[Python-Dev] PEP 318: Let's propose some useful built-in decorators (original) (raw)
Phillip J. Eby pje at telecommunity.com
Sat Apr 3 12:32:37 EST 2004
- Previous message: [Python-Dev] PEP 318: Let's propose some useful built-in decorators
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 09:07 AM 4/3/04 -0800, Guido van Rossum wrote:
> > We could also add a standard implementation of synchronized. Or > > perhaps that should be imported from threading. (But is that really > > a good thing to copy from Java?) > > I don't want to sound FUDdy, but I was under the impression that > people didn't think this is something we actually want...
Hence my parenthetical remark. But given that it is quite simple to do using decorators, surely someone will implement it. How useful it will be remains to be seen. Maybe someone should take this idea, run with it, and report how it enhanced their project?
For what it's worth, Jim Fulton's ExtensionClass package has had a "synchronized" metaclass implemented in C since about... 1997? I don't know of anybody actually using it, though.
For my few dabblings into objects being shared across threads, though, I've typically needed rather precise control over when things get locked and unlocked and how, so I've never bothered implementing a synchronizing decorator.
- Previous message: [Python-Dev] PEP 318: Let's propose some useful built-in decorators
- Next message: [Python-Dev] PEP 318: Properties
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]