python 2.7 and unicode (one more time)

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Nov 22 05:38:34 CET 2014


Marko Rauhamaa wrote:

> Rustom Mody <rustompmody at gmail.com>:
> 
>> Likewise in 2014, and given the arguments, inconsistencies, etc
>> remembering the nuts-n-bolts below the strings-represented-as-unicode
>> abstraction may be in order.
> 
> No need to hide Unicode, but talking about a
> 
>    Unicode string
> 
> is like talking about an
> 
>    electronic computer

versus a hydraulic computer, a mechanical computer, an optical computer, a
human computer, a genetic (DNA) computer, ... 

>    visible spectrum display

I'm not sure that many people actually do refer to "visible spectrum
display", or what you mean by it, but I can easily imagine that being in
contrast with a non-visible spectrum display.


>    mouse user interface

As opposed to a commandline user interface, direct brain-to-computer user
interface, touch UI, etc. Not to mention non-user interfaces, like SCSI
interface, SATA interface, USB interface, ...


>    ethernet socket

Telephone socket, Appletalk socket, Firewire socket, ADB socket ...


>    magnetic file

I have no idea what you mean here. Do you mean magnetic *field*? As opposed
to an electric field, gravitational field, Higgs field, strong nuclear
force field, weak nuclear force field ...


>    electric power supply
> 
> The language spec calls the things just "strings," as it should.


I really don't understand what bothers you about this. In Python, we have
Unicode strings and byte strings. In computing in general, strings can
consist of Unicode characters, ASCII characters, Tron characters, EBCDID
characters, ISO-8859-7 characters, and literally dozens of others. It
boogles my mind that you are so opposed to being explicit about what sort
of string we are dealing with.

Are you equally disturbed when people distinguish between tablespoon,
teaspoon, dessert spoon and serving spoon?



-- 
Steven




More information about the Python-list mailing list