Skip to content

Commit 821af67

Browse files
committed
Fix up error messages in list/dict/range vectorcall implements to match previous error messages.
1 parent 20eea92 commit 821af67

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3293,7 +3293,7 @@ dict_vectorcall(
32933293
{
32943294
size_t nargs = PyVectorcall_NARGS(nargsf);
32953295
if (nargs > 1) {
3296-
PyErr_Format(PyExc_TypeError, "dict() expected at most one argument, got %zd", nargs);
3296+
PyErr_Format(PyExc_TypeError, "dict() expected at most 1 argument, got %zu", nargs);
32973297
return NULL;
32983298
}
32993299
assert(PyType_Check(type));

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,7 @@ list_vectorcall(
27372737
}
27382738
size_t nargs = PyVectorcall_NARGS(nargsf);
27392739
if (nargs > 1) {
2740-
PyErr_Format(PyExc_TypeError, "list() expected at most one argument, got %zd", nargs);
2740+
PyErr_Format(PyExc_TypeError, "list() expected at most 1 argument, got %zu", nargs);
27412741
return NULL;
27422742
}
27432743

Objects/rangeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ range_vectorcall(
136136
}
137137
switch(nargs) {
138138
case 0:
139-
PyErr_Format(PyExc_TypeError, "range()range expected 1 arguments, got 0");
139+
PyErr_Format(PyExc_TypeError, "range() expected 1 arguments, got 0");
140140
return NULL;
141141
case 1:
142142
stop = PyNumber_Index(args[0]);
@@ -168,7 +168,7 @@ range_vectorcall(
168168
}
169169
break;
170170
default:
171-
PyErr_Format(PyExc_TypeError, "range() expected at most 3 arguments, got %zd", nargs);
171+
PyErr_Format(PyExc_TypeError, "range() expected at most 3 arguments, got %zu", nargs);
172172
return NULL;
173173
}
174174
obj = make_range_object(type, start, stop, step);

0 commit comments

Comments
 (0)