Merged revisions 66766-66767,66771-66772,66774,66776,66783-66787,66790,66793,66797 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r66766 | benjamin.peterson | 2008-10-03 06:52:06 -0500 (Fri, 03 Oct 2008) | 1 line
update the mac installer script
................
r66767 | andrew.kuchling | 2008-10-03 07:26:42 -0500 (Fri, 03 Oct 2008) | 1 line
Docstring typo.
................
r66771 | hirokazu.yamamoto | 2008-10-03 11:18:42 -0500 (Fri, 03 Oct 2008) | 2 lines
Fixed following error when DocXMLRPCServer failed.
UnboundLocalError: local variable 'serv' referenced before assignment
................
r66772 | andrew.kuchling | 2008-10-03 11:29:19 -0500 (Fri, 03 Oct 2008) | 1 line
Mention exception in docstring
................
r66774 | andrew.kuchling | 2008-10-03 11:42:52 -0500 (Fri, 03 Oct 2008) | 1 line
Typo fix
................
r66776 | hirokazu.yamamoto | 2008-10-03 12:34:49 -0500 (Fri, 03 Oct 2008) | 2 lines
Issue #1706863: Fixed "'NoneType' object has no attribute 'rfind'" error when sqlite libfile not found.
................
r66783 | andrew.kuchling | 2008-10-03 20:02:29 -0500 (Fri, 03 Oct 2008) | 1 line
Use correct capitalization of NaN
................
r66784 | andrew.kuchling | 2008-10-03 20:03:42 -0500 (Fri, 03 Oct 2008) | 1 line
Docstring change: Specify exception raised
................
r66785 | andrew.kuchling | 2008-10-03 20:04:24 -0500 (Fri, 03 Oct 2008) | 1 line
Docstring changes: Specify exceptions raised
................
r66786 | andrew.kuchling | 2008-10-03 20:05:56 -0500 (Fri, 03 Oct 2008) | 3 lines
Docstring change for *partition: use same tense as other docstrings.
Hyphenate left- and right-justified.
Fix 'registerd' typo
................
r66787 | andrew.kuchling | 2008-10-03 22:08:56 -0500 (Fri, 03 Oct 2008) | 1 line
two corrections
................
r66790 | andrew.kuchling | 2008-10-04 11:52:01 -0500 (Sat, 04 Oct 2008) | 1 line
Set svn:keywords
................
r66793 | georg.brandl | 2008-10-04 13:26:01 -0500 (Sat, 04 Oct 2008) | 2 lines
#4041: don't refer to removed and outdated modules.
................
r66797 | benjamin.peterson | 2008-10-04 15:55:50 -0500 (Sat, 04 Oct 2008) | 19 lines
Merged revisions 66707,66775,66782 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r66707 | benjamin.peterson | 2008-09-30 18:27:10 -0500 (Tue, 30 Sep 2008) | 1 line
fix #4001: fix_imports didn't check for __init__.py before converting to relative imports
........
r66775 | collin.winter | 2008-10-03 12:08:26 -0500 (Fri, 03 Oct 2008) | 4 lines
Add an alternative iterative pattern matching system that, while slower, correctly parses files that cause the faster recursive pattern matcher to fail with a recursion error. lib2to3 falls back to the iterative matcher if the recursive one fails.
Fixes http://bugs.python.org/issue2532. Thanks to Nick Edds.
........
r66782 | benjamin.peterson | 2008-10-03 17:51:36 -0500 (Fri, 03 Oct 2008) | 1 line
add Victor Stinner's fixer for os.getcwdu -> os.getcwd #4023
........
................
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 2faff34..881671c 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1548,7 +1548,7 @@
#ifdef Py_NAN
if (Py_IS_NAN(self)) {
PyErr_SetString(PyExc_ValueError,
- "Cannot pass nan to float.as_integer_ratio.");
+ "Cannot pass NaN to float.as_integer_ratio.");
return NULL;
}
#endif
@@ -1607,7 +1607,7 @@
"\n"
"Returns a pair of integers, whose ratio is exactly equal to the original\n"
"float and with a positive denominator.\n"
-"Raises OverflowError on infinities and a ValueError on nans.\n"
+"Raises OverflowError on infinities and a ValueError on NaNs.\n"
"\n"
">>> (10.0).as_integer_ratio()\n"
"(10, 1)\n"
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 10f2c5d..e8379e1 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2459,11 +2459,14 @@
PyDoc_STRVAR(insert_doc,
"L.insert(index, object) -- insert object before index");
PyDoc_STRVAR(pop_doc,
-"L.pop([index]) -> item -- remove and return item at index (default last)");
+"L.pop([index]) -> item -- remove and return item at index (default last).\n"
+"Raises IndexError if list is empty or index is out of range.");
PyDoc_STRVAR(remove_doc,
-"L.remove(value) -- remove first occurrence of value");
+"L.remove(value) -- remove first occurrence of value.\n"
+"Raises ValueError if the value is not present.");
PyDoc_STRVAR(index_doc,
-"L.index(value, [start, [stop]]) -> integer -- return first index of value");
+"L.index(value, [start, [stop]]) -> integer -- return first index of value.\n"
+"Raises ValueError if the value is not present.");
PyDoc_STRVAR(count_doc,
"L.count(value) -> integer -- return number of occurrences of value");
PyDoc_STRVAR(reverse_doc,
diff --git a/Objects/setobject.c b/Objects/setobject.c
index fbbdf6e..075f8e7 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -754,7 +754,8 @@
return key;
}
-PyDoc_STRVAR(pop_doc, "Remove and return an arbitrary set element.");
+PyDoc_STRVAR(pop_doc, "Remove and return an arbitrary set element.\n\
+Raises KeyError if the set is empty.");
static int
set_traverse(PySetObject *so, visitproc visit, void *arg)
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index b9a70a0..7f30f66 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -1591,9 +1591,9 @@
PyDoc_STRVAR(partition__doc__,
"S.partition(sep) -> (head, sep, tail)\n\
\n\
-Searches for the separator sep in S, and returns the part before it,\n\
+Search for the separator sep in S, and return the part before it,\n\
the separator itself, and the part after it. If the separator is not\n\
-found, returns S and two empty strings.");
+found, return S and two empty strings.");
static PyObject *
string_partition(PyStringObject *self, PyObject *sep_obj)
@@ -1622,9 +1622,9 @@
PyDoc_STRVAR(rpartition__doc__,
"S.rpartition(sep) -> (tail, sep, head)\n\
\n\
-Searches for the separator sep in S, starting at the end of S, and returns\n\
+Search for the separator sep in S, starting at the end of S, and return\n\
the part before it, the separator itself, and the part after it. If the\n\
-separator is not found, returns two empty strings and S.");
+separator is not found, return two empty strings and S.");
static PyObject *
string_rpartition(PyStringObject *self, PyObject *sep_obj)
@@ -3357,7 +3357,7 @@
to the default encoding. errors may be given to set a different error\n\
handling scheme. Default is 'strict' meaning that encoding errors raise\n\
a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n\
-as well as any other name registerd with codecs.register_error that is\n\
+as well as any other name registered with codecs.register_error that is\n\
able to handle UnicodeDecodeErrors.");
static PyObject *
@@ -3506,7 +3506,7 @@
PyDoc_STRVAR(ljust__doc__,
"S.ljust(width[, fillchar]) -> string\n"
"\n"
-"Return S left justified in a string of length width. Padding is\n"
+"Return S left-justified in a string of length width. Padding is\n"
"done using the specified fill character (default is a space).");
static PyObject *
@@ -3530,7 +3530,7 @@
PyDoc_STRVAR(rjust__doc__,
"S.rjust(width[, fillchar]) -> string\n"
"\n"
-"Return S right justified in a string of length width. Padding is\n"
+"Return S right-justified in a string of length width. Padding is\n"
"done using the specified fill character (default is a space)");
static PyObject *
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 348ae8c..b1a7003 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -719,7 +719,9 @@
}
PyDoc_STRVAR(index_doc,
-"T.index(value, [start, [stop]]) -> integer -- return first index of value");
+"T.index(value, [start, [stop]]) -> integer -- return first index of value.\n"
+"Raises ValueError if the value is not present."
+);
PyDoc_STRVAR(count_doc,
"T.count(value) -> integer -- return number of occurrences of value");
PyDoc_STRVAR(sizeof_doc,
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index f8601d8..1742425 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -7070,7 +7070,7 @@
PyDoc_STRVAR(ljust__doc__,
"S.ljust(width[, fillchar]) -> int\n\
\n\
-Return S left justified in a Unicode string of length width. Padding is\n\
+Return S left-justified in a Unicode string of length width. Padding is\n\
done using the specified fill character (default is a space).");
static PyObject *
@@ -7456,7 +7456,7 @@
PyDoc_STRVAR(rjust__doc__,
"S.rjust(width[, fillchar]) -> unicode\n\
\n\
-Return S right justified in a Unicode string of length width. Padding is\n\
+Return S right-justified in a Unicode string of length width. Padding is\n\
done using the specified fill character (default is a space).");
static PyObject *
@@ -7606,9 +7606,9 @@
PyDoc_STRVAR(partition__doc__,
"S.partition(sep) -> (head, sep, tail)\n\
\n\
-Searches for the separator sep in S, and returns the part before it,\n\
+Search for the separator sep in S, and return the part before it,\n\
the separator itself, and the part after it. If the separator is not\n\
-found, returns S and two empty strings.");
+found, return S and two empty strings.");
static PyObject*
unicode_partition(PyUnicodeObject *self, PyObject *separator)
@@ -7619,9 +7619,9 @@
PyDoc_STRVAR(rpartition__doc__,
"S.rpartition(sep) -> (tail, sep, head)\n\
\n\
-Searches for the separator sep in S, starting at the end of S, and returns\n\
+Search for the separator sep in S, starting at the end of S, and return\n\
the part before it, the separator itself, and the part after it. If the\n\
-separator is not found, returns two empty strings and S.");
+separator is not found, return two empty strings and S.");
static PyObject*
unicode_rpartition(PyUnicodeObject *self, PyObject *separator)