|
|
|
|
|
by muthuraj57
2639 days ago
|
|
I'm not familiar with Python since I'm from Java background. In Java throwing exceptions is costly (like null check is preferred over catching NPE) since exception needs to get stacktrace which involves quite a lot of reflection. Is this the case with python too? or throwing exception is "free" here? |
|
It could even be more efficient than return value checking in certain cases.