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

[Python-Dev] PEP 292, Simpler String Substitutions

[Python-Dev] PEP 292, Simpler String Substitutions [Python-Dev] PEP 292, Simpler String SubstitutionsBarry A. Warsaw barry@zope.com
Wed, 19 Jun 2002 10:58:56 -0400
>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    >> I agree that certain use cases make the exception problematic.
    >> Think a program that uses a template entered remotely through
    >> the web.  That template could have misspellings in the variable
    >> substitutions.  In that case I think you'd like to carry on as
    >> best you can, by returning a string with the bogus placeholders
    >> still in the string.

    GvR> That's a matter of validating the template before accepting
    GvR> it.

True, which isn't hard to do.  You can write a regexp to extract the
$names and then validate those.  In fact, I think this is what newer
versions of xgettext do for Python code (albeit with the %(name)s
syntax).

-Barry




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