[issue6690] BUILD_SET followed by COMPARE_OP (in) can be optimized if all items are consts
Antoine Pitrou
report at bugs.python.org
Fri Jan 15 23:41:45 CET 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
No, you can't rely on the repr of a frozenset with multiple items. You should find another way of testing (if you are brave you could match the "frozenset(...)" with a regex and eval() it).
Some comments on the patch:
- there's a line or two in peephole.c which seems to use spaces for indentation; please always use tabs (for this file anyway)
- instead of `self.assertTrue(X in Y)`, you can use `self.assertIn(X, Y)` (and `self.assertNotIn(X, Y)` for the negation)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6690>
_______________________________________
More information about the Python-bugs-list
mailing list