Re: [Python-Dev] Column offsets for attribute nodes

2010-12-27 Thread Sven Brauch
Glenn wrote: > [...] but maybe bar at 4 and baz at 8 would be even better. > In other words, I don't think pointing at the "." is useful? [...] Hi, here's a patch which results in what Glenn Linderman suggested: --- python-orig/Python/ast.c 2010-10-19 03:22:07.0 +0200 +++ python-new/Pyth

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Nick Coghlan
On Mon, Dec 27, 2010 at 9:34 AM, Benjamin Peterson wrote: > 2010/12/26 Sven Brauch : >> In that discussion, there's been different opinions about which >> behaviour is better; main arguments were "consistency" for the current >> and "usefulness" for the suggested behaviour. It has been proposed to

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Sven Brauch
Hey, yeah, you're right, that would be even better. Currently it would also give a 3 for bar in "foo.bar.baz". I'd be fine with both solutions, but yours seems more logical. Bye, Sven 2010/12/27 Glenn Linderman : > On 12/26/2010 1:41 PM, Sven Brauch wrote: > > Hi there, > > I recently filed

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Glenn Linderman
On 12/26/2010 1:41 PM, Sven Brauch wrote: Hi there, I recently filed a feature request in the tracker to change the behaviour of the parser in terms of setting ranges on attribute AST nodes, because I'm working on an application which needs more information than is currently provided. I suggeste

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Sven Brauch
It should maybe be noted that the proposed patch would change that, too, so it would be the same behaviour for all three types (subscripts, calls, and attributes) again. Just more intuitive. :) 2010/12/27 Benjamin Peterson : > 2010/12/26 Sven Brauch : >> Hi there, >> >> I recently filed a feature

Re: [Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Benjamin Peterson
2010/12/26 Sven Brauch : > Hi there, > > I recently filed a feature request in the tracker to change the > behaviour of the parser in terms of setting ranges on attribute AST > nodes, because I'm working on an application which needs more > information than is currently provided. I suggested to cha

[Python-Dev] Column offsets for attribute nodes

2010-12-26 Thread Sven Brauch
Hi there, I recently filed a feature request in the tracker to change the behaviour of the parser in terms of setting ranges on attribute AST nodes, because I'm working on an application which needs more information than is currently provided. I suggested to change the behaviour from foo.bar.baz #