Hello, On Thu, 12 Nov 2020 20:19:13 +0000 MRAB <pyt...@mrabarnett.plus.com> wrote:
[] > > Question of "what to mark with sigils - terms-used-as-values or > > terms-used-for-capturing" is orthogonal to the question of "what to > > use as match-all symbol", though I understand the desire to > > repurpose the same symbol for both. > > > > For a capturing sigil, "->", ">", ">>", "@", "?", "$" already were > > or can be proposed. The benefit of "->", ">", ">>" is that they're > > very intuitive. I'd also have preference for shorter one, because > > 2-chars are really verbose IMHO. OTOH, ">" has issue with parsing > > ambiguity unless separated by spaces ("Cls(kw1=>var)"). "$" is the > > worst choice IMHO, because intuitively (based on other languages - > > shell, etc.) it says "use the value of variable". > > > I'd still want to list "as" as another possibility, the advantage > being that it's already used for binding elsewhere. Well, the whole idea is that ">foo" syntax is a shortcut of "_ as foo" syntax of PEP634 or "foo := _" of PEP622. Such syntaxes otherwise would be rather verbose, why syntactic sugar for them would be beneficial. -- Best regards, Paul mailto:pmis...@gmail.com _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/GELIXN4O7C72E6QSVT3U2BXBY7GDFBRM/ Code of Conduct: http://python.org/psf/codeofconduct/