5. The name "Python" for the programming language is not derived from the snake
but rather from the British comedy group Monty Python. Guido van Rossum, the
creator of Python, enjoyed Monty Python's Flying Circus, a popular British
television show that aired in the 1970s. When he was developing Python in the
late 1980s, he wanted to choose a name that was short, unique, and a bit
mysterious. The name "Python" fit these criteria, and Guido van Rossum has
mentioned that he enjoyed the Python comedy group's work.
So, the programming language is named after the comedy group Monty Python,
and there is no direct connection to the snake of the same name. The language's
logo, however, often incorporates a stylized snake to playfully acknowledge the
name's shared element.
6. Python is a high-level programming language that has
gained widespread popularity due to its readability,
versatility, and ease of use.
1.Creation by Guido van Rossum (Late 1980s)
1. Python was created by Guido van Rossum, a Dutch programmer, in the late
1980s. The development started in December 1989 and continued through
the early 1990s.
2.Python 0.9.0 (February 1991)
1. The first official release, Python 0.9.0, was released in February 1991. This
version included exception handling, functions, and modules.
3.Python 1.0 (January 1994)
1. Python 1.0 was released in January 1994. It included new features like
lambda, map, filter, and reduce. The language's design philosophy,
emphasizing code readability, simplicity, and explicitness, was well-
7. 3. Python 2.0 (October 2000)
1. Python 2.0, released in October 2000, introduced list comprehensions,
garbage collection, and Unicode support. This version marked a significant
milestone in the language's development.
4. Python 3.0 (December 2008)
1. Python 3.0, also known as Python 3000 or Py3k, was a major, backward-
incompatible release that aimed to clean up the language and get rid of
redundancies and inconsistencies. It was released in December 2008.
5. Continuous Development (2010s - Present)
1. Python has continued to evolve with regular releases, adding new features
and improvements. The Python Software Foundation (PSF) oversees the
language's development, and the community actively contributes to its
growth.
8. 7.Popularity and Adoption
1. Python has become one of the most popular programming languages
globally. Its readability, versatility, and extensive standard libraries contribute
to its success. Python is widely used in web development, data science,
artificial intelligence, automation, and various other domains.
8.Major Versions (2.x vs. 3.x)
1. Python 2.x and Python 3.x coexisted for many years. However, Python 2
reached its end of life on January 1, 2020, and the community is encouraged
to migrate to Python 3 for ongoing support and features.
Python's history reflects a commitment to simplicity, readability,
and adaptability. Its community-driven development and
widespread use in various industries make it a language of
choice for many developers.
9.
10. Python 3.12
Language Changes
Type Hints
New Modules
Improved Modules
Optimizations
CPython bytecode changes
Demos and Tools
Deprecated
Removed
Porting to Python 3.12
Build Changes
C API Changes
11. • Generic classes and functions:
• PEP 695 introduces a new, more compact, and explicit way to create generic
classes and functions with type parameter syntax. This makes it easier to write
and maintain generic code.
• F-string grammar updates:
• PEP 701 formalizes the syntax of f-strings and lifts some restrictions on their
usage. This makes f-strings more powerful and easier to use.
• Security improvements:
• Python 3.12 includes a number of security improvements, such as a new
sandboxing feature that can help to protect against malicious code.
• Deprecations and removals:
• A number of features and modules have been deprecated or removed in
Python 3.12. It is important to check the Python documentation to see if any of
the code you use has been deprecated or removed.
12. • New type union operator: A new type union operator was introduced which enables
the syntax X |Y.
• Parameter Specification Variables: Two new options to improve the information
provided to static type checkers
• TypeAlias is introduced the concept of type aliases, only requiring them to be top-
level unannotated assignments.
• User-Defined Type Guards allows you to define your own type guards.
• Marking individual TypedDict items as required or not-required: Required and
NotRequired provide a straightforward way to mark whether individual items in a
TypedDict must be present.
• Self type: The new Self annotation provides a simple and intuitive way to annotate
methods that return an instance of their class.
• Arbitrary literal string type: The new LiteralString annotation may be used to indicate
that a function parameter can be of any literal string type.
• Data class transforms: PEP 681 allows you to transform data classes into other data
classes.
13. • typing_extensionsv ::
• This module provides additional type hints that are not included in
the standard library.
• math: :
• This module has been updated to include new functions for
working with complex numbers.
• random: :
• This module has been updated to include new functions for
generating random numbers.
• asyncio: :
• This module provides support for asynchronous programming.
• venv: :
• This module provides a tool for creating isolated Python
14. • pathlib:
• The pathlib.Path class now supports subclassing. This allows you to create
custom path-like objects that can be used with the existing pathlib API.
• os:
• The os module received several improvements for Windows support. These
improvements include support for the new Windows path syntax, as well as
support for the new Windows security features.
• sqlite3:
• A command-line interface has been added to the sqlite3 module. This allows
you to interact with SQLite databases from the command line.
• isinstance:
• isinstance() checks against runtime-checkable protocols enjoy a speed up of
between two and 20 times.This can improve the performance of your code by
reducing the number of times isinstance() needs to be called.
15. • asyncio:
• The asyncio package has had a number of performance
improvements, with some benchmarks showing a 75% speed
up.This can make your asyncio applications run much faster.
• uuid:
• A command-line interface has been added to the uuid module. This
allows you to generate UUIDs from the command line.
• tokenize:
• Due to the changes in PEP 701, producing tokens via the tokenize
module is up to 64% faster.This can improve the performance of
your code by reducing the time it takes to tokenize Python code
16. • Use the right data structures.
• Some data structures are more efficient than others for certain operations. For example, lists
are good for storing sequences of data, while dictionaries are good for storing key-value pairs.
• Avoid unnecessary loops.
• Loops can be slow, so try to avoid them whenever possible. If you do need to use a loop,
make sure it is as efficient as possible.
• Use built-in functions.
• Python has many built-in functions that can be used to perform common tasks. These
functions are often more efficient than writing your own code.
• Profile your code.
• Profiling your code can help you identify bottlenecks and inefficiencies. There are many
different profiling tools available for Python.
• Use a memory profiler.
• A memory profiler can help you identify memory leaks and other memory-related problems.
• Use a debugger.
• A debugger can help you step through your code line by line and inspect the values of
variables. This can be helpful for finding bugs.
17. • The argument of a jump is now the offset of the target instruction relative to the
instruction that appears immediately after the jump instruction's CACHE entries.
• The opcode for LOAD_NULL has been changed from 0x10 to 0x15.
• The opcode for RETURN_VALUE has been changed from 0x13 to 0x16.
• The opcode for YIELD_VALUE has been changed from 0x14 to 0x17.
• The opcode for POP_TOP has been changed from 0x2e to 0x2f.
• The opcode for ROT_TWO has been changed from 0x42 to 0x43.
• The opcode for ROT_THREE has been changed from 0x43 to 0x44.
• The opcode for DUP_TOP has been changed from 0x50 to 0x51.
• The opcode for DUP_TOP_TWO has been changed from 0x51 to 0x52.
• The opcode for DUP_TOP_THREE has been changed from 0x52 to 0x53.
18. • distutils
• The distutils module was used to build and install Python modules. It has been removed
in Python 3.12, and the setuptools module should be used instead.
• asynchat
• The asynchat module was used to implement asynchronous network programming. It has
been removed in Python 3.12, and the asyncio module should be used instead.
• asyncore
• The asyncore module was used to implement asynchronous network programming. It has
been removed in Python 3.12, and the asyncio module should be used instead.
• imp
• The imp module was used to import Python modules. It has been removed in Python 3.12,
and the importlib module should be used instead.
• smtpd
• The smtpd module was used to implement a simple SMTP server. It has been removed in
Python 3.12, and the smtplib module should be used instead.
• unittest
• - The unittest module was used to implement unit tests. Several deprecated methods and
classes were removed in Python 3.12.
19. • Improved Error Messages:
• Python 3.12 now provides better error messages that are more helpful and informative. This can be a
huge help for debugging code.
• More Flexible f-string Parsing:
• Python 3.12 now allows for more flexible f-string parsing, which means that you can do more things with
them. For example, you can now use f-strings to format numbers and dates.
• Support for the Linux perf profiler:
• Python 3.12 now supports the Linux perf profiler, which can be used to profile Python code. This can be
helpful for finding performance bottlenecks in your code.
• Faster Debug/Profile Monitoring:
• Python 3.12 now has faster debug/profile monitoring, which can be helpful for finding performance
bottlenecks in your code.
• Buffer protocol dunders:
• Python 3.12 now supports buffer protocol dunders, which can be used to improve the performance of
certain operations.
• Typing improvements:
• Python 3.12 now has several typing improvements, which can make your code more robust and easier to
maintain.
• Performance improvements:
• Python 3.12 includes a number of performance improvements, which can make your code run faster.
20. • Unstable CAPI tier:
• This PEP introduces an unstable API tier, which is an API set marked specifically as being
likely to change between versions. It's not intended to be used by most C extensions, but by
low-level tools such as debuggers or JIT compilers.
• immortal objects:
• This PEP adds support for immortal objects, which are objects that cannot be garbage
collected. This can be useful for objects that need to be kept alive for the lifetime of the
interpreter, such as global variables or objects that are used by multiple threads.
• CPython implementation improvements:
• comprehension inlining. This PEP improves the performance of comprehensions by inlining
them. This can be a significant performance improvement for large comprehensions.
• CPython support for the Linux perf profiler:
• This PEP adds support for the Linux perf profiler, which can be used to profile Python code.
• Implement stack overflow protection on supported platforms:
• This PEP implements stack overflow protection on supported platforms. This can help to
prevent Python programs from crashing due to stack overflows.
• New typing features:
• using TypedDict to annotate **kwargs. This PEP allows you to use TypedDict to annotate
**kwargs, which can help to improve the type safety of your code.
•This PEP introduces an unstable API tier, which is an API
set marked specifically as being likely to change between
versions. It's not intended to be used by most C
extensions, but by low-level tools such as debuggers or
JIT compilers.
•PEP 683, immortal objects:
•This PEP adds support for immortal objects, which are
objects that cannot be garbage collected. This can be
useful for objects that need to be kept alive for the lifetime
of the interpreter, such as global variables or objects that
are used by multiple threads.
•CPython implementation improvements:
•PEP 709, comprehension inlining. This PEP improves the
performance of comprehensions by inlining them. This
can be a significant performance improvement for large
comprehensions.
•CPython support for the Linux perf profiler:
•This PEP adds support for the Linux perf profiler, which
can be used to profile Python code.
•Implement stack overflow protection on supported
platforms:
•This PEP implements stack overflow protection on
supported platforms. This can help to prevent Python
programs from crashing due to stack overflows.
•New typing features:
21.
22. Python 3.14 is scheduled to be released in October 2024.
Planned for Python 3.14:
A new type hint, typing.Literal, which will allow you to specify the exact value of a
variable.
A new keyword-only argument syntax, which will make it easier to write code that is
more readable and maintainable.
A new f-string format specifier, {.+}, which will allow you to format floating-point
numbers with more precision.
A new contextlib.ExitStack class, which will make it easier to manage multiple
resources in a with statement.
These are just a few of the new features that are planned for Python 3.14. If you are
interested in learning more, you can check out the Python 3.14 documentation.