[Patches] [ python-Patches-997768 ] LC_CTYPE locale and strings
SourceForge.net
noreply at sourceforge.net
Mon Jul 26 14:58:31 CEST 2004
Patches item #997768, was opened at 2004-07-26 03:36
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997768&group_id=5470
>Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Pekka Pessi (ppessi)
Assigned to: Nobody/Anonymous (nobody)
Summary: LC_CTYPE locale and strings
Initial Comment:
It would be nice to get access to complete
locale-specific ctype information:
iscntrl()
isgraph()
isprint()
ispunct()
Also, the string.uppercase and string.lowercase depend
on LC_CTYPE locale. The string module has two other
members that could depend on LC_CTYPE,
string.punctuation and string.printable.
The current docs (in
http://www.python.org/doc/2.3.4/lib/module-string.html)
on string.printable is misleading, as string.printable
is not changed after LC_CTYPE locale changes, and it is
always
printable = digits + ascii_letters + punctuation +
whitespace
My approach is to create string.printable and
string.punctuation based on locale information, just
like string.uppercase and string.lowercase is done, and
add string.ascii_punctuation and string.ascii_printable
for the C locale values.
Patch containing proposed changes in stringobject,
string and _locale modules attached. No tests nor
changes to the docs, sorry.
----------------------------------------------------------------------
>Comment By: Martin v. Löwis (loewis)
Date: 2004-07-26 14:58
Message:
Logged In: YES
user_id=21627
Why do you need these functions?
It is convention that the Unicode type provides the same or
more methods, can you provide a patch that has a meaningful
definition for these methods for Unicode strings?
Reclassifying issue as a patch.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997768&group_id=5470
More information about the Patches
mailing list