I look at Python's built-in exceptions and wonder what the closest equivalent to Java is UnsupportedOperationException. NotImplementedErrorclose but seems to offer something a little different. Should I use RuntimeErroror implement my own Exception?
UnsupportedOperationException
NotImplementedError
RuntimeError
Exception
The closest equivalent is simply not to implement an unsupported method. Outgoing exception, if you try to use a non-existent method, this AttributeError.
AttributeError
Java, , , ( ), , . .
, , TypeError. , - , ValueError. , 2357112, AttributeError .