0% found this document useful (0 votes)
4 views

Python programming and its packages Dagim

The document outlines the evolution of Python programming language from its inception in the late 1980s to its current state, highlighting major version releases and their significant features. It discusses Python's impact on various fields such as data science, web development, and education, as well as the role of its community in fostering inclusivity and growth. The document also mentions upcoming features in future Python releases, emphasizing the language's continuous improvement and adaptability.

Uploaded by

dagimnega66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python programming and its packages Dagim

The document outlines the evolution of Python programming language from its inception in the late 1980s to its current state, highlighting major version releases and their significant features. It discusses Python's impact on various fields such as data science, web development, and education, as well as the role of its community in fostering inclusivity and growth. The document also mentions upcoming features in future Python releases, emphasizing the language's continuous improvement and adaptability.

Uploaded by

dagimnega66
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

ADAMA SCIENCE AND TECHNOLOGY UNIVERSITY

School of electrical engineering and computing


Department of Software Engineering

Course Name: Software Evolution and maintenance course


Course Code: Seng4203
Group Members

Name​ ​ ​ ​ ​ ID
1.​DAGIM NEGA​ ​ ​ UGE/27644/14
2.​ABDETA TEREFE​ ​ UGE/27670/14
3.​ELIAS BIKALE​ ​ ​ UGE/27687/14
4.​AMANUEL SELAMU​​ UGE/27676/14
5.​GETAHUN MILLION​ ​ UGE/27697/14
Python programming and its packages
1.​ introduction
Python, one of the most popular programming languages today, has a rich history of
development and evolution. From its inception in the late 1980s to its current status as a
versatile and powerful language, Python's version history reflects the language's
adaptability and the community's dedication to improvement.

Python is a high-level, general-purpose programming language. Its design philosophy


emphasizes code readability with the use of significant indentation.

Python is dynamically type-checked and garbage-collected. It supports multiple


