News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by cheez on Monday February 03, 2020 @01:54PM (#22227549)
SQLAlchemy does this well:

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.