ANN: Dogelog Runtime, Prolog to the Moon (2021)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Sep 18 00:29:03 EDT 2021


On 17/09/21 8:41 pm, Mostowski Collapse wrote:
> Are exceptions
> blocks in Python cheap or expensive? Are they like
> in Java, some code annotation, or like in Go
> programming language pushing some panic handler?

They're not free, but they're not hugely expensive either.
Don't be afraid to use them when it makes sense to do so.

I'm not sure what you mean by "some code annotations",
so I don't know how to answer that question. I suspect
that the way exceptions are implemented in the JVM is
similar to the way CPython does it, but I don't know
a lot about the JVM.

-- 
Greg


More information about the Python-list mailing list