[Python-Dev] Generalised String Coercion
"Martin v. Löwis"
martin at v.loewis.de
Mon Aug 8 23:42:01 CEST 2005
Phillip J. Eby wrote:
> Actually, thinking about it some more, it seems to me it's actually more
> like this:
>
> sock.send( ("%d:%s," %
> (len(data),data.decode('latin1'))).encode('latin1') )
While this would work, it would still feel wrong: the binary data
are *not* latin1 (most likely), so declaring them to be latin1 would
be confusing. Perhaps a synonym '8bit' for latin1 could be introduced.
Regards,
Martin
More information about the Python-Dev
mailing list