FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-141004: Mark up constants for `PyOS_double_to_string` by encukou · Pull Request #143867 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
20 changes: 17 additions & 3 deletions Doc/c-api/conversion.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ The following functions provide locale-independent string to number conversions.

*flags* can be zero or more of the following values or-ed together:

.. c:namespace:: NULL

.. c:macro:: Py_DTSF_SIGN

Always precede the returned string with a sign
Expand All @@ -151,9 +153,21 @@ The following functions provide locale-independent string to number conversions.

.. versionadded:: 3.11

If *ptype* is non-``NULL``, then the value it points to will be set to one of
``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that
*val* is a finite number, an infinite number, or not a number, respectively.
If *ptype* is non-``NULL``, then the value it points to will be set to one
of the following constants depending on the type of *val*:

.. list-table::
:header-rows: 1
:align: left

* - *\*ptype*
- type of *val*
* - .. c:macro:: Py_DTST_FINITE
- finite number
* - .. c:macro:: Py_DTST_INFINITE
- infinite number
* - .. c:macro:: Py_DTST_NAN
- not a number

The return value is a pointer to *buffer* with the converted string or
``NULL`` if the conversion failed. The caller is responsible for freeing the
Expand Down
Loading

Back | FazBrowse Home | New Git URL