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/024911.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 09:44:25 -0700
"Matthias Urlichs" <smurf@noris.de> writes:

> Gisle Aas:
> > Perl doesn't add references to names.  It imports direct reference as
> > well.
> 
> What I meant to say was: Perl shares the actual symbol table slot when you
> import something;

Wrong.  If you do:

   package Bar;
   use Foo qw(foo);

Then you end up with \&Bar::foo and \&Foo:foo pointing to the same
function object, but the symbol table slots are independent.  Is is
exactly the same situation you would have in Python with two namespace
dicts pointing to the same function object.

But you can achieve sharing by explicit import of the symbol (aka
glob) using something like:

   use Foo qw(*foo);

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