[issue4087] Document the effects of NotImplemented on == and !=

2008-11-21 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Looks good. Thanks, Raymond. Minor typos: "numberic" -> "numeric" "the expression ``x in y`` equivalent to" -> "the expression ``x in y`` is equivalent to" ___ Python tracker <[EMAIL PROTECTED]>

[issue4087] Document the effects of NotImplemented on == and !=

2008-11-17 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: r67249 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4087] Document the effects of NotImplemented on == and !=

2008-10-10 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: More sensibility offenders: >>> s = {fractions.Fraction(17,1), decimal.Decimal(17)} >>> s-{17} set() Removing one thing removes two. >>> s.remove(17) >>> 17 in s True Removing something leaves it there. >>> s {Fraction(17, 1)} # random ch

[issue4087] Document the effects of NotImplemented on == and !=

2008-10-10 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: 2008/10/9 Raymond Hettinger <[EMAIL PROTECTED]>: > Alternatively, we could decide to allow decimal/float > comparisons -- the float can be converted to a decimal > exactly and compared exactly -- it would be slow but > it would work and ha

[issue4087] Document the effects of NotImplemented on == and !=

2008-10-09 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: I'll take up the doc fix for the current state of affairs. A change from returning NotImplemented to raising NotImplementedError would need be a separate feature request or PEP. Alternatively, we could decide to allow decimal/float compar

[issue4087] Document the effects of NotImplemented on == and !=

2008-10-09 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: If Decimal(2) == float(2) were to raise an error, set([Decimal(2), float(2)]) would fail, as I would argue it ought to, and the set anomalies would disappear. -- assignee: georg.brandl -> priority: low -> normal

[issue4087] Document the effects of NotImplemented on == and !=

2008-10-09 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Recommend not "doing anything" about decimals and other numbers. What you're seeing is a predictable consequence of NotImplemented being returned by some but not all cross type comparisons. IMO, it is perfectly reasonable that both decima