This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brandtbucher
Recipients BTaskaya, Daniel Moisset, brandtbucher, freundTech, gvanrossum, kj, laurenjl, lys.nikolaou, pablogsal, rhettinger, willingc, xtreak
Date 2021-03-13.01:13:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615597985.89.0.490566804956.issue42128@roundup.psfhosted.org>
In-reply-to
Content
Not a much thought went into that decision, honestly.

The main reason I chose an identifier there was because "as" always stores a simple name, so allowing it to potentially be other contexts or expressions (which are illegal) just seemed to create complexity. I saw we used simple identifiers in many similar places and just went with it.

(As a related note, if mapping patterns had their own AST nodes, I would probably choose to represent "**rest" as an optional identifier, rather than a keyless value or optional Name.)

If it causes problems for clients of the AST, it's easy to change. But I sort of like it a bit better how it is now.
History
Date User Action Args
2021-03-13 01:13:05brandtbuchersetrecipients: + brandtbucher, gvanrossum, rhettinger, willingc, Daniel Moisset, lys.nikolaou, pablogsal, xtreak, BTaskaya, kj, laurenjl, freundTech
2021-03-13 01:13:05brandtbuchersetmessageid: <1615597985.89.0.490566804956.issue42128@roundup.psfhosted.org>
2021-03-13 01:13:05brandtbucherlinkissue42128 messages
2021-03-13 01:13:05brandtbuchercreate