title: Is there an analogue to Java IllegalStateException in Python?
body: <p>IllegalStateException is often used in Java when a method is invoked on an object in inappropriate state. What would you use instead in Python?</p>