[Python-bugs-list] [ python-Bugs-643260 ] typo in Object/abstract.c : ternary_op

noreply@sourceforge.net noreply@sourceforge.net
Fri, 29 Nov 2002 14:56:45 -0800


Bugs item #643260, was opened at 2002-11-24 17:35
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=643260&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Cesar Douady (douady)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: typo in Object/abstract.c : ternary_op

Initial Comment:
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.



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=643260&group_id=5470