3 ms·
PEP-572 has a very good section that talks about how people love to bike-shed about examples. Examples that are too simple are ridiculed with "I wouldn't do it
by cyphar 8y ago
PEP-572 has a very good section that talks about how people love to bike-shed about examples. Examples that are too simple are ridiculed with "I wouldn't do it that way", and examples that are too complicated are ridiculed with "that's far too convoluted to be a common use-case".
I think this comment falls along this type of bike-shedding.
- wodenokoto 8y agoObviously we disagree on where the example lands. My original post was in good faith. "Why would you need a new construct for something that is already solved?" To me, adding the variable assigned before the if-statement, inside, or after the if-statement would have made it clear why one might write the original code that way, and why a new type of assignment could be helpful. Looking at the downvotes, that is apparently not a common confusion.