A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/072281.html below:

#include equivalent

#include equivalentMichael Hudson mwh21 at cam.ac.uk
Tue Apr 3 04:06:44 EDT 2001
kragen at dnaco.net (Kragen Sitaker) writes:

> Yeah, but there are problems with execfile():
> - it puts all the stuff in that file in *your* namespace (not a separate one)
> - circular execfile()s will hang your program and eventually crash
...
> - execfile()ing the same file from two different modules generates two
...
>   - It takes more time (potentially *much* more time) 
>   - it takes more space (potentially *much* more space)
>   - it breaks objects that try to determine whether other objects are
...
>   - and it breaks any modules that try to maintain module state (like
...

So much more like #include then!

> So don't use execfile() instead of import.

Well, no, but that not really what was being proposed, was it?
Someone asked for an #include equivalent, and while import is probably
want they wanted, execfile is closer.  Different things.

Cheers,
M.

-- 
  I'm not particularly fond of singing GSTQ because she stands for
  some things I don't, but it's not really worth letting politics
  getting in the way of a good bawling.
                                            -- Dan Sheppard, ucam.chat

More information about the Python-list mailing list

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