gmpy comparisons raise a TypeError when coercion fails.
>>> gmpy.mpz(1) == None
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: coercion to gmpy.mpz type failed
Another example:
>>> [gmpy.mpz(4), None].count(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: coercion to gmpy.mpz type failed
Original issue reported on code.google.com by casevh on 14 Oct 2008 at 5:20
Original issue reported on code.google.com by
casevh
on 14 Oct 2008 at 5:20