You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IndexError in initials_list() when a *_list attribute contains a doubled-space element #232
first_list/middle_list/last_list are plain public attributes (not properties), so they can be assigned directly, bypassing parse_pieces's whitespace normalization. If an assigned element contains an internal double space, _process_initial (parser.py:269, initials.append(part[0])) crashes with IndexError: string index out of range, because "".split(" ") yields an empty string for the collapsed gap.
Repro:
fromnameparserimportHumanNamen=HumanName(first='John')
n.middle_list= ['Q R'] # double space inside one list elementn.initials_list() # IndexError: string index out of range
Going through the normal constructor/property paths is safe (HumanName("John Q Doe") or first="A B") since those go through parse_pieces, which normalizes whitespace. The crash only happens via direct assignment to the *_list attributes.
Found while reviewing #229 / PR #231 — unrelated to that cleanup; it's a pre-existing issue.
Activity
Reconcile test_initials against the facade (buckets B, C, E)
docs(review): the copy cost, the six names, and a restored dated entry