[Python-Dev] Re: [Python-checkins] python/dist/src/Python compile.c, 2.319, 2.320

Andrew MacIntyre andymac at bullseye.apana.org.au
Fri Aug 20 00:17:38 CEST 2004


On Thu, 19 Aug 2004, Tim Peters wrote:

> It *used* to apply, and for a similar reason, when -O also controlled
> whether SET_LINENO opcodes were generated, and the Python debugger was
> blind without them.  That's no longer the case.  The only reason to
> avoid -O now is to retain
>
>     if __debug__:
>
> blocks and (same thing) assert statements.  That can make a big speed
> difference in Zope and ZEO, for example.  Life would definitely be
> worse if -O could introduce new bugs (other than programmer errors of
> putting essential code inside __debug__ blocks).

Seems to me that in this context -O would be more appropriately renamed to
-D to reflect the debug relationship...

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen  ACT  2616
Web:    http://www.andymac.org/               |        Australia


More information about the Python-Dev mailing list