Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 8 Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,7 @@ map_next(PyObject *self)
// ValueError: map() argument 3 is shorter than arguments 1-2
const char* plural = i == 1 ? " " : "s 1-";
PyErr_Format(PyExc_ValueError,
"map() argument %d is shorter than argument%s%d",
"map() argument %zd is shorter than argument%s%zd",
i + 1, plural, i);
goto exit_no_result;
}
Expand All @@ -1541,7 +1541,7 @@ map_next(PyObject *self)
Py_DECREF(val);
const char* plural = i == 1 ? " " : "s 1-";
PyErr_Format(PyExc_ValueError,
"map() argument %d is longer than argument%s%d",
"map() argument %zd is longer than argument%s%zd",
i + 1, plural, i);
goto exit_no_result;
}
Expand Down Expand Up @@ -3230,7 +3230,7 @@ zip_next(PyObject *self)
// ValueError: zip() argument 3 is shorter than arguments 1-2
const char* plural = i == 1 ? " " : "s 1-";
return PyErr_Format(PyExc_ValueError,
"zip() argument %d is shorter than argument%s%d",
"zip() argument %zd is shorter than argument%s%zd",
i + 1, plural, i);
}
for (i = 1; i < tuplesize; i++) {
Expand All @@ -3240,7 +3240,7 @@ zip_next(PyObject *self)
Py_DECREF(item);
const char* plural = i == 1 ? " " : "s 1-";
return PyErr_Format(PyExc_ValueError,
"zip() argument %d is longer than argument%s%d",
"zip() argument %zd is longer than argument%s%zd",
i + 1, plural, i);
}
if (PyErr_Occurred()) {
Expand Down
4 changes: 2 additions & 2 deletions 4 Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
if (allowed < nargs) {
const char *plural = (allowed == 1) ? "" : "s";
_PyErr_Format(tstate, PyExc_TypeError,
"%s() accepts %d positional sub-pattern%s (%d given)",
"%s() accepts %zd positional sub-pattern%s (%zd given)",
((PyTypeObject*)type)->tp_name,
allowed, plural, nargs);
goto fail;
Expand Down Expand Up @@ -1436,7 +1436,7 @@ format_missing(PyThreadState *tstate, const char *kind,
if (name_str == NULL)
return;
_PyErr_Format(tstate, PyExc_TypeError,
"%U() missing %i required %s argument%s: %U",
"%U() missing %zd required %s argument%s: %U",
qualname,
len,
kind,
Expand Down
2 changes: 1 addition & 1 deletion 2 Python/crossinterp_data_lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ _PyBytes_GetXIDataWrapped(PyThreadState *tstate,
return NULL;
}
if (size < sizeof(_PyBytes_data_t)) {
PyErr_Format(PyExc_ValueError, "expected size >= %d, got %d",
PyErr_Format(PyExc_ValueError, "expected size >= %zu, got %zu",
sizeof(_PyBytes_data_t), size);
return NULL;
}
Expand Down
6 changes: 3 additions & 3 deletions 6 Python/getargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
if (i < parser->min) {
/* Less arguments than required */
if (i < pos) {
Py_ssize_t min = Py_MIN(pos, parser->min);
int min = Py_MIN(pos, parser->min);
PyErr_Format(PyExc_TypeError,
"%.200s%s takes %s %d positional argument%s"
" (%zd given)",
Expand All @@ -2292,7 +2292,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
else {
keyword = PyTuple_GET_ITEM(kwtuple, i - pos);
PyErr_Format(PyExc_TypeError, "%.200s%s missing required "
"argument '%U' (pos %d)",
"argument '%U' (pos %zd)",
(parser->fname == NULL) ? "function" : parser->fname,
(parser->fname == NULL) ? "" : "()",
keyword, i+1);
Expand Down Expand Up @@ -2333,7 +2333,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
/* arg present in tuple and in dict */
PyErr_Format(PyExc_TypeError,
"argument for %.200s%s given by name ('%U') "
"and position (%d)",
"and position (%zd)",
(parser->fname == NULL) ? "function" : parser->fname,
(parser->fname == NULL) ? "" : "()",
keyword, i+1);
Expand Down
2 changes: 1 addition & 1 deletion 2 Python/interpconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ interp_config_from_dict(PyObject *origdict, PyInterpreterConfig *config,
}
else if (unused > 0) {
PyErr_Format(PyExc_ValueError,
"config dict has %d extra items (%R)", unused, dict);
"config dict has %zd extra items (%R)", unused, dict);
goto error;
}

Expand Down
4 changes: 2 additions & 2 deletions 4 Python/pythonrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1379,11 +1379,11 @@ get_interactive_filename(PyObject *filename, Py_ssize_t count)
if (middle == NULL) {
return NULL;
}
result = PyUnicode_FromFormat("<%U-%d>", middle, count);
result = PyUnicode_FromFormat("<%U-%zd>", middle, count);
Py_DECREF(middle);
} else {
result = PyUnicode_FromFormat(
"%U-%d", filename, count);
"%U-%zd", filename, count);
}
return result;

Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.