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

  >>> hash([1, 2])
  TypeError: unhashable type: 'list'

  >>> t = ([1, 2], [3, 4])
  >>> print(t)
  ([1, 2], [3, 4])




Ah. Of course… that’s how the workaround to use tuples as frozen dicts can work in the first place. Slow morning for me!



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

Search: