'capwords' is not a string method
thehaas at binary.net
thehaas at binary.net
Wed Jul 17 18:38:19 EDT 2002
Alex Martelli <aleax at aleax.it> wrote:
> Apparently, they took occasion of the introduction of string
> methods to replace the semi-crippled capwords (which only
> capitalizes words _preceded by whitespace_) with the better
> method title, which capitalizes words even when they are
> preceded by punctuation, as well as whitespace. It seems
> sensible to me -- the need met by .title() is more frequent,
> and if the issue is backwards compatibility, capwords is
> still around (in the semi-obsolescent string module -- only
> semi, because it supplies crucial constants such as digits,
> letters, whitespace, etc).
I didn't know about the 'title' method . . .I'll try that. I'd rather
use string's built-in methods than (how you put it) the semi-obsolescent
string module.
-- mikeh
--
Mike Hostetler
thehaas at binary.net
http://www.binary.net/thehaas
GnuPG key: http://www.binary.net/thehaas/mikeh.gpg
More information about the Python-list
mailing list