Yet another Python textbook
steve+comp.lang.python at pearwood.info
Thu Nov 22 00:26:02 CET 2012
On Wed, 21 Nov 2012 12:03:30 -0500, Colin J. Williams wrote:
> On 20/11/2012 4:00 PM, Chris Angelico wrote:
>> To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393
>> strings. Take no notice; the rest of the world sees this as a huge
>> advantage. Python is now in a VERY small group of languages (I'm aware
>> of just one other) that have absolutely proper Unicode handling *and*
>> efficient string handling.
> It's interesting to see that someone else finds the format function to
> be a pain. Perhaps the problem lies with the documentation.
This is nothing to do with the format function. Chris, and JMF, is
talking about the internal representation of strings in Python.
Python 3.3 fixes a long-running design flaw that causes Unicode strings
to be buggy (the use of so-called "surrogate pairs" for characters
outside of the Basic Multilingual Plane), *and* saves up to 75% of the
memory used by strings (reducing it from up to 4 bytes per character to
as little as 1 byte per character), but at the cost of a trivially small
slowdown under some circumstances.
JMF is obsessed with the idea that Python is destroying Unicode for the
benefit of the Americans. It's quite sad really.
More information about the Python-list