Task: Implement Exception Detection for Finally Blocks in Python
Task: Implement Exception Detection for Finally Blocks in Python: a task in Terminal-Lego-15k (Harbor dataset). In Python, it is sometimes necessary to determine whether an exception was raised when you are inside a finally block, without having to catch exceptions you don't intend to handle just…
The task
In Python, it is sometimes necessary to determine whether an exception was raised when you are inside a `finally` block, without having to catch exceptions you don't intend to handle just to set a flag. The naive approach is verbose and not DRY:
Part of PrimeIntellect/Terminal-Lego-15k.