[Python-ideas] struct.unpack should support open files

Anders Hovmöller boxed at killingar.net
Wed Dec 26 20:53:44 EST 2018

> And this is why I, personally, think augumenting struct.unpack and json.read and a myriad of other arbitrary methods to accept both file-like things and bytes is an open ended can of worms.
> And it is why I wrote myself my CornuCopyBuffer class (see my other post in this thread).

Seems like that should be in the standard library then!

/ Anders

More information about the Python-ideas mailing list