Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions sorting_algorithms.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
"""
Sorting Algorithms Comparison Script
Includes:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Native Python sort() and sorted()
"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The module-level docstring has been removed. Module docstrings are important for maintainability as they provide a high-level overview of the file's purpose and contents. This is recommended by Python's style guide, PEP 257.1

Please consider re-adding the docstring to explain what this script does, as it was a helpful summary of the included algorithms.

"""
Sorting Algorithms Comparison Script

Includes:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Native Python sort() and sorted()
"""

Style Guide References

Footnotes

  1. PEP 257: "The docstring for a module should generally list the classes, exceptions and functions (and any other objects) that are exported by the module, with a one-line summary of each... All modules should normally have docstrings..."

def bubble_sort(arr):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Module Documentation

Module-level docstring was removed, eliminating critical context about the module's purpose and contents. This reduces maintainability by forcing developers to infer the module's role from individual functions.

Suggested change
def bubble_sort(arr):
"""
Sorting Algorithms Comparison Script
Includes:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Native Python sort() and sorted()
"""
Standards
  • Clean-Code-Documentation
  • Maintainability-Context
  • Clean-Code-Comments

"""
Expand Down