[issue13118] Py_BuildValue format f incorrect description.
New submission from Félix-Antoine Fortin <felixantoinefortin+python@gmail.com>: Python/C API Reference Manual, section Utilities, Parsing arguments and building values, function Py_BuildValue. The description for the format unit "f" is incorrect. It reads "Same as d.", as it should be "Convert a C float to a Python floating point number." since "f" is not the same as "d" when converting double to Python float. This was corrected in the documentation of Python 3, from which the proposed description comes. ---------- assignee: docs@python components: Documentation messages: 145031 nosy: docs@python, felixantoinefortin priority: normal severity: normal status: open title: Py_BuildValue format f incorrect description. versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13118> _______________________________________
Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment: I've checked in the code: 'f' and 'd' are really the same (Python/modsupport.c). And in http://en.wikipedia.org/wiki/Stdarg.h, you can read: """A float will automatically be promoted to a double.""" ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13118> _______________________________________
Félix-Antoine Fortin <felixantoinefortin+python@gmail.com> added the comment: I stand corrected. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13118> _______________________________________
participants (2)
-
Amaury Forgeot d'Arc -
Félix-Antoine Fortin