Skip to content

types: constrain tim sort items to Comparable - #15432

Merged
cclauss merged 2 commits into
TheAlgorithms:masterfrom
tayfuryldz:types/tim-sort-comparable
Sep 24, 2026
Merged

cclauss merged 2 commits into
TheAlgorithms:masterfrom
tayfuryldz:types/tim-sort-comparable

Conversation

@tayfuryldz

Copy link
Copy Markdown
Contributor

Summary: make TimSort helpers preserve a bounded comparable element type; accept any comparable sequence while returning list[T]; express comparisons using < only; add TimSort to the shared comparable-item and rejection test batteries. Validation: python -m doctest sorts/tim_sort.py; python -m pytest tests/test_sorts.py -q (345 passed); python -m compileall -q sorts/tim_sort.py tests/test_sorts.py; git diff --check. Part of #15234.

@cclauss
cclauss enabled auto-merge (squash) September 24, 2026 14:26
@cclauss
cclauss disabled auto-merge September 24, 2026 14:26
@cclauss
cclauss merged commit b3f113d into TheAlgorithms:master Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants