Darren Dale <[email protected]> added the comment: On Sat, May 14, 2011 at 6:24 PM, Benjamin Peterson <[email protected]> wrote: > > Benjamin Peterson <[email protected]> added the comment: > > 2011/5/14 Darren Dale <[email protected]>: >> >> Darren Dale <[email protected]> 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 ---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue11610> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
