Skip to content

Commit faa57cb

Browse files
jonathaneunicerhettinger
authored andcommitted
bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)
* 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
1 parent af46eb8 commit faa57cb

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
@@ -882,8 +882,7 @@ odict_eq(PyObject *a, PyObject *b)
882882

883883
PyDoc_STRVAR(odict_init__doc__,
884884
"Initialize an ordered dictionary. The signature is the same as\n\
885-
regular dictionaries, but keyword arguments are not recommended because\n\
886-
their insertion order is arbitrary.\n\
885+
regular dictionaries. Keyword argument order is preserved.\n\
887886
\n\
888887
");
889888

0 commit comments

Comments
 (0)