Indeed, the 2.0 code is very different, and got this case right.
I'm a little surprised no one is arguing that changing this code now
could break some applications. Maybe the fact no one noticed the docs
were wrong proves that no one ever tried returning None from a local
trace function.
On 2/05/2011 9:27 PM, Ned Batchelder wrote:
...
Maybe the fact no one noticed the docs
were wrong proves that no one ever tried returning None from a local
trace function.
Or if they did, they should have complained by now. IMO, if the
behaviour regresses from how it is documented and how it
On Mon, May 2, 2011 at 10:47 PM, Mark Hammond mhamm...@skippinet.com.au wrote:
On 2/05/2011 9:27 PM, Ned Batchelder wrote:
...
Maybe the fact no one noticed the docs
were wrong proves that no one ever tried returning None from a local
trace function.
Or if they did, they should have
This week I learned something new about trace functions (how to write a
C trace function that survives a sys.settrace(sys.gettrace())
round-trip), and while writing up what I learned, I was surprised to
discover that trace functions don't behave the way I thought, or the way
the docs say they
I think you need to go back farther in time. :-) In Python 2.0 the
call_trace function in ceval.c has a completely different signature
(but the docs are the same). I haven't checked all history but
somewhere between 2.0 and 2.3, SET_LINENO-less tracing was added, and
that's where the