Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57845

Re: Python3 doc, operator reflection

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <random832@fastmail.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'argument': 0.05; 'referring': 0.07; 'received:internal': 0.09; 'subject:Python3': 0.09; '__lt__': 0.16; 'does);': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'no...': 0.16; 'rather,': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subject:doc': 0.16; 'wrote:': 0.18; "shouldn't": 0.24; 'mon,': 0.24; 'versions': 0.24; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'doc': 0.31; 'url:python': 0.33; 'received:66': 0.35; 'but': 0.35; 'there': 0.35; 'url:org': 0.36; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'from:no real name:2**0': 0.61; 'url:3': 0.61; "you're": 0.61; 'header:Message- Id:1': 0.63; 'group,': 0.63; 'between': 0.67; 'reflection': 0.84; 'url:datamodel': 0.84; 'url:reference': 0.84; '2013,': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= message-id:from:to:mime-version:content-transfer-encoding :content-type:in-reply-to:references:subject:date; s=mesmtp; bh= gMogmBxLqlCnSgEAYc2bDCBzlAw=; b=l80pFJhNdO7+0OinYLPM61nnS780sFXa unsvbrt8a6rMmYRJ18oz74uoAO7Ex90XDujeFCGQ1GC57XYmDslrRb1CDECXExTh cwHR8k8GgmT11yMrshfLoj0dv3r3KvWIPIiuzT5tzW5FGQYdbOAK/tXjvJ/kcKWE Zt+M0jO0JP0=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=gMogmBxLqlCnSgEAYc2bDCBzlAw=; b=S+H FSz1U6u9gRABF0wScbV0wg4Zi2Szgl7hkTZkOGlb0i+k8OJYKZbMWVqDBEIk1GPs n57lOG7G3RZQzup7uIDYNJOQ2+x3zOMJBJzR4fnrz5uUpXl191/+Xq+ySxHQ4+Vc FHAgK5Gp8k9i2gSrUJFJ0bf8r2+/US1vhyAku0xM=
X-Sasl-Enc 0O8lYLapYmYJ0xrgiuA5RwY/9JasSY0/nDJ6krCA+I3F 1382985075
From random832@fastmail.us
To Johannes Bauer <dfnsonfsduifb@gmx.de>, python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding quoted-printable
Content-Type text/plain; charset="UTF-8"
X-Mailer MessagingEngine.com Webmail Interface - ajax-96010b3f
In-Reply-To <bd71ueFqcsiU1@mid.dfncis.de>
References <bd71ueFqcsiU1@mid.dfncis.de>
Subject Re: Python3 doc, operator reflection
Date Mon, 28 Oct 2013 14:31:15 -0400
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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1711.1382985091.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1382985091 news.xs4all.nl 15915 [2001:888:2000:d::a6]:39942
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:57845

Show key headers only | View raw



On Mon, Oct 28, 2013, at 8:00, Johannes Bauer wrote:
> Hi group,
> 
> in http://docs.python.org/3/reference/datamodel.html#customization the
> doc reads:
> 
> > There are no swapped-argument versions of these methods (to be used when the left argument does not support the operation but the right argument does); rather, __lt__() and __gt__() are each other’s reflection, __le__() and __ge__() are each other’s reflection, and __eq__() and __ne__() are their own reflection.
> 
> But shouldn't __lt__ be the reflection or __ge__ and __gt__ the
> reflection of __le__?

No... a < b is b > a - you're thinking of the relationship between a < b
and not(a >= b), which is not the argument-swapping it is referring to.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python3 doc, operator reflection Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-10-28 13:00 +0100
  Re: Python3 doc, operator reflection Chris Angelico <rosuav@gmail.com> - 2013-10-28 23:23 +1100
    Re: Python3 doc, operator reflection Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-10-28 13:45 +0100
  Re: Python3 doc, operator reflection random832@fastmail.us - 2013-10-28 14:31 -0400

csiph-web