pylint: What's wrong with the builtin map()
Georg Brandl
g.brandl-nospam at gmx.net
Sun Oct 22 14:08:00 EDT 2006
Tuomas wrote:
> #!/usr/bin/python
> """test pydev_0.9.3/../pylint"""
> __revision__ = "test_mod 0.1 by TV 06/10/22"
>
> lst = ['aaa', ' bbb', '\tccc\n']
> lst = map(lambda x: x.strip(), lst)
>
> result = """
> No config file found, using default configuration
> ************* Module test_mod
> W: 6: Used builtin function 'map'
> E: 6: Using variable 'x' before assigment
Some people think that all occurences of map() must be replaced
by list comprehensions. The designer of pylint seems to be
one of those.
Georg
More information about the Python-list
mailing list