[ python-Bugs-1212195 ] str.lower() to have an IMPORTANT NOTE or it's for magicians

SourceForge.net noreply at sourceforge.net
Thu Jun 2 13:48:47 CEST 2005


Bugs item #1212195, was opened at 2005-05-31 20:56
Message generated for change (Comment added) made by lemburg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1212195&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nikos Kouremenos (nkour)
Assigned to: M.-A. Lemburg (lemburg)
Summary: str.lower() to have an IMPORTANT NOTE or it's for magicians

Initial Comment:
lower() {maybe others} should mention that if used with
string object [not unicode object] it's likely the that
encoding will change unde some locales [eg pl_PL makes
it from utf8 to latin2]!!

or this hsould be put in the beginning of the doc in
str as a general WARNING/NOTE:

----------------------------------------------------------------------

>Comment By: M.-A. Lemburg (lemburg)
Date: 2005-06-02 13:48

Message:
Logged In: YES 
user_id=38388

A doc-patch would be nice.

I don't like the general situation either. Unicode doesn't
behave like this and I don't think string.lower() and
.upper()  should either, but there are users out there who
think differently, so we might want to add a parameter which
then allows modifying the type of mapping:

string.lower(map='ascii')
string.upper(map='latin-1')

etc.

Just an idea. 

PS: I'll be offline for two weeks now, so don't expect any
more comments before then.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-06-01 23:43

Message:
Logged In: YES 
user_id=80475

Mark, do you have any thoughts on this one?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1212195&group_id=5470


More information about the Python-bugs-list mailing list