[Python-Dev] draft PEP: Trace and Profile Support for Threads
Aahz
aahz@pythoncraft.com
Thu, 24 Apr 2003 19:22:48 -0400
On Wed, Apr 23, 2003, Guido van Rossum wrote:
> Aahz:
>>
>> Seems to me that this is a good argument for module-level properties,
>> BTW, or we require that all module attributes be set only through
>> functions.
>
> I'm not following. What do you mean by module-level properties?
Data descriptors on module objects. Let's suppose we have, say, a BCD
module. For example, we want to set the "global" rounding state on a
per-thread basis. By definition, modules are singletons, so there needs
to be a container within the module to hold the per-thread rounding
state. Question is, how/when do we update that container? Currently,
the only option is to require a user to call a function with the new
setting as a parameter; I can imagine cases where it would be convenient
to be able to simply set the module attribute, exactly the way we now
permit with new-style classes.
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/
Why is this newsgroup different from all other newsgroups?