This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: typo in Object/abstract.c : ternary_op
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: douady, rhettinger
Priority: normal Keywords:

Created on 2002-11-24 22:35 by douady, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg13454 - (view) Author: Cesar Douady (douady) Date: 2002-11-24 22:35
in file Object/abstract.c, in function ternary_op, in
the second test which computes slotw :
    	if (w->ob_type != v->ob_type &&
    	    mv != NULL && NEW_STYLE_NUMBER(w)) {
the test for mv is obviously a typo and should be
replaced by mw :
    	if (w->ob_type != v->ob_type &&
    	    mw != NULL && NEW_STYLE_NUMBER(w)) {
This gives an inconsistent behavior of the ** operator
which refuses to use the __rpow__ method when the first
operand does not have a number methods.

msg13455 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-12-07 10:16
Logged In: YES 

Added testcase and fixed code:
  abstract.c 2.110 and 1.16 and

Marking as fixed and closing bug.
Date User Action Args
2022-04-10 16:05:56adminsetgithub: 37529
2002-11-24 22:35:23douadycreate