4 ms·
GvR seems to make readability a priority. But my problem with true if cond else false is it makes impossible to chain fast choices. I thought it was a b
by SFJulie 10y ago
GvR seems to make readability a priority.
But my problem with
true if cond else false
is it makes impossible to chain fast choices.
I thought it was a bug, then I understood it was a feature (after talking to him).
GvR hate ternary operators, the python 3nary is midfix, it sux, but it removes the possibility for people to do long chained if/then/else in unreadable ways.
If you think I am right and it sux, understand I think forbidding this kind of operator is like hating shortcuts and goto.
Since I love shortcuts, goto and chained ift and python, I logically found ways to not care of PEP308 because it is a non problem.
Dispatch tables, and/or used wisely ... there are a lot of ways to not care about PEP308.
- dvt 10y ago> GvR seems to make readability a priority. And my point is that going against the standard (for over 100 years) way of reading conditionals is quite the opposite.
- SFJulie 10y agoI do agree, and for me it is ok to disagree with GvR. I would have prefered a ?: but I can replace it with # requires non null default else there is a bug value = arg is MARKER and default or arg So ... I don't bother
- Lazare 10y ago> GvR seems to make readability a priority. I don't find the syntax adopted in PEP 308 to be readable.