[Python-Dev] Property syntax (Re: [Python-Dev] Extended Function syntax)
holger krekel
pyth@devel.trillke.net
Fri, 31 Jan 2003 12:07:20 +0100
Fredrik Lundh wrote:
> Shane wrote:
>
> > Greg Ewing wrote:
> > > def foo as property:
> > > def __get__(self):
> > > ...
> > > def __set__(self, x):
> > > ...
> >
> > The above syntax seems to be particularly easy to read and
> > understand
>
> except that "binding-statement name1 as name2" already has a
> different meaning in Python.
What would you think of 'is' then?
def name(...) is classmethod:
doesn't ring confusing bells IMO. I certainly like it
more than some brackets which you don't even know
how to pronounce. Moreover the original chaining e.g.
def name(...) is classmethod, syncmethod:
still reads well IMO.
holger