Is it possible to do something like this:
def foo(bar, success)
success = True
# ...
>>> success = False
>>> foo(bar1, success)
>>> success
True
Does Python have out params, or an easy way to simulate them? (Aside from messing with parent’s stack frames.)
Yes, put them in a dict as pass the dict as a parameter. I think it’s somewhere in the main python official tutorial.