A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20150125/64d60caf/attachment.html below:

<div dir="ltr">How do I disassemble a generated comprehension?<div><br></div><div>For example, I am trying to debug the following:</div><div><br></div><div><div>>>> dis.dis('{**{} for x in [{1:2}]}')</div><div>  1 Â  Â  Â  Â  Â  0 LOAD_CONST Â  Â  Â  Â  Â  Â  Â  0 (<code object <dictcomp> at 0x10160b7c0, file "<dis>", line 1>)</div><div>  Â  Â  Â  Â  Â  Â  3 LOAD_CONST Â  Â  Â  Â  Â  Â  Â  1 ('<dictcomp>')</div><div>  Â  Â  Â  Â  Â  Â  6 MAKE_FUNCTION Â  Â  Â  Â  Â  Â 0</div><div>  Â  Â  Â  Â  Â  Â  9 LOAD_CONST Â  Â  Â  Â  Â  Â  Â  2 (2)</div><div>  Â  Â  Â  Â  Â  Â 12 LOAD_CONST Â  Â  Â  Â  Â  Â  Â  3 (1)</div><div>  Â  Â  Â  Â  Â  Â 15 BUILD_MAP Â  Â  Â  Â  Â  Â  Â  Â 1</div><div>  Â  Â  Â  Â  Â  Â 18 BUILD_LIST Â  Â  Â  Â  Â  Â  Â  1</div><div>  Â  Â  Â  Â  Â  Â 21 GET_ITER</div><div>  Â  Â  Â  Â  Â  Â 22 CALL_FUNCTION Â  Â  Â  Â  Â  Â 1 (1 positional, 0 keyword pair)</div><div>  Â  Â  Â  Â  Â  Â 25 RETURN_VALUE</div></div><div><br></div><div>(This requires the new patch in issue 2292.)</div><div><br></div><div>The code here looks fine to me, so I need to look into the code object <dictcomp>.  How do I do that?</div><div><br></div><div>Thanks,</div><div><br></div><div>Neil</div></div>

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