Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52143
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ethan@stoneleaf.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'reason,': 0.07; 'false,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'empty,': 0.16; 'empty.': 0.16; 'tuple': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'skip:l 30': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'said,': 0.30; 'invoke': 0.31; 'quite': 0.32; 'equal': 0.35; 'but': 0.35; 'list': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:173': 0.61; 'first': 0.61; 'skip:n 10': 0.64; 'skip:r 30': 0.69; 'car': 0.72; 'received:64.5': 0.84; 'sorry.': 0.91; 'why?': 0.91 |
| Date | Wed, 07 Aug 2013 10:50:12 -0700 |
| From | Ethan Furman <ethan@stoneleaf.us> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Bug? ( () == [] ) != ( ().__eq__([]) ) |
| References | <51FED74E.6080003@markusrother.de> <CAPTjJmp=FzJO5pA2WgcojcK4UneAwx8qWDqrC4GeqjO9dxHgfg@mail.gmail.com> <CAJQX3Dx0Kg7QNW47SEEPZ8eLWZsCsfAciM0vdMucZ_nQ7yb-SA@mail.gmail.com> |
| In-Reply-To | <CAJQX3Dx0Kg7QNW47SEEPZ8eLWZsCsfAciM0vdMucZ_nQ7yb-SA@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - gator410.hostgator.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - stoneleaf.us |
| X-BWhitelist | no |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| X-Source-Sender | ([173.12.184.233]) [173.12.184.233]:48985 |
| X-Source-Auth | ethan+stoneleaf.us |
| X-Email-Count | 2 |
| X-Source-Cap | dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.323.1375897815.1251.python-list@python.org> (permalink) |
| Lines | 10 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1375897815 news.xs4all.nl 16010 [2001:888:2000:d::a6]:39601 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:52143 |
Show key headers only | View raw
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Bug? ( () == [] ) != ( ().__eq__([]) ) Ethan Furman <ethan@stoneleaf.us> - 2013-08-07 10:50 -0700
csiph-web