mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Issue #1588: Add complex.__format__.
This commit is contained in:
parent
2518d3c1c0
commit
9139cc6a3b
7 changed files with 448 additions and 57 deletions
|
@ -6,9 +6,10 @@
|
|||
#include "Python.h"
|
||||
#include "../Objects/stringlib/stringdefs.h"
|
||||
|
||||
#define FORMAT_STRING _PyBytes_FormatAdvanced
|
||||
#define FORMAT_LONG _PyLong_FormatAdvanced
|
||||
#define FORMAT_INT _PyInt_FormatAdvanced
|
||||
#define FORMAT_FLOAT _PyFloat_FormatAdvanced
|
||||
#define FORMAT_STRING _PyBytes_FormatAdvanced
|
||||
#define FORMAT_LONG _PyLong_FormatAdvanced
|
||||
#define FORMAT_INT _PyInt_FormatAdvanced
|
||||
#define FORMAT_FLOAT _PyFloat_FormatAdvanced
|
||||
#define FORMAT_COMPLEX _PyComplex_FormatAdvanced
|
||||
|
||||
#include "../Objects/stringlib/formatter.h"
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#define FORMAT_STRING _PyUnicode_FormatAdvanced
|
||||
|
||||
/* don't define FORMAT_LONG and FORMAT_FLOAT, since we can live
|
||||
with only the string versions of those. The builtin format()
|
||||
will convert them to unicode. */
|
||||
/* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since
|
||||
we can live with only the string versions of those. The builtin
|
||||
format() will convert them to unicode. */
|
||||
|
||||
#include "../Objects/stringlib/formatter.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue