[issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs

Eric Wieser report at bugs.python.org
Mon Jul 23 10:19:25 EDT 2018


Eric Wieser <wieser.eric+pybug at gmail.com> added the comment:

> It should be fairly simple to modify the code to use a format of "B<size>" for unions, so that it at least matches the itemsize

Seems reasonable, although:

* I think it should be "<size>B" or "(<size>)B"
* I'd rather leave that for a later patch. While it would be correct, it's still not correct enough to be that useful, since ultimately the union layout is still lost. I'd prefer to focus on fixing the part of the PEPE3118 implementation that is most useful, rather than committing to fixing the whole thing all at once.

----------

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


More information about the Python-bugs-list mailing list