On 3/12/2011 12:39 AM, Eugene Toder wrote:
>  You've got wishful thinking if you think a handful of tests can catch
>  errors in code that sophisticated.
Why limit yourself with a handful of tests? Python is widespread,
there's*a lot*  of code in Python. Unlike with libraries, any code you
run tests the optimizer, so just run a lot of code. And, as I've said,
write a test generator.

As we're thinking about what the optimizer of the future should be, it would be great to have a way to turn it off completely. This would allow the tests to run test code both with and without the optimizer, and to verify that the two results were the same. Then we could automatically verify that the optimizer isn't changing semantics.

BTW: I also believe it would be very useful to make the turn-off-the-optimizer switch available for users so they can run their code unoptimized for times when they are more interested in program analysis than in execution speed. See http://bugs.python.org/issue2506 (closed 3 years ago) that I filed with this request.

--Ned.
_______________________________________________
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