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/2004-September/048804.html below:

[Python-Dev] Re: Alternative ImplementationforPEP292:SimpleString Substitutions

[Python-Dev] Re: Alternative ImplementationforPEP292:SimpleString Substitutions [Python-Dev] Re: Alternative ImplementationforPEP292:SimpleString SubstitutionsBrett C. bac at OCF.Berkeley.EDU
Sat Sep 11 07:22:12 CEST 2004
Raymond Hettinger wrote:

>>>* For someone who understands exactly what they are doing, perhaps
> 
> $ma
> 
>>>is the intended placeholder -- why force them to uses braces:
>>>${ma}ñana.
>>
>>It also makes it more difficult to document.  IOW, right now the PEP
> 
> and
> 
>>the documentation say that the first non-identifier character
> 
> terminates
> 
>>the placeholder.  How would you word the rules with your change?
> 
> 
> """Placeholders must be a valid Python identifier (containing only ASCII
> alphanumeric characters and an underscore).  If an unbraced identifier
> ends with a non-ASCII alphanumeric character, such as the latin letter n
> with tilde in $mañana, then a ValueError is raised for the specious
> identifier.
> 

I don't think any of this is needed.  If a non-programmer is being told 
to use string substitution chances are someone is either going to 
explain it to them or there will be another set of docs to explain 
things in a simple way.  I suspect stating exactly what a valid Python 
identifier contains as you did in parentheses above will be enough.

-Brett
More information about the Python-Dev mailing list

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