Bash rarely impresses me but this is a feature I love about it. I write Python normally, I really wish it had this.
if x=$(foo); then
...
fi
is that the stdout of running `foo` replaces the contents of $x and the `if` evaluates the exit code of `foo`. Python doesn't see stdout as some kind of first-class language construct. I also don't think this could ever work on Windows if you expect `foo` to be a simple function that has access to the interpreter state.while data := something_that_may_be_false():
# do something with data