A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-April/063717.html below:

[Python-Dev] [Python-3000] Removing 'self' from methoddefinitions

[Python-Dev] [Python-3000] Removing 'self' from methoddefinitions [Python-Dev] [Python-3000] Removing 'self' from methoddefinitionsTerry Reedy tjreedy at udel.edu
Thu Apr 13 22:55:19 CEST 2006
"Jim Jewett" <jimjjewett at gmail.com> wrote in message 
news:fb6fbf560604131154o1b5ef33fg19d8c01a7e887118 at mail.gmail.com...
>    >>> # 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



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4