[Python-Dev] Re: Update PEP 292

Fredrik Lundh fredrik at pythonware.com
Wed Aug 11 13:38:25 CEST 2004


Michael Hudson wrote:

> It's a silly point, but my instant impression on reading
>
>     This PEP describes a simpler string substitution feature, also
>     known as string interpolation.
>
> is "simpler than *what*?".

that's explained in the next sentence, of course.

    This PEP is "simpler" in two respects:
    [...]

> The only issue I have with putting it in string is that this makes it
> a touch harder to bundle up for use with scripts that work with older
> Python's (I take it the implementation is pure Python and works or can
> be fairly easily be made to work with 2.2?).

here's code that implements the "simpler" syntax, and works with 1.6
and later:

    http://effbot.org/zone/re-sub.htm#simple-templating

(from what I saw from the checkins, the PEP implementation isn't exactly
optimal, but I guess we can leave that for the next Optimization Day ;-)

</F>





More information about the Python-Dev mailing list