News for hackers. Stuff that matters.
Re:What's New in Python 3.11? by Latty on Monday June 27, 2022 @08:43AM (#31893765)
At the end of the day people were doing {**a, **b} or dict(d1.items() | d2.items()) (which is subtly different in that set order is arbitrary so which "wins" in the duplicate key case is arbitrary) in the wild, so I think supporting a natural dict-level union is the better option, even if it can't be all things to all people.
Re:What's New in Python 3.11? by robertlagrant on Monday June 27, 2022 @11:48AM (#31896239)
Agree. More complex stuff where precedence is tricky can be done in a dictionary comprehension.