summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-03-01 04:10:55 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-03-01 04:10:55 (GMT)
commit807e98e0afde0441349d9e627391a88e9f6fb9db (patch)
tree84bd79cd12457c9877db0913efb9842c410bf6c7
parentff3186401c0cd060a3d465914a4a9e521ed128f9 (diff)
downloadcpython-807e98e0afde0441349d9e627391a88e9f6fb9db.zip
cpython-807e98e0afde0441349d9e627391a88e9f6fb9db.tar.gz
cpython-807e98e0afde0441349d9e627391a88e9f6fb9db.tar.bz2
Merged revisions 78541 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78541 | ezio.melotti | 2010-03-01 06:08:34 +0200 (Mon, 01 Mar 2010) | 17 lines Merged revisions 78515-78516,78522 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78515 | georg.brandl | 2010-02-28 20:19:17 +0200 (Sun, 28 Feb 2010) | 1 line #8030: make builtin type docstrings more consistent: use "iterable" instead of "seq(uence)", use "new" to show that set() always returns a new object. ........ r78516 | georg.brandl | 2010-02-28 20:26:37 +0200 (Sun, 28 Feb 2010) | 1 line The set types can also be called without arguments. ........ r78522 | ezio.melotti | 2010-03-01 01:59:00 +0200 (Mon, 01 Mar 2010) | 1 line #8030: more docstring fix for builtin types. ........ ................
-rw-r--r--Objects/dictobject.c8
-rw-r--r--Objects/listobject.c4
-rw-r--r--Objects/setobject.c6
-rw-r--r--Objects/tupleobject.c8
4 files changed, 14 insertions, 12 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 03f2010..1d36e1d 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2100,12 +2100,12 @@ dict_iter(PyDictObject *dict)
}
PyDoc_STRVAR(dictionary_doc,
-"dict() -> new empty dictionary.\n"
+"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"
+" (key, value) pairs\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 38468f3..d3c997a 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2343,8 +2343,8 @@ static PySequenceMethods list_as_sequence = {
};
PyDoc_STRVAR(list_doc,
-"list() -> new list\n"
-"list(sequence) -> new list initialized from sequence's items");
+"list() -> new empty list\n"
+"list(iterable) -> new list initialized from iterable's items");
static PyObject *
list_subscript(PyListObject* self, PyObject* item)
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 27b41a1..742dadc 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2090,7 +2090,8 @@ static PyNumberMethods set_as_number = {
};
PyDoc_STRVAR(set_doc,
-"set(iterable) --> set object\n\
+"set() -> new empty set object\n\
+set(iterable) -> new set object\n\
\n\
Build an unordered collection of unique elements.");
@@ -2187,7 +2188,8 @@ static PyNumberMethods frozenset_as_number = {
};
PyDoc_STRVAR(frozenset_doc,
-"frozenset(iterable) --> frozenset object\n\
+"frozenset() -> empty frozenset object\n\
+frozenset(iterable) -> frozenset object\n\
\n\
Build an immutable unordered collection of unique elements.");
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 884174d..9145b58 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -656,10 +656,10 @@ tuple_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
PyDoc_STRVAR(tuple_doc,
-"tuple() -> an empty tuple\n"
-"tuple(sequence) -> tuple initialized from sequence's items\n"
-"\n"
-"If the argument is a tuple, the return value is the same object.");
+"tuple() -> empty tuple\n\
+tuple(iterable) -> tuple initialized from iterable's items\n\
+\n\
+If the argument is a tuple, the return value is the same object.");
static PySequenceMethods tuple_as_sequence = {
(lenfunc)tuplelength, /* sq_length */