[New-bugs-announce] [issue33178] Add support for BigEndianUnion and LittleEndianUnion in ctypes

emezh report at bugs.python.org
Thu Mar 29 09:48:23 EDT 2018


New submission from emezh <eugene.mezh at gmail.com>:

Python documentation says that "To build structures with non-native byte order, you can use one of the BigEndianStructure, LittleEndianStructure, BigEndianUnion, and LittleEndianUnion base classes"

However, BigEndianUnion ad LittleEndianUnion are not implemented

>>> from ctypes import *
>>> BigEndianStructure
<class 'ctypes._endian.BigEndianStructure'>
>>> BigEndianUnion
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'BigEndianUnion' is not defined

Is that something that can be added?

See also https://bugs.python.org/issue19023

----------
components: ctypes
messages: 314647
nosy: Eugene Mezhibovsky
priority: normal
severity: normal
status: open
title: Add support for BigEndianUnion and LittleEndianUnion in ctypes
type: enhancement
versions: Python 2.7, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33178>
_______________________________________


More information about the New-bugs-announce mailing list