This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients corona10, ncoghlan, sam_ezeh, steven.daprano
Date 2022-04-01.19:35:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
I'm not sure what the implementation uses to enforce this, but decimal 
contexts already seem to reject arbitrary attributes. So a naive 
implementation that just setattr()'s the keyword arguments will 
automatically fail:

>>> from decimal import getcontext
>>> ctx = getcontext()
>>> setattr(ctx, 'precision', 10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'decimal.Context' object has no attribute 'precision'

But you are absolutely correct that however we enforce it, we should 
avoid allowing typos to silently fail.
Date User Action Args
2022-04-01 19:35:30steven.dapranosetrecipients: + steven.daprano, ncoghlan, corona10, sam_ezeh
2022-04-01 19:35:28steven.dapranolinkissue47135 messages
2022-04-01 19:35:28steven.dapranocreate