[Python-Dev] PEP460 thoughts from a Mercurial dev

Augie Fackler raf at durin42.com
Mon Jan 13 19:51:32 CET 2014


Antoine Pitrou <solipsis <at> pitrou.net> writes:

> 
> On Mon, 13 Jan 2014 09:34:39 -0800
> 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.
> 
> Serhiy did a survey of formatting codes in the Mercurial sources:
> https://mail.python.org/pipermail/python-dev/2014-January/130969.html

Note that a lot of those are in debug code (eg the only %f I've spotted is),
or are time format specifiers (which can be unicode just fine). A few others
(eg %ln) are for our internal revset format-string language, so this
overstates what we'd need in bytes by a little. %f would probably be good
too, as I look a little more.

(Please don't remove me from the CC list - I could only respond via gmane
because I'm not subscribed to python-dev.)

> 
> Regards
> 
> Antoine.
> 
> 






More information about the Python-Dev mailing list