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/024903.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>"Gisle Aas gisle@ActiveState.com
02 Jun 2002 08:40:49 -0700
Matthias Urlichs <smurf@noris.de> writes:

> Since this addition is by reference to the actual object and not to
> the symbol's name in the other module, a concept which Python doesn't
> have (use Perl if you want this...)

Perl doesn't add references to names.  It imports direct reference as
well.  The difference is that perl will create the named object in the
exporting package when it is imported, if the exporting package's init
code has not executed yet.

In Perl this works because we at import time know if we are importing
a variable (and what kind) or a function, and later assignments to
variables or redefinitions of functions mutate the object in-place.

Regards,
Gisle Aas




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