[Python-Dev] Column offsets for attribute nodes (original) (raw)

Sven Brauch svenbrauch at googlemail.com
Mon Dec 27 01:14:53 CET 2010


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 <v+python at g.nevcal.com>:

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 suggested to change the behaviour from foo.bar.baz # <- foo is said to start at column 0, bar at 0 and baz at 0 (current) to foo.bar.baz # <- foo starts at 0, bar at 3 and baz at 7 (suggestion) 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 ask the question on this list, that's why I'm doing that now. :) The thread can be found here: http://bugs.python.org/issue10769 So, which version do you think to be better: the current one or the suggested one? The current one is better, 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?  Was that your intention?


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/svenbrauch%40googlemail.com



More information about the Python-Dev mailing list