Rational numbers

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Feb 26 02:12:52 EST 2007


En Sat, 24 Feb 2007 01:42:00 -0300, Martin Manns <mmanns at gmx.net> escribió:

> On Fri, 23 Feb 2007 20:20:12 -0300
> "Gabriel Genellina" <gagsl-py at yahoo.com.ar> wrote:
>
>> mx.Number.Rational is horribly broken. They break this rule:
>> a==b => hash(a)==hash(b)
>> so they can'b be used as dictionary keys, by example.
>
> I would be interested, under which circumstances the rule is broken.
> In my (few) tests, hash(a)==hash(b) worked.

I can't reproduce this issue with the latest mx experimental package, it  
appears to be fixed now. Also, I'm currently using Python 2.5 and it was  
2.3 by that time.

-- 
Gabriel Genellina




More information about the Python-list mailing list