A question on scope...
bruno.42.desthuilliers at websiteburo.invalid
Fri Jun 19 05:43:54 EDT 2009
MRAB a écrit :
> Wells Oliver wrote:
NB : answering the OP (original post didn't show up on c.l.py ???)
>> In writing out python classes, it seems the 'self' is optional,
You mean, inside a method ?
>> meaning that inside a class method,
<warning topic="semantic issue">
In Python, a "class method" is a method that operates on the class
object itself instead of operating on an instance of the class.
>> "self.foo = bar" has the same
>> effect as "foo = bar". Is this right?
It's obviously false, cf MRAB's answer.
More information about the Python-list