[PATCH] A compromise on case - another suggestion

Moshe Zadka moshez at math.huji.ac.il
Sun May 28 06:57:41 CEST 2000


On Sun, 28 May 2000, Peter Schneider-Kamp wrote:

> Is that really so? From a quick look at the relevant sources I saw
> at least some places where IndexError is checked. So you may be right.
> 
> But does it have to be like that? Can't we use the length of the list
> to check?

No. Have a look at the fileinput module for a place where you can't use
the length to check, and the IndexError hack works quite well.

I'm starting to think that my jocular reference to the
"--with-readable-error-messages" switch might become true: trade a little
efficiency for debuggability.






More information about the Python-list mailing list