[Python-Dev] Extended Function syntax
Walter Dörwald
walter@livinglogic.de
Tue, 28 Jan 2003 12:11:56 +0100
Greg Ewing wrote:
> Oren Tirosh <oren-py-d@hishome.net>:
>
>
>>If the attributes of a property object are made assignable the following
>>code will work:
>>
>> prop = property()
>>
>> def prop.fget(self):
>> ...
>>
>> def prop.fset(self, value):
>> ...
>
>
> I'm not sure I like the need for the prop = property() part.
> It exposes too much of the implementation for my taste.
What happened to Guido's proposal?
class Foo(object):
property myprop:
"""A computed property on Foo objects."""
def __get__(self):
return ...
def __set__(self):
...
def __delete__(self):
...
(see http://mail.python.org/pipermail/python-dev/2002-February/020081.html)
Bye,
Walter Dörwald