[Python-Dev] draft PEP: Trace and Profile Support for Threads

Samuele Pedroni pedronis@bluewin.ch
Fri, 25 Apr 2003 02:17:28 +0200


At 19:22 24.04.03 -0400, Aahz wrote:
>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.

see the following thread

http://aspn.activestate.com/ASPN/Mail/Message/1497615