[issue1623] Implement PEP-3141 for Decimal

Jeffrey Yasskin report at bugs.python.org
Tue Jan 8 05:53:56 CET 2008


Jeffrey Yasskin added the comment:

_dec_from_triple: Probably, yes. It doesn't seem to have any practical
effect, but it's good to be consistent.

__lt__, __le__: It doesn't matter whether they're called because they
have the same effect as __cmp__. They're only there to implement
numbers.Real. Perhaps, though, this is a sign that numbers.Real should
require __cmp__ instead in 2.6? Or all of the rich comparisons instead
of just the two minimal ones?

NaNs: I think the guideline is to keep the current behavior for 2.6, and
it's not needed for the 3141 implementation, but if that issue comes to
a conclusion before I get the 3.0 implementation submitted, I'm happy to
follow it.

Performance: cProfile points at abc.__instancecheck__ taking 20% of the
total time (1132436 calls). This could be a problem... I'll check how
that's changed (on my machine) from head and if I can fix it.

Thanks for your detailed reviews, Mark!

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1623>
__________________________________


More information about the Python-bugs-list mailing list