[Python-3000] __debug__

Guido van Rossum guido at python.org
Fri Jun 1 01:50:29 CEST 2007


Making __debug__ another keyword atom sounds great to me.

On 6/1/07, Thomas Heller <theller at ctypes.org> wrote:
> Brett Cannon schrieb:
> > On 5/31/07, Georg Brandl <g.brandl at gmx.net> wrote:
> >>
> >> Guido just fixed a case in the py3k branch where you could assign to
> >> "None" in a function call.
> >>
> >> __debug__ has similar problems: it can't be assigned to normally, but via
> >> keyword arguments it is possible.
> >>
> >> This should be fixed; or should __debug__ be thrown out anyway?
> >
> >
> >
> > I never use the flag, personally.  When I am debugging I have an
> > app-specific flag I set.  I am +1 on ditching it.
> >
> > -Brett
> >
> >
>
> I would very much wish that __debug__ stays, because I use it it nearly every larger
> program that I later wish to freeze and distribute.
>
> "if __debug__: ..." blocks have the advantage that *no* bytecode is generated
> when run or frozen with -O or -OO, so the modules imported in these blocks
> are not pulled in by modulefinder.  You cannot get this effect (AFAIK) with
> app-specific flags.
>
> Thanks,
> Thomas
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list