A question on scope...

Wells Oliver wells at submute.net
Thu Jun 18 12:54:58 EDT 2009


In writing out python classes, it seems the 'self' is optional, meaning that
inside a class method, "self.foo = bar" has the same effect as "foo = bar".
Is this right? If so, it seems a little odd- what's the rationale?

Or am I mistaken?

-- 
Wells Oliver
wells at submute.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090618/bb8604f5/attachment.html>


More information about the Python-list mailing list