Closed manthey closed 2 years ago
They do different things: or {}
is in python so if the left side is None
we have a dictionary. || []
is in javascript so if the left side is null
or undefined
we have an array. The | 0
is to cast to an integer.
Wow, with the snippets I did not even realize I was looking at two languages! Thanks, makes sense.
In and near your changes I see the patterns
or {}
,|| []
and| 0
. Any reason for the differences?