New submission from Eli Bendersky <[email protected]>:
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@python
components: Documentation
messages: 156161
nosy: docs@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 <[email protected]>
<http://bugs.python.org/issue14349>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com