You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.2 added int.from_bytes, which allows easily generating an integer value from the bytes--and we can use it now that we're only Python >= 3.6.
I doubt we should replace all usages of struct with this, but there are some places in the binary I/O code where we do some jumping through struct hoops just to form a couple of integers. This would certainly be clearer--we'd also want to do a bit of benchmarking to see if there's any performance ramifications.
The text was updated successfully, but these errors were encountered:
Python 3.2 added
int.from_bytes
, which allows easily generating an integer value from the bytes--and we can use it now that we're only Python >= 3.6.I doubt we should replace all usages of
struct
with this, but there are some places in the binary I/O code where we do some jumping throughstruct
hoops just to form a couple of integers. This would certainly be clearer--we'd also want to do a bit of benchmarking to see if there's any performance ramifications.The text was updated successfully, but these errors were encountered: