On Sun, Jul 22, 2012 at 8:29 PM, Chris Angelico <ros...@gmail.com> wrote: > On Mon, Jul 23, 2012 at 10:24 AM, Steven D'Aprano > <steve+comp.lang.pyt...@pearwood.info> wrote: >> Not quite: they have to be an instance of that class. ----8<---- > Hmm. I would have thought that methods were like all other functions: > they take their arguments and do code with them. Duck typing and all. > I stand corrected, then.
On Python 3 you are correct. >>> class A: ... def print(self): ... print(self) ... >>> A.print(2) 2 -- Devin -- http://mail.python.org/mailman/listinfo/python-list