[Python-Dev] improvement to declaring abstract properties

Darren Dale dsdale24 at gmail.com
Mon Mar 28 15:30:30 CEST 2011


On Sat, Mar 19, 2011 at 3:06 PM, Darren Dale <dsdale24 at gmail.com> wrote:
> I suggested at python-ideas a way that the declaration of abstract
> properties could be improved to support the decorator syntax:
> http://mail.python.org/pipermail/python-ideas/2011-March/009411.html .
> A relatively small change to the property builtin would allow
> properties to identify themselves as abstract when they are passed
> abstract methods (the same way that function objects identify
> themselves as abstract when decorated with @abstractmethod). As a
> result, @abstractproperty would no longer be needed.
>
>  I submitted a patch at http://bugs.python.org/issue11610. It includes
> the changes to the property builtin, documentation, and unit tests.

This patch has been improved so it only touches abc.abstractproperty.
"make test" yields the same results with and without the patch. As a
result of the review (http://bugs.python.org/review/11610/show), the
documentation was improved to make it clear that the changes are
backward compatible. The reviewer seemed satisfied and provided some
encouraging feedback, but will not be available to guide the patch to
submission. So I am soliciting for another core committer to continue
the review and hopefully apply the changes for python-3.3.

Thanks,
Darren


More information about the Python-Dev mailing list