Re: [Python-Dev] peps: And now for something completely different.
On Sun, 13 Nov 2011 22:33:28 +0100
barry.warsaw
+And Now For Something Completely Different +==========================================
So, is the release manager a man with two noses?
+Strings and bytes +----------------- + +Python 2's basic original string type are called 8-bit strings, and +they play a dual role in Python 2 as both ASCII text and as byte +arrays. While Python 2 also has a unicode string type, the +fundamental ambiguity of the core string type, coupled with Python 2's +default behavior of supporting automatic coercion from 8-bit strings +to unicodes when the two are combined, often leads to `UnicodeError`s. +Python 3's standard string type is a unicode, and Python 3 adds a +bytes type, but critically, no automatic coercion between bytes and +unicodes is provided. Thus, the core interpreter, its I/O libraries, +module names, etc. are clear in their distinction between unicode +strings and bytes. This clarity is often a source of difficulty in +transitioning existing code to Python 3, because many third party +libraries and applications are themselves ambiguous in this +distinction. Once migrated though, most `UnicodeError`s can be +eliminated.
First class unicode (*) support also makes Python much friendlier to non-ASCII natives when it comes to things like filesystem access or error reporting. (*) even though Tom Christiansen would disagree, but perhaps we can settle on first and a half
+Imports +------- + +In Python 3, star imports (e.g. ``from x import *``) are only +premitted in module level code.
permitted Regards Antoine.
If the PEP 404 lists important changes between Python 2 and Python 3, the removal of old-style classes should also be mentioned because it is a change in the core language. Victor
participants (2)
-
Antoine Pitrou
-
Victor Stinner