On this page
  1. ctypes.c_bool
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

ctypes.c_bool

Prev: ctypes.byref | Up: ctypes | Next: ctypes.c_buffer
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.c_bool
Tags: #public #python3 #stdlib #ctypes


Import

import ctypes
from ctypes import c_bool

Signature & Overview

ctypes.c_bool(...)

ctypes.c_bool class.

Usage

import ctypes

b = ctypes.c_bool(True)
assert b.value is True and ctypes.sizeof(b) == 1

Gotchas

REPL Inspect

from ctypes import c_bool
help(c_bool)

Linked from

Related notes