On Wed, Aug 26, 2020 at 9:02 AM Guido van Rossum
Mypy includes an experimental compiler from typed Python to C that actually does what the OP is looking for.
There is also Cython, which is almost exactly what the OP is looking for.
(I’m curious about how mypyc is different than Cython (other than syntax) and I’ve lost track, but I thought Cython was looking into using standard type hint notation.
But there’s a trick: type hints can be (and often are) duck typed. That is, they might specify a Sequence of Numbers, which doesn’t provide enough information to compile down to fully performant code.
In fact, when type hinting was standardized, it was explicitly said that that was not the goal.
-- --Guido van Rossum (python.org/~guido) Pronouns: he/him **(why is my pronoun here?) http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...
Python-ideas mailing list -- firstname.lastname@example.org
To unsubscribe send an email to email@example.com
Message archived at https://firstname.lastname@example.org/message/3FS5C3...
Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD
Python Language Consulting