Now that python 3 has hit 3.8 we can expect that python 4 will come out pretty soon.
Please put in the comment the most important single feature that you wish python 4 will have.
To start, for me it would be a stricter typing: typing is currently just a hint and not enforced in runtime. In a big project it helps a lot to have typing for everything (variables, functions).
Would be perfect if python can have a static typing mode that enforces this.
Top comments (15)
I think the function here is rather
can_convert_to_intaccording to PEP8 😅).
int(val)works for both
val="1". If you want simply to test whether a variable is int,
type(val)==intshould be enough.
Python 3.8 gets a heck of a lot closer by putting the relevant typing module in the standard library, so you can leverage it much more easily. That being said... the biggest thing Python needs right now is architectural improvements in multiprocessing. So many things people do with Python benefit from multiple cores, and Python can't yet take full advantage of them.
In order to take advantage of multi core, it seems that Python developers often use native binding libraries like Cython and hardly take use of the multiprocessing package. For IO bound applications, asyncio is usually the solution.
fastest as java.
To speed up Python, Cython can be a good option as we can mix C and Python code. We used to call 3D C++ functions from Python with Cython and the performance is on par with pure C++.
Hey you might be interested in mypy
Get rid of GIL
Have you had experiences where the GIL was the limiting factor on the runtime performance?
There are PEPs open now to help with this (including an overhauled subinterpreters implementation).
No, never reached that stage honestly
I think python 4 along with any other new version of a programming language should have multiple targets like kotlin and haxe have.
They are indeed similar. I think Cython users will tend to write custom C code whereas JNA is more about using existing code without modifying it but I might be wrong.