On 01/13/2014 09:12 AM, Nick Coghlan wrote:
On 14 January 2014 01:54, Ethan Furman wrote:

Forgive me for being dense, but I don't understand your objection.  With
Guido's proposal, '%s' % bytes_data, bytes_data is passed through unchanged.
Did you mean something else by "binary data"?

I mean it will work, but it will mean you've introduced an implicit
assumption of ASCII compatibility into the structure your program

Okay, I'm still trying to understand. Apparently we both mean the same thing by binary data / bytes, so the difference must be the %s, yes? And the concern as that because you have used %s as the format code, if somebody accidentally put, say, "stupid bug" on the RHS you would end up with b"'stupid bug'" instead of an exception, which you get if you had used %b instead. Am I following?

--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to