[issue3132] implement PEP 3118 struct changes

Meador Inge report at bugs.python.org
Thu May 20 19:17:42 CEST 2010


Meador Inge <meadori at gmail.com> added the comment:

> As a separate issue, I notice that the new 'T{}' code doesn't respect 
> multiplicities, e.g., as in 'H3T{HHL}'.  Is that 
> intentional/desirable?

That could have been an oversight on my part.  I don't see any immediate reason why we wouldn't allow it.

> But now I've got a new open issue:  how much padding should be 
> inserted/expected (for pack/unpack respectively) between the 'B' and 
> the 'T{...}' in a struct format string of the form 'BT{...}'?

Doesn't that depend on what is in the '...'?  For example, I would expect the same padding for 'BT{I}' and 'BI'.  In general, I would expect the padding to be the same for 'x+T{y+}' and 'x+y+'.  The 'T{...}'s are merely organizational, right?

> I'm tempted to suggest that for native mode, changing the specifier be 
> disallowed entirely.

I am tempted to suggest that we just go back to having one specifier at the beginning of the string :).  Things seem to be getting complicate without any clear benefits.

----------

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


More information about the Python-bugs-list mailing list