On 01/12/2014 08:09 AM, Nick Coghlan wrote:
On 13 Jan 2014 01:22, "Kristján Valur Jónsson" wrote:

Imho, this is not equivalent to re-introducing automatic type conversion 
between binary/unicode, it is adding a specific convenience function for 
explicitly asking for ASCII encoding.

It is not explicit, it is implicit - whether or not the resulting string 
assumes ASCII compatibility or not depends on
whether you pass a binary value (no assumption) or a string value (assumes 
ASCII compatibility).

Nick, I don't understand what you are saying here. Are you saying that the result of b'%s' % var may be either a bytes object or a str object? Because that would be wrong -- it would always be a bytes object.

--
~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