[Python-Dev] Binary Operator for New-Style String Formatting

R. David Murray rdmurray at bitdance.com
Sun Jun 21 20:50:40 CEST 2009


On Sun, 21 Jun 2009 at 12:36, Jerry Chen wrote:
> For better or for worse, I have created a patch against the py3k trunk
> which introduces a binary operator '@' as an alternative syntax for
> the new string formatting system introduced by PEP 3101 ("Advanced
> String Formatting"). [1]

It seems to me that this topic is more appropriate for python-ideas.

That said, I'm -1 on it.  The 'keywords as last item of tuple' reeks
of code-smell to my nose, and I don't think you've addressed all of
the reasons for why a method was chosen over an operator.  Python has a
tradition of having "one obvious way" to do something, so introducing an
"alternative" syntax that you admit is sub-optimal does not seem to me
to have enough benefit to justify breaking that design guideline.

Congratulations on your first foray into the core, though :)

--David


More information about the Python-Dev mailing list