Access from a class attribute

Kless jonas.esp at googlemail.com
Thu Jun 4 11:01:52 CEST 2009


Why can not to access from a class attribute to a function of that
class?

-----------------
class Foo(object):
   attr = __class__.__name__
   attr = self.__class__.__name__
-----------------



More information about the Python-list mailing list