[Python-Dev] operator precedence of eq, ne, etc, if both object have implementations (original) (raw)
Georg Brandl g.brandl at gmx.net
Wed Sep 23 13:48:21 CEST 2009
- Previous message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Next message: [Python-Dev] how to properly object to something (was: Distutils ML wrap-up: setup.cfg new format)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chris Withers schrieb:
Jared Flatow wrote:
This might help:
http://mail.python.org/pipermail/python-dev/2008-June/080111.html Here is the most relevant part (quoting Guido): > Does it help if I tell you that for "x y" we always try > x.binop(y) before trying y.reversebinop(x), except in the > case where y is an instance of a subclass of the class of x? Okay, but does that count as a pronouncement that should go across all versions and platforms?
Yes. Unfortunately it's just documented for the other binops, but not for the comparisons; the note in the docs should be copied to the respective section.
Georg
- Previous message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Next message: [Python-Dev] how to properly object to something (was: Distutils ML wrap-up: setup.cfg new format)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]