[Python-Dev] PEP460 thoughts from a Mercurial dev (original) (raw)

Augie Fackler raf at durin42.com
Mon Jan 13 18:41:11 CET 2014


On Mon, Jan 13, 2014 at 12:39 PM, Guido van Rossum <guido at python.org> wrote:

On Mon, Jan 13, 2014 at 9:37 AM, Augie Fackler <raf at durin42.com> wrote: > > On Mon, Jan 13, 2014 at 12:34 PM, Guido van Rossum <guido at python.org> wrote: >> >> On Mon, Jan 13, 2014 at 8:51 AM, Nick Coghlan <ncoghlan at gmail.com> wrote: >> > On 13 January 2014 23:57, Augie Fackler <raf at durin42.com> wrote: >> >> 1) What do we need in terms of functionality >> >> >> >> Best guess, %s, %d, and %f. I've not done a full audit of the code, but >> >> some >> >> limited looking over the grep hits for % in .py files suggests I'm >> >> right, >> >> and we could even do without %f (we only use that for 'hg --time' >> >> output, >> >> which we could do in unicode). >> > >> > I think PEP 460 will have you covered there, or hopefully asciistr on >> > 3.3+ >> >> I'm confused on how PEP 460 would help -- Augie mentioned %d, which it >> excludes. > > > > Yes - not having %d makes this much much less useful to me. > > For my part, it'd probably be fine if we could do %s (which would handle an > RHS that was bytes, and only bytes, no handing of str or bytes-type > stuff at all) and %d (with all the usual format modifiers, and would result > in an ascii-compatible sequence of bytes all the time).

Would it be okay of instead of %s you had to use %b for those semantics? (%d would still exist)

Probably, but it'd be quite painful, since we'd have to to some kind of .sub() call all over the place to remain compatible with 2.4 and 2.6.

Dropping 2.4 might be possible in the 3.5 timeframe - 2.6 almost certainly not. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140113/6cb5c158/attachment.html>



More information about the Python-Dev mailing list