
Learn About Python
In this episode of the I Can't Sleep Podcast, fall asleep learning about the programming language, Python. I know I didn't understand most of what I read, so hopefully that will do the trick for you tonight as you try to get some rest. Happy sleeping!
Transcript
Welcome to the I Can't Sleep podcast,
Where I read random articles from across the web to bore you to sleep with my soothing voice.
I'm your host,
Benjamin Boster.
Today's episode is from a Wikipedia article titled,
Python Programming Language.
Python is a high-level,
General-purpose programming language.
Its design philosophy emphasizes code readability with the use of significant indentation.
Python is dynamically typed and garbage collected.
It supports multiple programming paradigms,
Including structured,
Partially procedural,
Object-oriented,
And functional programming.
It is often described as a batteries-included language due to its comprehensive standard library.
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.
Python 2.
0 was released in 2000.
Python 3.
0,
Released in 2008,
Was a major revision not completely backward-compatible with earlier versions.
Python 2.
7.
18,
Released in 2020,
Was the last release of Python 2.
Python consistently ranks as one of the most popular programming languages and has gained widespread use in the machine learning community.
Python was conceived in the late 1980s by Guido van Rossum at Centrum Wiskund en Informatica,
CWI,
In the Netherlands,
As a successor to the ABC programming language,
Which was inspired by CETL,
Capable of exception handling and interfering with the Amoeba operating system.
Its implementation began in December 1989.
Van Rossum shouldered some responsibility for the project as the lead developer until 12th of July 2018,
When he announced his permanent vacation from his responsibilities as Python's benevolent dictator for life,
A title the Python community bestowed upon him to reflect his long-term commitment as the project's chief decision maker.
In January 2019,
Active Python core developers elected a five-member steering council to lead the project.
Python 2.
0 was released on the 16th of October 2000,
With many major new features,
Such as list comprehensions,
Cycle detecting,
Garbage collection,
Reference counting,
And Unicode support.
Python 3.
0 released on the 3rd of December 2008,
With many of its major features backboarded to Python 2.
6.
X and 2.
7.
X.
Releases of Python 3 include the 2-to-3 utility,
Which automates the translation of Python 2 code to Python 3.
Python 2.
7's end of life was initially set for 2015,
Then postponed to 2020 out of concern that a large body of existing code could not easily be forward ported to Python 3.
No further security patches or other improvements will be released for it.
Currently,
Only 3.
8 and later are supported.
2023 security issues were fixed in e.
G.
3.
7.
17,
The final 3.
7.
X release.
While Python 2.
7 and older is officially unsupported,
A different unofficial Python implementation,
PyPy,
Continues to support Python 2,
I.
E.
2.
7.
18+,
Plus 3.
9 and 3.
10,
With the plus meaning at least some backported security updates.
In 2021,
And again twice in 2022,
Security updates were expedited since all Python versions were insecure,
Including 2.
7,
Because of security issues leading to possible remote code execution and web cache poisoning.
In 2022,
Python 3.
10.
4 and 3.
9.
12 were expedited,
And 3.
8.
13 because of many security issues.
When Python 3.
9.
13 was released in May 2022,
It was announced that the 3.
9 series,
Joining the older series 3.
8 and 3.
7,
Would only receive security fixes in the future.
On September 7,
2022,
Four new releases were made due to a potential denial of service attack,
3.
10.
7,
3.
9.
14,
3.
8.
14,
And 3.
7.
14.
As of October 2023,
Python 3.
12 is the stabled release,
And 3.
12 and 3.
11 are the only versions with active,
As opposed to just security,
Support.
Notable changes in 3.
11 from 3.
10 include increased probable execution speed and improved error reporting.
Python 3.
12 adds syntax,
And in fact,
Every Python since at least 3.
5 adds some syntax to the language.
The new soft keyword type,
Recent releases have added a lot of typing support,
E.
G.
New type union operator in 3.
10,
And 3.
11 for exception handling,
And 3.
10 the matching case,
Soft keywords,
For structural pattern matching in 3.
10,
And 3.
11 for exception handling.
Python 3.
12 also drops outdated modules and functionality,
And future versions will too.
Python 3.
11 claims to be between 10 and 60% faster than Python 3.
10,
And Python 3.
12 adds another 5% on top of that.
It also has improved error messages and many other changes.
Since the 27th of June 2023,
Python 3.
8 is the oldest supported version of Python,
Albeit in the security support phase,
Due to Python 3.
7 reaching end of life.
Python is a multi-paradigm programming language.
Object-oriented programming and structured programming are fully supported,
And many of their features support functional programming and aspect-oriented programming,
Including metaprogramming and meta-objects.
Many other paradigms are supported via extensions,
Including design-by-contract and logic programming.
Python uses dynamic typing and a combination of reference counting,
And a cycle-detecting garbage collector for memory management.
It uses dynamic name resolution,
Late binding,
Which binds method and variable names during program execution.
Its design offers some support for functional programming in the Lisp tradition.
It has filter,
Map,
And reduce functions,
List comprehensions,
Dictionaries,
Sets,
And generator expressions.
The standard library has two modules,
Itertools and functools,
That implement functional tools borrowed from Haskell and StandardML.
Its core philosophy is summarized in the Zen of Python,
PEP20,
Which includes aphorisms such as beautiful is better than ugly,
Explicit is better than implicit,
Simple is better than complex.
Complex is better than complicated.
Readability counts.
However,
Python features regularly violate these principles,
And received criticism for adding unnecessary language bloat.
Responses to these criticisms are that the Zen of Python is a guideline rather than a rule.
New features have been so controversial that Guido van Rossum resigned as benevolent dictator for following vitriol over addition of the assignment expression operator in Python 3.
8.
Nevertheless,
Rather than building all of its functionality into its core,
Python was designed to be highly extensible via modules.
This compact modularity has made it particularly popular as a means of adding programmable interfaces to existing applications.
Van Rossum's vision of a small core language with a large standard library and easily extensible interpreter stemmed from his frustrations with ABC,
Which espoused the opposite approach.
Python claims to strive for a simpler,
Less cluttered syntax and grammar,
While giving developers a choice in their coding methodology.
In contrast to Perl's there's more than one way to do it motto,
Python embraces a there should be one and preferably only one obvious way to do it philosophy.
In practice,
However,
Python provides many ways to achieve the same task.
There are,
For example,
At least three ways to format a string literal,
With no certainty as to which one a programmer should use.
Alex Martelli,
A fellow at the Python Software Foundation and Python book author wrote,
To describe something as clever is not considered a compliment in the Python culture.
Python's developers usually strive to avoid premature optimization and reject patches to non-critical parts of the C Python reference implementation that would offer marginal increases in speed at the cost of clarity.
Execution speed can be improved by moving speed-critical functions to extension modules written in languages such as C or by using a just-in-time compiler like PyPy.
It is also possible to cross-compile to other languages,
But it either doesn't provide the full speed-up that might be expected,
Since Python is a very dynamic language,
Or a restricted subset of Python is compiled and possibly semantics are slightly changed.
Python's developers aim for it to be fun to use.
This is reflected in its name,
A tribute to the British comedy group Monty Python,
And in occasionally playful approaches to tutorials and reference materials,
Such as the use of the terms spam and eggs,
A reference to a Monty Python sketch,
And examples instead of the often-used foo and bar.
A common neologism in the Python community is Pythonic,
Which has a wide range of meanings related to program style.
Pythonic code may use Python idioms well,
Be natural or show fluency in the language,
Or conform with Python's minimalist philosophy and emphasis on readability.
Code that is difficult to understand or reads like a rough transcript from another programming language is called unpythonic.
Python is meant to be an easily-readable language.
Its formatting is visually uncluttered and often uses English keywords where other languages use punctuation.
Unlike many other languages,
It does not use curly brackets to delimit blocks,
And semicolons after statements are allowed but rarely used.
It has fewer syntactic exceptions and special cases than C or Pascal.
Python uses whitespace indentation rather than curly brackets or keywords to delimit blocks.
An increase in indentation comes after certain statements.
A decrease in indentation signifies the end of the current block.
Thus,
The program's visual structure accurately represents its semantic structure.
This feature is sometimes termed the off-side rule.
Some other languages use the off-side rule Some other languages use indentation this way,
But in most,
Indentation has no semantic meaning.
The recommended indent size is four spaces.
Python's statements include the assignment statement using a single equals sign,
The if statement,
Which conditionally executes a block of code along with else and elif,
A contraction of elseif,
The for statement,
Which iterates over an iterable object,
Capturing each element to a local variable for use by the attached block,
The while statement,
While executes a block of code as long as its condition is true,
The try statement,
Which allows exceptions raised in its attached code block to be caught and handled by except clauses,
Or new syntax except in Python 3.
11 for exception groups.
It also ensures that cleanup code in a finally block is always run regardless of how the block exits,
The raise statement used to raise a specified exception or re-raise a caught exception,
The class statement,
Which executes a block of code and attaches its local namespaces to a class for use in object-oriented programming,
The def statement,
Which defines a function or method,
The with statement,
Which encloses a code block with a context manager,
For example,
Acquiring a lock before it is run,
Then releasing the lock,
Or opening and closing a file,
Allowing resource acquisition is initialization or AII-like behavior,
And replacing a common try-finale idiom,
The break statement,
Which exits a loop,
The continue statement,
Which skips the rest of the current iteration and continues with the next,
The del statement,
Which removes a variable,
Deleting the reference from the name to the value,
And producing an error if the variable is referred to before it is redefined,
The pass statement,
Serving as a NOP,
Syntactically needed to create an empty code block,
The assert statement,
Used in debugging to check for conditions that should apply,
The yield statement,
Which returns a value from a generator function,
And also an operator,
Used to implement core routines,
The return statement,
Used to return a value from a function,
The import and from statements,
Used to import modules whose functions or variables can be used in the current program,
The assignment statement binds a name as a reference to a separate dynamically allocated object.
Variables may subsequently be rebound at any time to any object.
In Python,
A variable name is a generic reference holder with a fixed data type.
However,
It always refers to some object with a type.
This is called dynamic typing,
In contrast to statically typed languages,
Where each variable may contain only a value of a type.
Python does not support tail call optimization or first-class continuations,
And according to Van Rossum,
It never will.
However,
Better support for core routine-like functionality is provided by extending Python's generators.
Before 2.
5,
Generators were lazy iterators.
Data was passed unidirectionally out of the generator.
From Python 2.
5 on,
It is possible to pass data back into a generator function,
And from version 3.
3,
It can be passed through multiple stack levels.
Python's expressions include the plus,
Minus,
And times operators for mathematical addition,
Subtraction,
And multiplication are similar to other languages,
But the behavior of division differs.
There are two types of divisions in Python,
Floor division,
Or integer division,
And floating point division.
Python uses the double asterisk operator for exponentiation.
Python uses the plus operator for string concatenation.
Python uses the asterisk operator for duplicating a string a specified number of times.
The at infix operator,
It is intended to be used by libraries,
Such as NumPy for matrix multiplication.
The syntax colon equals,
Called the walrus operator,
Was introduced in Python 3.
8.
It assigns values to variables as part of a larger expression.
In Python,
The to equals sign compares by value.
Python's is operator may be used to compare object identities,
Comparison by reference,
And comparisons may be chained.
For example,
A is less than or equal to b,
Which is less than or equal to c.
Python uses and,
Or,
And not as Boolean operators.
Python has a type of expression called a list comprehension,
As well as a more general expression called a generator expression.
Anonymous functions are implemented using lambda expressions.
However,
There may only be one expression in each body.
Conditional expressions are written as x if c else y,
Different in order of operands from the c question mark x colon y operator,
Common to many other languages.
Python makes a distinction between lists and tuples.
Lists are written as bracket 1 comma 2 comma 3 close bracket,
Are mutable,
And cannot be used as the keys of dictionaries.
Dictionary keys must be immutable in Python.
Tuples written as parentheses 1 comma 2 comma 3 close parentheses are immutable,
And thus can be used as keys of dictionaries,
Provided all the tuples elements are immutable.
The plus operator can be used to concatenate two tuples,
Which does not directly modify their contents,
But produces a new tuple containing the elements of both.
Thus,
Given the variable t initially equal to open parentheses 1 comma 2 comma 3 close parentheses,
Executing t equals t plus open parentheses 4 comma 5 close parentheses,
First evaluates t plus open parentheses 4 comma 5 close parentheses,
Which yields open parentheses 1 comma 2 comma 3 comma 4 comma 5 close parentheses,
Which is then assigned back to t,
Thereby effectively modifying the contents of t while conforming to the immutable nature of tuple objects.
Parentheses are optional for tuples in unambiguous contexts.
Python features sequence unpacking where multiple expressions,
Each evaluating to anything that can be assigned to a variable,
Writable property,
Etc.
,
Are associated in an identical manner to that forming tuple literals,
And,
As a whole,
Are put on the left-hand side of the equal sign in an assignment statement.
The statement expects an iterable object on the right-hand side of the statement expects an iterable object on the right-hand side of the equal sign that produces the same number of values as the provided writable expressions.
When iterated through them,
It assigns each of the produced values to the corresponding expression on the left.
Python has a string format operator modulo that functions analogously to printf format strings in C,
E.
G.
Spam equals modulo s,
Eggs equal modulo d,
Modulo open parentheses,
Quote,
Blah,
Close quote,
Comma,
2,
Close parentheses,
Evaluates to,
Quote,
Spam equals blah,
Eggs equal 2,
Close quote.
In Python 2.
6 plus and 3 plus,
This was supplemented by the format method of the string class,
E.
G.
,
Quote,
Spam equals 0,
Eggs equals 1,
Close quote,
Dot format,
Open parentheses,
Quote,
Blah,
Quote,
Comma,
2,
Close parentheses.
Python 3.
6 added f strings,
Colon,
Spam equals,
Quote,
Blah,
Close quote,
Semicolon,
Eggs equal 2,
Semicolon,
F spam equals open curly bracket,
Spam,
Close curly bracket,
Eggs equals open curly bracket,
Eggs,
Close curly bracket.
Strings in Python can be concatenated by adding them with the same operator as for adding integers and floats,
E.
G.
,
Quote,
Spam,
Close quote,
Plus,
Quote,
Eggs,
Close quote,
Returns,
Quote,
Spam eggs with no space,
Close quote.
If strings contain numbers,
They are added as strings rather than integers,
E.
G.
,
Open quote 2,
Close quote,
Plus,
Open quote 2,
Close quote,
Returns,
Open quote 2,
2,
Close quote.
Python has various string literals.
Delimited by single or double quotes,
Unlike in Unix shells,
Perl,
And Perl-influenced languages,
Single and double quotes work the same.
Both use the backslash as an escape character.
String interpolation became available in Python 3.
6 as formatted string literals.
Triple quoted beginning and ending with three single or double quotes,
Which may span multiple lines and function like here documents in shells,
Perl,
And Ruby.
Raw string varieties denoted by prefixing the string literal with r,
Escape sequences are not interpreted.
Hence,
The raw strings are useful where literal backslashes are common,
Such as regular expressions and Windows-style paths.
Compare at-quoting in C-sharp.
Python has array index and array slicing expressions in lists,
Denoted as a-key,
A-start-stop,
Or a-start-stop-step.
Indexes are zero-based,
And negative indexes are relative to the end.
Slices take elements from the start index up to,
But not including the stop index.
The third slice parameter called step and stride allows elements to be skipped and reversed.
Slice indexes may be omitted.
For example,
A colon returns a copy of the entire list.
Each element of a slice is a shallow copy.
In Python,
A distinction between expressions and statements is rigidly enforced,
In contrast to languages such as Common Lisp,
Scheme,
Or Ruby.
This leads to duplicating some functionality.
For example,
List comprehensions versus for loops.
Conditional expressions versus if blocks.
The eval versus exec built-in functions,
In Python 2,
Exec is a statement.
The former is for expressions,
The latter is for statements.
Statements cannot be a part of an expression,
So list and other comprehensions or lambda expressions,
All being expressions,
Cannot contain statements.
A particular case is that an assignment statement such as a equals one cannot form part of the conditional expression of a conditional statement.
This has the advantage of avoiding a classic C error of mistaking an assignment operator equals for an equality operator's double equals in conditions.
If open parentheses c equals one close parentheses open curly bracket dot dot dot close curly bracket is syntactically valid but probably unintended C code.
But if c equals one colon dot dot dot causes a syntax error in Python.
Methods on objects are functions attached to the object's class.
The syntax instance dot method open parentheses argument close parentheses is for normal methods and functions syntax sugar for class dot method open parentheses instance comma argument close parentheses.
Python methods have an explicit self parameter to access instance data.
In contrast to the implicit self or this in some other object-oriented programming languages,
E.
G.
C++,
Java,
Objective-C,
Ruby.
Python also provides methods,
Often called dunder methods,
Due to their names being an ending with double underscores,
To allow user-defined classes to modify how they are handled by native operations including length,
Comparison,
And arithmetic operations and type conversion.
Python uses duck typing and has typed objects but untyped variable names.
Type constraints are not checked at compile time.
Rather,
Operations on an object may fail,
Signifying that it is not of a suitable type.
Despite being dynamically typed,
Python is strongly typed,
Forbidding operations that are not well defined.
For example,
Adding a number to a string rather than silencing Python allows programmers to define their own types using classes,
Most often used for object-oriented programming.
New instances of classes are constructed by calling the class,
E.
G.
Spam class or eggs class,
And the classes are instances of the metaclass type itself and instance of itself,
Allowing metaprogramming and reflection.
Before version 3.
0,
Python had two kinds of classes,
Both using the same syntax,
Old-style and new-style.
Current Python versions only support the semantics of new-style.
Python supports optional type annotations.
These annotations are not enforced by the language,
But may be used by external tools such as MyPy to catch errors.
MyPy also supports a Python compiler called MyPig,
Which leverages type annotations for optimization.
Python's large standard library provides tools suited to many tasks and is commonly cited as one of its greatest strengths.
For internet-facing applications,
Many standard formats and protocols such as MIME and HTTP are supported.
It includes modules for creating graphical user interfaces,
Connecting to relational databases,
Generating pseudo-random numbers,
Arithmetic with arbitrary precision decimals,
Manipulating regular expressions,
And a lot more.
Some parts of the standard library are covered by specifications.
For example,
The web service gateway interface WSGI implementation WSGIREF follows PEP333,
But most are specified by their code,
Internal documentation,
And test suites.
However,
Because most of the standard library is cross-platform Python code,
Only a few modules need altering or rewriting for variant implementations.
As of the 14th of November 2022,
The Python package index PyPy,
The official repository for third-party Python software,
Contains over 415,
000 packages with a wide range of functionality,
Including automation,
Data analytics,
Databases,
Documentation,
Graphical user interfaces,
Image processing,
Machine learning,
Mobile apps,
Multimedia,
Computer networking,
Scientific computing,
System administration,
Test frameworks,
Text processing,
Web frameworks,
Web scraping.
Most Python implementations,
Including CPython,
Include a read-eval-print loop,
Or EPL,
Permitting them to function as a command-line interpreter,
For which users enter statements sequentially and receive results immediately.
Python also comes with an integrated development environment,
IDE,
Called IDLE,
Which is more beginner-oriented.
Other shells,
Including IDLE and IPython,
Add further abilities,
Such as improved auto-completion,
Session state retention,
And syntax highlighting.
As well as standard desktop integrated development environments,
Including PyCharm,
IntelliJ,
IDEA,
Visual Studio Code,
Etc.
,
There are web-browser-based IDEs,
Including SageMath for developing science and math-related programs,
Python Anywhere,
A browser-based IDE and hosting environment,
And Canopy IDE,
A commercial IDE emphasizing scientific computing.
CPython is the reference implementation of Python.
It is written in C,
Meeting the C89 standard.
Python 3.
11 uses C11,
With several select C99 features.
CPython includes its own C extensions,
But third-party extensions are not limited to older C versions,
E.
G.
,
They can be implemented with C11 or C++.
It compiles Python programs into an intermediate bytecode,
Which is then executed by its virtual machine.
Python is distributed with a large standard library written in a mixture of C and native Python,
And is available for many platforms including Windows.
Starting with Python 3.
9,
The Python installer deliberately fails to install on Windows 7 and 8.
Windows XP was supported until Python 3.
5,
And most modern Unix-like systems,
Including Mac OS and Apple M1 Macs,
Since Python 3.
9.
1 was experimental installer and unofficial support for e.
G.
,
VMS.
Platform portability was one of its earliest priorities.
During Python 1 and 2 development,
Even OS 2 and Solaris were supported,
But support has since been dropped for many platforms.
PyPy is a fast,
Compliant interpreter of Python 2.
7 and 3.
8.
Its just-in-time compiler often brings a significant speed improvement over CPython,
But some libraries written in C cannot be used with it.
Stackless Python is a significant fork of CPython that implements microthreads.
It does not use the call stack in the same way,
Thus allowing massively concurrent programs.
PyPy also has a stackless version.
MicroPython and CircuitPython are Python 3 variants optimized for microcontrollers,
Including LEGO Mindstorms EV3.
Piston is a variant of the Python runtime that uses just-in-time compilation to speed up the execution of Python programs.
Cinder is a performance-oriented fork for CPython 3.
8 that contains a number of optimizations,
Including bytecode inline caching,
Eager evaluation of coroutines,
A method-at-a-time JIT,
And an experimental bytecode compiler.
Snack-embedded computing language,
Supporting e.
G.
8-bit AVR microcontrollers such as ATmega328p based Arduino,
And larger ones that are microPython can also support,
Is Python-inspired but is not Python.
It is possible to write Snack programs that run under a full Python system,
But most Python programs will not run under Snack.
It's an imperative language,
Not including OOP classes unlike Python,
And simplifying to one number type,
Like JavaScript,
Except using smaller 32-bit single-precision integer values of less than 24 bits can be expressed exactly in these floating-point values.
Other just-in-time Python compilers have been developed,
But are now unsupported.
Google began a project named Unladen Swallow in 2009 with the aim of speeding up the Python interpreter five-fold by using the LLVM,
And of improving its multi-threading ability to scale to thousands of cores,
While ordinary implementations suffer from the global interpreter lock.
SciCo is a discontinued just-in-time specialization compiler that integrates with CPython and transforms bytecode to machine code at runtime.
The emitted code is specialized for certain data types and is faster than the standard Python code.
SciCo does not support Python 2.
7 or later.
PyS6D was a Python 2 interpreter for Series 6T mobile phones released by Nokia in 2005.
It implemented many of the modules from the standard library,
And some additional modules for integrating with the Symbian operating system.
The Nokia N900 also supports Python 2.
7,
But is not supported by Series 6T.
There are several compilers-transpilers to high-level object languages,
With either unrestricted Python,
A restricted subset of Python,
Or a language similar to Python as a source language.
Brython is a Python 2 interpreter for Series 6T mobile phones released by Nokia in 2005.
Codon compiles a subset of statically-typed Python to machine code via LLVM,
And supports native multithreading.
Cython compiles a superset of Python to C.
The resulting code is a Python 2 interpreter for Series 6T mobile phones.
And supports native multithreading.
Cython compiles a superset of Python to C.
The resulting code is also usable with Python via direct C-level API calls into the Python interpreter.
IJL compiles transpiles a subset of Python to human-readable,
Maintainable,
And high-performance Julia source code.
Despite claiming high-performance,
No tool can claim to do that for arbitrary Python code,
I.
E.
It's known not possible to compile to a faster language or machine code.
Unless semantics of Python are changed,
But in many cases speedup is possible with few or no changes in the Python code.
The faster Julia source code can then be used from Python,
Or compiled to machine code and based that way.
Nuitka compiles Python into C.
Noomba uses LLVM to compile a subset of Python to machine code.
Pythran compiles a subset of Python 3 to C++,
C++11.
RPython can be compiled to C and is used to build the PyPy interpreter of Python.
MyHTL is a Python-based hardware description language,
HTL,
That converts MyHTL code to Verilog or VHTL code.
Older projects.
Google's Grumpy,
Latest release in 2017,
Transpiles Python 2 to Go.
IronPython allows running Python 2.
7 programs,
And an alpha released in 2021 is also available.
Python 3.
4,
Although features and behaviors from later versions may be included on the .
NET Common Language Runtime.
Jython compiles Python 2.
7 to Java bytecode,
Allowing the use of the Java libraries from a Python program.
Pyrex,
Latest release in 2010,
And ShedSkin,
Latest release in 2013,
Compile to C and C++,
Respectively.
Performance comparison of various Python implementations on a non-numerical combinatorial workload was presented at EuroSciPy 13.
Python's performance compared to other programming languages is also benchmarked by the Computer Language Benchmarks game.
Python's development is conducted largely through the Python Enhancement Proposal,
PEP,
Process.
The primary mechanism for proposing major new features,
Collecting community input on issues,
And documenting Python design decisions.
Python coding style is covered in PEP 8.
Outstanding PEPs are reviewed and commented on by the Python community and the Steering Council.
Enhancement of the language corresponds with the development of the CPython reference implementation.
The mailing list,
PythonDev,
Is the primary forum for the language's development.
Specific issues were originally discussed in the Roundup bug tracker,
Hosted at by the Foundation.
In 2022,
All issues and discussions were migrated to GitHub.
Development originally took place on a self-hosted source code repository running Mercurial,
Until Python moved to GitHub in January 2017.
CPython's public releases come in three types,
Distinguished by which part of the version number is incremented.
Backward incompatible versions,
Where code is expected to break and needs to be manually ported.
The first part of the version number is incremented.
These releases happen infrequently.
Version 3.
0 was released eight years after 2.
0.
According to Guido van Rossum,
A version 4.
0 is very unlikely to ever happen.
Major,
Or feature,
Releases are largely compatible with the previous version,
But introduce new features.
The second part of the version number is incremented.
Starting with Python 3.
9,
These releases are expected to happen annually.
Each major version is supported by bug fixes for several years after its release.
Bug fix releases,
Which introduce no new features,
Occur about every three months,
And are made when a sufficient number of bugs have been fixed upstream since the last release.
Security vulnerabilities are also patched in these releases.
The third and final part of the version number is incremented.
Many alpha,
Beta,
And release candidates are also released as previews,
And for testing before final releases.
Although there is a rough schedule for each release,
They are often delayed if the code is not ready.
Python's development team monitors the state of the code by running the large unit test suite during development.
The major academic conference on Python is PyCon.
There are also special Python mentoring programs,
Such as PyLadies.
Python 3.
12 removed WSTR,
Meaning Python extensions need to be modified,
And 3.
10 added pattern matching to the language.
Python 3.
12 dropped some outdated modules,
And more will be dropped in the future,
Deprecated as of 3.
13.
Already deprecated array U format code will emit deprecation warning since 3.
13,
And will be removed in Python 3.
16.
The W format code should be used instead.
Part of C types is also deprecated,
And http.
Server.
Cgihttp request handler will emit a deprecation warning.
And will be removed in 3.
15.
Using that code already has a high potential for both security and functionality bugs.
Parts of the typing module are deprecated,
E.
G.
Creating a typing.
Named tuple class,
Using keyword arguments to denote the fields and such,
And more,
Will be disallowed in Python 3.
15.
Tools that can generate documentation for Python API include PyDoc,
Available as part of the standard library,
Sphinx,
Pdoc and its forks,
Doxygen,
And GraphViz,
Among others.
4.9 (14)
Recent Reviews
Jeffrey
April 4, 2024
This is simply the new gold standard for boring, I don't see how it could be possible to get more boring. Good sir, you have out done yourself. 🙏 P.S I have suggested to IT a new 6 star rating be made available for this reading. ⭐️⭐️⭐️⭐️⭐️⭐️
Beth
March 9, 2024
That was SSSOOO boring, great work!! 😂😂 Out like a light in 5 minutes flat! 😆
