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

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

[Python-Dev] PEP 215 redux: toward a simplified consensus? [Python-Dev] PEP 215 redux: toward a simplified consensus?Tim Peters tim.one@comcast.net
Mon, 25 Feb 2002 22:24:03 -0500
[Barry A. Warsaw]
> Does anybody ever even use something other than `s' for %() strings?
>
> >>> '%(float)f' % {'float': 3.9}
> '3.900000'
>
> I never have.

Then again, you've never used a floating-point number either <wink>.  I've
certainly used %(x)f/g/e with float formats.

Not quite speaking of which, if Python grows a new $ operator, let's get the
precedence right.  This kind of thing is too common today:

>>> amount = 3.50
>>> n = 3
>>> print "Total: $%.2f." % amount*n
Total: $3.50.Total: $3.50.Total: $3.50.
>>>




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