[Python-Dev] [Python-3000] Removing 'self' from methoddefinitions (original) (raw)
Terry Reedy tjreedy at udel.edu
Thu Apr 13 22:55:19 CEST 2006
- Previous message: [Python-Dev] [Python-3000] Removing 'self' from method definitions
- Next message: [Python-Dev] Building Python with the free MS Toolkit compiler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"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
- Previous message: [Python-Dev] [Python-3000] Removing 'self' from method definitions
- Next message: [Python-Dev] Building Python with the free MS Toolkit compiler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]