On Mon, 7 May 2018 at 06:28 Serhiy Storchaka <[email protected]> wrote:
> 07.05.18 12:58, Eloi Gaudry пише: > > I didn't mean to replace the current (debug) assert but I wanted to add > > another one that would allow to be switch on or off on production builds. > > > > The need for a new keyword (not syntax) comes from this difference. > > > > > > I cannot think of another example that would convince you of the > > benefit of having a specific keyword for such a runtime assert. I do > > believe that having such a feature in non-debug build is more than > > interesting but indeed needed. > > I just don't understand why you need a new keyword for writing runtime > checks. > My question is how is this different to running with -O which leaves the assert statement out of the bytecode and so you avoid any run-time cost of the statement entirely?
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
