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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, georg.brandl, gotgenes, ncoghlan, nir1408, nnorwitz, orivej
Date 2008-01-29.21:48:26
SpamBayes Score 0.008054911
Marked as misclassified No
Message-id <1201643311.71.0.882665505575.issue1750076@psf.upfronthosting.co.za>
In-reply-to
Content
Here is an attempt to correct the problem, with unit tests.

I removed half of the trick marked by a "XXX(nnorwitz)", by adding an
attribute to "struct instr" (this attribute is a bitfield and does not
increase the memory usage). FOR_ITER is no more special-cased in
assemble_lnotab.
Note that the attribute is not always set: only when the target block
has already been filled with instructions. Hopefully this is the case
for the beginning of loops (while & for).

Then the second part of the trick (c->u->u_lineno_set = false, already
used in compiler_for) can be applied to compiler_while. Don't know how
to write this better.

Nir's examples now correctly generate the 3 offsets, and the unit test
checks that a "line" event is repeatedly emitted for the "while" condition.
History
Date User Action Args
2008-01-29 21:48:32amaury.forgeotdarcsetspambayes_score: 0.00805491 -> 0.008054911
recipients: + amaury.forgeotdarc, nnorwitz, georg.brandl, ncoghlan, gotgenes, nir1408, orivej
2008-01-29 21:48:31amaury.forgeotdarcsetspambayes_score: 0.00805491 -> 0.00805491
messageid: <1201643311.71.0.882665505575.issue1750076@psf.upfronthosting.co.za>
2008-01-29 21:48:27amaury.forgeotdarclinkissue1750076 messages
2008-01-29 21:48:26amaury.forgeotdarccreate