[Python-checkins] r78515 - in python/trunk/Objects: dictobject.c listobject.c setobject.c

georg.brandl python-checkins at python.org
Sun Feb 28 19:19:18 CET 2010


Author: georg.brandl
Date: Sun Feb 28 19:19:17 2010
New Revision: 78515
Log:
#8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object.
Modified:
 python/trunk/Objects/dictobject.c
 python/trunk/Objects/listobject.c
 python/trunk/Objects/setobject.c
Modified: python/trunk/Objects/dictobject.c
==============================================================================
--- python/trunk/Objects/dictobject.c	(original)
+++ python/trunk/Objects/dictobject.c	Sun Feb 28 19:19:17 2010
@@ -2330,9 +2330,9 @@
 "dict() -> new empty dictionary.\n"
 "dict(mapping) -> new dictionary initialized from a mapping object's\n"
 " (key, value) pairs.\n"
-"dict(seq) -> new dictionary initialized as if via:\n"
+"dict(iterable) -> new dictionary initialized as if via:\n"
 " d = {}\n"
-" for k, v in seq:\n"
+" for k, v in iterable:\n"
 " d[k] = v\n"
 "dict(**kwargs) -> new dictionary initialized with the name=value pairs\n"
 " in the keyword argument list. For example: dict(one=1, two=2)");
Modified: python/trunk/Objects/listobject.c
==============================================================================
--- python/trunk/Objects/listobject.c	(original)
+++ python/trunk/Objects/listobject.c	Sun Feb 28 19:19:17 2010
@@ -2537,7 +2537,7 @@
 
 PyDoc_STRVAR(list_doc,
 "list() -> new list\n"
-"list(sequence) -> new list initialized from sequence's items");
+"list(iterable) -> new list initialized from iterable's items");
 
 
 static PyObject *
Modified: python/trunk/Objects/setobject.c
==============================================================================
--- python/trunk/Objects/setobject.c	(original)
+++ python/trunk/Objects/setobject.c	Sun Feb 28 19:19:17 2010
@@ -2102,7 +2102,7 @@
 };
 
 PyDoc_STRVAR(set_doc,
-"set(iterable) --> set object\n\
+"set(iterable) -> new set object\n\
 \n\
 Build an unordered collection of unique elements.");
 
@@ -2200,7 +2200,7 @@
 };
 
 PyDoc_STRVAR(frozenset_doc,
-"frozenset(iterable) --> frozenset object\n\
+"frozenset(iterable) -> frozenset object\n\
 \n\
 Build an immutable unordered collection of unique elements.");
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /