Re: Zero runtime impact tracing

2016-07-30 Thread Steven D'Aprano
On Sat, 30 Jul 2016 06:32 pm, Johannes Bauer wrote: > Hi group, > > I'm using CPython 3.5.1. Currently I'm writing some delicate code that > is doing the right thing in 99% of the cases and screws up on the other > 1%. > > I would like to have tracing in some very inner loops: > > if self._debu

Re: Zero runtime impact tracing

2016-07-30 Thread Ned Batchelder
On Saturday, July 30, 2016 at 4:32:25 AM UTC-4, Johannes Bauer wrote: > Hi group, > > I'm using CPython 3.5.1. Currently I'm writing some delicate code that > is doing the right thing in 99% of the cases and screws up on the other 1%. > > I would like to have tracing in some very inner loops: >

Zero runtime impact tracing

2016-07-30 Thread Johannes Bauer
Hi group, I'm using CPython 3.5.1. Currently I'm writing some delicate code that is doing the right thing in 99% of the cases and screws up on the other 1%. I would like to have tracing in some very inner loops: if self._debug: print("Offset %d foo bar" % (self._offset)) However, this incurs