]> granicus.if.org Git - python/commit
Removed Exact/Inexact after discussion with Yasskin.
authorRaymond Hettinger <python@rcn.com>
Sat, 15 Mar 2008 20:02:04 +0000 (20:02 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 15 Mar 2008 20:02:04 +0000 (20:02 +0000)
commit6b46762974bb281106088dae124ca0059571db2a
tree6fc3d853a61f5162d42787d9f2193fa03b31d79f
parent32ed8c267c0ab005c4a28c5e64b875f40ac2a00f
Removed Exact/Inexact after discussion with Yasskin.

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).
Lib/numbers.py
Lib/test/test_abstract_numbers.py