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.
On May 31, 2017 11:48 PM, "Serhiy Storchaka"
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.
On May 31, 2017 11:48 PM, "Serhiy Storchaka"
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.
Tau was kind of a joke.
Stephan
Op 1 jun. 2017 09:47 schreef "Serhiy Storchaka"
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@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
Does this really make expressions more readable?
More, these characters are difficult to write.
2017-06-01 9:53 GMT+02:00 Stephan Houben
Tau was kind of a joke.
Stephan
Op 1 jun. 2017 09:47 schreef "Serhiy Storchaka"
: 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@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- Antoine Rozo
Hi Serhiy,
math.π is a kind of joke too.
The point is that tau, being a joke, should not be considered as setting a precedent.
Honest, it is strange, that Python allows Unicode identifiers, but doesn't have the one in its stdlib!
Actually it is policy:
https://www.python.org/dev/peps/pep-3131/#policy-specification
"""
Policy Specification
As an addition to the Python Coding style, the following policy is
prescribed: All identifiers in the Python standard library MUST use
ASCII-only identifiers, and SHOULD use English words wherever feasible
(in many cases, abbreviations and technical terms are used which
aren't English). In addition, string literals and comments must also
be in ASCII. The only exceptions are (a) test cases testing the
non-ASCII features, and (b) names of authors. Authors whose names are
not based on the Latin alphabet MUST provide a Latin transliteration
of their names.
"""
Stephan
2017-06-01 10:06 GMT+02:00 Serhiy Storchaka
01.06.17 10:53, Stephan Houben пише:
Tau was kind of a joke.
math.π is a kind of joke too.
Honest, it is strange, that Python allows Unicode identifiers, but doesn't have the one in its stdlib!
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
Hi Serhiy,
For the record, *I* am a complete nobody,
it's Guido you will have to convince.
I am not sure that presenting it as a joke feature is the road to success,
but admittedly it has at least worked once before.
Stephan
2017-06-01 12:16 GMT+02:00 Serhiy Storchaka
01.06.17 12:32, Stephan Houben пише:
math.π is a kind of joke too.
The point is that tau, being a joke, should not be considered as setting a precedent.
If add one joke feature per release, this one looks enough harmless.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
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"
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@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
participants (4)
-
Antoine Rozo
-
David Mertz
-
Serhiy Storchaka
-
Stephan Houben