@@ -185,7 +185,7 @@ public Object fromString(PythonClass cls, String source, PNone encoding, PNone e
185
185
throw raise (PythonErrorType .TypeError , "string argument without an encoding" );
186
186
}
187
187
188
- @ Specialization (guards = {"!isInt(iterable)" , "isNoValue(encoding)" , "isNoValue(errors)" })
188
+ @ Specialization (guards = {"!isInt(iterable)" , "!isNoValue(iterable)" , " isNoValue(encoding)" , "isNoValue(errors)" })
189
189
public Object bytearray (PythonClass cls , Object iterable , @ SuppressWarnings ("unused" ) PNone encoding , @ SuppressWarnings ("unused" ) PNone errors ,
190
190
@ Cached ("create()" ) GetIteratorNode getIteratorNode ,
191
191
@ Cached ("create()" ) GetNextNode getNextNode ,
@@ -1072,7 +1072,7 @@ Object fail(PythonClass cls, Object arg, Object keywordArg) {
1072
1072
throw raise (TypeError , "int() can't convert non-string with explicit base" );
1073
1073
}
1074
1074
1075
- @ Specialization (guards = "isNoValue(keywordArg)" )
1075
+ @ Specialization (guards = { "isNoValue(keywordArg)" , "!isNoValue(obj)" } )
1076
1076
public Object createInt (PythonClass cls , Object obj , PNone keywordArg ,
1077
1077
@ Cached ("create(__INT__)" ) LookupAndCallUnaryNode callIntNode ,
1078
1078
@ Cached ("create(__TRUNC__)" ) LookupAndCallUnaryNode callTruncNode ,
@@ -1379,7 +1379,7 @@ public Object str(Object strClass, double arg, PNone encoding, PNone errors) {
1379
1379
return asPString (strClass , PFloat .doubleToString (arg ));
1380
1380
}
1381
1381
1382
- @ Specialization
1382
+ @ Specialization ( guards = { "!isNoValue(obj)" , "!isNone(obj)" })
1383
1383
public Object str (Object strClass , Object obj , @ SuppressWarnings ("unused" ) PNone encoding , @ SuppressWarnings ("unused" ) PNone errors ,
1384
1384
@ Cached ("create(__STR__)" ) LookupAndCallUnaryNode callNode ) {
1385
1385
Object result = callNode .executeObject (obj );
0 commit comments