• Raymond Hettinger's avatar
    Removed Exact/Inexact after discussion with Yasskin. · 6b467629
    Raymond Hettinger yazdı
    Unlike Scheme where exactness is implemented as taints, the Python
    implementation associated exactness with data types.  This created
    inheritance issues (making an exact subclass of floats would result
    in the subclass having both an explicit Exact registration and an
    inherited Inexact registration).  This was a problem for the
    decimal module which was designed to span both exact and inexact
    arithmetic.  There was also a question of use cases and no examples
    were found where ABCs for exactness could be used to improve code.
    One other issue was having separate tags for both the affirmative
    and negative cases.  This is at odds with the approach taken
    elsewhere in the Python (i.e. we don't have an ABC both Hashable
    and Unhashable).
    6b467629
test_abstract_numbers.py 1.68 KB