Chris Angelico <ros...@gmail.com>: > On Sat, Jul 12, 2014 at 4:11 PM, Ethan Furman <et...@stoneleaf.us> wrote: >> class list: >> def __eq__(self, other): >> if len(self) != len(other): >> return False >> for this, that in zip(self, other): >> if this is that or this == that: >> continue >> break >> else: >> return True >> return False > > Seems a little elaborate. Why not just return straight from the loop, > instead of breaking and using else? :)
But look at that keyword density! That single function demonstrates 80% of Python syntax making it a great educational tool. Marko -- https://mail.python.org/mailman/listinfo/python-list