[Python-checkins] r78541 - in python/branches/py3k: Objects/dictobject.c Objects/listobject.c Objects/setobject.c Objects/tupleobject.c

ezio.melotti python-checkins at python.org
Mon Mar 1 05:08:34 CET 2010


Author: ezio.melotti
Date: Mon Mar  1 05:08:34 2010
New Revision: 78541

Log:
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.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Objects/dictobject.c
   python/branches/py3k/Objects/listobject.c
   python/branches/py3k/Objects/setobject.c
   python/branches/py3k/Objects/tupleobject.c

Modified: python/branches/py3k/Objects/dictobject.c
==============================================================================
--- python/branches/py3k/Objects/dictobject.c	(original)
+++ python/branches/py3k/Objects/dictobject.c	Mon Mar  1 05:08:34 2010
@@ -2100,12 +2100,12 @@
 }
 
 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)");

Modified: python/branches/py3k/Objects/listobject.c
==============================================================================
--- python/branches/py3k/Objects/listobject.c	(original)
+++ python/branches/py3k/Objects/listobject.c	Mon Mar  1 05:08:34 2010
@@ -2357,8 +2357,8 @@
 };
 
 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)

Modified: python/branches/py3k/Objects/setobject.c
==============================================================================
--- python/branches/py3k/Objects/setobject.c	(original)
+++ python/branches/py3k/Objects/setobject.c	Mon Mar  1 05:08:34 2010
@@ -2090,7 +2090,8 @@
 };
 
 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 @@
 };
 
 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.");
 

Modified: python/branches/py3k/Objects/tupleobject.c
==============================================================================
--- python/branches/py3k/Objects/tupleobject.c	(original)
+++ python/branches/py3k/Objects/tupleobject.c	Mon Mar  1 05:08:34 2010
@@ -656,10 +656,10 @@
 }
 
 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 */


More information about the Python-checkins mailing list