Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit caeaafc

Browse files
committed
don't complain about too many args if arg is a dict
1 parent ea64dea commit caeaafc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/stringobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ formatstring(format, args)
921921
XDECREF(temp);
922922
} /* '%' */
923923
} /* until end */
924-
if (argidx < arglen) {
924+
if (argidx < arglen && !dict) {
925925
err_setstr(TypeError, "not all arguments converted");
926926
goto error;
927927
}

0 commit comments

Comments
 (0)