Skip to content

Commit e51ee8a

Browse files
committed
Fix the docstrings of the capitalize method.
1 parent fa89798 commit e51ee8a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Objects/bytes_methods.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ _Py_bytes_title(char *result, char *s, Py_ssize_t len)
332332
PyDoc_STRVAR_shared(_Py_capitalize__doc__,
333333
"B.capitalize() -> copy of B\n\
334334
\n\
335-
Return a copy of B with only its first character capitalized (ASCII).");
335+
Return a copy of B with only its first character capitalized (ASCII)\n\
336+
and the rest lower-cased.");
336337

337338
void
338339
_Py_bytes_capitalize(char *result, char *s, Py_ssize_t len)

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6705,7 +6705,7 @@ PyDoc_STRVAR(capitalize__doc__,
67056705
"S.capitalize() -> str\n\
67066706
\n\
67076707
Return a capitalized version of S, i.e. make the first character\n\
6708-
have upper case.");
6708+
have upper case and the rest lower case.");
67096709

67106710
static PyObject*
67116711
unicode_capitalize(PyUnicodeObject *self)

0 commit comments

Comments
 (0)