diff --git a/pythonetc/README.md b/pythonetc/README.md index b2eb723..d4a2791 100644 --- a/pythonetc/README.md +++ b/pythonetc/README.md @@ -73,6 +73,7 @@ More: 1. ./re-compile.md 1. ./lru-cache.md 1. ./functools-cache.md +1. ./tau.md Out of order: @@ -92,5 +93,3 @@ Unicode module String.Template String module consts Urllib -Always compile regexp -Tau vs pi diff --git a/pythonetc/digits.md b/pythonetc/digits.md index 9a209a0..b633a08 100644 --- a/pythonetc/digits.md +++ b/pythonetc/digits.md @@ -1,4 +1,4 @@ -We used to use Arabic digits to record numbers. However, there are many more numeral systems: Chinese (and Suzhou), Chakma, Persian, Hebrew, and so on. And Python supports them when detecting numbers: +We use Arabic digits to record numbers. However, there are many more numeral systems: Chinese (and Suzhou), Chakma, Persian, Hebrew, and so on. And Python supports them when detecting numbers: ```python int('٤٢') diff --git a/pythonetc/tau.md b/pythonetc/tau.md new file mode 100644 index 0000000..1cff56b --- /dev/null +++ b/pythonetc/tau.md @@ -0,0 +1,15 @@ +Issue with beautiful number [#12345](https://bugs.python.org/issue12345) proposed to add the following constant into stdlib: + +```python +tau = 2*math.pi +``` + +It was a contraversal proposal since apparently it's not hard to recreate this constant on your own which will be more explicit, since more people are familiar with π rather than τ. However, the proposal was accepted and tau landed in `math` module in Python 3.6 ([PEP-628](https://www.python.org/dev/peps/pep-0628/)): + +```python +import math +math.tau +# 6.283185307179586 +``` + +There is a long story behind τ which you can read at [tauday.com](https://tauday.com/). Especially good [this numberphile video](http://youtu.be/83ofi_L6eAo).