Mercurial > cpython-lru_cache-weakref
diff Include/complexobject.h @ 53632:2cde0d003ffc
Issue #1588: Add complex.__format__.
| author | Eric Smith <eric@trueblade.com> |
|---|---|
| date | Thu, 30 Apr 2009 01:00:33 +0000 |
| parents | b69f443ef480 |
| children | 62b61abd02b8 |
line wrap: on
line diff
--- a/Include/complexobject.h Thu Apr 30 00:59:58 2009 +0000 +++ b/Include/complexobject.h Thu Apr 30 01:00:33 2009 +0000 @@ -54,6 +54,12 @@ PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op); PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op); +/* Format the object based on the format_spec, as defined in PEP 3101 + (Advanced String Formatting). */ +PyAPI_FUNC(PyObject *) _PyComplex_FormatAdvanced(PyObject *obj, + Py_UNICODE *format_spec, + Py_ssize_t format_spec_len); + #ifdef __cplusplus } #endif
