[Python-checkins] cpython (3.3): correct defaultdict signature in docstring (closes #20250)

benjamin.peterson python-checkins at python.org
Tue Jan 14 05:56:43 CET 2014


http://hg.python.org/cpython/rev/d46bf7835b45
changeset:   88459:d46bf7835b45
branch:      3.3
parent:      88456:7f176a45211f
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Jan 13 23:56:05 2014 -0500
summary:
  correct defaultdict signature in docstring (closes #20250)

Patch from Andrew Barnert.

files:
  Modules/_collectionsmodule.c |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -1625,11 +1625,13 @@
 }
 
 PyDoc_STRVAR(defdict_doc,
-"defaultdict(default_factory) --> dict with default factory\n\
+"defaultdict(default_factory[, ...]) --> dict with default factory\n\
 \n\
 The default factory is called without arguments to produce\n\
 a new value when a key is not present, in __getitem__ only.\n\
 A defaultdict compares equal to a dict with the same items.\n\
+All remaining arguments are treated the same as if they were\n\
+passed to the dict constructor, including keyword arguments.\n\
 ");
 
 /* See comment in xxsubtype.c */

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list