Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on I'm Switching to Python and Actually Liking It. Parent comment
Letting the KeyError go is usually fine, but if you want to log it or can recover somehow then:
try: API_KEY = os.environ["API_KEY"] except KeyError: logger.exception("...") ...
There are no comments on this comment yet.
Letting the KeyError go is usually fine, but if you want to log it or can recover somehow then: