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

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

[Python-Dev] PEP 215 redux: toward a simplified consensus?Fredrik Lundh fredrik@pythonware.com
Mon, 25 Feb 2002 21:44:13 +0100
paul wrote:
> Your strategy requires the naive user to learn a) the $ syntax, b) the
> magic operator syntax and c) the meaning of the locals() function. Plus
> you've thrown away the idea that interpolation works as it does in the
> shell or in Perl/Awk/Ruby etc.
> 
> At that point, in my mind, we're back where we started and should just
> use %.

    # interpolate!
    s = I('Joe has $ ', a, ' in his pocket.')

or perhaps

    # print-like interpolation
    s = P('Joe has $', a, 'in his pocket.')

works pretty well too.  in all versions of python, with all existing
syntax-aware tools.  and if written in C, it's probably as fast as
any other solution...

(implementing I/P is left as an exercise etc etc)

</F>




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