File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -387,10 +387,11 @@ protected Iterable<Scope> findTopScopes(PythonContext context) {
387
387
@ Override
388
388
protected String toString (PythonContext context , Object value ) {
389
389
final PythonModule builtins = context .getBuiltins ();
390
- PBuiltinFunction intClass = ((PBuiltinMethod ) builtins .getAttribute (BuiltinNames .REPR )).getFunction ();
391
- Object [] userArgs = PArguments .create (1 );
392
- PArguments .setArgument (userArgs , 0 , value );
393
- Object res = InvokeNode .create (intClass ).invoke (userArgs );
390
+ PBuiltinFunction reprMethod = ((PBuiltinMethod ) builtins .getAttribute (BuiltinNames .REPR )).getFunction ();
391
+ Object [] userArgs = PArguments .create (2 );
392
+ PArguments .setArgument (userArgs , 0 , PNone .NONE );
393
+ PArguments .setArgument (userArgs , 1 , value );
394
+ Object res = InvokeNode .create (reprMethod ).invoke (userArgs );
394
395
return res .toString ();
395
396
}
396
397
You can’t perform that action at this time.
0 commit comments