hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of modules in c is a purely preproces
max(01)* wrote:
> hi everybody.
>
> suppose that code-1.py imports code-2.py and code-3.py (because it uses
> names from both), and that code-2.py imports code-3.py.
>
> if python were c, code-1.c should only *include* code-2.c, because the
> latter in turns includes code-3.c.
>
> inclusion of
er modules? That
would pretty much defeat most of the value of
namespaces.
Anyway, why this concern over so-called redundant
imports? The source code itself is not parsed
and compiled all over again, and even the .pyc file
is not re-read... once any module has imported a
module any other import
Tim Jarman wrote:
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it uses
names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, because the
latter in turns includes code-3.c.
inclusion of mod
amespaces.
Anyway, why this concern over so-called redundant
imports? The source code itself is not parsed
and compiled all over again, and even the .pyc file
is not re-read... once any module has imported a
module any other import just retrieves a reference
to that module from the sys.modules dictionary
max(01)* wrote:
this leads me to another question. since *.pyc files are automatically
created the first time an import statement in executed on a given
module, i guess that if i ship a program with modules for use in a
directory where the user has no write privileges then i must ship the
*.pyc
Peter Hansen wrote:
max(01)* wrote:
this leads me to another question. since *.pyc files are automatically
created the first time an import statement in executed on a given
module, i guess that if i ship a program with modules for use in a
directory where the user has no write privileges then i
Peter Hansen wrote:
max(01)* wrote:
this leads me to another question. since *.pyc files are automatically
created the first time an import statement in executed on a given
module, i guess that if i ship a program with modules for use in a
directory where the user has no write privileges then i
"max(01)*" <[EMAIL PROTECTED]> writes:
> Peter Hansen wrote:
>> max(01)* wrote:
>>
>>> hi everybody.
>>>
>>> suppose that code-1.py imports code-2.py and code-3.py (because it
>>> uses names from both), and that code-2.py imports code-3.py.
>>>
>>> if python were c, code-1.c should only *include*
On Sat, 02 Apr 2005 16:44:29 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote:
>"max(01)*" <[EMAIL PROTECTED]> writes:
>
>> Peter Hansen wrote:
>>> max(01)* wrote:
>>>
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it
uses names from both), and that co
Mike Meyer wrote:
> The semantic behavior of "include" in C is the same as "from module
> import *" in python. Both cases add all the names in the included
> namespace directly to the including namespace. This usage is
> depreciated in Python ...
Did you mean discouraged? Or it's really slated f
Serge Orlov wrote:
Mike Meyer wrote:
The semantic behavior of "include" in C is the same as "from module
import *" in python. Both cases add all the names in the included
namespace directly to the including namespace. This usage is
depreciated in Python ...
Did you mean discouraged? Or it's real
Mike Meyer wrote:
"max(01)*" <[EMAIL PROTECTED]> writes:
Peter Hansen wrote:
max(01)* wrote:
hi everybody.
suppose that code-1.py imports code-2.py and code-3.py (because it
uses names from both), and that code-2.py imports code-3.py.
if python were c, code-1.c should only *include* code-2.c, bec
13 matches
Mail list logo