Brandt Bucher <brandtbuc...@gmail.com> added the comment:
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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to