[issue12345] Add math.tau

Aaron Meurer report at bugs.python.org
Thu Aug 11 15:52:07 EDT 2016


Aaron Meurer added the comment:

I also wonder, if math will be gaining constants that no one uses like tau, if it will also gain constants that people actually do use (currently math just has pi, e, inf, and nan). [i for i in dir(numpy) if isinstance(getattr(numpy, i), float)] reveals euler_gamma as one example. https://docs.scipy.org/doc/scipy/reference/constants.html lists a bunch more. 

And if we're adding derived constants, why not loge2, another derived constants, used way more often than tau?

In case you can't tell, I'm opposed to adding tau, although fwiw I do think it would be nice to add some of the other constants I mentioned above like euler_gamma to math, and in general, I support adding more stuff to math (but only generally useful stuff, obviously; there's no need to port all of scipy.special, for instance).

As an aside, a technical note on the patch: for consistency, it should also be added to the cmath library (pardon me if I misread the patch and that's already happening).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12345>
_______________________________________


More information about the Python-bugs-list mailing list