News for hackers. Stuff that matters.
Re:Python Anti-Pattern by Asraelite on Wednesday September 15, 2021 @02:26PM (#28542537)
I think using `or` for default fallbacks is generally considered bad practice because it disallows all falsey values, like `0` and `{}`.

It doesn't matter in this particular case because the only falsey List is `[]` anyway, but it's a bad habit.

JavaScript added the `??` operator for this specific problem.

There are no comments on this comment yet.