Issue 12842: Docs: first parameter of tp_richcompare() always has the correct type (original) (raw)

Issue12842

Created on 2011-08-25 20:31 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tp_richcompare.diff skrah,2011-08-25 20:31 review
Messages (3)
msg142991 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-08-25 20:31
I've noticed that assumptions about the operand types in tp_richcompare() are not always consistent. As far as I can see, the first parameter in tp_richcompare() is guaranteed to be of the correct type. But in some places the first parameter's type is still checked: Objects/cellobject.c: if (!PyCell_Check(a) | !PyCell_Check(b)) { The attached patch makes it clear that the first parameter has the correct type.
msg221489 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-24 20:09
The patch has never been applied. I'm not qualified to state whether or not it is correct.
msg222173 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2014-07-03 13:09
Fixed in 71a0743f36db and 06bdd7e8fffd
History
Date User Action Args
2022-04-11 14:57:21 admin set github: 57051
2014-07-03 13:09:29 asvetlov set status: open -> closedversions: + Python 3.4, Python 3.5, - Python 2.7, Python 3.2, Python 3.3nosy: + asvetlovmessages: + resolution: fixedstage: patch review -> resolved
2014-06-24 20:09:45 BreamoreBoy set nosy: + BreamoreBoymessages: +
2011-08-26 15:16:10 eric.araujo set keywords: + needs reviewstage: patch reviewversions: - Python 3.1
2011-08-25 20:31:24 skrah create