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
str() strips literal "None" from real names when empty_attribute_default is None #254
With empty_attribute_default = None, __str__ interpolates None into the formatted string and then scrubs it with .replace(str(self.C.empty_attribute_default), '') (a hack dating to PR #45, 2016). The scrub can't distinguish the interpolated None from name text containing the same substring:
The parse is correct (first='Nonez'); the formatted output silently corrupts the name. Present since 2016; None-mode only. initials() had the same family of bug, fixed in 1.3.0.
Fix: substitute '' for falsy fields beforestr.format() (e.g. format a {k: v or '' for ...} view of as_dict()) instead of scrubbing 'None' after — which also deletes the replace hack outright. Related: #255 removes the option entirely in 2.0; this fix protects users during the deprecation window.
Activity
derek73 commentedon Jul 8, 2026
#255 removes the
empty_attribute_defaultproperty entirely so not if sure this is worth doing.Add _render with the #254-normative collapse; extend layering for it
Reconcile test_output_format against the facade (buckets B, C)
Apply the /simplify findings: snapshot caching, shared collapse, one …
feat: default str()/render() shows nickname and maiden