This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scummos
Recipients georg.brandl, scummos
Date 2010-12-24.14:07:45
SpamBayes Score 4.93096e-10
Marked as misclassified No
Message-id <1293199668.93.0.710632978584.issue10769@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

I'm writing a python language support plugin for an IDE. I'm using the AST module to get information about the loaded source code, which works pretty well. However, in some cases, the information provided by the AST is simply not sufficient to do proper highlighting (or whatever); for example, 

class_instance.method(argument1.arg_attribute).attribute
class_instance.method(   argument1.    arg_attribute)    . attribute
and
class_instance.method(   argument1. \
                         arg_attribute)   \
                                   . attribute

produce exactly the same syntax tree, making it impossible to determine where e.g. "attribute" starts and ends. Although technically obviously correct, the information that the column offset for "attribute" is "0" is quite pointless.

It would really be great if there could be an additional attribute for Attribute Access nodes which tells me where the attribute access the node refers to *really* takes place, not just "column 0". :)
It would be even better if there was not only an offset, but also an "end" attribute providing information on where the node ends; that'd make this module way more useful, at least for me.

Thanks and best regards,
Sven
History
Date User Action Args
2010-12-24 14:07:48scummossetrecipients: + scummos, georg.brandl
2010-12-24 14:07:48scummossetmessageid: <1293199668.93.0.710632978584.issue10769@psf.upfronthosting.co.za>
2010-12-24 14:07:45scummoslinkissue10769 messages
2010-12-24 14:07:45scummoscreate