Diez B. Roggisch wrote:
If you really need that sort of dependent matching, there are better ways to accomplish that in python:
for m, name in [self.macro_parser, self.a_parser, self.b_parser, ...]: mo = m.match(data) if mo: break
Hi, this method looks more elegant. However I got the following error: for m, name in [self.macro_parser] ^ SyntaxError: invalid syntax
What is the valid syntax with this usage?
Thanks Sam
-- http://mail.python.org/mailman/listinfo/python-list