Skip to content

Commit bdc4cfd

Browse files
derek73claude
andcommitted
docs: middle_as_family use case; nickname default links to its constant
The fold example (verified live): 'Gabriel García Márquez' -> family 'García Márquez' for multi-part-surname data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f0bd837 commit bdc4cfd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

nameparser/_policy.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,14 @@ class Policy:
8686
#: (EAST_SLAVIC, TURKIC); usually set via a locale pack.
8787
patronymic_rules: frozenset[PatronymicRule] = frozenset()
8888
#: Folds middle into family instead of splitting them (v1's
89-
#: middle_name_as_last).
89+
#: middle_name_as_last) -- for data where unrecognized interior
90+
#: words are surname parts, not middle names: multi-part surnames
91+
#: like Spanish/Portuguese dual surnames ("Gabriel García Márquez"
92+
#: -> family "García Márquez" instead of middle "García").
9093
middle_as_family: bool = False # v1's middle_name_as_last
9194
#: (open, close) pairs whose enclosed content becomes the nickname
92-
#: field. Defaults to DEFAULT_NICKNAME_DELIMITERS (#273).
95+
#: field. Defaults to
96+
#: :data:`~nameparser.DEFAULT_NICKNAME_DELIMITERS` (#273).
9397
nickname_delimiters: frozenset[tuple[str, str]] = DEFAULT_NICKNAME_DELIMITERS
9498
#: (open, close) pairs whose enclosed content becomes the maiden
9599
#: field instead; a pair listed here is dropped from the effective

0 commit comments

Comments
 (0)