Author larry
Recipients larry, ncoghlan
Date 2013-11-22.19:42:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za>
In-reply-to
Content
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 test__opcode.py
* 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.
History
Date User Action Args
2013-11-22 19:42:03larrysetrecipients: + larry, ncoghlan
2013-11-22 19:42:03larrysetmessageid: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za>
2013-11-22 19:42:03larrylinkissue19722 messages
2013-11-22 19:42:03larrycreate