Issue #12345: Add mathemathcal constant tau to math and cmath.

Patch by Lisa Roach. See also PEP 628.
This commit is contained in:
Guido van Rossum 2016-08-15 09:12:52 -07:00
parent 6349612a8e
commit 0a891d70de
7 changed files with 23 additions and 2 deletions

View file

@ -1239,6 +1239,7 @@ PyInit_cmath(void)
PyModule_AddObject(m, "pi",
PyFloat_FromDouble(Py_MATH_PI));
PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E));
PyModule_AddObject(m, "tau", PyFloat_FromDouble(Py_MATH_TAU)); /* 2pi */
/* initialize special value tables */