gh-123165: correct tests for dis.dis(func, show_positions=True)#123220
gh-123165: correct tests for dis.dis(func, show_positions=True)#123220iritkatriel merged 2 commits intopython:mainfrom
dis.dis(func, show_positions=True)#123220Conversation
The same way that dis tests '--' for line numbers should work. It inputs python code that gets compiled into something that needs '--'. |
Mmh, yes it was dumb of me. I'll try this approach now. |
|
The tests are a bit longer (in length) but at least I don't need some magical construction that I would forget about tomorrow :D Thank you all for the tips. |
Mark suggested simplifying the faking of positions information via
astmanipulation so here it is.cc @iritkatriel @markshannon
show_positionskeyword argument todis.disand related functions #123165