phinds said:
No, as was just explained by Scott in a previous post, it is NOT converted to machine code, it is "executed" by the interpreter.
.
While the above statement was originally true in older languages such as Snobol, it is not necessarily true in newer languages such as Python. Automatic code optimization in computer systems these days is so intricate and occurs at every level, from the machine code on up through virtual machines, and we typically don't know the half of it. And it's quite good. I would expect languages such as Python DO create, or at least cache, machine code for parts of a program that are called repeatedly, such as in a loop.
Today, machines keep seeming slower, despite faster processors and more memory, because applications that we use (including programming tools and environments) have become bulkier and hog more and more memory, and in addition, we run more things at one time (including anti-virus--a huge drain on CPU resources). So all discussions in here about "performance" can only be considered, I fear, very high level.
And not really important in many cases, because machines really are pretty fast and if you know enough about how your program is using memory, you can affect performance by designing for it from the beginning (though it's very difficult to retrofit performance improvements into code).
Bottom line: Python may or may not be fast enough for scientific applications. Possibly more important than speed
in many cases may be the loose typing, a feature shared with, say, Visual Basic. One need not declare the types of variables, and Python makes assumptions as to what the type will be. This is a lovely and convenient feature--until, sooner or later, the compiler or interpreter (whatever you want to call it) makes the wrong decision and you get a possibly quite mysterious error in your results, which could even go undetected for some time.