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

Suggested changes to PEP 215

[Python-Dev] Re: Suggested changes to PEP 215 [Python-Dev] Re: Suggested changes to PEP 215Jason Orendorff jason@jorendorff.com
Mon, 14 Jan 2002 21:46:38 -0600
Ping wrote:
> > Consider:
> >
> >     def f(str):
> >         # The argument 'str' masks the builtin str() function.
> >         a, b = find_stuff(str)
> >         print $'a = $a, b = $b'
> >         return a, b
> >
> > It should be specified that $-strings do not use the local
> > "str" and "unicode" names to find str() and unicode()
> 
> Good point.  Perhaps it is better to simply describe a
> transformation using '%s' and '%' instead of 'str' and '+'
> to avoid this potential confusion altogether.

I thought about this; but I don't know if there's a '%'
equivalent for the unicode handling.

$u'uni${a}ode'
    ---> (u'uni' + unicode(a) + u'ode')
    ---> u'uni%???ode' % (a,)

I don't think %s does it.  Maybe there's some format spec
flag that I'm forgetting.

## Jason Orendorff    http://www.jorendorff.com/




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