This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Retro, docs@python, eric.araujo, georg.brandl, r.david.murray
Date 2011-02-26.01:28:55
SpamBayes Score 3.003377e-05
Marked as misclassified No
Message-id <1298683736.1.0.728046989161.issue11318@psf.upfronthosting.co.za>
In-reply-to
Content
What this part means is: “If you create an instance of C named c, and get c.count, it will get the attribute count defined on C.”  IOW: You can get a class variable from any instance.

In the example, the code in __init__ cannot assign to self.count, because it wants to increment the attribute on the class, not on the instance.  This is very well explained in Dive Into Python.

Please experiment in a shell and ask on appropriate venues after this message.
History
Date User Action Args
2011-02-26 01:28:56eric.araujosetrecipients: + eric.araujo, georg.brandl, Retro, r.david.murray, docs@python
2011-02-26 01:28:56eric.araujosetmessageid: <1298683736.1.0.728046989161.issue11318@psf.upfronthosting.co.za>
2011-02-26 01:28:55eric.araujolinkissue11318 messages
2011-02-26 01:28:55eric.araujocreate