Problem with python 3.2 and circular imports
ben+python at benfinney.id.au
Sun Feb 27 13:44:46 CET 2011
"Frank Millman" <frank at chagford.com> writes:
> Assume the following structure -
> from pkg import mod1
> import mod2
> import mod1
What are you expecting the result to be?
If it's about sharing objects between the modules, why not break the
circular dependency: factor out the common code to a module that both
the others import?
> Any comments or suggestions will be appreciated.
Special cases aren't special enough to break the rules. If you think you
have a practical reason to do so, it would be best to make it explicit
when asking for help about this.
\ “The long-term solution to mountains of waste is not more |
`\ landfill sites but fewer shopping centres.” —Clive Hamilton, |
_o__) _Affluenza_, 2005 |
More information about the Python-list