
March 16, 2010
10:10 p.m.
Mark Dickinson wrote:
On the one hand there's something to be said for maintaining a clean separation between the float and Decimal types, allowing only explicit conversions from one to the other; mixed-type arithmetic between floats and Decimals was very deliberately not permitted in the original PEP, and that's unlikely to change in a hurry.
I think that as long as you're disallowing arithmetic between float and decimal, comparison should be disallowed as well. So if you're going to change anything, it would be better to make such comparisons raise a TypeError in 2.7 to match the current 3.x behaviour. -- Greg