"Jim Jewett" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>    >>> # No syntax errors when creating m()
>    >>> class C:
>        def m(): pass
>
> but the method can't actually be called

Unless it is wrapped as a staticmethod ;-)

...
>    >>> C().m()
>
>    Traceback (most recent call last):
>      File "<pyshell#102>", line 1, in -toplevel-
>        C().m()
>    TypeError: m() takes no arguments (1 given)
>
> Could it at least say something like "(1 given, including self)"?

or perhaps '(self + 0 given' or '(instance + 0 more given)'

Terry Jan Reedy



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to