cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-99266: fix wrong exception message in ctypes docs

Open kamilturek opened this issue 3 years ago • 0 comments

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

kamilturek avatar Nov 08 '22 23:11 kamilturek