Skip to content

Commit 85dfe58

Browse files
committed
List/TupleBuiltins: fix __eq__ and __neq__ fallbacks
1 parent a85307d commit 85dfe58

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/list/ListBuiltins.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,8 @@ boolean doPListObjectStorage(VirtualFrame frame, PList left, PList right,
10611061

10621062
@Fallback
10631063
@SuppressWarnings("unused")
1064-
boolean doOther(Object left, Object right) {
1065-
return false;
1064+
Object doOther(Object left, Object right) {
1065+
return PNotImplemented.NOT_IMPLEMENTED;
10661066
}
10671067
}
10681068

@@ -1078,8 +1078,8 @@ boolean doPList(VirtualFrame frame, PList left, PList right,
10781078

10791079
@Fallback
10801080
@SuppressWarnings("unused")
1081-
boolean doOther(Object left, Object right) {
1082-
return true;
1081+
PNotImplemented doOther(Object left, Object right) {
1082+
return PNotImplemented.NOT_IMPLEMENTED;
10831083
}
10841084
}
10851085

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/tuple/TupleBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ boolean doPTuple(VirtualFrame frame, PTuple left, PTuple right,
417417

418418
@Fallback
419419
@SuppressWarnings("unused")
420-
boolean doOther(Object left, Object right) {
421-
return true;
420+
PNotImplemented doOther(Object left, Object right) {
421+
return PNotImplemented.NOT_IMPLEMENTED;
422422
}
423423
}
424424

0 commit comments

Comments
 (0)