Assigning attributes to typing.NoDefault
raises TypeError
, but should raise AttributeError
#118895
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
topic-typing
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Most sentinels in Python raise
AttributeError
if you try to assign attributes to them, buttyping.NoDefault
raisesTypeError
instead. I think this should beAttributeError
, for consistency with other similar objects:CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: