diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-08 22:11:11 (GMT) |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2016-09-08 22:11:11 (GMT) |
commit | 4f29e75289592991efcc65a96a2a4a995417b76e (patch) | |
tree | b6d0019f076909e11633cadc468a7822124965a3 /Doc/reference | |
parent | 7f730cf01d161f2d1793372a0852788ad5f4acb1 (diff) | |
download | cpython-4f29e75289592991efcc65a96a2a4a995417b76e.zip cpython-4f29e75289592991efcc65a96a2a4a995417b76e.tar.gz cpython-4f29e75289592991efcc65a96a2a4a995417b76e.tar.bz2 |
Issue #24254: Drop cls.__definition_order__.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 12 | ||||
-rw-r--r-- | Doc/reference/datamodel.rst | 7 |
2 files changed, 3 insertions, 16 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index ffdeae0..4fc6af0 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 00785ed..a075503 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 |