programming paradigms, including structured (particularly 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.
2.​ Analyze Version Histories: and Compare Releases: Contrast
features, performance, and architecture across major versions.

The Birth of Python

Python 0.9.0 (1991)


Python's journey began with version 0.9.0, released by Guido van Rossum in 1991. This
initial release included core features such as exception handling, functions, and the core
data types: list, dict, str, and others. It also introduced the module system, allowing the
organization of code into reusable libraries

Python 1

Python 1 launched in 1994 with new features for functional programming, including
lambda, map, filter and reduce. It also included features from 0.9 Python, including
classes with inheritance, exception handling, functions, and the core data types list, dict,
str.

Python 1.4 brought its next set of features, such as Modula-3 style keyword arguments
and support for complex number operations.

Python 1.5 (1997)

Version 1.5 introduced important updates, including:

Standard Library Enhancements: Expansion of the standard library, making Python


more versatile.​
Unicode Support: Initial support for Unicode, facilitating internationalization.

Other version 1 updates included optimizations, background changes, and updates to


documentation/licences.

During this period, Perl was the most popular scripting language, and Python was too
immature to be used at wide scale. As more developers sought alternatives to Perl,
Python seemed the best choice, as it mimics many of Perl’s features. In the world of
object-oriented programming, Java was on the rise during this era of Visual Basic and
C/C++.
Establishing a Strong Foundation
Python 2.0 (2000)

Python 2 launched in 2000 with big changes to source code storage. It introduced many
desired features like unicode support, list comprehension, and garbage collection. A bit
later, Python 2.2 introduced unification of types and classes under one hierarchy,
allowing Python to be truly object-oriented.

Around this time, many programmers used to adopt Python as an alternate scripting
language. Since Java was dominating in the world of enterprise-sized applications,
Python was used in smaller, niche applications.

Even Java developers started using Python to increase their coding speed due to its
interoperability.

List Comprehension

List comprehensions are used to create new lists from, from other iterables. List
comprehensions take and return a list, allowing you to trim a list by a certain criteria or
to create a new list with newly manipulated elements.

The syntax for list comprehensions is:

The following shows how you can use list comprehensions to return a new list with only
elements that are present in both passed lists.

Garbage collection cycles

Python 2.0 overhauls the garbage collection system by switching from a counter-based
system to a cycle-based system.

In the old system, each object would contain a counter that records how many other
objects are pointing to it. The object was then automatically deleted once that counter
reached zero. However, it wouldn’t delete objects that were pointed to but were not
accessible, resulting in a memory leak.
Python 2.0 fixes this by periodic cycles that call the garbage collector to delete
inaccessible objects. The cycles use additional overhead but reduce the risk of a
memory leak. Overhead costs of the deletion cycles have since been reduced due to
optimizations.

Augmented Assignment

Python 2.0 also adds support for augmented assignment operators that perform an
operation on the chosen variable and return the variable. For example, a += 1 adds 1 to
the value of a. It is a shorter version of the statement = a + 1.

The full list of supported assignment operators is +=, -=, *=, /=, %=, **=, &=, |=, ^=, >>=,
and <<=.

Version: Release Date: Major Changes:


Python 2.1 Added support for nested scopes to perform more like
October 2001 other statically scoped languages

Python 2.2 Unified types and classes into one Python hierarchy to
December 2001 make Python more object-oriented. Also, added
generator routines that control the behavior of loops.

Python 2.4 Added generator expressions for iterator feature,


function decorators, and the decimal data type

Python 2.5 Added the with statement that encloses code within a
March 2005 context manager.

Python 2.6 Added all backwards compatible 3.0 features,


September 2006 including typeError, bin(), and _complex_(). Switched
from SourceForge Issue Tracking to Roundup. Also,
optimized the with statement.

Python 2.7 Minor bug fixes and optimizations. Terminated support


October 2006 for Python 2.
Python 3
Python 3.0 is the biggest change the language has undergone. The main mission of
the update was to remove fundamental design flaws with the language by deleting
duplicate modules and constructs.

Python 3’s development was steered by the same philosophies as previous versions but
also added that for every task “there should be one— and preferably only one
—obvious way to do it”.

Removing many duplicate tools unfortunately meant that all previous Python 2 code
was not compatible with Python 3.0. Some of the most notable changes are that print is
now a built-in function, removal of the Python 2 input, unification of str and unicode, and
changes in integer division.

Thankfully, the team at Python created a tool called 2to3 that will review an old Python 2
program and convert much of the changed syntax to Python 3 automatically.

The release of Python 3.0 pushed it into the developer limelight, and it attracted the
scientific community, particularly in fields like neuroscience. Once the NumPy library
was created in Python, Python became a competitor with R and Matlab, pushing Python
into its pedestal as the preferred language for machine learning and data science.

With the rise of big data in the early 2000s, spurred by the 2008 financial crisis, a new
need for data automation tools spiked. Many companies adopted Python for its
simplicity and powerful libraries. Shortly after, it became the preferred language for
managing social-media data.

It was around this time that Pandas, Scikit-learn, and Matplotlib were developed to meet
this demand.

Between 2012 and 2015, large technology companies like Facebook, Google, and
Netflix soon expanded the field of data science and machine learning, using Python as
the primary language and R for data visualization. More big-name Python tools like
TensorFlow and Seaborn were developed by these companies, making Python the #1
choice for data scientists.
Minor changes in Python 3.0

●​ reduce(): reduce() has been moved from builtins into functools. However map()
and filter() remain built-in.
●​ Old feature removal: old-style classes, string exceptions, and implicit relative
imports are no longer supported.
●​ Exception handling: exceptions now need the as keyword, exec as *var* is
standard over exec, *var*.
●​ with statement: which is now built in and no longer needs to be imported from
__future__.
●​ range: xrange() from Python 2 has been replaced by range(). The original range()
behavior is no longer available.

Print Function
In Python 2, print was a statement that had to be imported from __future__. In Python 3,
it has been changed to a built-in function and no longer requires any imports. As it is
now a function, you must have all printed arguments enclosed in parentheses,
print("printed").

For example:

One notable side effect of this is that you can no longer use an empty print statement to
create a new line

raw_input to input
The Python 2.0 version of input has been removed and the old raw_input has been
renamed to input. This means that input now always returns as a string rather than
being evaluated as an expression.

The goal of the change is to remove confusion around the behavior of the two similar
inputs and instead favor the more common use. If you want to use the old functionality,
you can instead use eval(input()).
Integer division

In Python 3, division operations that result in decimals return a float rather than a
truncated integer.

In Python 2, the outcome of 5/2 would be 2 because the decimal is automatically


truncated to form an integer. Now, 5/2 equals 2.5 where the outcome is converted to a
float to represent the correct answer. You can still get the truncating behavior if you use
the // operator, 5//2.

The desire here is to remove unexpected behavior from unintentional truncation.

Python 3.1 June 2009 Added support for ordered dictionaries, which let
configuration files be read, modified, and then written
back in their original order.

Python 3.2 February 2011 Adds the option to restrict modules to specific APIs that
will remain stable despite updates. Added the argparse
module to replace optparse and the futures library for
concurrent programming.

Python 3.3 September Added yield from expression for generator delegation.
2012 Readded explicit unicode declaration support to ease
transition from Py2 to Py3. Simplified error catching by
removing the requirement to name a specific error type.
All errors can now be caught using OSError.

Python 3.4 March 2014 Added the asyncho module that includes support for
event loop implementations.

Python 3.5 September Additional support for asynchronous programming by


2015 adding awaitable objects, coroutine functions,
asynchronous iteration, and asynchronous context
managers.
Python 3.6 December Stabilized asyncho module with additional features,
2016 syntax, optimizations, and bug fixes. Added support for
asynchronous generators and compressions. Added
f-strings, which include expressions evaluated at runtime.

Python 3.7 June 2018 Added async and await as reserved keywords. Also,
added breakpoint() method, which drops you into the
debugger at the call site. Annotation evaluations can
now be postponed until runtime rather than at definition
to avoid scope errors.

Python 3.8 October 2019 Added “walrus operator” (:=) that allows you to assign
value to variables as part of a larger expression.
Enabled positional-only arguments that allows you to
specify that a parameter must be noted by position
rather than keyword. Added support for f-string specifier
= to allow more control over how the f-string is
presented.

Python 3.9 October 2020 Merge (|) and update (|=) added to dict library to
complement dict.update() method. Added
str.removeprefix(prefix) and str.removesuffix(suffix) to
easily remove unneeded sections of a string.

Python 3.10 October 2021 Python 3.10 introduced structural pattern matching with
the match statement, providing a functionality akin to the
switch or case statements found in other languages.

Python 3.11 (2022)

Python 3.11 aimed at improving performance and developer experience:


●​ Performance Improvements: Significant speed improvements across various
operations.
●​ Error Messages: More informative and precise error messages.
Python 3.12 (2023)

The future release of Python 3.12 brings more optimizations and features, continuing
the evolution of the language.
●​ Improved Error Messages in Python
●​ More Flexibility in Python F-String
●​ Type Parameter Syntax
●​ Improvement in Modules
●​ Syntactic Formalization of f-strings

Python 3.13 (2024)


The future release of Python 3.12 is expected to bring more optimizations and features,
continuing the evolution of the language

3.​ Community Impact: Explore how developer/contributor trends


influenced evolution.

Python's straightforward syntax and readability have not only made it a popular choice
for beginners but have also influenced the design of other programming languages like
Go (Golang) and Cobra. Its user-friendly nature allows new programmers to grasp
fundamental concepts easily, facilitating a smoother transition to more complex
languages later on.

Impact on Data Science and Machine Learning​


Python has become a cornerstone in the fields of data science and machine learning.
Its extensive ecosystem of libraries and tools, such as NumPy, Pandas, and scikit-learn,
empowers data scientists to perform intricate data analysis, create insightful
visualizations, and build sophisticated models. This has led to groundbreaking
advancements in artificial intelligence and data-driven decision-making.
Python's impact extends far beyond data science and machine learning, influencing a
wide range of fields due to its versatility and ease of use. Here are some key areas
where Python has made a significant impact:

1.​ Web Development:​

○​ Python is widely used for web development, thanks to frameworks like


Django and Flask. These frameworks enable developers to build scalable
and secure web applications efficiently.
2.​ Scientific Computing:​

○​ Python has become a staple in scientific research due to libraries like


NumPy, SciPy, and Matplotlib. These tools facilitate complex computations
and data visualization, making Python invaluable for researchers across
various scientific disciplines.
3.​ Automation and Scripting:​

○​ Python's simplicity makes it ideal for automating repetitive tasks and


writing scripts to manage system administration tasks. It is often used for
web scraping, data processing, and task automation.
4.​ Artificial Intelligence:​

○​ Beyond machine learning, Python is used extensively in AI for natural


language processing (NLP), computer vision, and robotics. Libraries like
TensorFlow and PyTorch are instrumental in developing advanced AI
models.
5.​ Education:​

○​ Python's readability and straightforward syntax make it an excellent


language for teaching programming concepts. It is widely used in
educational institutions to introduce students to coding.
6.​ Game Development:​

○​ Python is used in game development, particularly with the Pygame library,


which allows developers to create games and multimedia applications.
7.​ Finance:​

○​ In the financial sector, Python is used for quantitative analysis, algorithmic


trading, and risk management. Libraries like Pandas and NumPy are
essential for financial modeling and data analysis.

The Thriving Python Community and Culture

Python's journey from a niche tool to a globally recognized language is marked by its
vibrant community and inclusive culture. These aspects have significantly contributed to
its enduring popularity and growth.

1.​ Openness and Inclusivity: The Python community is renowned for its open and
inclusive nature, fostering a welcoming environment for all programmers,
regardless of background or expertise. Initiatives like PyLadies and various
diversity programs, supported by the Python Software Foundation (PSF), have
been instrumental in promoting inclusivity and mentorship.
2.​ The Python Software Foundation (PSF): As the backbone of the Python
community, the PSF ensures that Python remains free and open-source. It
supports numerous outreach programs, grants, and events, providing a
collaborative platform for developers to contribute to Python's evolution.​
3.​ Online Resources and Support: The community offers a wealth of online
resources, including comprehensive documentation, tutorials, forums, and Q&A
platforms like Stack Overflow. These resources create an accessible learning
environment, enabling both beginners and experienced developers to enhance
their Python skills and seek guidance from peers.​

4.​ Collaboration and Community-Driven Development: Python's development is


driven by collaboration, with Python Enhancement Proposals (PEPs)
encouraging open dialogue and community input. This approach has led to the
creation of highly regarded libraries and frameworks, such as Django and
TensorFlow, showcasing the power of community-driven innovation.​

5.​ Events and Conferences: Python enthusiasts worldwide organize conferences,


meetups, and workshops, such as PyCon and PyData, to share knowledge and
celebrate the language's advancements. These events foster networking, inspire
new ideas, and drive the growth of the Python ecosystem.
6.​ Python Community Impact: Python's influence extends beyond programming,
making it a favored tool among educators, scientists, and researchers. Its
simplicity, readability, and versatility have made it indispensable in various
domains, including web development, scientific computing, and automation. This
widespread adoption highlights the positive impact the Python community has
had on innovation and problem-solving across multiple sectors.

4. Challenges: Highlight technical debt, backward compatibility,


or scalability issues.

Technical debt in software development refers to the implied cost of additional rework
caused by choosing an easy solution now instead of using a better approach that would
take longer.

Scalability refers to the ability of a system, network, or process to handle a growing


amount of work, or its potential to be enlarged to accommodate that growth.

Backward compatibility refers to the ability of a newer system, software version, or


technology to support or interact with older versions, interfaces, or data.

Python, despite its popularity and versatility, faces several challenges that developers
need to consider. Here are some key challenges, particularly focusing on technical debt,
backward compatibility, and scalability issues:

Technical Debt
1.​ Dynamic Typing:​

○​ Python's dynamic typing can lead to runtime errors that are harder to
catch during development. This can accumulate technical debt, especially
in large codebases where type-related bugs may go unnoticed until
execution.
2.​ Dependency Management:​

○​ Managing dependencies in Python can be complex, especially in large


projects with many third-party libraries. Tools like pip and virtual
environments help, but they can also lead to "dependency hell" where
conflicting versions cause issues.
3.​ Code Maintainability:​

○​ While Python encourages readable code, poorly written or undocumented


code can accumulate technical debt. Ensuring code quality through best
practices, linters, and code reviews is essential to mitigate this.

Backward Compatibility

1.​ Python 2 to Python 3 Transition:​

○​ The shift from Python 2 to Python 3 introduced significant changes, and


maintaining backward compatibility can be challenging. Although Python 2
is no longer supported, legacy systems may still require maintenance.
2.​ Library Updates:​

○​ Libraries and frameworks evolve, and maintaining backward compatibility


with older versions can be difficult. This can lead to issues when
upgrading dependencies or integrating with newer systems.
3.​ Deprecation of Features:​

○​ As Python evolves, certain features and libraries may be deprecated.


Keeping up with these changes and refactoring code to use newer
alternatives can be time-consuming.
Scalability Issues

1.​ Performance:​

○​ Python's performance can be a limitation for CPU-intensive tasks due to


its interpreted nature. While libraries like NumPy and Cython can help,
they add complexity to the codebase.
2.​ Global Interpreter Lock (GIL):​

○​ The GIL in CPython can be a bottleneck for multi-threaded programs,


limiting the ability to take full advantage of multi-core processors. This can
impact the scalability of CPU-bound applications.
3.​ Memory Management:​

○​ Python's memory management can be less efficient compared to


lower-level languages. This can be a challenge for applications that
require high memory efficiency.
4.​ Concurrency:​

○​ While Python supports multithreading and multiprocessing, achieving true


concurrency can be challenging due to the GIL. Asynchronous
programming with libraries like asyncio can help, but it requires a different
programming paradigm.

Additional Challenges

1.​ Security:​

○​ Python's dynamic nature and extensive use of third-party libraries can


introduce security vulnerabilities. Regularly updating dependencies and
performing security audits are essential to manage this risk.
2.​ Deployment:​

○​ Deploying Python applications can be complex due to differences in


environments and dependencies. Tools like Docker and virtual
environments can help, but they add another layer of complexity.
3.​ Mobile Development:​

○​ Python is not natively supported on mobile platforms, which can be a


limitation for developers looking to create mobile applications.
Frameworks like Kivy and BeeWare can help, but they are not as mature
as native development tools.
5. Future directions: expected future releases, key increments, or
performance issues.
The current version of Python is 3.13.1, which is the latest release as of December
2024.

Looking ahead to Python 4.0, several key improvements and performance


enhancements are anticipated:

1.​ Performance Improvements:​

○​ Just-In-Time (JIT) Compilation: One of the most anticipated features in


Python 4.0 is the integration of JIT compilation, which can significantly
boost the performance of Python programs by compiling parts of the code
during execution. This dynamic approach could help Python close the
performance gap with statically typed languages like C++ and Java
○​ Enhanced Garbage Collection: Improvements in garbage collection are
expected to reduce memory overhead and improve execution speed,
which is crucial for applications that require high performance and efficient
memory management, such as real-time data processing and machine
learning.
2.​ Modernized Syntax and Features:​

○​ Pattern Matching: Introduced in Python 3.10, pattern matching is expected


to be further refined in Python 4.0. This feature allows for more expressive
and concise code, making it easier to handle complex data structures and
improve code readability.
3.​ Concurrency and Parallelism:​

○​ Improved Asynchronous Programming: Python 4.0 is expected to


introduce enhancements to the asyncio library, simplifying the
development of concurrent programs and potentially drawing inspiration
from other languages' concurrency models.
○​ Native Support for Multi-Threading: The Global Interpreter Lock (GIL) has
been a longstanding topic of debate in the Python community. Python 4.0
might bring significant changes to the GIL or even explore alternative
approaches to multi-threading, enhancing the language's ability to handle
parallel tasks.
4.​ Ecosystem and Tooling:​

○​ Standard Library Updates: Python 4.0 could bring updates to existing


modules, deprecate outdated ones, and introduce new libraries to keep
pace with the evolving needs of developers.
○​ Improved Package Management: Enhancements to pip and the overall
package management experience are expected, making it easier to
manage dependencies and maintain environments.
5.​ Backward Compatibility and Migration:​

○​ Easing the Transition: Python 4.0 will likely focus on making the transition
as smooth as possible, providing tools and documentation to help
developers migrate their codebases with minimal friction.
○​ Incremental Depreciation: To avoid the challenges faced during the Python
2 to 3 transition, Python 4.0 might adopt an incremental deprecation
strategy, allowing developers to gradually update their code.

These anticipated features and improvements in Python 4.0 aim to address


performance issues and enhance the language's usability and modern features,
continuing Python's evolution and innovation.
References
●​ https://www.datacamp.com/blog/all-about-python-the-most-versatile-programmin
g-language
●​ https://en.wikipedia.org/wiki/Python_(programming_language)
●​ https://aldim.ro/article/the-community-and-culture-of-python
●​ https://medium.com/tech-spectrum/how-python-has-changed-the-world-468e9cb
db8f0
●​ https://teamcubate.com/blogs/the-future-of-python
●​ https://blog.bytescrum.com/the-future-of-python-what-to-expect-in-python-40
●​ https://highplains.io/python-performance-improvements/
●​ https://www.geeksforgeeks.org/future-of-python-exploring-python-40/

You might also like