[Python-Dev] Property syntax (Re: [Python-Dev] Extended Function syntax)

Guido van Rossum guido@python.org
2003年1月30日 20:26:58 -0500


> Some more thoughts on property syntax...

Actually I was attempting to find a solution not just for properties
but for other situations as well. E.g. someone might want to define
capabilities, or event handlers, or ...
> (1) It's a pity "access" was revoked as a keyword, since
> it would have fitted quite well:
>> access foo:
> def __get__(self):
> ...
> def __set__(self, x):
> ...
>> Is there any chance it could be reinstated?

Not really. Anyway, I don't know what you expect the above to do.
> (2) Maybe "property" could be recognised as a pseudo-keyword
> when it's the first word of a statement inside a class
> definition.

See above. I'd like to find something that goes beyond properties.
--Guido van Rossum (home page: http://www.python.org/~guido/)

AltStyle によって変換されたページ (->オリジナル) /