Re: Wow: a second look at asttokens, fstringify and black

2020-01-15 Thread Edward K. Ream
On Wednesday, January 15, 2020 at 11:40:23 AM UTC-5, Edward K. Ream wrote: > I'll investigate how thoroughly asttokens attaches token lists to nodes. I had remembered that only ast nodes for statements have attached tokens, but now I am not sure at all about that. Well, I haven't forgotten

Re: Wow: a second look at asttokens, fstringify and black

2020-01-15 Thread Edward K. Ream
On Wednesday, January 15, 2020 at 11:40:23 AM UTC-5, Edward K. Ream wrote: > I will certainly investigate using asttokens instead of the TOG class. I only plan to compare how asttokens attaches token lists to nodes. Actually, asttokens uses begin/end token indices instead of actually creating

Re: Discuss: a proposed answer to python issue #33337

2020-01-15 Thread Edward K. Ream
On Wed, Jan 15, 2020 at 2:45 PM Brad wrote: This is very interesting work. > Thank you. > As you probably know, the Python core developers are a bit curmudgeonly > when it comes to suggestions that haven't come from themselves. > Hehe. I have some experience with that :-) Be aware that the

Re: Discuss: a proposed answer to python issue #33337

2020-01-15 Thread Brad
Edward, This is very interesting work. As you probably know, the Python core developers are a bit curmudgeonly when it comes to suggestions that haven't come from themselves. Be aware that the responses could focus exclusively on all of the potential problems, with the inevitable: "Why

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

Wow: a second look at asttokens, fstringify and black

2020-01-15 Thread Edward K. Ream
This morning I took a second look at asttokens, fstringify and black. What I found astounded me. I had studied the sources asttokens awhile back, but now, looking at the sources with expert's eyes, I see that the asttokens people have solved all the problems that took me so much work. I then

Re: Discuss: a proposed answer to python issue #33337

2020-01-15 Thread Edward K. Ream
On Tuesday, January 14, 2020 at 3:00:44 PM UTC-5, Terry Brown wrote: I wonder if a couple of demos would help > I'd like to thank you, Brian and Matt for your comments. Those comments have helped me not to make a fool of myself straightaway :-) Something shocking has just happened. I'll

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