Tuomas wrote: > Georg Brandl wrote: >> Some people think that all occurences of map() must be replaced >> by list comprehensions. The designer of pylint seems to be >> one of those. > > So it seems, but why?
See Fredrik's post. There's no error in the expression with map(), it's just less effective than a LC, but only if used with a lambda. > Formally spoken we ase "using variable 'x' before > assigment" in the comprehension too. That's another issue. I'd suggest a bug in pylint. (You probably have a variable called "x" later in the file. My version of pylint (0.12.1) doesn't show this "error". Georg -- http://mail.python.org/mailman/listinfo/python-list