A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078660.html below:

[Python-Dev] thoughts on having EOFError inherit from EnvironmentError?

[Python-Dev] thoughts on having EOFError inherit from EnvironmentError? [Python-Dev] thoughts on having EOFError inherit from EnvironmentError?Guido van Rossum guido at python.org
Wed Apr 16 00:36:39 CEST 2008
On Tue, Apr 15, 2008 at 3:27 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Guido van Rossum wrote:
>
>  > No, that's some kind of parsing error. EnvironmentError doesn't
>  > concern itself with the contents of files.
>
>  Often I raise EnvironmentErrors of my own to signal
>  parsing errors. This makes it easy to wrap everything
>  in a try-except that catches anything that's the user's
>  fault rather than the program's.

Well, that's your problem. That's not what EnvironmentErrors are for.

>  > But what operations raise EOFError? Surely you're not using
>  > raw_input()? It's really only there for teaching.
>
>  I'm fairly sure there are some others, although I
>  can't point to them on the spur of the moment.
>
>  However, thinking about it a bit more, anything that
>  calls something that can raise EOFError should be
>  catching it anyway, so an escaped EOFError represents
>  a program bug. So it's probably okay.

Right.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4