Totally confused by the str/bytes/unicode differences introduced in Pythyon 3.x

Christian Heimes lists at cheimes.de
Sat Jan 17 02:42:11 CET 2009


Giampaolo Rodola' schrieb:
> I work with string of characters but to convert bytes into string I
> need to specify an encoding and that's what confuses me.
> Before there was no need to deal with that.

Why do you have to deal with unicode data? IIRC ftp uses ASCII only text
so you can stick to bytes everywhere. If you didn't have to worry about
encoding and unicode in Python 2.x then you should use bytes all over
the place, too.

Christian




More information about the Python-list mailing list