A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/024896.html below:

[Python-Dev] intra-package mutual imports fail: "from <pkg> import <mod>"

[Python-Dev] intra-package mutual imports fail: "from <pkg> import <mod>" [Python-Dev] intra-package mutual imports fail: "from <pkg> import <mod>"Guido van Rossum guido@python.org
Sun, 02 Jun 2002 09:25:08 -0400
> >          module5.py:
> >              from package import module6   # absolute import
> >
> >          module6.py:
> >              from package import module5
> >  [...]
> >      ImportError: cannot import name module5
> >
> >  Is this behavior expected?  Or is it a bug?
> 
> The problem is that importing with from consists of two steps:
> - load the module
> - add the imported names to the local namespace

Good explanation!  This means it's an unavoidable problem.  Maybe you
can fix the FAQ entry?

--Guido van Rossum (home page: http://www.python.org/~guido/)




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