How do I disassemble a generated comprehension? For example, I am trying to debug the following: >>> dis.dis('{**{} for x in [{1:2}]}') 1 0 LOAD_CONST 0 (<code object <dictcomp> at 0x10160b7c0, file "<dis>", line 1>) 3 LOAD_CONST 1 ('<dictcomp>') 6 MAKE_FUNCTION 0 9 LOAD_CONST 2 (2) 12 LOAD_CONST 3 (1) 15 BUILD_MAP 1 18 BUILD_LIST 1 21 GET_ITER 22 CALL_FUNCTION 1 (1 positional, 0 keyword pair) 25 RETURN_VALUE (This requires the new patch in issue 2292.) The code here looks fine to me, so I need to look into the code object <dictcomp>. How do I do that? Thanks, Neil -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150125/64d60caf/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4