[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

Serhiy Storchaka report at bugs.python.org
Tue Dec 29 08:29:04 EST 2015


Serhiy Storchaka added the comment:

LGTM.

I haven't tested that "type(x) is float or type(x) is Decimal" is faster than alternatives ("type(x) in (float, Decimal)", or "isinstance(x, (float, Decimal))", or "hasattr(x, 'as_integer_ratio')") and believe you have tested this.

----------
stage:  -> commit review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25974>
_______________________________________


More information about the Python-bugs-list mailing list