Van Rossum: You have to change the source code of your Python 2 apps in the most general case. We provided a tool named 2to3 that does most of the changes to your source code automatically. But there are some things that you can't automate, so you have to manually revise them. Since then, people have also come up with strategies of writing in a restricted version of Python 2, by just not using certain features, and magically their source code is already compatible with Python 3.
InfoWorld: You talked about the arguments for and against dynamic typing. You said that if you trust your compiler to find all the bugs in your program, you've not been doing software development for very long. So you're satisfied with Python being dynamic?
Van Rossum: Absolutely. The basic philosophy of the language is not going to change. I don't see Python suddenly growing a static subdivision or small features in that direction.
InfoWorld: You mentioned at some point you expect global static analysis of Python programs would be realistic. What would the benefit be for Python developers?
Van Rossum: What you can do with global static analysis is you can find certain types of bugs. Another thing you can do is optimization.
InfoWorld: Is Python's GIL (Global Interpreter Lock) an impediment to doing multicore programming, or is that not the story?
Van Rossum: That is actually more or less the story. If you have multiple cores, you cannot have each core execute Python bytecodes in parallel with the others because Python bytecode runs with the GIL, and only one of the cores can have the GIL. What Python threads can do when they don't hold the GIL is just wait for I/O, or they can invoke code that was written in C or C++.
For example, in NumPy, which does large matrix manipulations, when you give a matrix to NumPy or a big array and you tell it to go compute this function over these 10 million points, it releases the GIL that can be executed on a core. I don't know if NumPy has parallelization machinery, but you could even imagine that if you had 10 cores, you could parcel out work to 10 cores, and those could run in parallel on different pieces of data, and none of them needs the GIL because they're not manipulating Python objects.
This article, "Van Rossum: Python is not too slow," was originally published at InfoWorld.com. Follow the latest developments in business technology news and get a digest of the key stories each day in the InfoWorld Daily newsletter. For the latest developments in business technology news, follow InfoWorld.com on Twitter.