Files
typeshed/stdlib/struct.pyi
Stephen Morton 27286c6821 Struct class lives in _struct (#12980)
This one is an improvement on 3.9+. On 3.8, the Struct class
calls itself `builtins.Struct` instead, which we can't and won't
match. `struct.error` is defined in `_struct.c`, but always called
itself `struct.error`.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-07 20:10:50 -08:00

6 lines
155 B
Python

from _struct import *
__all__ = ["calcsize", "pack", "pack_into", "unpack", "unpack_from", "iter_unpack", "Struct", "error"]
class error(Exception): ...