Re: [Python-Dev] surprising bug in s.capitalize()?

"M.-A. Lemburg" <mal@lemburg.com> writes:
Yes.
Here's what the string.py module has to say about this BTW:
I said "string_capitalize", i.e. "stringobject.c:string_capitalize", i.e I think
'aAaA'.capitalize()
should result in 'AAaA' We're not doing too well at understanding each other today, are we?
Ah yes. So in the interests of reducing redunancy, .capitalize should probably do something usefully different... Cheers, M. -- 59. In English every word can be verbed. Would that it were so in our programming languages. -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html

Michael Hudson wrote:
The string methods were built closely after the string module functions, so that's what the reference is...
:)
Depends... we'll still need some sort of compatibility with string.py. -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

No. The capitalize() method, which descends from the string.capitalize(), and which definitely should return 'Aaaa' here. This means that (a) the documentation needs some clarification, and (b) the Unicode capitalize() method is broken and needs to be fixed. --Guido van Rossum (home page: http://www.python.org/~guido/)

Michael Hudson wrote:
The string methods were built closely after the string module functions, so that's what the reference is...
:)
Depends... we'll still need some sort of compatibility with string.py. -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/

No. The capitalize() method, which descends from the string.capitalize(), and which definitely should return 'Aaaa' here. This means that (a) the documentation needs some clarification, and (b) the Unicode capitalize() method is broken and needs to be fixed. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (3)
-
Guido van Rossum
-
M.-A. Lemburg
-
Michael Hudson