Gordon Airporte <[EMAIL PROTECTED]> writes: > I did already find that it speeds things up to pre-test a line like > > if 'bets' or 'calls' or 'raises' in line: > run the appropriate re's > > which isn't very pretty at all
Nor does it work the way you might suppose: >>> line = "foo calls" >>> if 'bets' or 'calls' or 'raises' in line: ... print "Yes" ... Yes >>> line = "spam eggs" >>> if 'bets' or 'calls' or 'raises' in line: ... print "Yes" ... Yes Hint: the expression being evaluated for the 'if' statement above is equivalent to: if (('bets') or ('calls') or ('raises' in line)): print "Yes" -- \ "An eye for an eye would make the whole world blind." -- | `\ Mahatma Gandhi | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list