Back to index

python3.2  3.2.2
Static Private Attributes
abc.abstractproperty Class Reference

List of all members.

Static Private Attributes

 __isabstractmethod__ = True

Detailed Description

A decorator indicating abstract properties.

Requires that the metaclass is ABCMeta or derived from it.  A
class that has a metaclass derived from ABCMeta cannot be
instantiated unless all of its abstract properties are overridden.
The abstract properties can be called using any of the normal
'super' call mechanisms.

Usage:

    class C(metaclass=ABCMeta):
        @abstractproperty
        def my_abstract_property(self):
            ...

This defines a read-only property; you can also define a read-write
abstract property using the 'long' form of property declaration:

    class C(metaclass=ABCMeta):
        def getx(self): ...
        def setx(self, value): ...
        x = abstractproperty(getx, setx)

Definition at line 68 of file abc.py.


Member Data Documentation

Definition at line 92 of file abc.py.


The documentation for this class was generated from the following file: