Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That syntax doesn't make sense. The

  {**d1, **d2}
idiom is just a clever mashup of Python's dictionary construction literal {}, and * * unpacking. That's why it only works with string-valued keys (which is a major limitation).

Adding a third item to the dictionary literal would require special-casing the {} dictionary construction literal.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: