[Python-ideas] Ideas for improving the struct module

Mark Dickinson dickinsm at gmail.com
Fri Jan 20 02:43:29 EST 2017


On Fri, Jan 20, 2017 at 12:30 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Does it require a PEP just to add one more
> format code? (Maybe it will, if the format code requires a complete
> re-write of the entire module.)

Yes, I think a PEP would be useful in this case. The proposed change
*would* entail some fairly substantial changes to the design of the
module (I encourage you to take a look at the source to appreciate
what's involved), and if we're going to that level of effort it's
probably worth stepping back and seeing whether those changes are
compatible with other proposed directions for the struct module, and
whether it makes sense to do more than add that one format code. That
level of change probably isn't worth it "just to add one more format
code", but might be worth it if it allows other possible expansions of
the struct module functionality. There are also performance
considerations to look at, behaviour of alignment to consider, and
other details.

-- 
Mark


More information about the Python-ideas mailing list