Skip to content

Commit b746792

Browse files
derek73claude
andcommitted
docs: extra_suffix_delimiters is additive; the comma is not replaceable
Verified live: with ' - ' configured, comma-split suffix groups parse unchanged. The comma is structural (the same reading that parses 'Family, Given' input), not a configurable suffix delimiter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 79ff5f5 commit b746792

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/customize.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ listed below.
9090
Defaults to empty — see the routing example below.
9191
* - ``extra_suffix_delimiters``
9292
- ``frozenset[str]``
93-
- Adds separators (beyond a comma) that split suffix groups, e.g.
94-
``" - "`` for ``"Jane Smith, RN - CRNA"``.
93+
- Adds separators that split suffix groups, e.g. ``" - "`` for
94+
``"Jane Smith, RN - CRNA"``. Additions only — the comma always
95+
splits suffix groups and cannot be replaced.
9596
* - ``lenient_comma_suffixes``
9697
- ``bool``
9798
- Allows a segment after a comma to be read as a suffix using

nameparser/_policy.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ class Policy:
8686
#: nickname set (maiden wins, see __post_init__), so
8787
#: maiden_delimiters={("(", ")")} is the whole recipe (#274).
8888
maiden_delimiters: frozenset[tuple[str, str]] = frozenset()
89-
#: Separators beyond a comma that split suffix groups (e.g. " - ").
89+
#: Additional separators that split suffix groups (e.g. " - " for
90+
#: "Jane Smith, RN - CRNA"). Additive only: the comma always
91+
#: splits suffix groups and cannot be replaced -- comma handling
92+
#: is structural (the same comma reading that parses
93+
#: "Family, Given" input), not a configurable delimiter.
9094
extra_suffix_delimiters: frozenset[str] = frozenset()
9195
#: Allows a post-comma segment to read as a suffix via the lenient
9296
#: initial-shaped test; False requires the strict acronym form.

0 commit comments

Comments
 (0)