I have two files: node.py and path.py , which define two classes: Node and Path respectively.
Until today, the Path definition was referencing a Node object, and so I did
from node.py import *
in the path.py file.
However, to date, I have created a new method for Node that references a Path object.
I had problems trying to import path.py : I tried this, and when the program started and called the Path method, which uses Node , the exception grew around Node , which is not defined.
What should I do?
python circular-dependency
Ram Rachum May 21 '09 at 20:08 2009-05-21 20:08
source share