<br><br><div class="gmail_quote">On Fri, Aug 14, 2009 at 09:16, Benjamin Peterson <span dir="ltr"><<a href="mailto:benjamin@python.org">benjamin@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/8/14 Frank Wierzbicki <<a href="mailto:fwierzbicki@gmail.com">fwierzbicki@gmail.com</a>>:<br>
<div class="im">> Hi all,<br>
><br>
> Off and on I have been directly comparing Jython's AST with Python's<br>
> AST and generally working towards making them as close to identical as<br>
> possible. There are a couple of places where I haven't "fixed" Jython<br>
> because it looks to me like Jython has slightly better offsets. One<br>
> example:<br>
><br>
> for a,b in c:<br>
> pass<br>
><br>
> The Tuple node "a,b" ends up with a col_offset of 0 (the position of<br>
> the "for") where Jython has the col_offset as 4 (the position of "a").<br>
> Jython's result is more consistent with other Tuple node col_offset<br>
> results.<br>
><br>
> I have a local patch that changes the CPython col_offset to match<br>
> Jython's, but before I submit a patch I thought I'd ask here if there<br>
> is support for this sort of change and if I should continue to find<br>
> col_offset and lineno results that look fishy to me, or should I just<br>
> change Jython's results to match (one way or another, things will be<br>
> much easier for me to test if they match).<br>
<br>
</div>Yes, please submit it.<br>
<div class="im"><br>
><br>
> Also, would this be a change that would be considered a backwards<br>
> incompatibility? In other words, would patches like this be allowed<br>
> in 2.6/3.1 or only in 2.7/3.2.<br>
<br>
</div>While I don't see a problem in backporting it to maintence branches, I<br>
would personally only apply it to the current development branches. It<br>
doesn't seem to fix a "bug", just make a nice improvement.</blockquote><div><br></div><div>I like the improvement, but I disagree it should be considered for backporting as it changes semantics for something that could be considered a bug, but that feels like a stretch.</div>
<div><br></div><div>-Brett </div></div>