@schlink Yeah, unfortunately I've done the following in python way too often:
bar = 'something else'
if foo:
bar = 'something'
Top-level
Craig Maloney ☕
@schlink Yeah, unfortunately I've done the following in python way too often: bar = 'something else' 3 comments
Eugen Rochko
@noelle @craigmaloney @schlink Don't they all have ternary operators? condition ? when-true : when-false |
@craigmaloney @schlink Hang on, I think Python does do what you want: