Re: __debug__ http://stackoverflow.com/questions/15305688

2016-11-16 Thread Steven D'Aprano
On Thursday 17 November 2016 02:22, eryk sun wrote: > On Wed, Nov 16, 2016 at 8:39 AM, Steven D'Aprano > wrote: >> On Wednesday 16 November 2016 16:21, Veek M wrote: >> >>> Trying to make sense of that article. My understanding of debug was >>> simple: >>> 1. __debug__ is always True, unless -O o

Re: __debug__ http://stackoverflow.com/questions/15305688

2016-11-16 Thread eryk sun
On Wed, Nov 16, 2016 at 8:39 AM, Steven D'Aprano wrote: > On Wednesday 16 November 2016 16:21, Veek M wrote: > >> Trying to make sense of that article. My understanding of debug was >> simple: >> 1. __debug__ is always True, unless -O or -OO >> 2. 'if' is optimized out when True and the expr is in

Re: __debug__ http://stackoverflow.com/questions/15305688/conditional-debug-statement-not-executed-though-debug-is-true

2016-11-16 Thread Steven D'Aprano
On Wednesday 16 November 2016 16:21, Veek M wrote: > Trying to make sense of that article. My understanding of debug was > simple: > 1. __debug__ is always True, unless -O or -OO > 2. 'if' is optimized out when True and the expr is inlined. > > So what does he mean by: > > 1. 'If you rebind __de

Re: __debug__ http://stackoverflow.com/questions/15305688/conditional-debug-statement-not-executed-though-debug-is-true

2016-11-16 Thread dieter
Veek M writes: > Trying to make sense of that article. My understanding of debug was > simple: > 1. __debug__ is always True, unless -O or -OO > 2. 'if' is optimized out when True and the expr is inlined. > > So what does he mean by: > > 1. 'If you rebind __debug__, it can cause symptoms' > 2. '

Re: __debug__ http://stackoverflow.com/questions/15305688/conditional-debug-statement-not-executed-though-debug-is-true

2016-11-15 Thread Veek M
Veek M wrote: > Trying to make sense of that article. My understanding of debug was > simple: > 1. __debug__ is always True, unless -O or -OO > 2. 'if' is optimized out when True and the expr is inlined. > > So what does he mean by: > > 1. 'If you rebind __debug__, it can cause symptoms' > 2. 'D