Movatterモバイル変換


[0]ホーム

URL:


homepage

Message148760

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authorezio.melotti
Recipientscvrebert, docs@python, ezio.melotti, mark.dickinson, rhettinger, terry.reedy
Date2011-12-02.16:49:27
SpamBayes Score2.6115404e-07
Marked as misclassifiedNo
Message-id<1322844568.33.0.783845954563.issue12067@psf.upfronthosting.co.za>
In-reply-to
Content
Would it be ok to state that:1) <, >, ==, >=, <=, and != compare the values of two objects;2) the two objects don't necessarily have to be of the same type;3) with == and !=, objects of different types compare unequal, unless they define a specific __eq__ and/or __ne__;4) with <, >, <=, and >=, the comparison of objects of different types raises a TypeError, unless they define specific __lt__, __gt__, __le__, and __ge__;5) some built-in types define these operations, so it's possible to compare e.g. int and floats;This should summarize the possible behaviors.  There's no reason IMHO to expose implementation details and to special case built-in types (unless their comparison is actually different and doesn't depend on __eq__, __ne__, etc.).
History
DateUserActionArgs
2011-12-02 16:49:28ezio.melottisetrecipients: +ezio.melotti,rhettinger,terry.reedy,mark.dickinson,cvrebert,docs@python
2011-12-02 16:49:28ezio.melottisetmessageid: <1322844568.33.0.783845954563.issue12067@psf.upfronthosting.co.za>
2011-12-02 16:49:27ezio.melottilinkissue12067 messages
2011-12-02 16:49:27ezio.melotticreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp