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

Matthias Urlichs smurf@noris.de
Sun, 2 Jun 2002 18:05:37 +0200


Hi,

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; so a later reassignment to the variable in question will
affect every module.

Python doesn't have that additional indirection.

> 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.
> 
... which is essentially a different way to state the same thing. ;-)

-- 
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/