Hacker News new | ask | show | jobs
by dave_sullivan 3201 days ago
I think it raises an exception.

https://www.python.org/dev/peps/pep-0448/

EDIT: yeah, nvm, it's what everyone else said.

1 comments

No it doesn't, you simply get the value from the last dict:

  >>> a = {'x': 1}
  >>> b = {'x': 2}
  >>> {**a, **b}
  {'x': 2}
  >>> {**b, **a}
  {'x': 1}