Skip to content

Latest commit

 

History

History
6 lines (6 loc) · 368 Bytes

2020-05-28-11-54-56.bpo-40801.CFOWc1.rst

File metadata and controls

6 lines (6 loc) · 368 Bytes

Add a new :func:`operator.as_float` function for converting an arbitrary Python numeric object to :class:`float`. This is a simple wrapper around the :c:func:`PyFloat_AsDouble` C-API function. The intent is to provide at Python level a conversion whose semantics exactly match Python's own implicit float conversions, for example those used in the :mod:`math` module.