[issue6798] Argument for sys.settrace() callbacks documented incorrectly

Eli Bendersky report at bugs.python.org
Wed Aug 4 05:36:15 CEST 2010


Eli Bendersky <eliben at gmail.com> added the comment:

I can confirm Robert's findings. 

1) The documentation of C_RETURN and C_EXCEPTION indeed says None while the function object is passed. This is seen in the implementation of the C_TRACE macro in Python/ceval.c

2) The arg of RETURN can be indeed NULL when caused by an exception. This is seen in the PyEval_EvalFrameEx function of Python/ceval.c right after the 'fast_yield' label.

3) The C/API documentation of Py_tracefunc shares the same errors with sys.settrace

As Georg said, the docs should be fixed to reflect the correct behavior.

----------

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


More information about the Python-bugs-list mailing list