Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5ae808

Browse files
[3.14]gh-141004: DocumentPy_DTSF_* macros (GH-141310) (GH-141329)
gh-141004: Document `Py_DTSF_*` macros (GH-141310)(cherry picked from commit9b0179f)Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent6cbb8cb commitb5ae808

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

‎Doc/c-api/conversion.rst‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,28 @@ The following functions provide locale-independent string to number conversions.
128128
must be 0 and is ignored. The ``'r'`` format code specifies the
129129
standard:func:`repr` format.
130130
131-
*flags* can be zero or more of the values ``Py_DTSF_SIGN``,
132-
``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:
131+
*flags* can be zero or more of the following values or-ed together:
133132
134-
* ``Py_DTSF_SIGN`` means to always precede the returned string with a sign
135-
character, even if *val* is non-negative.
133+
..c:macro:: Py_DTSF_SIGN
136134
137-
* ``Py_DTSF_ADD_DOT_0`` means to ensure thatthe returned stringwill not look
138-
like an integer.
135+
Always precedethe returned stringwith a sign
136+
character, even if *val* is non-negative.
139137
140-
* ``Py_DTSF_ALT`` means to apply "alternate" formatting rules. See the
141-
documentation for the:c:func:`PyOS_snprintf` ``'#'`` specifier for
142-
details.
138+
..c:macro:: Py_DTSF_ADD_DOT_0
139+
140+
Ensure that the returned string will not look like an integer.
141+
142+
..c:macro:: Py_DTSF_ALT
143+
144+
Apply "alternate" formatting rules.
145+
See the documentation for the:c:func:`PyOS_snprintf` ``'#'`` specifier for
146+
details.
147+
148+
..c:macro:: Py_DTSF_NO_NEG_0
149+
150+
Negative zero is converted to positive zero.
151+
152+
..versionadded::3.11
143153
144154
If *ptype* is non-``NULL``, then the value it points to will be set to one of
145155
``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp