class variable declarations...
Lee John Moore
leej at dsl.pipex.com
Mon Jun 16 18:22:11 CEST 2003
One may as well begin with Peter Hansen's letter to comp.lang.python:
Pardon the snipping. I'm a bit worried about leaving too much
in for the sake of mailing list bandwidth. :)
> *All* instances that are created automatically have access to
> this shared value because it is a *class* attribute, rather
> than an instance attribute. All the items prefixed with self.
> are instance attributes, and pertain only to a single instance
> of a class, never to all instances.
You've helped me realise where I misunderstood the original
respondent. It's only obvious after reading your message
though. Thanks for explaining. Much appreciated. :)
"However far you may travel in this world, you
will still occupy the same volume of space."
- Traditional Ur-Bororo saying
More information about the Python-list