A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-February/086297.html below:

[Python-Dev] Choosing a best practice solution for Python/extension modules

[Python-Dev] Choosing a best practice solution for Python/extension modules [Python-Dev] Choosing a best practice solution for Python/extension modulesGreg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 21 06:14:39 CET 2009
Daniel Stutzbach wrote:

> No, I'm afraid Brett is quite right.  Globals are looked up when the 
> function is executed, true, but they are looked up within the module 
> that defined the function.

I was thinking you could fix that by going over the
imported functions and stuffing the current globals
into their func_globals, but unfortunately it's
read-only. :-(

 >>> f.func_globals = g
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: readonly attribute

Is there a reason it couldn't be made writeable?

-- 
Greg
More information about the Python-Dev 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