def find_match(): for x in range(max_x): for y in range(max_y): if match(x, y): return x, y result = find_match() if result is None: # match not found else: x, y = resultYup, looks clean to me, and the named "result" and "inner_function" give the opportunity for self-documentation, with appropriate names instead of "result" and "inner_function".
Image by mikebaird via Flickr
For your esthetical enrichment, a picture of a nest!
No comments:
Post a Comment