Giampaolo Rodola' schrieb:
> Now. The basic difference is that socket.recv() returns a bytes object
> instead of a string object and that's the thing which confuses me
> mainly.
> My question is: is there a way to convert that bytes object into
> exactly *the same thing* returned by socket.recv() in Python 2.x (a
> string)?

Python 3.0's bytes type is almost the same type as Python 2.x's str
type. During the development of Python 3.0 the old str type was modified
and renamed to bytes. The old unicode type is now known as str.

2.x     ->  3.0
-----------------
str     ->  bytes
unicode ->  str
""      ->  b""
u""     ->  ""

HTH

Christian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to