Python internal structure

I'm reading a book about Python now, but before I learned the language, I found it interesting how Python works, so I posted it.

Is Python generally an "object-oriented scripting language"? It is classified into the category like. It seems to be somewhere between an object-oriented programming language like Java and a scripting language like Perl. The description can be done like a script language, and structurally it seems to be a language with functions like object orientation.

It seems that this language does not need to be compiled before execution like C, C ++, Java, and if the file is rewritten every time it is executed, the source code is automatically rewritten to bytecode, and that bytecode Is executed on PVM (Python Virtual Machine). Since PVM is a virtual machine that only executes bytecode from the top line to the last line in order, there is no need to rewrite it into a binary that the computer itself can understand like C language, and PVM understands and executes bytecode. Will do it. This kind of language mechanism is called an interpreter.

The advantage of the interpreter is that once you create a bytecode on any computer, it can be executed on a PVM, regardless of the language version or computer. It is versatile because it is not necessary to compile the source code for each computer and rewrite the binary by taking many steps like in C language. It's true that Java also uses an interpreter, so if you're familiar with Java, you shouldn't wonder. The disadvantage is that it doesn't rewrite the binary and runs on a virtual machine, so the speed is slower than C, but I haven't learned enough about this, so I haven't fully understood it. If anyone knows, please let me know.

Reference: First Python 3rd Edition (Publisher: O'Reilly Japan)

Recommended Posts

Python internal structure
Python data structure and internal implementation ~ List ~
C-like structure in Python
[Python tutorial] Data structure
[Python tutorial] Control structure tool
Python
3D skeleton structure analysis with Python
Picture book data structure algorithm Python
How to know the internal structure of an object in Python
kafka python
Python basics ⑤
python + lottery 6
Python Summary
Built-in python
Python comprehension
Python technique
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
python tips
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python Singleton
Output tree structure of files in Python
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
Installing Python 3.4.3.
Try python
Python memo
Python iterative
Python algorithm
Python2 + word2vec
[Python] Variables
Python functions
Python sys.intern ()
Python tutorial
Python decimals
python underscore
Python summary
Start python
[Python] Sort
Note: Python
Python basics ③
python log
Python basics
[Scraping] Python scraping
Python update (2.6-> 2.7)
Python data structure and operation (Python learning memo ③)
python memo
Python memorandum