Issue #1588: Add complex.__format__.
diff --git a/Include/complexobject.h b/Include/complexobject.h
index 84b6d8b..c9a9500 100644
--- a/Include/complexobject.h
+++ b/Include/complexobject.h
@@ -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,
+ char *format_spec,
+ Py_ssize_t format_spec_len);
+
#ifdef __cplusplus
}
#endif