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-February/020342.html below:

[Python-Dev] PEP 215 redux: toward a simplified consensus?

[Python-Dev] PEP 215 redux: toward a simplified consensus?Paul Prescod paul@prescod.net
Mon, 25 Feb 2002 16:39:21 -0800
[meant to send this before]

Guido van Rossum wrote:
> 
>...
> 
> All right, but there *also* needs to be a way to invoke interpolation
> explicitly -- just like eval().  This has applicability e.g. in i18n.

Agree 100%. The last time we discussed this I proposed there should be a
function to do this. But the naive integrated syntax could be compile
time.

My complaints with the current interpolation are:

 1. they require too many magical incantations to invoke (especially %
vars())
 2. they require too much thinking about types and conversions in the
syntax
 3. special behaviour with dictionaries and tuples and singleton tuples
etc.
 4. operator abuse

I would only be in favour of a replacement if for *simple cases* it
cleared up all of these issues so that it is roughly as easy as in
Perl/Ruby/sh/tcl:

a = $"My name is $name"

If there is any more syntax than that then personally I think that the
cost/benefit ratio falls down. So I don't see this as a big win:

a = "My name is $name" \ locals()

It solves two of my four problems.

Maybe other people have different goals than I do and that's why they
see the above as a "win".

 Paul Prescod



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