[Python-checkins] cpython: improve abstract property support (closes #11610)

Nick Coghlan ncoghlan at gmail.com
Fri Dec 16 00:18:16 CET 2011


On Fri, Dec 16, 2011 at 6:34 AM, benjamin.peterson
<python-checkins at python.org> wrote:
> +abc
> +---
> +
> +Improved support for abstract base classes containing descriptors composed with
> +abstract methods. The recommended approach to declaring abstract descriptors is
> +now to provide :attr:`__isabstractmethod__` as a dynamically updated
> +property. The built-in descriptors have been updated accordingly.
> +
> +  * :class:`abc.abstractproperty` has been deprecated, use :class:`property`
> +    with :func:`abc.abstractmethod` instead.
> +  * :class:`abc.abstractclassmethod` has been deprecated, use
> +    :class:`classmethod` with :func:`abc.abstractmethod` instead.
> +  * :class:`abc.abstractstaticmethod` has been deprecated, use
> +    :class:`property` with :func:`abc.abstractmethod` instead.
> +
> +(Contributed by Darren Dale in :issue:`11610`)

s/property/staticmethod/ in the final bullet point here.

Cheers,
Nick.
-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-checkins mailing list