Hi,
I was wondering why decorator-based context managers are not reentrant
or even reusable.
They could be made reusable by initializing the generator in __enter__()
instead of __init__(). They could be made reentrant by storing generatos
in a stack. A similar thing has been implemented for
> On 30 Mar 2023, at 08:10, Tobias Bengfort wrote:
>
> Hi,
>
> I was wondering why decorator-based context managers are not reentrant or
> even reusable.
Do you mean this use of reentrant?
https://en.wikipedia.org/wiki/Reentrancy_(computing)
>
> They could be made reusable by initializi
On 30/03/2023 09.21, Barry wrote:
On 30 Mar 2023, at 08:10, Tobias Bengfort
wrote:
I was wondering why decorator-based context managers are not reentrant
or even reusable.
Do you mean this use of reentrant?
https://en.wikipedia.org/wiki/Reentrancy_(computing)
I mean mean it as used in the