Message3231

Author fwierzbicki
Recipients fwierzbicki
Date 2008-06-06.16:34:35
SpamBayes Score 0.062005095
Marked as misclassified No
Message-id <1212770076.62.0.961508481215.issue1048@psf.upfronthosting.co.za>
In-reply-to
Content
So the following fails in all versions of Jython 2.2 and on:

def foo():
   try:
       pass
   finally:
      [f for f in (1,2)]

The reason this fails, is that ListComps are assigned a name in
ScopesCompiler and CodeCompiler based on a counter.  The reason this
fails is that finally blocks are inlined, and can thus be repeated
within the bytecodes.  This repetition causes the counter to increment
too many times in CodeCompiler, causing mismatches between the names
in ScopesCompiler and CodeCompiler.  What I think is necessary here is
to come up with a naming convention that doesn't involve a counter.  I
propose we use the line and column info for the ListComp node, so we
make the following change
History
Date User Action Args
2008-06-06 16:34:37fwierzbickisetspambayes_score: 0.0620051 -> 0.062005095
recipients: + fwierzbicki
2008-06-06 16:34:36fwierzbickisetspambayes_score: 0.0620051 -> 0.0620051
messageid: <1212770076.62.0.961508481215.issue1048@psf.upfronthosting.co.za>
2008-06-06 16:34:36fwierzbickilinkissue1048 messages
2008-06-06 16:34:36fwierzbickicreate