mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #7169: Document PyFloat_AsString and PyFloat_AsReprString, and note that they are unsafe and deprecated.
This commit is contained in:
parent
156692752d
commit
c12781abcb
2 changed files with 27 additions and 0 deletions
|
@ -92,3 +92,27 @@ Floating Point Objects
|
||||||
be freed.
|
be freed.
|
||||||
|
|
||||||
.. versionadded:: 2.6
|
.. versionadded:: 2.6
|
||||||
|
|
||||||
|
|
||||||
|
.. cfunction:: void PyFloat_AsString(char *buf, PyFloatObject *v)
|
||||||
|
|
||||||
|
Convert the argument *v* to a string, using the same rules as
|
||||||
|
:func:`str`. The length of *buf* should be at least 100.
|
||||||
|
|
||||||
|
This function is unsafe to call because it writes to a buffer whose
|
||||||
|
length it does not know.
|
||||||
|
|
||||||
|
.. deprecated:: 2.7
|
||||||
|
Use :func:`PyObject_Str` or :func:`PyOS_double_to_string` instead.
|
||||||
|
|
||||||
|
|
||||||
|
.. cfunction:: void PyFloat_AsReprString(char *buf, PyFloatObject *v)
|
||||||
|
|
||||||
|
Same as PyFloat_AsString, except uses the same rules as
|
||||||
|
:func:`repr`. The length of *buf* should be at least 100.
|
||||||
|
|
||||||
|
This function is unsafe to call because it writes to a buffer whose
|
||||||
|
length it does not know.
|
||||||
|
|
||||||
|
.. deprecated:: 2.7
|
||||||
|
Use :func:`PyObject_Repr` or :func:`PyOS_double_to_string` instead.
|
||||||
|
|
|
@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #7168: Document PyFloat_AsString and PyFloat_AsReprString, and
|
||||||
|
note that they are unsafe and deprecated.
|
||||||
|
|
||||||
- Issue #7120: logging: Removed import of multiprocessing which is causing
|
- Issue #7120: logging: Removed import of multiprocessing which is causing
|
||||||
crash in GAE.
|
crash in GAE.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue