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

Christian Heimes lists at cheimes.de
Fri Jan 16 20:42:11 EST 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