This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, ncoghlan
Date 2013-11-22.19:42:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Attached is a patch exposing the old opcode_stack_effect() function to Python.  The patch does the following:

* renames opcode_stack_effect() to PyCompile_OpcodeStackEffect()
* removes the "static" modifier from PyCompile_OpcodeStackEffect()
* changes PyCompile_OpcodeStackEffect()'s behavior so it returns a magic
  value on failure
* preserves existing behavior when compiling code and encountering
  an opcode/oparg pair that results in failure
* creates a new _opcode module
* exposes PyCompile_OpcodeStackEffect() as _opcode.stack_effect()
* tests _opcode module with new
* imports _opcode.stack_effect() into opcode, exposing it publically
* documents the function in dis (there is no documentation for opcode,
  and dis imports and exposes everything in opcode)

Whew!  I think it's ready to go in.
Date User Action Args
2013-11-22 19:42:03larrysetrecipients: + larry, ncoghlan
2013-11-22 19:42:03larrysetmessageid: <>
2013-11-22 19:42:03larrylinkissue19722 messages
2013-11-22 19:42:03larrycreate