Movatterモバイル変換


[0]ホーム

URL:


[Python-ideas] Delayed Execution via Keyword

Joseph Hackmanjosephhackman at gmail.com
Fri Feb 17 21:14:29 EST 2017


On 17 February 2017 at 20:23, Steven D'Aprano <steve at pearwood.info> wrote:>> > I think it would be key, like async/await, to narrowly define the scope> in> > which the word delayed functions as a keyword.>> The PEP makes it clear that's just a transition phase: they will be> turned into proper keywords in Python 3.7.>>https://www.python.org/dev/peps/pep-0492/#id80>> Python has had "pseudo-keywords" in the past, like "as":>> [steve at ando ~]$ python2.5 -c "import math as as; print as"> <module 'math' from '/usr/local/lib/python2.5/lib-dynload/math.so'>>> and it is my understanding that the core developers dislike this sort of> thing. As do I. You shouldn't count as getting the same special treament> as async/await. Maybe you will, maybe you won't.>Very well put! Do you have any suggestions for doing something in the samevein? I think there's been a [...]> That will make it pretty much impossible to tell whether something is a> delayed "thunk" or not, since *any* attempt to inspect it in any way> will cause it to reify.>> Maybe that's what we want.>In my mind, this is a plus. The only way to determine if something isdelayed would be something that doesn't apply to anything else, so codenever needs to be aware of delayed.> Earlier we talked about delayed *expressions* always generating the same> value, now you're talking about *instances* rather than expressions. It> makes sense to have keep the standard Python object semantics, rather> than have the value of a delayed thunk cached by the textual expression> that generated it.You are totally right. I agree that the nomenclature is important, and Ithink we're on the same page. [...]Steve-I really appreciate the thoughtful feedback! Please let me know if you havesuggestions; I don't expect the idea to be acceptable out-of-the-gate. :)-Joseph-------------- next part --------------An HTML attachment was scrubbed...URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170217/eb832eea/attachment.html>


More information about the Python-ideasmailing list

[8]ページ先頭

©2009-2026 Movatter.jp