[Python-Dev] Property syntax

Gerald S. Williams gsw@agere.com
Fri, 31 Jan 2003 16:18:14 -0500


Guido van Rossum wrote:
> >     def C as class:
> >         suite
> 
> Um, the whole point of this syntax is that property, synchronized
> etc. do *not* have to be keywords -- they are just callables.

How many different types of parsing are needed? Could
some small number of keywords that determine how the
thunk is parsed be intermixed in the same context as
the thunk-aware objects?

def C(B) as class:
    def spam() as staticmethod function: ...
    def spamspam(klass) as classmethod generator: ...
    def spamspamspam as class property: ...

-Jerry