Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52143 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2013-08-07 10:50 -0700 |
| Last post | 2013-08-07 10:50 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Bug? ( () == [] ) != ( ().__eq__([]) ) Ethan Furman <ethan@stoneleaf.us> - 2013-08-07 10:50 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2013-08-07 10:50 -0700 |
| Subject | Re: Bug? ( () == [] ) != ( ().__eq__([]) ) |
| Message-ID | <mailman.323.1375897815.1251.python-list@python.org> |
On 08/07/2013 02:24 AM, Shiyao Ma wrote: > > Sorry. I don't quite get it. As you said, it first tries, leftOperand.__eq__(rightOperand) then if it returns > NotImplemented, it goes to invoke rightOperand.__eq__(leftOperand). But for any reason, [] == () returns false, why? A list that is empty is not equal to a tuple that is empty, much like a car that is empty is not equal to a boat that is empty. -- ~Ethan~
Back to top | Article view | comp.lang.python
csiph-web