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 Demur Rumed
Recipients Demur Rumed, brett.cannon, serhiy.storchaka, vstinner
Date 2016-05-27.12:06:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464350760.95.0.236121770887.issue27129@psf.upfronthosting.co.za>
In-reply-to
Content
https://github.com/search?q=f_lasti&type=Code

Popular use of f_lasti is checking it for -1, checking the instruction at the byte offset of f_lasti, checking the argument with code[f_lasti+1] (Some bad code checking f_lasti+3 which'll break with 3.6)

abarnert discussed how bytecode should be typed to Python code. Ideally it'd be typed as a "(instruction, arg)" tuple. He considered creating a "words" type similar to "bytes" but with 16 bit values. It's a bit niche to introduce a builtin for. So if the co_code object is remaining a bytes object then it seems intuitive to keep f_lasti as a bytes offset. Clashes with jump offsets no longer being a bytes offset even in Python code tho

In reality most of the results on github all seem to be copying a few distinct uses. So maybe backwards compatibiltiy isn't so important

Other search https://searchcode.com/?q=f_lasti&loc=0&loc2=10000&src=3&src=7&src=1&lan=19 doesn't produce many results either
History
Date User Action Args
2016-05-27 12:06:01Demur Rumedsetrecipients: + Demur Rumed, brett.cannon, vstinner, serhiy.storchaka
2016-05-27 12:06:00Demur Rumedsetmessageid: <1464350760.95.0.236121770887.issue27129@psf.upfronthosting.co.za>
2016-05-27 12:06:00Demur Rumedlinkissue27129 messages
2016-05-27 12:06:00Demur Rumedcreate