New-style string formatting (Was: Re: Tuple "detection")

Michael Chermside mcherm at mcherm.com
Tue May 20 08:31:42 EDT 2003


  [... discussion of an alternative to "%" for string interpolation...]

> Is this the right place for this discussion or should this be
> on python-dev?

This is the right place for the discussion. If the PEP had been written
and accepted and was being implemented (or perhaps even if it wasn't
yet accepted but was being implemented) then python-dev would be
appropriate.

> Alexander Semenov schreef op maandag 19 mei om 22:57:37 +0000:
> > I propose change % to str.__call__()

> Sounds great! Unless we're overlooking something...

Well, I think what you're overlooking is PEP 215. This PEP
(which can be found at "http://www.python.org/peps/pep-0215.html")
proposes a replacement for the "%" operator for strings. I am not
sure at the  moment what its status is... I haven't heard anything
about it for a long time (it's certainly not planned for inclusion
in Python 2.3). But rather than starting a new PEP, you might be
better served by getting behind an existing one. Even if not, you
certainly want to read that PEP and the archived discussions that
led to it and learn from what was discussed previously.

-- Michael Chermside






More information about the Python-list mailing list