<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I would like to add another view of
      this feature might be very useful for cleaning up existing code
      bases:<br>
      <br>
      Just have a look at <a class="moz-txt-link-freetext" href="https://pypi.org/project/xfork/">https://pypi.org/project/xfork/</a> and
      specifically I would like to point you to the following lines
      <a class="moz-txt-link-freetext" href="https://github.com/srkunze/fork/blob/afecde0/fork.py#L216">https://github.com/srkunze/fork/blob/afecde0/fork.py#L216</a> till
      #419.<br>
      <br>
      As you can see these whooping 203 lines are for the sake of
      implementing a delaying proxy class (of a 520 lines project).<br>
      <br>
      <br>
      If this feature gets added, the almost the whole implementation
      could <b>shrink to a mere line</b> of (I hope):<br>
      <br>
      delayed: future.result()<br>
      <br>
      That would be awesome!<br>
      <br>
      <br>
      Btw. adding parameters to 'delayed' like lambda would also be
      useful. [I gather that delayed is a mere placeholder for now.]<br>
      <br>
      <br>
      On 18.02.2017 12:10, Nathaniel Smith wrote:<br>
    </div>
    <blockquote
cite="mid:CAPJVwBnKcdBZCxb_z0xdbBYwpgcfrf_wAN1JHRU8H3VOZXU4wA@mail.gmail.com"
      type="cite">
      <pre wrap="">On Fri, Feb 17, 2017 at 9:34 PM, David Mertz <a class="moz-txt-link-rfc2396E" href="mailto:mertz@gnosis.cx"><mertz@gnosis.cx></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On Fri, Feb 17, 2017 at 6:20 PM, Nathaniel Smith <a class="moz-txt-link-rfc2396E" href="mailto:njs@pobox.com"><njs@pobox.com></a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">
value = delayed: some_dict.get("whatever")
if value is None:
    ...

I.e., the question is, how does 'is' work on delayed objects? I guess
it has to force the promise and walk the proxy chain in each input and
then do an 'is' on the base objects?
</pre>
        </blockquote>
        <pre wrap="">

You've explained the semantics exactly.  That's not confusing at all.
</pre>
      </blockquote>
      <pre wrap="">
Okay... so what if I want to check if two objects refer to the same
delayed computation? I guess you can say that's just not supported,
but that's *extraordinarily weird* for Python.</pre>
    </blockquote>
    <br>
    It's new to Python yes, but it's not weird. You already can
    implement such proxies today as I've demonstrated.<br>
    <br>
    <blockquote
cite="mid:CAPJVwBnKcdBZCxb_z0xdbBYwpgcfrf_wAN1JHRU8H3VOZXU4wA@mail.gmail.com"
      type="cite">
      <pre wrap="">And at the implementation level... so you just added two type checks
and two branches to every 'is' call; this seems concerning. And now
'is' can raise an error, which it never could before. You also AFAICT
have to modify every single C extension function to check for and
handle these things, which is probably impossible even if the overhead
of all the checks is acceptable, which isn't obvious. I'm just not
seeing how this could be implemented.
</pre>
    </blockquote>
    <br>
    I don't share your concerns here. What you describe is the nature of
    <b>delayed</b>. It's not only applicable to 'is' but to all
    operations which evaluate delayed objects.<br>
    <br>
    My point of view from the other side: me and other people need
    delayed proxies, so they implement them, and all of us make the same
    mistakes over and over gain.<br>
    <br>
    Cheers,<br>
    Sven<br>
  </body>
</html>