bpo-29878: Add global instances of int for 0 and 1. (#852)

This commit is contained in:
Serhiy Storchaka 2017-03-30 09:09:41 +03:00 committed by GitHub
parent e6911a44f6
commit ba85d69a3e
18 changed files with 105 additions and 249 deletions

View file

@ -936,7 +936,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
/*[clinic input]
@classmethod
complex.__new__ as complex_new
real as r: object(c_default="Py_False") = 0
real as r: object(c_default="_PyLong_Zero") = 0
imag as i: object(c_default="NULL") = 0
Create a complex number from a real part and an optional imaginary part.