News about repr() and 8-bit characters, and setlocale() in the

readline module.
This commit is contained in:
Guido van Rossum 2002-10-09 21:40:48 +00:00
parent 628e3bf6cf
commit 2b492b61c6
1 changed files with 17 additions and 0 deletions

View File

@ -66,6 +66,12 @@ Type/class unification and new-style classes
Core and builtins
-----------------
- The repr() function for 8-bit strings now preserves all characters
that are considered printable in the current locale. (Previously,
all bytes that are not printable ASCII would be encoded in hex.)
This requires the user to set the current locale; in the initial "C"
locale the old behavior is maintained. [SF patch 479898]
- Unicode file name processing for Windows (PEP 277) is implemented.
All platforms now have an os.path.supports_unicode_filenames attribute,
which is set to True on Windows NT/2000/XP, and False elsewhere.
@ -348,6 +354,17 @@ Extension modules
Library
-------
- Importing the readline module now no longer has the side effect of
calling setlocale(LC_CTYPE, ""). The initial "C" locale, or
whatever locale is explicitly set by the user, is preserved. If you
want repr() of 8-bit strings in your preferred encoding to preserve
all printable characters of that encoding, you have to add the
following code to your $PYTHONSTARTUP file or to your application's
main():
import locale
locale.setlocale(locale.LC_CTYPE, "")
- shutil.move was added. shutil.copytree now reports errors as an
exception at the end, instead of printing error messages.