On this page
ctypes.ArgumentError
Prev: ctypes.alignment | Up: ctypes | Next: ctypes.Array
Rel: ctypes.addressof, ctypes.alignment, ctypes.Array, ctypes.BigEndianStructure
Ref: docs.python.org โ ctypes.ArgumentError
Tags: #public #python3 #stdlib #ctypes
Import
import ctypes
from ctypes import ArgumentError
Signature & Overview
ctypes.ArgumentError(...)
ctypes.ArgumentError class.
Methods & Attributes
ArgumentError.add_note(self, note, /)โ Add a note to the exceptionArgumentError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import ctypes
assert issubclass(ctypes.ArgumentError, Exception)
Gotchas
- Raised when a Python argument doesn't match a C function's
argtypes: Always setfn.argtypesandfn.restypeso mismatches raiseArgumentErrorinstead of segfaulting.
REPL Inspect
from ctypes import ArgumentError
help(ArgumentError)
Linked from
- tuts/python3/stdlib_module/ctypes
- tuts/python3/stdlib_module/ctypes/addressof
- tuts/python3/stdlib_module/ctypes/alignment
- tuts/python3/stdlib_module/ctypes/Array
- tuts/python3/stdlib_module/ctypes/BigEndianStructure
- tuts/python3/stdlib_module/ctypes/BigEndianUnion
- tuts/python3/stdlib_module/ctypes/byref
- tuts/python3/stdlib_module/ctypes/c_bool
- tuts/python3/stdlib_module/ctypes/c_buffer
- tuts/python3/stdlib_module/ctypes/c_byte
- tuts/python3/stdlib_module/ctypes/c_char
- tuts/python3/stdlib_module/ctypes/c_char_p
- tuts/python3/stdlib_module/ctypes/c_double
- tuts/python3/stdlib_module/ctypes/c_double_complex
- tuts/python3/stdlib_module/ctypes/c_float
- tuts/python3/stdlib_module/ctypes/c_float_complex
- tuts/python3/stdlib_module/ctypes/c_int
- tuts/python3/stdlib_module/ctypes/c_int16
- tuts/python3/stdlib_module/ctypes/c_int32
- tuts/python3/stdlib_module/ctypes/c_int64
- tuts/python3/stdlib_module/ctypes/c_int8
- tuts/python3/stdlib_module/ctypes/c_long
- tuts/python3/stdlib_module/ctypes/c_longdouble
- tuts/python3/stdlib_module/ctypes/c_longdouble_complex
- tuts/python3/stdlib_module/ctypes/cast
- tuts/python3/stdlib_module/ctypes/create_string_buffer
- tuts/python3/stdlib_module/ctypes/create_unicode_buffer
- tuts/python3/stdlib_module/ctypes/get_errno
- tuts/python3/stdlib_module/ctypes/memmove
- tuts/python3/stdlib_module/ctypes/memoryview_at
- tuts/python3/stdlib_module/ctypes/memset
- tuts/python3/stdlib_module/ctypes/pointer
- tuts/python3/stdlib_module/ctypes/resize
- tuts/python3/stdlib_module/ctypes/set_errno
- tuts/python3/stdlib_module/ctypes/SetPointerType
- tuts/python3/stdlib_module/ctypes/sizeof
- tuts/python3/stdlib_module/ctypes/string_at
- tuts/python3/stdlib_module/ctypes/wstring_at
Related notes
- tuts/python3/stdlib_module/ctypes/addressof Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/alignment Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/Array Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianStructure Linked here; links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ctypes/BigEndianUnion links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/byref links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_bool links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_buffer links to this page; shared tags: #ctypes, #stdlib
- tuts/python3/stdlib_module/ctypes/c_byte links to this page; shared tags: #ctypes, #stdlib