[issue4376] Nested ctypes 'BigEndianStructure' fails

Vlad Riscutia report at bugs.python.org
Tue Jul 12 04:50:20 CEST 2011


Vlad Riscutia <riscutiavlad at gmail.com> added the comment:

Also added diff for fix:

- Implemented proposed issubclass(typ, Structure) solution
- Refactored _other_endian function because we used to getattr, catch exception, then check if type is array/structure. I believe exception throwing should not be on normal code path so I replaced try-except with a check for hasattr
- Removed a unittest which becomes deprecated with this fix (unittest asserts getting _other_endian for nested struct raises exception which is no longer the case)

----------
Added file: http://bugs.python.org/file22627/issue4376_fix.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4376>
_______________________________________


More information about the Python-bugs-list mailing list