python 2.7 and unicode (one more time)

Marko Rauhamaa marko at pacujo.net
Fri Nov 21 08:14:26 CET 2014


Chris Angelico <rosuav at gmail.com>:

> On Fri, Nov 21, 2014 at 5:36 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> I'm saying equating an abstract data type (string) with its
>> representation (Unicode vector) is bad taste.
>
> What about "sequence of Unicode code points" is "representation"? What
> is your abstraction over that?

The letter 'A' is a character. Unicode for the letter 'A' is 65. It is
very rarely that you care about that number. You are only interested in
the letter 'A', which you can use to spell people's names, for instance.

When you read a book, you read the text, not the ink.


Marko



More information about the Python-list mailing list