3 ms·
That's also the same thought behind the Python practice of "it's better to ask forgiveness than permission". If you're going to have a conditional that will ev
by pythonaut_16 9y ago
That's also the same thought behind the Python practice of "it's better to ask forgiveness than permission".
If you're going to have a conditional that will evaluate to True most of the time, sometimes (in Python) it's considered better to just go ahead and try the logic that the conditional is guarding, and then catch the exception and handle it if it happens.