Demur Rumed added the comment:

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

----------
nosy: +Demur Rumed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27129>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to