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 Aivar.Annamaa
Recipients Aivar.Annamaa, benjamin.peterson, brett.cannon, flox, georg.brandl, ncoghlan
Date 2014-04-19.06:14:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397888042.42.0.58492972513.issue21295@psf.upfronthosting.co.za>
In-reply-to
Content
Regarding #16795, the documentation says "The lineno is the line number of source text and the col_offset is the UTF-8 byte offset of the first token that generated the node", not that lineno and col_offset indicate a suitable position to mention in the error messages related to this node.

IMO lineno and col_offset should stay as predictable means for finding the (beginning of) source text of the node. In error reporting code one could inspect the situation and compute locations suitable for this.

Alternatively, these attributes could be left for purposes mentioned in #16795 and parser developers could introduce new attributes in ast nodes which indicate both start and end positions of corresponding source. (Hopefully this would resolve also #18374 and #16806)
History
Date User Action Args
2014-04-19 06:14:02Aivar.Annamaasetrecipients: + Aivar.Annamaa, brett.cannon, georg.brandl, ncoghlan, benjamin.peterson, flox
2014-04-19 06:14:02Aivar.Annamaasetmessageid: <1397888042.42.0.58492972513.issue21295@psf.upfronthosting.co.za>
2014-04-19 06:14:02Aivar.Annamaalinkissue21295 messages
2014-04-19 06:14:01Aivar.Annamaacreate