Should fix bugz0r with OptionList.tokenize.

This commit is contained in:
Jeremy Fincher 2004-02-17 05:14:57 +00:00
parent 465e12e14e
commit bef64f2b21
1 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,9 @@ class OptionList(object):
elif token == ')':
if len(ret) > 1:
if '|' in ret:
L = map(''.join,utils.itersplit(lambda x: x=='|', ret))
L = map(''.join,
utils.itersplit('|'.__eq__, ret,
yieldEmpty=True))
return random.choice(L)
else:
return ''.join(ret)