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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to