>> > if global_min is None or score(candidate) < global_min: >> > global_min = score(candidate) >> > do stuff appropriate for a new local minimum >> That's precisely what I was suggesting, yes. Andrew> The code is still brittle. If score(candidate) returns None, Andrew> hilarity ensues. Presumably the return value of score() is under control of the author of the loop who can guarantee that it won't return None. Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4