Skip to content

Commit 3b9d444

Browse files
authored
[3.6] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (GH-2179) (GH-3370)
* fixed OrderedDict.__init__ docstring re PEP 468 * tightened comment and mirrored to C impl * added space after period per marco-buttu * preserved substituted for stable * drop references to Python 3.6 and PEP 468 (cherry picked from commit faa57cb)
1 parent c506403 commit 3b9d444

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Lib/collections/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ class OrderedDict(dict):
8585

8686
def __init__(*args, **kwds):
8787
'''Initialize an ordered dictionary. The signature is the same as
88-
regular dictionaries, but keyword arguments are not recommended because
89-
their insertion order is arbitrary.
90-
88+
regular dictionaries. Keyword argument order is preserved.
9189
'''
9290
if not args:
9391
raise TypeError("descriptor '__init__' of 'OrderedDict' object "

Objects/odictobject.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,7 @@ odict_eq(PyObject *a, PyObject *b)
875875

876876
PyDoc_STRVAR(odict_init__doc__,
877877
"Initialize an ordered dictionary. The signature is the same as\n\
878-
regular dictionaries, but keyword arguments are not recommended because\n\
879-
their insertion order is arbitrary.\n\
878+
regular dictionaries. Keyword argument order is preserved.\n\
880879
\n\
881880
");
882881

0 commit comments

Comments
 (0)