Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80945
| References | <mailman.15896.1416169228.18130.python-list@python.org> <54693cc4$0$13000$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2014-11-16 17:31 -0800 |
| Subject | Re: Using map() |
| From | Dan Stromberg <drsalists@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15934.1416187894.18130.python-list@python.org> (permalink) |
On Sun, Nov 16, 2014 at 4:09 PM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> 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, it is perfectly fine. > > Some people don't like map. Pay no attention to them. I actually avoid map. map works as intended; there's nothing particularly wrong with it. In fact I believe it's pretty important in lisp, but it's a rather glaring example of TMTOWTDI in Python. BTW, I believe in Python 2.x map is like a list comprehension, but in 3.x map is like a generator expression.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using map() Pavel Volkov <sailor@lists.xtsubasa.org> - 2014-11-16 16:01 +0300
Re: Using map() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-17 11:09 +1100
Re: Using map() Ned Batchelder <ned@nedbatchelder.com> - 2014-11-16 19:24 -0500
Re: Using map() Chris Angelico <rosuav@gmail.com> - 2014-11-17 12:08 +1100
Messages from code analysis tools (was: Using map()) Ben Finney <ben+python@benfinney.id.au> - 2014-11-17 12:21 +1100
Re: Using map() Dan Stromberg <drsalists@gmail.com> - 2014-11-16 17:31 -0800
Re: Messages from code analysis tools (was: Using map()) Chris Angelico <rosuav@gmail.com> - 2014-11-17 12:36 +1100
Re: Messages from code analysis tools Ned Batchelder <ned@nedbatchelder.com> - 2014-11-16 20:49 -0500
csiph-web