[docs] [issue33478] PEP 8 CapWords reference wrong?

Berker Peksag report at bugs.python.org
Sun May 13 02:13:38 EDT 2018


Berker Peksag <berker.peksag at gmail.com> added the comment:

'CapWord' is a single word so string.capwords() works as documented:

    Split the argument into words using str.split(), capitalize each word
    using str.capitalize(), and join the capitalized words using str.join().

https://docs.python.org/3/library/string.html#string.capwords

You can also see this in the REPL:

    >>> "CapWord".split()
    ['CapWord']
    >>> _[0].capitalize()  # '_' is a shortcut for the latest command
    'Capword'

----------
nosy: +berker.peksag
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33478>
_______________________________________


More information about the docs mailing list