ENH: 🐍 snake by tacaswell · Pull Request #1686 · python/cpython · GitHub
source link: https://github.com/python/cpython/pull/1686
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Contributor
tacaswell commented on May 20, 2017
Special case the identifier validation to allow to be used in
identifiers
This works in the terminal (assuming you have the right fonts, showing both with and without mark up as the do not render for me in the escaped code)
(bleeding) ✔ ~
18:38 $ python
Python 3.7.0a0 (heads/enh_🐍_snek:2bfe3d18dad, May 20 2017, 18:32:35)
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 🐍 = 1
>>> 🐍 + 🐍
2
>>>
(bleeding) ✔ ~
(bleeding) ~
18:38 $ python
Python 3.7.0a0 (heads/enh__snek:2bfe3d18dad, May 20 2017, 18:32:35)
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
= 1
+
2
(bleeding) ~
It also works in the jupyter notebook (again assuming you have the right fonts)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK