ped*_*uiz 0 python syntax-error
试图执行某人的代码,得到语法错误.不知道为什么:(
def GetParsers( self, systags ):
childparsers = reduce( lambda a,b : a+b, [[]] + [ plugin.GetParsers( systags ) for plugin in self.plugins ] )
parsers = [ p for plist in [ self.parsers[t] for t in systags if self.parsers.has_key(t) ] for p in plist ]
return reduce( lambda a,b : ( a+[b] if not b in a else a ), [[]] + parsers + childparsers )
Run Code Online (Sandbox Code Playgroud)
错误是
File "base.py", line 100
return reduce( lambda a,b : ( a+[b] if not b in a else a ), [[]] + parsers + childparsers )
Run Code Online (Sandbox Code Playgroud)
Python版本
Python 2.2.3 (#1, May 1 2006, 12:33:49)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-54)] on linux2
^
Run Code Online (Sandbox Code Playgroud)