You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dis module doesn't know how to disassemble generators #66146
The dis module doesn't know how to disassemble generator object because it has no idea about the gi_code attribute.
I made a (very) little patch to change this behavior.
If there is a valid reason to not let the dis module disassemble generator, I would be glad to know it.
While we have some discretion to accept "small" patches without one, a signed CLA helps assure that we have the necessary rights to incorporate and redistribute contributions worldwide.
Activity
httpsgithubcomhakril commentedon Jul 9, 2014
The
dismodule doesn't know how to disassemble generator object because it has no idea about thegi_codeattribute.I made a (very) little patch to change this behavior.
If there is a valid reason to not let the
dismodule disassemble generator, I would be glad to know it.pitrou commentedon Jul 9, 2014
That sounds like a good idea. The patch lacks a unit test, though.
httpsgithubcomhakril commentedon Jul 9, 2014
Here is a try for a better patch.
Added a unit test and updated the doc.
rhettinger commentedon Jul 10, 2014
+1
httpsgithubcomhakril commentedon Jul 14, 2014
Updated some docstrings in the new patch after the review comments.
Thanks kushou for the code review.
python-dev commentedon Jul 25, 2014
New changeset 2ae5709692ef by Nick Coghlan in branch 'default':
Issue bpo-21947: handle generator-iterator objects in dis
http://hg.python.org/cpython/rev/2ae5709692ef
ncoghlan commentedon Jul 25, 2014
Thanks for the patch Clement!
Could I also please request that you sign the Contributor License Agreement at https://www.python.org/psf/contrib/contrib-form/
While we have some discretion to accept "small" patches without one, a signed CLA helps assure that we have the necessary rights to incorporate and redistribute contributions worldwide.