Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 078b24f

Browse files
committed
When refering to Unicode characters in exception messages and
docstrings, the documentation guidelines call for "Unicode", not "unicode". Comply.
1 parent 127b2ef commit 078b24f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Python/bltinmodule.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ builtin_unicode(self, args)
192192
static char unicode_doc[] =
193193
"unicode(string [, encoding[, errors]]) -> object\n\
194194
\n\
195-
Creates a new unicode object from the given encoded string.\n\
195+
Creates a new Unicode object from the given encoded string.\n\
196196
encoding defaults to 'utf-8' and errors, defining the error handling,\n\
197197
to 'strict'.";
198198

@@ -368,9 +368,9 @@ builtin_unichr(self, args)
368368
}
369369

370370
static char unichr_doc[] =
371-
"unichr(i) -> unicode character\n\
371+
"unichr(i) -> Unicode character\n\
372372
\n\
373-
Return a unicode string of one character with ordinal i; 0 <= i < 65536.";
373+
Return a Unicode string of one character with ordinal i; 0 <= i < 65536.";
374374

375375

376376
static PyObject *
@@ -1657,7 +1657,7 @@ builtin_ord(self, args)
16571657
ord = (long)*PyUnicode_AS_UNICODE(obj);
16581658
} else {
16591659
PyErr_Format(PyExc_TypeError,
1660-
"expected string or unicode character, " \
1660+
"expected string or Unicode character, " \
16611661
"%.200s found", obj->ob_type->tp_name);
16621662
return NULL;
16631663
}
@@ -1673,7 +1673,7 @@ builtin_ord(self, args)
16731673
static char ord_doc[] =
16741674
"ord(c) -> integer\n\
16751675
\n\
1676-
Return the integer ordinal of a one character [unicode] string.";
1676+
Return the integer ordinal of a one character string.";
16771677

16781678

16791679
static PyObject *

0 commit comments

Comments
 (0)