On Mon, Sep 29, 2008 at 7:12 AM, Michele Simionato
<[EMAIL PROTECTED]> wrote:
> I like Martin's proposals (use a function, remove -O) very much.

That's too bad, since I don't like it at all :-). You can write your
own function trivially that does this; however IMO the *language*
should support something that can be disabled to the point where no
code is generated for it. Most languages have this (in fact Java
*added* it). I'll concede that -O is not necessary the right flag to
pass, but I do want to be able to write asserts that can be turned
into nothing completely, and unless we were to add macros for just
this purpose, it'll have to be something recognized by the compiler,
like a statement. Most other details are negotiable (like the exact
syntax, or the flag used to disable it). However I don't like changing
the syntax so that it resembles a function call -- that's not going to
resolve the existing confusion and will add more confusion ("why can't
I write my own assert() function?").

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to