How about leveraging the `# coding=<encoding name>` hook that exists
since 2001 to enable the alternative syntax some are advocating for
type hints?
PEP 263—Defining Python Source Code Encodings
https://www.python.org/dev/peps/pep-0263/
I've seen experiments in the wild using that to support syntax
extensions to Python. Just for fun, years ago I wrote a POC for
Sucuri—a Python dialect with the keywords in Portuguese. The
pre-processor simply replaced the Portuguese keywords with the English
ones.
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Technical Principal at ThoughtWorks
| Twitter: @ramalhoorg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XRLAOOIJZRPDT2AW6LW4UVBEJD5NKLV5/
Code of Conduct: http://python.org/psf/codeofconduct/
since 2001 to enable the alternative syntax some are advocating for
type hints?
PEP 263—Defining Python Source Code Encodings
https://www.python.org/dev/peps/pep-0263/
I've seen experiments in the wild using that to support syntax
extensions to Python. Just for fun, years ago I wrote a POC for
Sucuri—a Python dialect with the keywords in Portuguese. The
pre-processor simply replaced the Portuguese keywords with the English
ones.
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Technical Principal at ThoughtWorks
| Twitter: @ramalhoorg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XRLAOOIJZRPDT2AW6LW4UVBEJD5NKLV5/
Code of Conduct: http://python.org/psf/codeofconduct/