Reading Until EOF
Rainer Deyke
rainerd at eldwood.com
Tue Oct 21 18:27:51 EDT 2003
Scott Brady Drummonds wrote:
> However, I'm not entirely comfortable having the Object constructor
> raise an exception when the end-of-file is hit. Per my experience
> with C++, this does not qualify as "exceptional behavior". Frankly,
> it is accepted. I'd like to save the exceptions for true exceptions.
That's a common, but to my mind very strange preference. If you handle an
exception, the exception is by definition expected and "normal". Exceptions
are just a way to exit from nested loops and function calls; there is
nothing "exceptional" about them.
--
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list
mailing list