r/Python • u/dankey26 • Dec 19 '22
Intermediate Showcase multi line lambdas, as god intended

codec abuse, part 2. https://github.com/dankeyy/superlambda.py
gl hf hope you like it
52
Upvotes
r/Python • u/dankey26 • Dec 19 '22

codec abuse, part 2. https://github.com/dankeyy/superlambda.py
gl hf hope you like it
View all comments
Show parent comment
1
u/iceytomatoes Dec 31 '22
People's frustrations, and guido's regret, for the else after a for loop is that the else statement comes into play if the loop is broken early. It's not super-intuitive to figure out if you look at it.
People always comment about wanting the for loop to act like an if statement. Such that the else clause would activate if the list being for-looped over is empty, and the loop never happens. This isn't the current functionality i believe.