HN user

bkad

10 karma

[ my public key: https://keybase.io/kle; my proof: https://keybase.io/kle/sigs/rF6JqJ1YlefUEpYo1VJve6_fbRDF77YW7HXSjVEz0NU ]

Posts0
Comments5
View on HN
No posts found.

dicts are like Maps in JavaScript, so the type of a key matters. It enables usecases where your keys aren't always strings:

  >> bar = {1: "a", "1": "b"}
  >> bar[1]
  "a"
  >> bar["1"]
  "b"