Skip to content

Commit 858b973

Browse files
committed
Implement "i" in ParseTupleAndKeywords
1 parent c1a8582 commit 858b973

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

py/args.go

+5
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ func ParseTupleAndKeywords(args Tuple, kwargs StringDict, format string, kwlist
446446
panic(ExceptionNewf(TypeError, "%s() argument %d must be str, not %s", name, i+1, arg.Type().Name))
447447
}
448448
*result = arg
449+
case "i":
450+
if _, ok := arg.(Int); !ok {
451+
panic(ExceptionNewf(TypeError, "%s() argument %d must be int, not %s", name, i+1, arg.Type().Name))
452+
}
453+
*result = arg
449454
default:
450455
panic(ExceptionNewf(TypeError, "Unknown/Unimplemented format character %q in ParseTupleAndKeywords called from %s", op, name))
451456
}

0 commit comments

Comments
 (0)