Re:Skills Poor Programmers Lack
by sidlls on Sunday July 21, 2019 @02:06PM
(#20492706)
The code is doing one thing: assigning the result of a boolean expression. It's not different in structure from, say, `x = a + b`.
[ Parent
| on HN ]
Re:Skills Poor Programmers Lack
by bryanrasmussen on Sunday July 21, 2019 @02:17PM
(#20492780)
it's sort of an interesting problem in intention - if the reason why the expression
"isDone = isDelivered and isNotified" was written is because the programmer saw "if isDelivered and isNotified: isDone = True else: isDone = false;"
and thought I can improve that, then what they have done is managed to wrap the checking and assignment into one expression, they are logically now doing two things in the one line - it just so happens that they can do that because one of those things was not really necessary to do.