Torsten Bronger wrote: > I know that cyclic imports work in Python under certain > circumstances. Can anyone refer me to a page which explains when > this works?
I don't know of a specific URL offhand.
Cyclic imports are not a problem by themselves, but cyclic definitions are.
Thus:
# a.py
import b
x = 1
# b.py
import a
x = 2
works fine, but:
# a.py
import b
x = 1
# b.py
import a
x = a.x + 1 # circular definition
does not.
Jeffrey
--
http://mail.python.org/mailman/listinfo/python-list
