[Python-Dev] Generalised String Coercion
Phillip J. Eby
pje at telecommunity.com
Mon Aug 8 05:49:25 CEST 2005
At 05:24 PM 8/7/2005 -0700, Guido van Rossum wrote:
>Hm. What would be the use case for using %s with binary, non-text data?
Well, I could see using it to write things like netstrings,
i.e. sock.send("%d:%s," % (len(data),data)) seems like the One Obvious Way
to write a netstring in today's Python at least. But perhaps there's a
subtlety I've missed here.
More information about the Python-Dev
mailing list