Comment

Comment by xcombelle

How I eventually resolve this kind of problems.

    minimum = +Inf
    for b in bar.naz():
        if not some_filter(b):
            continue
        b = some_op(b)
        minimum = min(minimum, b)
    foo(minimum)
Yes, plain old procedural python. data flow from top to bottom. it allows `print` debugging, very usefull to debug some_filter and some_op are broken.
parent xcombelle 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton