Why do class methods always need 'self' as the first parameter?

Javier Collado javier.collado at gmail.com
Wed Aug 31 11:10:45 EDT 2011


2011/8/31 T. Goodchild <tgoodchild at gmail.com>:
> But one of the things that bugs me is the requirement that all class
> methods have 'self' as their first parameter.  On a gut level, to me
> this seems to be at odds with Python’s dedication to simplicity.

I think the answer to this question is part of the zen of python:
<<Explicit is better than implicit.>>



More information about the Python-list mailing list