[Python-Dev] operator precedence of eq, ne, etc, if both object have implementations (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Wed Sep 23 06:27:21 CEST 2009
- Previous message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Next message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Willem Broekema wrote:
The AND above (which I uppercased) is subtle but important. In the "x op y" case with y being of a subclass of the class of x, if there is no class in between x and y (excluding x, including y) that overrides the rop method, then y,rop(x) is not tried before x.op(y).
How does this work at the C typeslot level, where there are no rop methods?
-- Greg
- Previous message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Next message: [Python-Dev] operator precedence of __eq__, __ne__, etc, if both object have implementations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]