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

Nick Coghlan ncoghlan at gmail.com
Mon Dec 27 01:32:58 CET 2010


On Mon, Dec 27, 2010 at 9:34 AM, Benjamin Peterson <benjamin at python.org> wrote:

2010/12/26 Sven Brauch <svenbrauch at googlemail.com>:

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. :) My argument against this change is that an attribute includes the expression from which the attribute is being taken. This is consistent with subscripts and calls, which both have the lineno and coloffset of their source expressions.

I'd like to see the impact on existing uses of this information (primarily SyntaxErrors) before forming a firm opinion, but my initial inclination is that retaining the column information for the subattribute names is a better option.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list