On Sat, 16 Nov 2013 17:34:15 +0200
Maciej Fijalkowski <fij...@gmail.com> wrote:
> On Sat, Nov 16, 2013 at 5:33 PM, Maciej Fijalkowski <fij...@gmail.com> wrote:
> > On Sat, Nov 16, 2013 at 5:09 PM, Nick Coghlan <ncogh...@gmail.com> wrote:
> >> On 16 November 2013 23:17, Maciej Fijalkowski <fij...@gmail.com> wrote:
> >>> On Sat, Nov 16, 2013 at 3:51 AM, Terry Reedy <tjre...@udel.edu> wrote:
> >>>> If user input can trigger an assert, then the code should raise a normal
> >>>> exception that will not disappear with -OO.
> >>>
> >>> May I assert that -OO should instead be killed?
> >>
> >> "I don't care about embedded devices" is not a good rationale for
> >> killing features that really only benefit people running Python on
> >> such systems.
> >>
> >> Cheers,
> >> Nick.
> >
> > Can I see some writeup how -OO benefit embedded devices?
> 
> Or more importantly, how removing assert does. And how not naming it
> --remove-asserts would not help (people really have an opinion it
> would optimize their code)

I agree that conflating the two doesn't help the discussion.
While removing docstrings may be beneficial on memory-constrained
devices, I can't remember a single situation where I've wanted to
remove asserts on a production system.

(I also tend to write less and less asserts in production code, since
all of them tend to go in unit tests instead, with the help of e.g.
mock objects)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to