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 benjamin.peterson, georg.brandl, rhettinger, scummos, terry.reedy
Date 2010-12-25.00:34:25
SpamBayes Score 2.0487512e-08
Marked as misclassified No
Message-id <1293237266.52.0.898826142926.issue10769@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

I found the reason for this behavior in the code now, it's in Python/ast.c, lines 1745 and 1746 in ast_for_power():

        tmp->lineno = e->lineno;
        tmp->col_offset = e->col_offset;

Here, the range information for the individual attributes (which is correctly set before!) is being discarded and replaced by the useless information from the expression ast.
I don't see any reason for this, is there one? :)

Removing those two lines doesn't seem to break anything and sets ranges correctly.

Best regards,
Sven
History
Date User Action Args
2010-12-25 00:34:26scummossetrecipients: + scummos, georg.brandl, rhettinger, terry.reedy, benjamin.peterson
2010-12-25 00:34:26scummossetmessageid: <1293237266.52.0.898826142926.issue10769@psf.upfronthosting.co.za>
2010-12-25 00:34:25scummoslinkissue10769 messages
2010-12-25 00:34:25scummoscreate