[Python-Dev] PEP 460 reboot

Glenn Linderman v+python at g.nevcal.com
Mon Jan 13 22:08:18 CET 2014


On 1/13/2014 9:38 AM, Ethan Furman wrote:
> On 01/13/2014 09:31 AM, Antoine Pitrou wrote:
>> On Mon, 13 Jan 2014 08:36:05 -0800
>> Ethan Furman wrote:
>>>
>>> You mean crash all the time?  I'd be fine with that for both the str 
>>> case
>>> and the bytes case.  But's probably too late
>>> to change the str case, and the bytes case should mirror what str does.
>>
>> Let me add something else: str and bytes don't have to be symmetrical.
>> In Python 2, str and unicode were symmetrical, they allowed exactly the
>> same operations and were composable.
>> In Python 3, str and bytes are different beasts; they have different
>> operations *and* different semantics (for example, bytes interoperates
>> with bytearray and memoryview, while str doesn't).
>
> This makes sense to me.
>
> So I'm guess I'm fine with either the quoted ascii repr or the always 
> blowing up method, with leaning towards the blowing up method. 

+1 - what Ethan said. A real death, instead death by inappropriately 
transformed data, is fine by me, if b"%s" % str(...) doesn't have the 
appropriate .encode(...) call. But I could live with either.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140113/857e4cb9/attachment.html>


More information about the Python-Dev mailing list