[Python-Dev] PEP 460 reboot
ethan at stoneleaf.us
Mon Jan 13 08:18:48 CET 2014
On 01/12/2014 10:51 PM, Nick Coghlan wrote:
> I am a strong -1 on the more lenient proposal, as it makes binary
> interpolation in Python 3 an *unsafe operation* for ASCII incompatible
> binary formats.
No more unsafe that calling .upper() on ASCII incompatible streams.
> The existing binary operations that assume ASCII do so *inherently* -
> they're not input driven, the operation itself assumes ASCII, so if
> you're working with data that may not be ASCII compatible, you simply
> don't use them (these are operations like title(), upper(), lower(),
> the default arguments for split() and strip(), etc).
How is this different from not using % interpolation when the byte stream is incompatible? It isn't.
And what do you mean by "input driven"? If the LHS is bytes, the result is bytes, no matter what the input is. This is
not the Py2 world where you may end up with str or unicode; you always end up with bytes if the LHS is bytes.
[snip the rest that seems to flow from these misunderstandings]
More information about the Python-Dev