• Mark Dickinson's avatar
    Issue #8748: Fix two issues with comparisons between complex and integer · cc6a982d
    Mark Dickinson yazdı
    objects.  (1) The comparison could incorrectly return True in some cases
    (2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
    (2) The comparison raised an OverflowError for large integers, leading
    to unpredictable exceptions when combining integers and complex objects
    in sets or dicts.
    
    Patch by Meador Inge.
    cc6a982d
test_complex.py 24.4 KB