msg202675 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-12 06:52 |
http://docs.python.org/2/library/ast.html AST module doc is incomplete. To write node visitor, you need to know possible types of parameters and expected values for every node type. They are different. http://hg.python.org/cpython/file/1ee45eb6aab9/Parser/Python.asdl For example, visit_Assign expects: Assign(targets, value) `targets` can be List, Tuple or Name When there is List, and when there is Tuple? It should be documented. |
|
|
msg202697 - (view) |
Author: Brett Cannon (brett.cannon) *  |
Date: 2013-11-12 15:43 |
The node types are all listed right there in the docs in the abstract grammar section, so arguing they are incomplete I don't think is accurate. I'm willing to leave this open in case some ambitious person wants to write docs for every node type, but I think this is a very low priority task. |
|
|
msg203734 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-22 10:57 |
Neither you nor docs answer the question when Assign node gets Tuple as argument, when List and when Subscript. While it is obvious to you, I personally don't know what a Subscript is. This is the kind of stuff that I'd like to see documented. |
|
|
msg204073 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-23 18:32 |
http://stackoverflow.com/questions/8370132/what-syntax-is-represented-by-an-extslice-node-in-pythons-ast |
|
|
msg204479 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-26 14:51 |
https://greentreesnakes.readthedocs.org/en/latest/ |
|
|
msg204513 - (view) |
Author: Georg Brandl (georg.brandl) *  |
Date: 2013-11-26 18:28 |
When citing a link, it's customary to give at least a comment *why* you are citing it. |
|
|
msg204528 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-26 20:29 |
SO link serves a proof that a problem is actual. It is needed, because, for example Brett doesn't think it is important. 2nd link is the same proof, and also an example of documentation wanted. |
|
|
msg204529 - (view) |
Author: anatoly techtonik (techtonik) |
Date: 2013-11-26 20:30 |
In fact it may be the documentation that could be merged. |
|
|
msg359759 - (view) |
Author: Batuhan Taskaya (BTaskaya) *  |
Date: 2020-01-10 21:27 |
@pablogsal is working on documenting nodes (not every node type that exists, the ones that aren't deprecated) in PR 17812 |
|
|
msg359851 - (view) |
Author: Cheryl Sabella (cheryl.sabella) *  |
Date: 2020-01-12 14:30 |
@BTaskaya, thank you. I'm going to close this issue as a duplicate of that one. |
|
|