PEP 318: Function Modifier Syntax

Roman Suzi rnd at onego.ru
Tue Jun 10 00:03:17 EDT 2003


On Tue, 10 Jun 2003, Greg Ewing (using news.cis.dfn.de) wrote:

>Gerrit Holl wrote:
>> def synchonized(classmethod(foo(self)), lock)
>       ^^^^^^^
>
>I wonder what synchons are? Particles of synchronisation
>found in very fine-grained parallelism, maybe?

Probably all this fancy is needed by OOP funs to be able
to have syntactic support of all UML has in store for them.

What about this syntax then:

def m(args,...).classmethod().syncronized(lock):
  lalalalala

The new object "Function being defined" will appear as early
as def-statement and suffer all those tortures.

However, if it will go too far, "as" will be needed to know
what is being defined:

def synchonized(classmethod(method(self)), lock) as foo:
  hehehe  


>Hoping-my-python-interpreter-won't-tunnel-through-the-GIL,

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3






More information about the Python-list mailing list