Hi,
> That's exactly why I mentioned it. Some people love to uppercase
> everything in any language and I usually find myself fixing it by hand.
> Ignoring proper names, the conversion is trivial ("s[0].upper() +
> s[1:].lower()" will do it), but I was a bit lazy to actually write the
> plug-in...

That is slightly different from what I had in mind: it actively
lowercases anything else, ignoring potential proper names.
I'd have offered  s[0].upper() + s[1:]  as an option.
Your option does make sense though, maybe as "Remove Title Case"
(I.e. automatically uppercase the first character, leave the rest alone.
For example, a song might be titled "für Elise". In that situation, it
should be transformed to "Für Elise". Another example is abbreviations.
"JD's blues" for example should be left unchanged.

Another thing my titlecase function did that yours doesn't is process
all-uppercase strings.
I'm aware that occasionally you'll have a track titled "TLA" that
shouldn't be converted to "Tla". But a very common bad title is "EXAMPLE
TRACK TITLE", where I'd like to have an easy way to make that into
"Example Track Title".

> In anyway, I don't think that we need to go out of our way to handle
> that. Python should respect the environment's locale, and if not, it
> should be fixed there.

Speaking of which, did anyone manage to get the re.LOCALE flag to work?
I've yet to see a proper way of using that...

best regards,
Erich Schubert
-- 
   erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
     The future is here. It's just not evenly distributed yet.      //\
       Wenn Leute nicht glauben, dass Mathematik einfach ist,       V_/_
            dann nur deshalb, weil sie nicht begreifen,
        wie kompliziert das Leben ist. --- John von Neumann



Reply via email to