From bca1169e94f81b140629ae69ce2ab33628d26b08 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 28 Feb 2010 18:19:17 +0000 Subject: [PATCH] #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. --- Objects/dictobject.c | 4 ++-- Objects/listobject.c | 2 +- Objects/setobject.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Objects/dictobject.c b/Objects/dictobject.c index b20d6f36e9a..517c20c2fc5 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -2330,9 +2330,9 @@ PyDoc_STRVAR(dictionary_doc, "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)"); diff --git a/Objects/listobject.c b/Objects/listobject.c index c55524d5b1f..d7103744249 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2537,7 +2537,7 @@ static PySequenceMethods list_as_sequence = { 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 * diff --git a/Objects/setobject.c b/Objects/setobject.c index 81fd31580e4..45a9afc2dc7 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -2102,7 +2102,7 @@ static PyNumberMethods set_as_number = { }; 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 @@ static PyNumberMethods frozenset_as_number = { }; PyDoc_STRVAR(frozenset_doc, -"frozenset(iterable) --> frozenset object\n\ +"frozenset(iterable) -> frozenset object\n\ \n\ Build an immutable unordered collection of unique elements.");