Issue 8347: string capitalize erroneously lower-case any non-first letters (original) (raw)

Issue8347

Created on 2010-04-08 17:05 by famart, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg102629 - (view) Author: Martin (famart) Date: 2010-04-08 17:05
When the following is run: s='the Los Angeles Symphony'; s.capitalize(); it displays 'The los angeles symphony' instead of 'The Los Angeles Symphony' the str.capitalize() should only deal with the first letter, not lower-case the rest of the letters. The manual correctly describes this, but the actual behavior is not consistent with this description.
msg102637 - (view) Author: Philip Jenvey (pjenvey) * (Python committer) Date: 2010-04-08 17:45
S.capitalize() -> string Return a copy of the string S with only its first character capitalized. You've misunderstood the docs, only the first character is indeed capitalized. You want string.capwords instead
History
Date User Action Args
2022-04-11 14:56:59 admin set github: 52594
2010-04-08 17:45:28 pjenvey set status: open -> closednosy: + pjenveymessages: + resolution: not a bug
2010-04-08 17:05:31 famart create