Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue6427] Rename float*.[ch] to double.[ch]

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Jul 6, 2009, 3:30 AM

Post #1 of 4 (343 views)
Permalink
[issue6427] Rename float*.[ch] to double.[ch]

New submission from Jack Diederich <jackdied [at] gmail>:

The core types use doubles, not floats. The file and function names
should reflect that (the docs already do).

----------
components: None
messages: 90169
nosy: jackdied
severity: normal
status: open
title: Rename float*.[ch] to double.[ch]
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 6, 2009, 5:12 AM

Post #2 of 4 (320 views)
Permalink
[issue6427] Rename float*.[ch] to double.[ch] [In reply to]

Amaury Forgeot d'Arc <amauryfa [at] gmail> added the comment:

'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?

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 6, 2009, 5:59 AM

Post #3 of 4 (319 views)
Permalink
[issue6427] Rename float*.[ch] to double.[ch] [In reply to]

Eric Smith <eric [at] trueblade> added the comment:

-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.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Jul 6, 2009, 1:58 PM

Post #4 of 4 (317 views)
Permalink
[issue6427] Rename float*.[ch] to double.[ch] [In reply to]

Martin v. Löwis <martin [at] v> added the comment:

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.

----------
nosy: +loewis
resolution: -> rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue6427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.