Collin Winter schrieb: > What's inconsistent about it? That classes are being used for the > _ast.{Add,Sub,Mult,etc} names? Exactly. These aren't names - they are nodes in the tree. All nodes are instances of _ast.AST. > I don't see the need for both _ast.Add and _ast.Add.singleton or > _ast.add or however else it might be spelled. I'd be perfectly happy > doing something like "_ast.Add = object()" (when initializing the _ast > module), so long as I can write "node.op is _ast.Add", "node.op == > _ast.Add", or something equally brief and to-the-point. Would you like to do the same for Pass, Break, Continue, and Ellipsis? They are also "just names". If you make _ast.Add the entry in the tree itself, why not _ast.Break? Or, if you have a way to deal with _ast.Break, why can't the same way work for _ast.Add? Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4