[issue11318] Python 3.2 FAQ example code typo?

R. David Murray report at bugs.python.org
Fri Feb 25 14:27:40 CET 2011


R. David Murray <rdmurray at bitdance.com> added the comment:

Hmm.  Rereading your message, is seems like you just didn't understand the statement "c.count refers to C.count for any...".  That is a statement about how the language behaves.  If there is not yet an instance variable 'count', but a class variable 'count' exists, then the value of the class variable is used when c.count is evaluated.  A class is a two level nested name space with a couple of special properties.

I don't really see any way to make that statement clearer.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11318>
_______________________________________


More information about the Python-bugs-list mailing list