[Python-Dev] PEP 326 (quick location possibility)

Tim Peters tim.one at comcast.net
Thu Jan 29 14:36:58 EST 2004

>>         if global_min is None or score(candidate) < global_min:


> That's not a problem I've run into, and I don't see it cropping up all
> that often on c.l.py.  (To be precise, I don't have any memories of it
> cropping up.)

No, most search loops you see on c.l.py don't bother with this at all, and
are brittle as a result.  That's the point.  The need for additional "thing
is None" kinds of clauses is something people learn the hard way, after
they've been burned by making a bad guess for an extreme initial value (or
more likely what turns out to be bad *eventually* -- passes all their
initial tests, but screws up later when input changes).

More information about the Python-Dev mailing list