[Python-ideas] π = math.pi

David Mertz mertz at gnosis.cx
Thu Jun 1 12:58:57 EDT 2017


I think having math.pi is just for backward compatibility. We all use tau
now, I assume. That's why the true definition is:

  pi = math.tau/2

:-)

... and yes, as someone else comments, adding tau was a bit whimsical in
the spirit of 'import antigravity' and the line.

On Jun 1, 2017 12:48 AM, "Serhiy Storchaka" <storchaka at gmail.com> wrote:

01.06.17 10:03, David Mertz пише:

It's awfully easy to add in your own code. Since they are simply aliases, I
> don't see why bother put the duplication in the standard library. You can
> even monkey patch if you want it in the 'math' namespace. I'd prefer a bare
> 'π' in my own code though.
>

As well as adding tau = 2*math.pi in your own code. But this deserved the
whole PEP and was added as a feature in 3.6.


_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170601/185d97fd/attachment-0001.html>


More information about the Python-ideas mailing list