Hacker News new | ask | show | jobs
by tgsovlerkhgsel 1787 days ago
Your example will throw a KeyError if "input" doesn't contain "foo", and an AttributeError if "foo" is some unexpected data type that doesn't have keys().