Python Forum

Full Version: while handling this exception, another ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have try/except within a higher except which if properly coded seems to work. how deeply can i nest try/except in the except handlers?
What do you mean exactly? You should be able to nest them arbitrarily. Having said that, deeply nested code will likely be quite difficult to follow and the try/except obscures the happy path (because they make visible the error handling). Result types offer an alternative.