Python 2 or 3

Chris Angelico rosuav at gmail.com
Sat Dec 3 22:02:15 EST 2011


On Sun, Dec 4, 2011 at 1:52 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> For anyone working with unicode instead of ascii...

Which, frankly, should be everyone. You can't get away with assuming
that a character is a byte any more; even if you stick to the US,
you're going to run into some non-ASCII symbols sooner or later. Of
course, you can work with UTF-8, which means that anything that fits
into 7-bit ASCII will be represented as itself; but you still need to
be aware of the difference between 'bytes' and 'str' (or between 'str'
and 'unicode').

ChrisA



More information about the Python-list mailing list