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/2003-October/039324.html below:

[Python-Dev] Can we please have a better dict interpolation syntax?

[Python-Dev] Can we please have a better dict interpolation syntax? [Python-Dev] Can we please have a better dict interpolation syntax?Greg Ewing greg at cosc.canterbury.ac.nz
Wed Oct 22 21:36:41 EDT 2003
I have just had the experience of writing a bunch
of expressions of the form

  "create index %(table)s_lid1_idx on %(table)s(%(lid1)s)" % params

and found myself getting quite confused by all the parentheses
and "s" suffixes. I would *really* like to be able to write
this as

  "create index %{table}_lid1_idx on %{table}(%{lid1})" % params

which I find to be much easier on the eyes.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list

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