Circular package references

Serge Beaumont serge at sergebeaumont.com
Tue Aug 8 07:21:12 EDT 2000


Hello all,

I've looked everywhere: the docs, FAQs, dejanews and c.l.py. But I can't
find an answer to my questions:

- Are circular package references allowed in Python? I think not, from
the exceptions I get... or there's something I'm not doing right.

- When two classes reference each other, MUST they be in the same
package?

- I don't understand the global keyword either. Could this be a help
here?

My situation:
thing.py -> class Thing -> imports allThings
thinglist.py -> class ThingList -> imports Thing
globals.py -> allThings (variable) -> imports ThingList

Serge.

www.sergebeaumont.com
serge at sergebeaumont.com




More information about the Python-list mailing list