Reference class in class creation

Éric Daigneault daigno at gmail.com
Tue Nov 21 15:19:11 EST 2006


oops...

Change :
class SomeContainer(object):
    a = SomeElement(self)


for
class SomeContainer(object):
    pass

container = SomeContainer()

element = SomeElement(container)

would certainly make more sense...

Eric :D.



More information about the Python-list mailing list