Skip to content

Commit 0a5e93b

Browse files
derek73claude
andcommitted
docs: comma-order example a reader can verify without cultural context
'Yamamoto, Haruki' only demonstrates the point if you already know which word is the surname. 'Thomas, John' is ambiguous to an English-reading audience in exactly the way the comma resolves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent c8313a0 commit 0a5e93b

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

docs/customize.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ listed below.
6565
- Assigns positional (no-comma) input to given/middle/family in
6666
this order. Use the exported ``GIVEN_FIRST`` (default),
6767
``FAMILY_FIRST``, or ``FAMILY_FIRST_GIVEN_LAST`` constants.
68-
Ignored for comma-format input ("Yamamoto, Haruki"), which
69-
states its own order.
68+
Ignored for comma-format input — the comma itself states the
69+
order ("Thomas, John" puts the family name first).
7070
* - ``patronymic_rules``
7171
- ``frozenset[PatronymicRule]``
7272
- Reorders patronymic-shaped names via opt-in detectors — East

nameparser/_policy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ class Policy:
7777
#: :ref:`name-order constants <name-order-constants>` --
7878
#: GIVEN_FIRST (the default), FAMILY_FIRST, and
7979
#: FAMILY_FIRST_GIVEN_LAST; any other tuple of Roles raises
80-
#: ValueError. Ignored when the input contains a comma:
81-
#: comma-format input ("Yamamoto, Haruki") states its own order
82-
#: explicitly.
80+
#: ValueError. Ignored when the input contains a comma: the comma
81+
#: itself states the order -- "Thomas, John" puts the family name
82+
#: first no matter which words could otherwise be either
83+
#: ("Thomas" and "John" both work as given or family names).
8384
name_order: tuple[Role, Role, Role] = GIVEN_FIRST
8485
#: Opt-in detectors that reorder patronymic-shaped names
8586
#: (EAST_SLAVIC, TURKIC); usually set via a locale pack.

0 commit comments

Comments
 (0)