[Python-Dev] PEP 460: allowing %d and %f and mojibake (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Tue Jan 14 10:39:48 CET 2014


On 14 Jan 2014 19:11, "Stephen J. Turnbull" <stephen at xemacs.org> wrote:

Nick Coghlan writes: > "Give up" makes it sound like I got tired of arguing without being > convinced rather than admitting I was just plain wrong. I thought it was something in between (you explicitly said "lenient PEP 460" doesn't hurt you, but my understanding was you still believe that there's a safer way, and it's the latter you aren't going to try to convince folks of).

I did say that at one point (when Guido first objected to the formatb idea), but I switched to complete agreement after he pointed out the ASCII assumption embedded in the formatting syntax itself.

> While I'll still work on the asciistr proposal, Thank you for that. I really wish I had time to, myself, but not for several weeks... :-(

Heh, depending on how many quirky edge cases we find, we may still be working on it by then, especially since there are still a few docs updates and other fixes I want to get into Python 3.4.

> that's unrelated to PEP 460 - it's about making hybrid APIs less

"It" refers to asciistr or to PEP 460?

asciistr

> painful to write in Python 3 when you're willing to place the > burden of ensuring ASCII compatibility of binary data on the > calling code.

Versus what?

Versus doing explicit decoding the way urllib.parse does - it only accepts strict 7-bit ASCII as binary input by default, so you have to decode to text externally in order to handle arbitrary input that may contain other bytes.

Cheers, Nick.

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140114/34d9999f/attachment.html>



More information about the Python-Dev mailing list