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

2010-10-15 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Should be fixed in r85540.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-03 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Eli, any comment on this?

--
nosy: +eli.bendersky, tjreedy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-08-03 Thread Eli Bendersky

Eli Bendersky eli...@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 rep...@bugs.python.org
http://bugs.python.org/issue6798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2009-09-01 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

It certainly seems to be implemented this way in ceval.c. I don't know
if the docs describe the implementation intent better, but I'd say that
this is then such a minor issue that just documenting the actual
behavior is the best thing to do.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2009-08-28 Thread Robert Kern

New submission from Robert Kern robert.k...@gmail.com:

The final 'arg' argument of the sys.settrace() callback is documented to
be None for the 'c_return' and 'c_exception' events, but it appears to
be the function object itself. Additionally, the 'return' event's
argument may be None if the 'return' event is being generated because of
an exception. These errors also exist in the Py_tracefunc documentation
in the C API. The latter error is not particularly important for the
Python API, but in the C API the argument may be a NULL pointer.

I am happy to make the corrections if someone will confirm that my
analysis is correct.

--
assignee: georg.brandl
components: Documentation
messages: 92050
nosy: georg.brandl, robert.kern
severity: normal
status: open
title: Argument for sys.settrace() callbacks documented incorrectly
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com