<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 17, 2017 at 9:45 PM, David Mertz <span dir="ltr"><<a href="mailto:mertz@gnosis.cx" target="_blank">mertz@gnosis.cx</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">That will make it pretty much impossible to tell whether something is a<br></blockquote></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
delayed "thunk" or not, since *any* attempt to inspect it in any way<br>
will cause it to reify. Maybe that's what we want.</blockquote><div> </div></span><div>This feels like a disadvantage, and an important one. Most "normal" programmers should never have to care whether something is delayed or has been concretized already. But people writing debuggers, profilers, etc. really do want to know.</div><div><br></div><div>There should be some way at poking at an object if you really want to without concretizing it. I wouldn't care if this was some ugly and obscure device like 'inspect._is_delayed(my_obj._<wbr>co_delayed)' that has different semantics than other function calls. Maybe "the uglier the better" in this case, since it *should* be reserved for special purposes only.</div></div></div></div></blockquote><div><br></div><div>If we assume idempotency (which I'm not certain whether we can/should) then we could spell the check like this:</div><div><br></div><div><font face="monospace, monospace"> if delayed delayed my_obj is delayed my_obj:</font></div><div><font face="monospace, monospace"> print("Yep, it's delayed and I haven't concretized it") </font></div></div><div><br></div><div>That has the dual advantages of being both ugly and obvious.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Keeping medicines from the bloodstreams of the sick; food <br>from the bellies of the hungry; books from the hands of the <br>uneducated; technology from the underdeveloped; and putting <br>advocates of freedom in prisons. Intellectual property is<br>to the 21st century what the slave trade was to the 16th.<br></div>
</div></div>