Python's "ternary" operator
foo = bar if baz else baz
Not sure why, though.
I agree, I'd much prefer AutoHotkey's (or similar): ?:
foo := baz?bar:baz
foo := (baz?bar:baz)
foo := (a=b)?a:b
foo := ((a=b)?a:b)
Yeah, that's not great.
I often use dicts for dispatching, instead of using if/elif/else
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.