-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Dear maintainers,
I'd like to propose updating our Python scripts to use modern Python 3 syntax exclusively. Currently, maintaining compatibility with Python 2 requires extra complexity that may inadvertently hinder students' learning experience.
Key reasons for this change:
-
Educational value:
Students may analyze and modify these scripts as part of their learning journey. Legacy Python 2 syntax creates unnecessary cognitive load when they should be focusing on OS concepts. -
Readability matters:
As the Zen of Python reminds us:- "Readability counts" (compatibility checks clutter core logic)
- "There should be one obvious way to do it" (dual implementations violate this)
Modern Python 3 features like f-strings (f"PID: {pid}"
) would make algorithms more transparent.
-
Relevance:
Python 2 reached end-of-life in 2020, and students now learn Python 3 first. Our scripts might better serve students through cleaner code.
Proposed approach:
- Remove all Python 2 compatibility layers (e.g.
__future__
) - Migrate to Python 3.10+ LTS (or newer) with modern syntax
- Maintain exact functionality through careful testing
If this proposal aligns with the project's educational goals, I'd be grateful for the opportunity to contribute initial refactoring for a few scripts as proof of concept.
Thank you kindly for your consideration.