]> granicus.if.org Git - python/commitdiff
[3.6] bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (GH-2179) (GH-3370)
authorMariatta <Mariatta@users.noreply.github.com>
Wed, 6 Sep 2017 01:13:07 +0000 (18:13 -0700)
committerGitHub <noreply@github.com>
Wed, 6 Sep 2017 01:13:07 +0000 (18:13 -0700)
* 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 faa57cbe7074b26807cd7ed89a7b173b5cbf3086)

Lib/collections/__init__.py
Objects/odictobject.c

index 85b4c3c19acc39008b893db4a31c463f34dd1710..1d6822a3a0b5e5e1ae591c45214dd6d57b488e00 100644 (file)
@@ -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 "
index f9f1bf362e7e4db4af6ef8fe81f94186bb97ded3..9e891152affbdc371dca646859d7b841bfb3e151 100644 (file)
@@ -875,8 +875,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\
         ");