markflorisson88/cython — comment on commit cf9598f3707e46497b033a59437c2588bf52fe1c
File:  line 0
By dagss:

Hmm. IIRC, I went to great lengths to support looking at a buffer with a nested-struct dtype using a flattened struct -- or, basically, ignore the struct-tree-layout and just make sure that offsetof and dtype matches.

That's the reason for the non-intuitive structure of the format string parser: It basically needs two stacks, one for walking the RTTI and one for walking the format string, and uses an array on the call frame of the caller for the former, and the call stack for the latter.

If one drops support for using flattened structs, then the code would become simpler, as one would only need the call stack, and parsing the format string would correspond 1:1.

It seemed better to be as lenient as possible (without data corruption) at the time. But it certainly isn't a very important feature, and it is certainly more important to have full support for all possible format strings.