On Tue, Jul 8, 2014 at 10:19 AM, Chris Angelico <ros...@gmail.com> wrote:
> For hash keys, float object identity will successfully look them up:
>>>> d={}
>>>> d[float("nan")]=1
>>>> d[float("nan")]=2
>>>> x=float("nan")
>>>> d[x]=3
>>>> d[x]
> 3
>>>> d
> {nan: 1, nan: 2, nan: 3}

Neat!

S
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to