Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Nick Coghlan
On 28 September 2017 at 06:23, George King wrote: > Victor, thank you for starting this conversation. Nick, I just looked at your > patch and I think it is a better solution than mine, because it does not > involve adding to or changing the sys API. I will close my pull

Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread George King
Victor, thank you for starting this conversation. Nick, I just looked at your patch and I think it is a better solution than mine, because it does not involve adding to or changing the sys API. I will close my pull request. The reason for my interest in this area is that I’m experimenting with

Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Nick Coghlan
On 27 September 2017 at 22:56, Victor Stinner wrote: > Hi, > > In bpo-29400, it was proposed to add the ability to trace not only > function calls but also instructions at the bytecode level. I like the > idea, but I don't see how to extend sys.settrace() to add a new >

Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Guido van Rossum
On Wed, Sep 27, 2017 at 8:10 AM, Serhiy Storchaka wrote: > I afraid that this change breaks an assumption in frame_setlineno() about > the state of the stack. This can corrupt the stack if you jump from the > instruction which is a part of Python operation. For example

Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Serhiy Storchaka
27.09.17 15:56, Victor Stinner пише: In bpo-29400, it was proposed to add the ability to trace not only function calls but also instructions at the bytecode level. I like the idea, but I don't see how to extend sys.settrace() to add a new "trace_instructions: bool" optional (keyword-only?)

Re: [Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Hrvoje Niksic
On 09/27/2017 02:56 PM, Victor Stinner wrote: Hi, In bpo-29400, it was proposed to add the ability to trace not only function calls but also instructions at the bytecode level. I like the idea, but I don't see how to extend sys.settrace() to add a new "trace_instructions: bool" optional

[Python-Dev] API design question: how to extend sys.settrace()?

2017-09-27 Thread Victor Stinner
Hi, In bpo-29400, it was proposed to add the ability to trace not only function calls but also instructions at the bytecode level. I like the idea, but I don't see how to extend sys.settrace() to add a new "trace_instructions: bool" optional (keyword-only?) parameter without breaking the backward