cpython
cpython copied to clipboard
gh-99266: fix wrong exception message in ctypes docs
This PR fixes the exception message in ctypes docs.
Closes #99266.
>>> strchr = libc.strchr
>>> strchr.restype = c_char_p
>>> strchr.argtypes = [c_char_p, c_char]
>>>
>>> strchr(b"abcdef", b"def")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ctypes.ArgumentError: argument 2: TypeError: wrong type
- Issue: gh-99266