A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131505.html below:

[Python-Dev] PEP 460: allowing %d and %f and mojibake

[Python-Dev] PEP 460: allowing %d and %f and mojibakeGuido van Rossum guido at python.org
Tue Jan 14 07:04:06 CET 2014
On Mon, Jan 13, 2014 at 9:34 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 14 January 2014 15:15, Stephen J. Turnbull <stephen at xemacs.org> wrote:
>> The purity position is probably going to lose in the end, since Guido
>> is clearly in the PBP camp at this point, and that's a strong
>> indicator (especially since Nick has given up on convincing
>> python-dev).  But that does not mean it's entirely invalid.
>
> I didn't give up regarding PEP 460 - Guido pointed out an error in my
> assumptions that made my position invalid, and his correct. "Give up"
> makes it sound like I got tired of arguing without being convinced
> rather than admitting I was just plain wrong.

Thanks for that. (I was worried when I saw your first huge post in the
reboot thread.)

> While I'll still work on the asciistr proposal, that's unrelated to
> PEP 460 - it's about making hybrid APIs less 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. That kind of thing
> is likely to be a reasonable approach in specific domains (when
> writing a web development framework, for example), even though I think
> it's an *in*appropriate design for the standard library.

I've now looked at asciistr. (Thanks Glenn and Ethan for the link.)

Now that I (hopefully) understand it, I'm worried that a text
processing algorithm that uses asciistr might under hard-to-predict
circumstances (such as when the arguments contain nothing of interest
to the algorithm) might return an asciistr instance instead of a str
or bytes instance, and this might confuse a caller (e.g. isinstance()
checks might fail, dict lookups, or whatever -- it feels like the
problem is similar to creating the perfect proxy type).

> PEP 460 should actually make asciistr easier in the long run, as I now
> expect we'll run into some "interesting" issues getting formatting to
> produce anything other than text (contrary to what I said elsewhere in
> these threads - I hadn't thought through the full implications at the
> time).

For example?

-- 
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4