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/2008-July/081254.html below:

[Python-Dev] PEP 3101: floats format 'f' and 'F'

[Python-Dev] PEP 3101: floats format 'f' and 'F' [Python-Dev] PEP 3101: floats format 'f' and 'F'Guido van Rossum guido at python.org
Wed Jul 16 19:25:29 CEST 2008
On Wed, Jul 16, 2008 at 7:35 AM, Eric Smith
<eric+python-dev at trueblade.com> wrote:
> Does anyone know why 'F' is the same as 'f'?  Wouldn't it make more sense to
> either drop it, or make it convert the exponent to upper case (like 'E' and
> 'G')?  Compatibility with %-formatting is the only reason I can think of to
> keep up, but I get the sense we've given up on an automatic conversion from
> %-formatting to str.format().  Plus, I can find no uses of '%F' in the
> standard library.

My best guess as to why 'F' is the same as 'f' is that somebody
(could've been me :-) thought, like several others in this thread,
that %f never prints an exponent. I agree that making it emit an 'E'
when an exponent is used is the right thing to do. Do it now!

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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