getting a reference to a class inside its definition
Daniel Dittmar
daniel.dittmar at sap.com
Mon Jun 18 11:50:01 EDT 2001
> Still, I want to be able to reference a class inside it's own definition.
> Is this possible or am I going to have to do
It depends on what you try to achieve. If you want to access class variables
inside the class definition, do so without any qualification:
class SomeClass:
hello = 'hello'
world = 'world'
greeting = hello + ', ' + world
print SomeClass.greeting
Daniel
More information about the Python-list
mailing list