EAFP - Easier to ask for forgiveness than permission - is a popular idiom in Pythonic code. Unlike languages like C++ or Java, where you usually check for condition first and then proceed (which can introduce race conditions in multithreaded code if done improperly).