Reference class in class creation

Éric Daigneault daigno at gmail.com
Tue Nov 21 21:19:11 CET 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