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-January/019534.html below:

[Python-Dev] Utopian String Interpolation

[Python-Dev] Utopian String InterpolationM.-A. Lemburg mal@lemburg.com
Wed, 16 Jan 2002 19:22:37 +0100
Paul Prescod wrote:
> 
> I think that if we're going to do string interpolation we might as go
> all of the way and have one unified string interpolation model.
> 
>  1. There should be no string-prefix. Instead the string \$ should be
> magical in all non-raw literal strings as \x, \n etc. are. (if you want
> to do string interpolation on a raw string, you could do it using the
> method version below)
> 
> >>> from __future__ import string_interp
> 
> >>> a = "acos(.5) = \$(acos(.5))"
> 
> Embrace the __future__!

-1. 

Too dangerous. If string interpolation makes it into the core,
then please use a *new* construct. '\$' is currently interpreted
as '\$' and this should not be changed (heck, just think what would
happen to all the shell script snippets encoded in Python strings).
 
BTW, why don't you wrap all this interpolation stuff into
a module and then call a function to have it apply all the
magic you want. If I remember correctly, someone
else has already written such a module for Python.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/



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