Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on You’re better off using Exceptions. Parent comment
obj = session.query(MyObject).one_or_none() # no exception if missing
obj = session.query(MyObject).one() # exception if missing
There are no comments on this comment yet.
obj = session.query(MyObject).one_or_none() # no exception if missing
obj = session.query(MyObject).one() # exception if missing