[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts

Dave Malcolm report at bugs.python.org
Sat Jan 16 01:13:39 CET 2010


Dave Malcolm <dmalcolm at redhat.com> added the comment:

Thanks for the suggestions.

Attached is a revised version of the patch. 
  - I believe I've fixed all tab/space issues in this version of the patch, though I may have missed some (http://www.python.org/dev/tools/ doesn't recommend an automated way of checking this).
  - I've rewritten the selftests as you suggested, using re and eval
  - I've rewritten the new selftests to use assertIn, assertNotIn

The existing tests don't use assertIn/assertNotIn; I'm working on a patch for that, but I'll file that as a separate bug.

----------
Added file: http://bugs.python.org/file15900/optimize-BUILD_SET-v4.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6690>
_______________________________________


More information about the Python-bugs-list mailing list