'20' < 100

Dave Brueck dave at pythonapocrypha.com
Fri May 2 11:54:31 EDT 2003


On Thu, 1 May 2003, Dan Bishop wrote:

> > For one, to me the bug is elsewhere in the OP's program, not at the time
> > of the comparison,
>
> But an exception would at least make it obvious that a bug exists,
> instead of letting it pass silently.

No, my point was that it's only a bug _in the context of the OP's
program_. It is not universally true that raising an exception at the
point of the comparison would be the Right Thing To Do.

I can write a class that maintains an ordered list of objects so that I
can search them quickly based on an identifier string. If the need arises,
I can later insert objects with purely numerical identifiers or multipart
(object) identifiers, and my program will, thankfully, still work.

-Dave





More information about the Python-list mailing list