Hi, trying to have two class that reference each others, in the same file. What would be the best way to have this working:
class Foo(object):
other = Bar
class Bar(object):
other = Foo
if __name__ == '__main__':
print 'all ok'
?
The problem seems to be that since the property is on the class, since it tries to executes as soon as the class itself is parsed.
Is there a way to solve that?
edit:
those keys are used for SQLAlchemy mapping, to they realy are class variables (not instance).