[Python-ideas] [Python-Dev] hello, new dict addition for new eve ?

julien tayon julien at tayon.net
Wed Jan 4 12:54:15 CET 2012


2012/1/3 Nathan Rice <nathan.alexander.rice at gmail.com>:
>>
>> As a said earlier in this thread, being able to view dicts as sets is such a
>> good idea that it was already added a few years ago.
>>
>>>>> {1:1}.items() < {1:1, 2:2}.items()
>> True
>
Making me think of funny stuffs  :

>>> dict( a = .1 * .1 )  > dict( a = .01 )
True
( value compared, floats are behaving as they always do)

>>> dict( a = lambda x : x  ) == dict( a = lambda x  : x )
False
( value compared, and lambda are id compared I guess)

And since I  always mixed up truth and lies :
>>> False , True = True, False ==  True and "to be" or not "to be" if  "logic" is "insane"  else 42
-- 
Jul



More information about the Python-ideas mailing list