From: Raymond Hettinger Date: Thu, 9 Apr 2009 22:31:51 +0000 (+0000) Subject: Add note on using keyword arguments with OrderedDict. X-Git-Tag: v2.7a1~1518 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c473c5aa9b18651b81f50ca2db95b0f890dad1d8;p=python Add note on using keyword arguments with OrderedDict. --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index ec0ae4b42f..d5702289c3 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -875,6 +875,10 @@ Equality tests between :class:`OrderedDict` objects and other This allows :class:`OrderedDict` objects to be substituted anywhere a regular dictionary is used. +The :class:`OrderedDict` constructor and :meth:`update` method both accept +keyword arguments, but their order is lost because Python's function call +semantics pass-in keyword arguments using a regular unordered dictionary. + .. seealso:: `Equivalent OrderedDict recipe `_