pyfmodex
pyfmodex copied to clipboard
structures and structure_declarations
Technical question: why are some structures defined completely in structures.py
and others partially in structure_declarations.py
?
Just asking as it makes importing them more of a hassle, since one needs to remember where the required structure comes from.
You should not need to import anything from structure_declarations directly. I separated it just because i for reason wanted the partial declarations in a separate file, there's nothing more to that.
In some samples, I needed CREATESOUNDEXINFO
. I believed the only way to create such a structure was to import it from structure_declarations, but it seems I was wrong, indeed. The line from structure_declarations import *
makes that unnecessary when writing code, but the Sphinx autodoc module is still confused and seperates the documentation of the different structures over the two.
Follow up question: why not separate all structures over those two files, for consistency's sake?
I'll likely revisit the split before the next release, as i looked, i do not remember the exact reasons for putting some structs there.