Backported to 2.3.
\end{methoddesc}
\begin{methoddesc}[string]{isdigit}{}
-Return true if there are only digit characters, false otherwise.
+Return true if all characters in the string are digits and there
+is at least one character, false otherwise.
\end{methoddesc}
\begin{methoddesc}[string]{islower}{}
\begin{methoddesc}[string]{isspace}{}
Return true if there are only whitespace characters in the string and
-the string is not empty, false otherwise.
+there is at least one character, false otherwise.
\end{methoddesc}
\begin{methoddesc}[string]{istitle}{}
-Return true if the string is a titlecased string: uppercase
-characters may only follow uncased characters and lowercase characters
-only cased ones. Return false otherwise.
+Return true if the string is a titlecased string and there is at least one
+character, i.e. uppercase characters may only follow uncased
+characters and lowercase characters only cased ones. Return false
+otherwise.
\end{methoddesc}
\begin{methoddesc}[string]{isupper}{}
}
PyDoc_STRVAR(isspace__doc__,
-"S.isspace() -> bool\n"
-"\n"
-"Return True if there are only whitespace characters in S,\n"
-"False otherwise.");
+"S.isspace() -> bool\n\
+\n\
+Return True if all characters in S are whitespace\n\
+and there is at least one character in S, False otherwise.");
static PyObject*
string_isspace(PyStringObject *self)
PyDoc_STRVAR(isalpha__doc__,
"S.isalpha() -> bool\n\
\n\
-Return True if all characters in S are alphabetic\n\
+Return True if all characters in S are alphabetic\n\
and there is at least one character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(isalnum__doc__,
"S.isalnum() -> bool\n\
\n\
-Return True if all characters in S are alphanumeric\n\
+Return True if all characters in S are alphanumeric\n\
and there is at least one character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(isdigit__doc__,
"S.isdigit() -> bool\n\
\n\
-Return True if there are only digit characters in S,\n\
-False otherwise.");
+Return True if all characters in S are digits\n\
+and there is at least one character in S, False otherwise.");
static PyObject*
string_isdigit(PyStringObject *self)
PyDoc_STRVAR(isupper__doc__,
"S.isupper() -> bool\n\
\n\
-Return True if all cased characters in S are uppercase and there is\n\
+Return True if all cased characters in S are uppercase and there is\n\
at least one cased character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(istitle__doc__,
"S.istitle() -> bool\n\
\n\
-Return True if S is a titlecased string, i.e. uppercase characters\n\
-may only follow uncased characters and lowercase characters only cased\n\
-ones. Return False otherwise.");
+Return True if S is a titlecased string and there is at least one\n\
+character in S, i.e. uppercase characters may only follow uncased\n\
+characters and lowercase characters only cased ones. Return False\n\
+otherwise.");
static PyObject*
string_istitle(PyStringObject *self, PyObject *uncased)
PyDoc_STRVAR(isupper__doc__,
"S.isupper() -> bool\n\
\n\
-Return True if all cased characters in S are uppercase and there is\n\
+Return True if all cased characters in S are uppercase and there is\n\
at least one cased character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(istitle__doc__,
"S.istitle() -> bool\n\
\n\
-Return True if S is a titlecased string, i.e. upper- and titlecase\n\
-characters may only follow uncased characters and lowercase characters\n\
-only cased ones. Return False otherwise.");
+Return True if S is a titlecased string and there is at least one\n\
+character in S, i.e. upper- and titlecase characters may only\n\
+follow uncased characters and lowercase characters only cased ones.\n\
+Return False otherwise.");
static PyObject*
unicode_istitle(PyUnicodeObject *self)
PyDoc_STRVAR(isspace__doc__,
"S.isspace() -> bool\n\
\n\
-Return True if there are only whitespace characters in S,\n\
-False otherwise.");
+Return True if all characters in S are whitespace\n\
+and there is at least one character in S, False otherwise.");
static PyObject*
unicode_isspace(PyUnicodeObject *self)
PyDoc_STRVAR(isalpha__doc__,
"S.isalpha() -> bool\n\
\n\
-Return True if all characters in S are alphabetic\n\
+Return True if all characters in S are alphabetic\n\
and there is at least one character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(isalnum__doc__,
"S.isalnum() -> bool\n\
\n\
-Return True if all characters in S are alphanumeric\n\
+Return True if all characters in S are alphanumeric\n\
and there is at least one character in S, False otherwise.");
static PyObject*
PyDoc_STRVAR(isdigit__doc__,
"S.isdigit() -> bool\n\
\n\
-Return True if there are only digit characters in S,\n\
-False otherwise.");
+Return True if all characters in S are digits\n\
+and there is at least one character in S, False otherwise.");
static PyObject*
unicode_isdigit(PyUnicodeObject *self)