classmethod & staticmethod

Neil Cerutti horpner at
Wed Jul 25 13:26:32 CEST 2007

On 2007-07-25, Alex Popescu <nospam.themindstorm at> wrote:
> Neil Cerutti <horpner at> wrote in news:eRwpi.36813$G23.28496
>> On 2007-07-25, Alex Popescu <nospam.themindstorm at> 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. 
> I must confess that I am a bit confused by this advise, as both
> are returning exactly the same thing.

Oops! I misthought myself.

I was thinking of MyClass.__dict__.keys() and

Neil Cerutti
To succeed in the world it is not enough to be stupid, you must also be well-
mannered. --Voltaire

More information about the Python-list mailing list