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

Andrew Koenig ark-mlist at att.net
Thu Jan 29 12:28:06 EST 2004


> > global_minimum = made_up_value_presumed_to_be_unreachably_large
> > while mote_to_look_at:
> > do a ton of computation, yielding a candidate
> > if score(candidate) < global_minimum:
> > global_minimum = score(candidate)
> > do a ton of stuff to prune the search based
> > on the new (so far) local minimum
> > return global_minimum

> I'm curious: why you didn't use None as the initial value or use some
> other hack to avoid initializing with a specific number?

Perhaps None is unreachably small, rather than unreachably large?


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /