2 ms·
> Isn't sending data "somewhere" pretty common. Unless this is middleware in python ecosystem, data is going to go a logger, database, console, web page, file.
by bostik 12y ago
> Isn't sending data "somewhere" pretty common. Unless this is middleware in python ecosystem, data is going to go a logger, database, console, web page, file. Am I misunderstanding it? It seems you are dismissing it as something one doesn't need to worry about, because it is not done much...
In my opinion, the high frequency of sending data "somewhere else" is precisely the reason why unicode strings make so much sense.
Yes, there's a processing overhead. Yes, there is a need to make sure that all strings that go into python are valid unicode. And yes, if you happen to live in a part of the world where you never need characters outside of the ASCII table, it is likely a massive pain in the arse.
I have never enjoyed the privilege of the last one. The single, most important thing about unicode - at least for me - is that conversion from unicode to any other encoding is in practice a well specified operation.
(It may be luck that I've never had to deal with strings that would use multiple diaresis variants. I've been informed that mixing those symbols gets particularly ugly in terms of string transformations.)