Re: [RFC] Context Managers, v2
| From: | Pierre | Date: | Fri, 06 Nov 2026 11:19:36 +0000 |
| Subject: | Re: [RFC] Context Managers, v2 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-133025@lists.php.net to get a copy of this message | ||
Le 05/11/2026 à 18:33, Larry Garfield a écrit :
It basically swaps the two-method approach in favor of "it's a generator, you're welcome." The result is, I think, both simpler and more flexible, and resolves a number of other issues as well. More details in the RFC.Hello, 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). Regards, -- Pierre