[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3

Gregory P. Smith greg at krypto.org
Sat Mar 29 19:53:45 CET 2014


On Thu, Mar 27, 2014 at 3:05 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Thu, 27 Mar 2014 18:47:59 +0000
> Brett Cannon <bcannon at gmail.com> wrote:
> > On Thu Mar 27 2014 at 2:42:40 PM, Guido van Rossum <guido at python.org>
> wrote:
> >
> > > Much better, but I'm still not happy with including %s at all.
> Otherwise
> > > it's accept-worthy. (How's that for pressure. :-)
> > >
> >
> > But if we only add %b and leave out %s then how is this going to lead to
> > Python 2/3 compatible code since %b is not in Python 2? Or am I
> > misunderstanding you?
>
> I think we have reached a point where adding porting-related facilities
> in 3.5 may actually slow down the pace of porting, rather than
> accelerate it (because people will then wait for 3.5 to start porting
> stuff).
>

I understand that sentiment but that is an unjustified fear. It is not a
good reason not to do it. Projects are already trying to port stuff today
and running into roadblocks when it comes to ascii-compatible bytes
formatting for real world data formats in code needing to be 2.x
compatible. I'm pulling out my practicality beats purity card here.

Mercurial is one of the large Python 2.4-2.7 code bases that needs this
feature in order to support Python 3 in a sane manner. (+Augie Fackler to
look at the latest http://legacy.python.org/dev/peps/pep-0461/ to confirm
usefulness)

-gps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140329/194b917a/attachment.html>


More information about the Python-Dev mailing list