>
> Bearing in mind compatibility with existing simpletrace analysis
> scripts, how about the following default method implementations?
>
> def __enter__(self):
> self.begin()
>
> def __exit__(self, exc_type, exc_val, exc_tb):
> if exc_type is None:
> self.end()
> ret
On Tue, May 02, 2023 at 11:23:32AM +0200, Mads Ynddal wrote:
> From: Mads Ynddal
>
> Instead of explicitly calling `begin` and `end`, we can change the class
> to use the context-manager paradigm. This is mostly a styling choice,
> used in modern Python code. But it also allows for more advanced
From: Mads Ynddal
Instead of explicitly calling `begin` and `end`, we can change the class
to use the context-manager paradigm. This is mostly a styling choice,
used in modern Python code. But it also allows for more advanced analyzers
to handle exceptions gracefully in the `__exit__` method (not