summaryrefslogtreecommitdiff
path: root/Modules/cmathmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2016-08-15 09:12:52 -0700
committerGuido van Rossum <guido@dropbox.com>2016-08-15 09:12:52 -0700
commit2cc8235deb4eb24b5fbbc9446a5eb291fb89ee73 (patch)
treeb67c487ae95d79aaeaa9d39336956152895cc65c /Modules/cmathmodule.c
parent4dccd58a52119d952226773b095547fc11c85889 (diff)
downloadcpython-2cc8235deb4eb24b5fbbc9446a5eb291fb89ee73.tar.gz
Issue #12345: Add mathemathcal constant tau to math and cmath.
Patch by Lisa Roach. See also PEP 628.
Diffstat (limited to 'Modules/cmathmodule.c')
-rw-r--r--Modules/cmathmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index cba42a7257..0e7d4db96d 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -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 */