From: Raymond Hettinger Date: Thu, 9 Apr 2009 22:34:23 +0000 (+0000) Subject: Add note on using keyword arguments with OrderedDict. X-Git-Tag: v3.1b1~330 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3618078cd67cb9cc4e4cdedd22b7a628bbb7fc6b;p=thirdparty%2FPython%2Fcpython.git Add note on using keyword arguments with OrderedDict. --- diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 2e6a53782816..e27d89ae84fd 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -852,6 +852,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 `_