[issue14349] The documentation of 'dis' doesn't describe MAKE_FUNCTION correctly

Eli Bendersky report at bugs.python.org
Sat Mar 17 16:08:06 CET 2012


New submission from Eli Bendersky <eliben at gmail.com>:

The documentation of the MAKE_FUNCTION opcode in 'dis' says:

"Pushes a new function object on the stack. TOS is the code associated with the function. "

Which doesn't appear to be true. In Python/ceval.c:

[...]
        TARGET_WITH_IMPL(MAKE_CLOSURE, _make_function)
        TARGET(MAKE_FUNCTION)
        _make_function:
        {
            int posdefaults = oparg & 0xff;
            int kwdefaults = (oparg>>8) & 0xff;
            int num_annotations = (oparg >> 16) & 0x7fff;

            w = POP(); /* qualname */
            v = POP(); /* code object */
            x = PyFunction_NewWithQualName(v, f->f_globals, w);
[...]

----------
assignee: docs at python
components: Documentation
messages: 156161
nosy: docs at python, eli.bendersky, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: The documentation of 'dis' doesn't describe MAKE_FUNCTION correctly
type: behavior
versions: Python 3.3

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


More information about the Python-bugs-list mailing list