Re: Using map()

2014-11-16 Thread Ian Kelly
On Sun, Nov 16, 2014 at 4:22 PM, Terry Reedy wrote: > If pylint sees 'map(lambda ...: ', it would be appropriate to suggest using > a comprehension or generator expression instead. This avoids the unneeded > creation and repeated call of a new function. There's actually a separate warning for th

Re: Using map()

2014-11-16 Thread Dan Stromberg
On Sun, Nov 16, 2014 at 4:09 PM, Steven D'Aprano wrote: > Pavel Volkov wrote: > >> I checked my modules with pylint and saw the following warning: >> >> W: 25,29: Used builtin function 'map' (bad-builtin) >> >> Why is the use of map() discouraged? >> It' such a useful thing. > > That's a bug in py

Re: Using map()

2014-11-16 Thread Chris Angelico
On Mon, Nov 17, 2014 at 11:24 AM, Ned Batchelder wrote: > Pylint isn't useful until you've tailored the messages. Personally, I avoid > map, but your usage may vary. The pylint message that always irked me was: > > W0142: Used * or ** magic This is why I don't bother with linters at all. Th

Re: Using map()

2014-11-16 Thread Ned Batchelder
On 11/16/14 7:09 PM, Steven D'Aprano wrote: Pavel Volkov wrote: I checked my modules with pylint and saw the following warning: W: 25,29: Used builtin function 'map' (bad-builtin) Why is the use of map() discouraged? It' such a useful thing. That's a bug in pylint. It's not a bad builtin, i

Re: Using map()

2014-11-16 Thread Steven D'Aprano
Pavel Volkov wrote: > I checked my modules with pylint and saw the following warning: > > W: 25,29: Used builtin function 'map' (bad-builtin) > > Why is the use of map() discouraged? > It' such a useful thing. That's a bug in pylint. It's not a bad builtin, it is perfectly fine. Some people do

Re: Using map()

2014-11-16 Thread Terry Reedy
On 11/16/2014 8:01 AM, Pavel Volkov wrote: I checked my modules with pylint and saw the following warning: W: 25,29: Used builtin function 'map' (bad-builtin) Why is the use of map() discouraged? It' such a useful thing. I consider that to be a bug in pylint. It misstates a careless 'bad' o

RE: Using map()

2014-11-16 Thread Joseph L. Casale
> I checked my modules with pylint and saw the following warning: > > W: 25,29: Used builtin function 'map' (bad-builtin) > > Why is the use of map() discouraged? > It' such a useful thing. The warning manifests from the opinion that a comprehension is more suitable. You can disable the warning or

Re: Using map()

2014-11-16 Thread Joel Goldstick
On Sun, Nov 16, 2014 at 8:01 AM, Pavel Volkov wrote: > I checked my modules with pylint and saw the following warning: > > W: 25,29: Used builtin function 'map' (bad-builtin) > > Why is the use of map() discouraged? > It' such a useful thing. > -- > https://mail.python.org/mailman/listinfo/python-