aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTomas R <tomas.roun8@gmail.com>2023-08-04 16:34:04 +0200
committerGitHub <noreply@github.com>2023-08-04 16:34:04 +0200
commit09a8cc79846ce0870e51fa8e7c449e153832fe4b (patch)
treec1ce36c4f8745f1dd2ea1667493fd45808f826c7
parent19f32b24b2e1680ff9929bb64d681397b259c6fb (diff)
downloadcpython-09a8cc79846ce0870e51fa8e7c449e153832fe4b.tar.gz
cpython-09a8cc79846ce0870e51fa8e7c449e153832fe4b.zip
gh-107600: Docs: Update ctypes.ArgumentError error message (#107601)
-rw-r--r--Doc/library/ctypes.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index c253a45e1a8..ea7873a8851 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -361,7 +361,7 @@ from within *IDLE* or *PythonWin*::
>>> printf(b"%f bottles of beer\n", 42.5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- ArgumentError: argument 2: TypeError: Don't know how to convert parameter 2
+ ctypes.ArgumentError: argument 2: TypeError: Don't know how to convert parameter 2
>>>
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::
>>> printf(b"%d %d %d", 1, 2, 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
- ArgumentError: argument 2: TypeError: wrong type
+ ctypes.ArgumentError: argument 2: TypeError: 'int' object cannot be interpreted as ctypes.c_char_p
>>> printf(b"%s %d %f\n", b"X", 2, 3)
X 2 3.000000
13