summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-08 22:07:05 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-08 22:07:05 (GMT)
commit7adc776ea6ab808a4bf8fbf2740bb3bb9a7928a4 (patch)
treec9ba8bbc4fd541cd5761c5de0e92d782b3e3ddf0 /Doc/library
parent24f3c5c646d26350e4de6a878fed3e6db1e4ff9a (diff)
downloadcpython-7adc776ea6ab808a4bf8fbf2740bb3bb9a7928a4.zip
cpython-7adc776ea6ab808a4bf8fbf2740bb3bb9a7928a4.tar.gz
cpython-7adc776ea6ab808a4bf8fbf2740bb3bb9a7928a4.tar.bz2
Issue 2408: remove the _types module
It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType), when they can easily be obtained with python code. These expressions even work with Jython. I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 ) at least this change makes it simpler.
Diffstat (limited to 'Doc/library')
-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 b5e3830..6c90ec9 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -233,20 +233,22 @@ 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.
.. versionadded:: 2.5
.. 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``.
.. versionadded:: 2.5