summaryrefslogtreecommitdiffstats
path: root/Doc/library/types.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/types.rst')
-rw-r--r--Doc/library/types.rst18
1 files changed, 10 insertions, 8 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index ddb7e7d..e3cbef5 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -86,15 +86,17 @@ The module defines the following names:
.. data:: GetSetDescriptorType
- The type of objects defined in extension modules with ``PyGetSetDef``, such as
- ``FrameType.f_locals`` or ``array.array.typecode``. This constant is not
- defined in implementations of Python that do not have such extension types, so
- for portable code use ``hasattr(types, 'GetSetDescriptorType')``.
+ The type of objects defined in extension modules with ``PyGetSetDef``, such
+ as ``FrameType.f_locals`` or ``array.array.typecode``. This type is used as
+ descriptor for object attributes; it has the same purpose as the
+ :class:`property` type, but for classes defined in extension modules.
.. data:: MemberDescriptorType
- The type of objects defined in extension modules with ``PyMemberDef``, such as
- ``datetime.timedelta.days``. This constant is not defined in implementations of
- Python that do not have such extension types, so for portable code use
- ``hasattr(types, 'MemberDescriptorType')``.
+ The type of objects defined in extension modules with ``PyMemberDef``, such
+ as ``datetime.timedelta.days``. This type is used as descriptor for simple C
+ data members which use standard conversion functions; it has the same purpose
+ as the :class:`property` type, but for classes defined in extension modules.
+ In other implementations of Python, this type may be identical to
+ ``GetSetDescriptorType``.