bpo-33866: enum: Stop using OrderedDict (GH-7698)

This commit is contained in:
INADA Naoki 2018-06-19 01:14:26 +09:00 committed by GitHub
parent ea3dc8029a
commit e57f91a0f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 15 deletions

View file

@ -281,7 +281,7 @@ Iterating over the members of an enum does not provide the aliases::
>>> list(Shape)
[<Shape.SQUARE: 2>, <Shape.DIAMOND: 1>, <Shape.CIRCLE: 3>]
The special attribute ``__members__`` is an ordered dictionary mapping names
The special attribute ``__members__`` is a read-only ordered mapping of names
to members. It includes all names defined in the enumeration, including the
aliases::
@ -998,7 +998,7 @@ Finer Points
Supported ``__dunder__`` names
""""""""""""""""""""""""""""""
:attr:`__members__` is an :class:`OrderedDict` of ``member_name``:``member``
:attr:`__members__` is a read-only ordered mapping of ``member_name``:``member``
items. It is only available on the class.
:meth:`__new__`, if specified, must create and return the enum members; it is