classmethod & staticmethod
Neil Cerutti
horpner at yahoo.com
Tue Jul 24 20:31:06 EDT 2007
On 2007-07-25, Alex Popescu <nospam.themindstorm at gmail.com> wrote:
> As a matter of style, how do you figure out that class_list is
> a class attribute and not an instance attribute? (I don't
> remember seeing anything in the PEP describing the coding
> style).
Check out dir(MyClass) and dir(MyClass()) for some insight, if it
turns out that it matters. Preferably, the user of a class
doesn't have to really think about it much.
--
Neil Cerutti
More information about the Python-list
mailing list