summaryrefslogtreecommitdiff
path: root/Doc/reference
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2016-09-08 15:11:11 -0700
committerEric Snow <ericsnowcurrently@gmail.com>2016-09-08 15:11:11 -0700
commit761928cf31626534ebb81a6326c61b42050ef388 (patch)
tree172e6863bda2dea0b119600cc9d907fb1cd1c429 /Doc/reference
parentd5da00a9ba80db859f719e46a6b6874f4f144610 (diff)
downloadcpython-761928cf31626534ebb81a6326c61b42050ef388.tar.gz
Issue #24254: Drop cls.__definition_order__.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/compound_stmts.rst12
-rw-r--r--Doc/reference/datamodel.rst7
2 files changed, 3 insertions, 16 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index ffdeae04e5..4fc6af02f1 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -634,15 +634,9 @@ dictionary. The class name is bound to this class object in the original local
namespace.
The order in which attributes are defined in the class body is preserved
-in the ``__definition_order__`` attribute on the new class. If that order
-is not known then the attribute is set to :const:`None`. The class body
-may include a ``__definition_order__`` attribute. In that case it is used
-directly. The value must be a tuple of identifiers or ``None``, otherwise
-:exc:`TypeError` will be raised when the class statement is executed.
-
-.. versionchanged:: 3.6
-
- Add ``__definition_order__`` to classes.
+in the new class's ``__dict__``. Note that this is reliable only right
+after the class is created and only for classes that were defined using
+the definition syntax.
Class creation can be customized heavily using :ref:`metaclasses <metaclasses>`.
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 00785ed39c..a0755039f7 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1752,13 +1752,6 @@ additional keyword arguments, if any, come from the class definition).
If the metaclass has no ``__prepare__`` attribute, then the class namespace
is initialised as an empty ordered mapping.
-.. impl-detail::
-
- In CPython the default is :class:`collections.OrderedDict`.
-
-.. versionchanged:: 3.6
- Defaults to :class:`collections.OrderedDict` instead of :func:`dict`.
-
.. seealso::
:pep:`3115` - Metaclasses in Python 3000