bpo-12743: Delete obsolete comment from marshalling docs by berkerpeksag · Pull Request #8457 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely missed MemoryError

It is missed also in lists of exceptions for PyMarshal_ReadObjectFromFile() etc.

but isn't it possible to hit the following branch?

It looks to me that this branch can be hit only when read from Python file-like object with broken readinto(). PyMarshal_ReadLongFromFile() reads from the C file, and fread() should return <= n, unless libc is is broken.

Is it OK to leave that to another issue? (or is there an already open issue?)

I'm working on this. It will be another issue.

I have doubts that it is worth to specify full lists of exceptions. They almost always will be incomplete.