Tim Peters wrote:

> Changing the user-visible API is a hard egg to
> swallow, and it's unfortunate that the Python code used a dict to hold
> "flags" to begin with.  The dict doesn't just record whether an
> exception has occurred, it also counts how many times the exception
> occurred.  It's possible that someone, somewhere, has latched on to
> that as "a feature".

Especially since it was a documented one:

>>> import decimal
>>> help(decimal.Context)
Help on class Context in module decimal:

class Context(__builtin__.object)
 |  Contains the context for a Decimal instance.
[...]
 |  flags  - When an exception is caused, flags[exception] is incremented.
 |           (Whether or not the trap_enabler is set)
 |           Should be reset by user of Decimal instance.
[...]

-- 
Giovanni Bajo
_______________________________________________
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

Reply via email to