PyChecker "self is argument in staticmethod"

Discussion in 'Python' started by Olaf Meding, Nov 18, 2004.

  1. Olaf Meding

    Olaf Meding Guest

    What does the below PyChecker warning mean?

    More importantly, is there a way to suppress it?

    PyChecker warning:
    ..\src\phaseid\integration.py:21: self is argument in staticmethod


    My best guess is that the warning is related to PyChecker not
    supporting C++ extensions.


    Thanks much for your help.

    Olaf
    Olaf Meding, Nov 18, 2004
    #1
    1. Advertising

  2. Olaf Meding

    Peter Hansen Guest

    Olaf Meding wrote:
    > What does the below PyChecker warning mean?
    >
    > More importantly, is there a way to suppress it?
    >
    > PyChecker warning:
    > ..\src\phaseid\integration.py:21: self is argument in staticmethod
    >
    > My best guess is that the warning is related to PyChecker not
    > supporting C++ extensions.


    Sounds like a pretty wild guess to me. ;-)

    c:\>c:\a\python23\python.exe
    c:\a\python23\Lib\site-packages\pychecker\checker.py test.py
    Processing test...

    Warnings...

    test.py:2: self is argument in staticmethod

    c:\>type test.py
    class A:
    def func(self, blah):
    pass

    func = staticmethod(func)


    Does your code look anything like the above? The warning message
    is very explicit about what is wrong here... a staticmethod
    should not really have a "self" parameter.

    -Peter
    Peter Hansen, Nov 18, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    16
    Views:
    519
  2. Tim Peters

    RE: PyChecker work with Python 2.3?

    Tim Peters, Aug 3, 2003, in forum: Python
    Replies:
    1
    Views:
    338
    John Machin
    Aug 4, 2003
  3. Pedro Werneck
    Replies:
    0
    Views:
    438
    Pedro Werneck
    Aug 18, 2003
  4. F. GEIGER
    Replies:
    0
    Views:
    301
    F. GEIGER
    Oct 19, 2003
  5. Neal Norwitz
    Replies:
    1
    Views:
    271
    Edward K. Ream
    Dec 2, 2003
Loading...

Share This Page