
On Wed, 19 Jul 2023 at 11:51, Dom Grigonis <dom.grigonis@gmail.com> wrote:
Coming back to deferred evaluation,
https://peps.python.org/pep-0671/ These 2 aren’t really orthogonal in functionality. Maybe in implementation. But PEP671 is a certain subset of deferred evaluation as it can achieve the same with 1 extra line at the start of the function’s body.
No, it's not a subset of deferred evaluation, as has been stated clearly in the PEP and discussed many times in the past. Deferred evaluation is HARD. It's easy to handwave everything and pretend that it magically gets evaluated at the exact right time, but how do you actually define that? What are the scoping rules? Does it create a closure? Try creating an actual concrete specification and you may find out why it hasn't been implemented yet. ChrisA