Re: [RFC] Context Managers, v2

From: Date: Fri, 06 Nov 2026 12:31:09 +0000
Subject: Re: [RFC] Context Managers, v2
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-133027@lists.php.net to get a copy of this message
Le 06/11/2026 à 12:19, Pierre a écrit :
I love the simplicity for this RFC. I have one question: what happens if the generator yield more than once, will the using block run more than once ? If so it seems odd and may trigger very hard to debug problems (I can imagine some SQL transaction running more than once because of a generator bug).
The implementation details section gave me an answer, the generator can only yield once. Sorry for the noise. -- Pierre

« previous php.internals (#133027) next »