Skip to content

lists: add conjunction parameter to natural_list (issue #214) - #3

Merged
lethevinh merged 1 commit into
mainfrom
fix/issue-214-conjunction
Sep 21, 2026
Merged

lethevinh merged 1 commit into
mainfrom
fix/issue-214-conjunction

Conversation

@lethevinh

Copy link
Copy Markdown

Implements python-humanize#214 — an optional conjunction parameter on natural_list choosing between "and" and "or".

What

  • natural_list(items, conjunction="and") — new keyword; "or" produces one, two or three; any other value raises ValueError.
  • Backwards compatible: the default keeps today's behaviour byte-for-byte.
  • 6 new tests in tests/test_lists.py covering both conjunctions, the empty/single-item edge cases, and the invalid-value rejection.

Tests

python -m pytest → 752 passed, 110 skipped (baseline at this pin: 746 passed).

Notes

@lethevinh
lethevinh merged commit e655d8d into main Sep 21, 2026
@lethevinh
lethevinh deleted the fix/issue-214-conjunction branch September 21, 2026 08:26
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.

1 participant