[Python-Dev] When to use EOFError? (original) (raw)

Ethan Furman ethan at stoneleaf.us
Mon Jun 27 12:40:16 EDT 2016


On 06/21/2016 01:48 PM, Serhiy Storchaka wrote:

There is a design question. If you read file in some format or with some protocol, and the data is ended unexpectedly, when to use general EOFError exception and when to use format/protocol specific exception?

I believe that EOFError was created for the situation when a file unexpectedly ends.

-- Ethan



More information about the Python-Dev mailing list