Hacker News new | ask | show | jobs
by sidlls 2531 days ago
The code is doing one thing: assigning the result of a boolean expression. It's not different in structure from, say, `x = a + b`.
1 comments

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.