On Wed, Aug 26, 2020 at 8:41 AM Ronald Oussoren via Python-ideas < python-ideas@python.org> wrote:
> > On 26 Aug 2020, at 17:02, krishnans2...@gmail.com wrote: > > One suggestion I had for the next Python release is to add > type-implication support. Many developers have learned Python, but do not > want to use it since it is slow. An awesome way to fix this is to have > optional type-implications. For example, if you know for sure that variable > x is an int, you can make Python just a bit smaller by somehow specifying > to the interpreter that the variable is an integer. Something like 'x::int > = 5'. By having optional type implications, you can still do everything you > do with normal Python, except you can speed it up a little bit by telling > the Interpreter that this variable is starting off with this datatype. > > > Python as type annotations, but those are primarily used for type checking > using tools such as mypy and are not used by the interpreter itself. > Mypy includes an experimental compiler from typed Python to C that actually does what the OP is looking for. https://github.com/python/mypy/tree/master/mypyc -- --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-change-the-world/>
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/3FS5C32FVB6YNN5TL5WTZETSCGLEHDTI/ Code of Conduct: http://python.org/psf/codeofconduct/