On Sun, Nov 17, 2013 at 9:02 PM, Barry Warsaw <ba...@python.org> wrote: > On Nov 17, 2013, at 05:14 PM, Victor Stinner wrote: > >>2013/11/16 Maciej Fijalkowski <fij...@gmail.com>: >>> Can I see some writeup how -OO benefit embedded devices? >> >>You get smaller .pyc files. In an embedded device, the whole OS may be >>written in a small memory, something like 64 MB or smaller. Removing >>doctrings help to fit in 64 MB. > > I'm in support of separate flags for stripping docstrings and asserts. I'd > even be fine with eliminating a flag to strip docstrings if we had a > post-processing tool that you could apply to pyc files to strip out the > docstrings. Another problem that I had while addressing these options in > Debian was the use of .pyo for both -O and -OO level. > > -Barry > _______________________________________________ > 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/fijall%40gmail.com
My problem with -O and -OO is that their arguments are very circular. Indeed, I understand the need why you would want in certain and limited cases to remove both docstrings and asserts. So some options for doing so are ok. But a lot of arguments I see are along the lines of "don't use asserts because -O removes them". If the option was named --remove-asserts, noone would care, but people care since -O is documented as "do optimizations" and people *assume* this is what it does (makes code faster) and as unintended consequence removes asserts. Cheers, fijal _______________________________________________ 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