summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-04-30 00:58:58 (GMT)
committerEric Smith <eric@trueblade.com>2009-04-30 00:58:58 (GMT)
commit9139cc6a3ba9b6c66a09256f3295b1a4ed50adc9 (patch)
tree7e116afff6e262ba6161cad6c1f223f6741bf0d0 /Python
parent2518d3c1c0b907b1cabdaa647c7affaa01ffca63 (diff)
downloadcpython-9139cc6a3ba9b6c66a09256f3295b1a4ed50adc9.zip
cpython-9139cc6a3ba9b6c66a09256f3295b1a4ed50adc9.tar.gz
cpython-9139cc6a3ba9b6c66a09256f3295b1a4ed50adc9.tar.bz2
Issue #1588: Add complex.__format__.
Diffstat (limited to 'Python')
-rw-r--r--Python/formatter_string.c9
-rw-r--r--Python/formatter_unicode.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/Python/formatter_string.c b/Python/formatter_string.c
index f33ad70..e6a4d4b 100644
--- a/Python/formatter_string.c
+++ b/Python/formatter_string.c
@@ -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"
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c
index 5cf5bad..6e3685d 100644
--- a/Python/formatter_unicode.c
+++ b/Python/formatter_unicode.c
@@ -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"