1 Odpowiedź
0
Python has a compiler! You just don't notice it because it runs automatically. You can tell it's there, though: look at the.pyc(or.pyoif you have the optimizer turned on) files that are generated for modules that youimport.Also, it does not compile to the native machine's code. Instead, it compiles to a byte code that is used by a virtual machine. The virtual machine is itself a compiled program. This is very similar to how Java works; so similar, in fact, that there is a Python variant (Jython) that compiles to the Java Virtual Machine's byte code instead! There's alsoIronPython, which compiles to Microsoft's CLR (used by .NET). (The normal Python byte code compiler is sometimes called CPython to disambiguate it from these alternatives.)
===============《《 Stack overflow