Nick Coghlan <> added the comment:

I'm back in the embedded software world now, and hence working with the 
combination of:

- low level serial formats (including fixed length CAN packets)
- C firmware developers that are quite capable of writing supporting 
C-in-Python code using the standard library, but aren't the least bit 
interested in graduating from writing standalone stdlib-only Python scripts 
that live in repositories otherwise full of C code to writing full Python 
applications with PyPI backed dependency management (etc)

It's the kind of environment where having the struct module in the standard 
library is incredibly valuable, and the main things that better support for 
direct manipulation of binary data could potentially offer us is avoiding some 
"memory -> struct.unpack -> process -> struct.pack -> memory" round trips, as 
well as potentially reducing the overall amount of code we have to maintain.

So I'll keep an eye out for potential opportunities for code simplification - 
while crypto algorithms, file formats, network protocols, and hardware 
interfaces can all call for this kind of thing, I'm less sure how often we're 
encountering it in situations where having it available would have let us avoid 
invoking struct entirely.

nosy: +ncoghlan
versions: +Python 3.8 -Python 3.5

Python tracker <>
Python-bugs-list mailing list

Reply via email to