Arc Forumnew | comments | leaders | submitlogin
1 point by ivankirigin 6116 days ago | link | parent

Yah, and I usually just try to grab it, with a default value. Both these options are fine:

  some_dict.get("username", "default")
or

  try:
    u = some_dict["username"]
  except KeyError:
    # long error case code if needed