Brian May <[email protected]> writes:
> For example. if in module/__init__.py I have:
>
> import module.something
>
> I get an circular import loop.
Don't do that, then. Within the package ‘__init__’ module, don't refer
to the package.
Instead, use a relative import::
from . import foo
or::
from .foo import bar
See
<URL:http://docs.python.org/3.0/tutorial/modules.html#intra-package-references>.
--
\ “If nature has made any one thing less susceptible than all |
`\ others of exclusive property, it is the action of the thinking |
_o__) power called an idea” —Thomas Jefferson |
Ben Finney
_______________________________________________
melbourne-pug mailing list
[email protected]
https://mail.python.org/mailman/listinfo/melbourne-pug