[Python-ideas] Delayed Execution via Keyword

Ed Kellett edk141 at gmail.com
Fri Feb 17 16:49:57 EST 2017


On Fri, 17 Feb 2017 at 21:18 Joseph Jevnik <joejev at gmail.com> wrote:

> There is no existing code that uses delayed execution so we don't need to
> worry about breaking it.
>

I think you're missing the point here. This thing is transparent—that's
sort of the entire point—so you can pass delayed expressions to other
things, and it would be better if they didn't have insane behaviour.


> I think it would be much easier to reason about if forcing an expression
> was always explicit. I am not sure what you mean with the second case; why
> are you delaying a function if you care about the observable side-effect?
>

You don't delay the function, you delay an expression that evaluates to it.
You should be able to pass the result to *any* existing code that expects a
function and sometimes calls it, and the function should be called when
that happens, rather than evaluated to a delayed object and then discarded.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170217/bb658a98/attachment.html>


More information about the Python-ideas mailing list