This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Rename float*.[ch] to double.[ch]
Type: Stage:
Components: None Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, eric.smith, jackdied, loewis
Priority: normal Keywords:

Created on 2009-07-06 10:30 by jackdied, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg90169 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2009-07-06 10:30
The core types use doubles, not floats.  The file and function names
should reflect that (the docs already do).
msg90175 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-07-06 12:12
'float' is how python names its floating point number type, and this
won't change.  Yes, it is based on the C double, but I think that the
code is very careful to avoid the confusion.

For example, in the C sources, the word 'float' always has a 'Py'
prefix, or an 'object' suffix, to assert that it refers to the python
type (e.g. PyFloat_FromDouble, floatobject.c)

Do you have a precise example where the distinction is not clear?
msg90177 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-07-06 12:59
-1

The time to change this was 3.0, if it was ever needed. It would break
too much code now. We could develop some strategy using macros, but I
just don't think it's worth it.

And as Amaury points it, the type is known in python as "float", so to
change it would be confusing. That it uses C doubles is an
implementation detail.
msg90191 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-07-06 20:57
As Amaury explains, it's called float because it *is* a floating point
type. 

It is not a double type, as it is not two types, but only a single one
:-) In 2.x, the "int" type was also represented with a C long, yet the
type called "long" was not represented with longs but with shorts.
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50676
2009-07-06 20:57:59loewissetstatus: open -> closed

nosy: + loewis
messages: + msg90191

resolution: rejected
2009-07-06 12:59:33eric.smithsetnosy: + eric.smith
messages: + msg90177
2009-07-06 12:12:10amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg90175
2009-07-06 10:30:49jackdiedcreate