At 10:15 AM 2/18/05 -0500, Raymond Hettinger wrote:
Only contains expressions are translated:
"if x in [1,2,3]"
currently turns into:
"if x in (1,2,3)"
and I'm proposing that it go one step further:
"if x in Seachset([1,2,3])"
ISTM that whenever I use a constant in-list like that, it's almost always with just a few (<4) items, so it doesn't seem worth the extra effort (especially disrupting the marshal module) just to squeeze out those extra two comparisons and replace them with a hashing operation.
_______________________________________________ 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