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

ctypes.c_float

Prev: ctypes.c_double_complex | Up: ctypes | Next: ctypes.c_float_complex
Rel: ctypes.addressof, ctypes.alignment, ctypes.ArgumentError, ctypes.Array
Ref: docs.python.org — ctypes.c_float
Tags: #public #python3 #stdlib #ctypes


Import

import ctypes
from ctypes import c_float

Signature & Overview

ctypes.c_float(...)

ctypes.c_float class.

Usage

import ctypes

f = ctypes.c_float(1.5)
assert f.value == 1.5 and ctypes.sizeof(f) == 4

Gotchas

REPL Inspect

from ctypes import c_float
help(c_float)

Linked from

Related notes