[issue15783] decimal.localcontext(None) fails when using the C accelerator module
report at bugs.python.org
Sat Aug 25 17:56:38 CEST 2012
Stefan Krah added the comment:
OK, but for example:
Help on function __truediv__ in module decimal:
__truediv__(self, other, context=None)
Return self / other.
Here I think it's undisputed that a C version should not cram a context
argument into a number method. There are many functions in decimal where
some arguments are just implementation details, or worse, leftovers
So I simply don't know if localcontext(None) was intended or (once)
an implementation detail.
localcontext(None) by itself looks kind of awkward to me. The only valid
use case I can see is indeed the one from #15136.
I don't particularly mind either way for localcontext(), but in more
speed sensitive areas I would care.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list