Can a simple a==b 'hang' in and endless loop?

bonono at gmail.com bonono at gmail.com
Wed Jan 18 11:30:15 EST 2006


Claudio Grondi wrote:
> As also the fact, that when
> a = [1,2.0,3L]
> b = [1.0,2,3 ]
> a==b # gives True
> even if the objects in the lists are actually different,
> or when the objects being members of the list redefine __eq__ so, that
> no matter how different they are, the lists always compare True.
> 
Can't you use "a is b" in this case to test for what you want ?




More information about the Python-list mailing list