Skip to content

Commit 7d0295c

Browse files
committed
Fix error handling for divmod builtin
1 parent b6a2bf1 commit 7d0295c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,14 @@ public PTuple doDouble(double a, double b) {
525525

526526
@Specialization
527527
public Object doObject(VirtualFrame frame, Object a, Object b,
528-
@Cached("create(__DIVMOD__, __RDIVMOD__)") LookupAndCallBinaryNode callDivmod) {
528+
@Cached("createDivmod()") LookupAndCallBinaryNode callDivmod) {
529529
return callDivmod.executeObject(frame, a, b);
530530
}
531531

532+
protected static LookupAndCallBinaryNode createDivmod() {
533+
return BinaryArithmetic.DivMod.create();
534+
}
535+
532536
}
533537

534538
// eval(expression, globals=None, locals=None)

0 commit comments

Comments
 (0)