On Thu, Dec 2, 2021 at 1:33 AM André Roberge <andre.robe...@gmail.com> wrote: > On Wed, Dec 1, 2021 at 7:51 AM Chris Angelico <ros...@gmail.com> wrote: >> >> On Wed, Dec 1, 2021 at 10:30 PM André Roberge <andre.robe...@gmail.com> >> wrote: >> >> >> 2) Independently: Is the syntactic distinction between "=" and "=>" a >> >> cognitive burden? >> > >> > Yes. >> > I really think that using a keyword like defer, or from_calling_scope ;-), >> > would significantly reduce the cognitive burden. >> >> Also fair. I'm not a fan of keywords for this sort of thing, since it >> implies that you could do this: >> >> def f(x=defer []): ... >> >> dflt = defer [] >> def f(x=dflt): ... >> >> which is a completely different proposal (eg it would be evaluated >> only when you "touch" that, rather than being guaranteed to be >> evaluated before the first line of the function body). That's why I >> want to adorn the equals sign and nothing else. > > > Shouldn't the PEP contain a rejected idea section where this could be > mentioned? >
Hmm, maybe. It's such a completely different proposal, but it does get asked a few times. If someone could actually put it forward as a full proposal, I'd gladly mention it as an interaction with another PEP. Otherwise, I'll write up a very brief thing on deferred expressions and how they're not what this is about. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7RM5G6T3VHBA7MEWJ53O6N6PB4CDXWPW/ Code of Conduct: http://python.org/psf/codeofconduct/