On Fri, Apr 27, 2018 at 10:52 AM Paul G <paul at ganssle.io> wrote: > Rust has a few syntactic ways to accomplish the same thing, though. I think match expressions are used for the equivalent of conditionals that carry the condition value into the body of the expression, and all blocks return the result of the last statement, so you can do things like: > let mut x; > while { x = foo(); x } { > bar(x); > } Go is similar to Python; it's doesn't allow assignment in expression. And Go has similar syntax like above; for x := foo(); x { bar(x) } if err := baz(); err != nil { return err } I like Go and I think this syntax can be ported to Python. But it help only if/while statements. It doesn't help list comprehension. And Go doesn't have list comprehension.
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