Author dsdale24
Recipients Darren.Dale, benjamin.peterson, daniel.urban, dsdale24, ncoghlan, ned.deily
Date 2011-05-14.22:36:34
SpamBayes Score 4.49405e-07
Marked as misclassified No
Message-id <BANLkTikznqPySO+Z3NyXBPg+4bVX_t6LVQ@mail.gmail.com>
In-reply-to <BANLkTimjxvpagN8T6577riE90j+VncTL3A@mail.gmail.com>
Content
On Sat, May 14, 2011 at 6:24 PM, Benjamin Peterson
<report@bugs.python.org> wrote:
>
> Benjamin Peterson <benjamin@python.org> added the comment:
>
> 2011/5/14 Darren Dale <report@bugs.python.org>:
>>
>> Darren Dale <dsdale24@gmail.com> added the comment:
>>
>> It definitely is a common case, and always will be. You can't begin
>> using abstractproperty.abstract(getter/setter/deleter) until you have
>> an abstract property, which requires passing a (potentially abstract)
>> method to the constructor.
>
> What about
>
> @abstractproperty
> def something(): pass
>
> @abstractproperty.setter
> def set(): pass
>
> @abstractproperty.deleter
> def delete: pass
>
> requires you to pass a method (explicitly) to a constructor?

@abstractproperty
def something(): pass

takes the "something" function and passes it to the abstractproperty()
constructor.

It doesn't appear that you are familiar with how the decorator syntax
works for properties. Here is how your example should probably look:

@abstractproperty
def something(): pass

@something.setter
def something(): pass

@something.deleter
def something(): pass
History
Date User Action Args
2011-05-14 22:36:35dsdale24setrecipients: + dsdale24, ncoghlan, benjamin.peterson, ned.deily, daniel.urban, Darren.Dale
2011-05-14 22:36:34dsdale24linkissue11610 messages
2011-05-14 22:36:34dsdale24create