At 06:26 PM 4/21/2006 +0200, Thomas Wouters wrote: >On 4/21/06, guido.van.rossum ><<mailto:python-3000-checkins at python.org>python-3000-checkins at python.org> >wrote: >>The hardest part was fixing two mutual recursive imports; >>somehow changing "import foo" into "from . import foo" where >>foo and bar import each other AND both are imported from __init__.py >>caused things to break. Bah. > >Hm, this is possibly a flaw in the explicit relative import mechanism. Actually, this sounds rather like a problem that happens in Python 2.4 as well. If you have a package 'foo' containing modules 'bar' and 'baz', and foo/__init__.py imports both bar and baz, then 'import foo.bar' will fail inside of baz. You have to use 'from foo import bar' or it doesn't work. We run into this a lot in Chandler, which tries to expose package APIs from the package __init__ modules.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4