Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitb541b98

Browse files
authored
Avoid %T format in error message (#146)
The %T format was added to Python 3.13 (PEP 737).
1 parentffae0ff commitb541b98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎pythoncapi_compat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,8 @@ PyUnicodeWriter_WriteSubstring(PyUnicodeWriter *writer, PyObject *str,
14911491
Py_ssize_t start, Py_ssize_t end)
14921492
{
14931493
if (!PyUnicode_Check(str)) {
1494-
PyErr_Format(PyExc_TypeError,"expect str, not %T", str);
1494+
PyErr_Format(PyExc_TypeError,"expect str, not %s",
1495+
Py_TYPE(str)->tp_name);
14951496
return -1;
14961497
}
14971498
if (start <0 || start > end) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp