Re: Please review the new docs for #1440

2020-01-15 Thread Edward K. Ream
On Wed, Jan 15, 2020 at 8:54 AM Brian Theado wrote: > But in its current form, this example doesn't do anything user visible. It doesn't return anything and it doesn't display anything. IMO, examples should as much as possible be standalone and do something the user can see. That way the user

Re: Please review the new docs for #1440

2020-01-15 Thread Brian Theado
On Wed, Jan 15, 2020 at 3:57 AM Edward K. Ream wrote: > On Tue, Jan 14, 2020 at 7:06 PM Brian Theado > wrote: > [...] > The ast module is particularly deficient in this regard. The documentation > for ast.walk is: > > " Recursively yield

Re: Please review the new docs for #1440

2020-01-15 Thread Edward K. Ream
On Tue, Jan 14, 2020 at 10:59 PM Brian Theado wrote: I like your second comment > . > It is well written and informative. Nice job. > Thanks. > You stress "token order traversal". How does that contrast the traversal

Re: Please review the new docs for #1440

2020-01-15 Thread Edward K. Ream
On Tue, Jan 14, 2020 at 7:06 PM Brian Theado wrote: In the theory of operation: > > "The notion of a *token order traversal* of a parse tree is the > foundation of this project" > > In contrast, what traversal order do parse trees provide? > None whatever. Traversals are defined by code, not by

Re: Please review the new docs for #1440

2020-01-14 Thread Edward K. Ream
On Tue, Jan 14, 2020 at 6:10 PM Brian Theado wrote: > One thing I really like about the front page of that project ( https://github.com/gristlabs/asttokens) is the front-and-center example which shows in a few lines of code how to call the code using concrete inputs and shows exactly what the

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
I like your second comment . It is well written and informative. Nice job. You stress "token order traversal". How does that contrast the traversal provided by the ast library? Does your library still traverse the ast

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
In the theory of operation: "The notion of a *token order traversal* of a parse tree is the foundation of this project" In contrast, what traversal order do parse trees provide? How is token order different/better? What does it allow me to do that I can't otherwise do with parse trees? "This

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
Ok, now I see in your proposed email response in the other thread you do mention the asttokens project. And also later in #1440 you said "The asttokens project assigns tokens to ast nodes, but only for statement-level ast nodes." That's useful to know.

Re: Please review the new docs for #1440

2020-01-14 Thread Brian Theado
I just followed the stackoverflow link ( https://stackoverflow.com/questions/16748029/how-to-get-source-corresponding-to-a-python-ast-node#) and someone posted that they created https://github.com/gristlabs/asttokens which "Annotates Python AST trees with source text and token information". Is

Please review the new docs for #1440

2020-01-14 Thread Edward K. Ream
In a day or three I'll be announcing #1440 , the unification of parse trees and tokens, to python's core developers. I'll do that by making a comment in this related python issue . In preparation for