News for hackers. Stuff that matters.
Re:Python 3.9 by Doxin on Tuesday October 06, 2020 @02:56AM (#24695317)
It operates similarly to bitwise or, combining all the set bits, or like the or operator on sets, combining all the set elements. "|" has never meant logical or in python nor in most other common programming languages.
Re:Python 3.9 by minitech on Tuesday October 06, 2020 @03:57AM (#24695594)
They’re referring to duplicate keys’ precedence. `a or b` prefers `a` if truthy, but `a | b` prefers b’s values.
Re:Python 3.9 by Doxin on Thursday October 08, 2020 @02:31AM (#24716453)
That's because it's replicating the behavior of the update function. Again | doesn't mean or, so it shouldn't be expected to behave the same.