sam <[EMAIL PROTECTED]> wrote: >Hi, > >I got the the following syntax error in comparison: > File "/usr/local/work/myparser.py", line 85 > if ( (m=self.macro_parser.match (d)) != None ): > ^ >SyntaxError: invalid syntax > >How can I get around wtih this? I don't want to break down this >comparison in two steps.
Sorry, you have to. Assignment statements are not expressions in Python. m = self.macro_parser.match(d) if m: xxx You know the outer parentheses are not necessary, right? -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list