Python Histoy

Guido van Rossum began working on Python in the late 1980s as a successor to the ABC programming language and first released it in 1991 as Python 0.9.0.[36].

Python 2.0 was released in 2000 and introduced new features such as list comprehensions, cycle-detecting garbage collection, reference counting, and Unicode support. 

Python 3.0, released in 2008, was a major revision that is not completely backward-compatible with earlier versions.

Python 2 was discontinued with version 2.7.18 in 2020

Major implementations

CPython, PyPy, Stackless Python, MicroPython, CircuitPython, IronPython, Jython

Influenced

Apache Groovy, Boo, Cobra, CoffeeScript, D, F#, Genie, Go, JavaScript, Julia, Nim, Ring, Ruby, Swift

Influenced by

ABC, Ada,ALGOL , APL,C,C++, CLU, Dylan, Haskell, Icon,Lisp, Modula-3, Perl,[24] Standard ML

Dialects

Cython, RPython, Starlark


Time Line:

1980 -- Python Development Start

1989 --

1991 -- Python First Version Released

An “implementation” of Python should be taken to mean a program or environment which provides support for the execution of programs written in the Python language.

The above definition is stated in the python reference documents. To explain this concept in simple terms, we’ll need to understand a few general terms related to code execution on any machine.

Compiler is a function that converts one programming language to another, typically from a high level language(C, C++) to a low level language(Machine code, Assembly language) to create an executable file.

Interpreter is a function that directly executes a programming language without it being compiled and converted to machine code.

Python is considered as an interpreted language, but this is partially true, as it involves a compilation step that converts the python code into bytecode which is stored with a .pyc or .pyo format that gets deleted once the program is executed. Bytecode is also binary representation executed by virtual machine (not by CPU directly). The virtual machine (which is written different for different machines) converts binary instruction into a specific machine instruction.

Above diagram explains Python’s code execution flow. The source code is first compiled and converted to a bytecode. This bytecode is then executed on a virtual machine. Python implementations are defined based on the language these virtual machines are build on or the way it is interpreted/compiled.

The default python(that we download from https://www.python.org/) is also known as CPython is the reference implementation of python.

This is because the bytecode produced by the compiler of this implementation is run by a virtual machine that is written using C code.

When the python.exe file is executed, it compiles the C code of this virtual machine and generates a machine code. 

This virtual machine now acts as an emulator of the CPU and runs bytecode the same way a CPU would run machine instructions. 

CPython is distributed with a large standard library written in a mixture of C and Python. 

CPython provides the highest level of compatibility with Python packages and C extension modules.
All versions of the Python language are implemented in C because CPython is the reference implementation.


Comments

Popular posts from this blog

Machine Learning Notes:

Python Programming Language Advanced Notes