On Mon, Apr 18, 2011 at 3:50 AM, R. David Murray <rdmur...@bitdance.com> wrote: > Thanks, your explanation seems to me to make a good case for making the > decimal.py implementation less permissive.
Indeed. Since the current handling of Context in decimal.py violates "Errors should never pass silently, unless explicitly silenced", I would personally support a proposal to lock down its __setattr__ to a predefined set of attributes, have its __delattr__ always raise an exception, and introduce a parent ABC that is used for an isinstance() check in setcontext(). (The ABC could include an attribute check, so only objects that failed to provide all the appropriate methods and attributes would raise the TypeError). Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com