Skip to content
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ category.
| +-------------------------------------------+---------------------------------------------------+
| | :meth:`str.casefold` | |
| +-------------------------------------------+---------------------------------------------------+
| | :meth:`str.capitalize` | :meth:`bytes.capitalize` |
| | :meth:`str.` | :meth:`bytes.capitalize` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems accidental.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it was. Anyway, this commit should be reverted.

| +-------------------------------------------+---------------------------------------------------+
| | :meth:`str.title` | :meth:`bytes.title` |
| +-------------------------------------------+---------------------------------------------------+
Expand Down Expand Up @@ -1759,7 +1759,21 @@ expression support in the :mod:`re` module).
.. method:: str.capitalize()

Return a copy of the string with its first character capitalized and the
rest lowercased.
rest lowercased. For example::

>>> 'PYTHON IS AMAZING'.capitalize()
'Python is amazing'
>>> 'Njemačka starts With a non-ASCII digraph'.capitalize()
'Njemačka starts with a non-ascii digraph'
>>> ' DZ, Dz, dz'.title()
>>> 'DŽ, Dž, dž '.title()
>>> 'IJ, ij'.title()
>>> 'LJ, Lj, lj '.title()
>>> 'NJ, Nj, nj '.title()
>>> 'ᵺ '.title()


See also :meth:`title`.

.. versionchanged:: 3.8
The first character is now put into titlecase rather than uppercase.
Expand Down
Loading