[Python-Dev] Re: String module

Alex Martelli aleax@aleax.it
Wed, 29 May 2002 22:18:37 +0200

On Wednesday 29 May 2002 09:32 pm, Guido van Rossum wrote:
> > 	{"istitle", (PyCFunction)string_istitle, METH_NOARGS, istitle__doc__},
> I think all of the unicode methods should be added to 8-bit strings,
> even if they are just aliases for others (what's title case applied to
> Latin-1?  I suppose same as upper case?).

Current Python strings DO have .istitle() -- it means "the first letter
of each substring made of letters is uppercase, all the other letters
in the substring are lowercase".  (It also means the string DOES
have some letters -- I always find it quite tricky that all the string
iswhatever methods return False when called on an empty string).

>>> "Pol23Zap And Plee+Kuup!".istitle()