A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-June/025670.html below:

PEP 292, Simpler String Substitutions

[Python-Dev] Re: PEP 292, Simpler String Substitutions [Python-Dev] Re: PEP 292, Simpler String SubstitutionsPatrick K. O'Brien pobrien@orbtech.com
Wed, 19 Jun 2002 23:23:10 -0500
[Guido van Rossum]
>
> > > I quite like the positional % substitution.  I think %(...)s was a
> > > mistake -- what we really wanted was ${...}.
> >
> > What is the advantage of curly braces over parens in this context?
>
> Apart from Make, most $ substituters use ${...}, not $(...).

I guess what I was really wondering is whether that advantage clearly
outways some of the possible disadvantages. I'm not a fan of curly braces
and I'll be sad to see more of them in Python. There's something refreshing
about only having curly braces for dictionaries and parens everywhere else.
And since the exisiting string substitution uses parens why shouldn't the
new?

It won't surprise me that you've already considered all this and are fine
with using curly braces here, but I just had to ask before it is a done
deal. (And I promise I won't go on a boolean crusade and predict that curly
braces will appear everywhere to the demise of the language. <wink>)

--
Patrick K. O'Brien
Orbtech
-----------------------------------------------
"Your source for Python software development."
-----------------------------------------------
Web:  http://www.orbtech.com/web/pobrien/
Blog: http://www.orbtech.com/blog/pobrien/
Wiki: http://www.orbtech.com/wiki/PatrickOBrien
-----------------------------------------------





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4