[Python-checkins] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179)
Raymond Hettinger
webhook-mailer at python.org
Tue Sep 5 19:23:51 EDT 2017
https://github.com/python/cpython/commit/faa57cbe7074b26807cd7ed89a7b173b5cbf3086
commit: faa57cbe7074b26807cd7ed89a7b173b5cbf3086
branch: master
author: Jonathan Eunice <jonathan.eunice at gmail.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2017-09-05T16:23:49-07:00
summary:
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
files:
M Lib/collections/__init__.py
M Objects/odictobject.c
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 8408255d27e..70cb683088b 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -85,9 +85,7 @@ class OrderedDict(dict):
def __init__(*args, **kwds):
'''Initialize an ordered dictionary. The signature is the same as
- regular dictionaries, but keyword arguments are not recommended because
- their insertion order is arbitrary.
-
+ regular dictionaries. Keyword argument order is preserved.
'''
if not args:
raise TypeError("descriptor '__init__' of 'OrderedDict' object "
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index c3d1a09584e..e1ee53beae6 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -882,8 +882,7 @@ odict_eq(PyObject *a, PyObject *b)
PyDoc_STRVAR(odict_init__doc__,
"Initialize an ordered dictionary. The signature is the same as\n\
- regular dictionaries, but keyword arguments are not recommended because\n\
- their insertion order is arbitrary.\n\
+ regular dictionaries. Keyword argument order is preserved.\n\
\n\
");
More information about the Python-checkins
mailing list