Skip to content

Commit 09a8cc7

Browse files
authored
gh-107600: Docs: Update ctypes.ArgumentError error message (#107601)
1 parent 19f32b2 commit 09a8cc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/ctypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ from within *IDLE* or *PythonWin*::
361361
>>> printf(b"%f bottles of beer\n", 42.5)
362362
Traceback (most recent call last):
363363
File "<stdin>", line 1, in <module>
364-
ArgumentError: argument 2: TypeError: Don't know how to convert parameter 2
364+
ctypes.ArgumentError: argument 2: TypeError: Don't know how to convert parameter 2
365365
>>>
366366

367367
As has been mentioned before, all Python types except integers, strings, and
@@ -444,7 +444,7 @@ prototype for a C function), and tries to convert the arguments to valid types::
444444
>>> printf(b"%d %d %d", 1, 2, 3)
445445
Traceback (most recent call last):
446446
File "<stdin>", line 1, in <module>
447-
ArgumentError: argument 2: TypeError: wrong type
447+
ctypes.ArgumentError: argument 2: TypeError: 'int' object cannot be interpreted as ctypes.c_char_p
448448
>>> printf(b"%s %d %f\n", b"X", 2, 3)
449449
X 2 3.000000
450450
13

0 commit comments

Comments
 (0)