summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-10-18 09:55:08 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-10-18 09:55:08 (GMT)
commit6828e18a6a0d63f2203f5043bda0018925244188 (patch)
treeeddebe1c7f67df0286ae57d1862231c946a888e5 /Objects/unicodeobject.c
parent849a972f35a6740c4784c80a8271af9f5592d7b6 (diff)
downloadcpython-6828e18a6a0d63f2203f5043bda0018925244188.zip
cpython-6828e18a6a0d63f2203f5043bda0018925244188.tar.gz
cpython-6828e18a6a0d63f2203f5043bda0018925244188.tar.bz2
Patch #825679: Clarify semantics of .isfoo on empty strings.
Backported to 2.3.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index f0480fb..03559da 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -4897,7 +4897,7 @@ unicode_islower(PyUnicodeObject *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*
@@ -4931,9 +4931,10 @@ unicode_isupper(PyUnicodeObject *self)
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)
@@ -4978,8 +4979,8 @@ 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)
@@ -5007,7 +5008,7 @@ 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*
@@ -5036,7 +5037,7 @@ unicode_isalpha(PyUnicodeObject *self)
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*
@@ -5094,8 +5095,8 @@ unicode_isdecimal(PyUnicodeObject *self)
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)