Reasoning behind 'self' parameter in classes?
bearophileHUGS at lycos.com
bearophileHUGS at lycos.com
Wed Jul 30 14:17:01 EDT 2008
Brett g Porter:
> Fredrik Lundh has written a very clear explanation of this athttp://effbot.org/pyfaq/why-must-self-be-used-explicitly-in-method-de...
Today lot of people know that Ruby exists, so such FAQ explanation
must explain why Python doesn't use a shorter syntax like for example
@foo to denote instance attributes (and maybe @@baz for the class
attributes).
Bye,
bearophile
More information about the Python-list
mailing list