[docs] [issue25836] Documentation of MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

Russell Keith-Magee report at bugs.python.org
Thu Dec 17 20:42:27 EST 2015


Russell Keith-Magee added the comment:

It turns out I wasn't completely correct. As per my second point, the interpretation of annotations needs be clarified, but my first point about default_args including the annotation count is incorrect. 

My error was made because of the documentation for EXTENDED_ARG. The current text implies that you need to combine the argument value of the EXTENDED_ARG opcode with the argument value for the previous opcode. However if you're using dis.Bytecode() to extract bytecodes, that composition is done for you - you can effectively ignore the EXTENDED_ARG opcode.

----------
title: Documentation of MAKE_FUNCTION is still incorrect -> Documentation of MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25836>
_______________________________________


More information about the docs mailing list