Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'builtin': 0.09; 'pavel': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'repeated': 0.09; 'subject:()': 0.09; 'bug': 0.12; 'jan': 0.12; 'suggest': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sees': 0.16; 'unneeded': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'instead.': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'checked': 0.32; 'useful': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'expression': 0.60; 'new': 0.61; 'such': 0.63; 'saw': 0.77; 'avoids': 0.84; 'careless': 0.84; 'fact.': 0.84; 'received:fios.verizon.net': 0.84; 'subject:Using': 0.84; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Using map() Date: Sun, 16 Nov 2014 18:22:09 -0500 References: <3b3e245f-c377-4543-b9eb-186e5087103a@lists.xtsubasa.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-108-16-203-145.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <3b3e245f-c377-4543-b9eb-186e5087103a@lists.xtsubasa.org> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416180154 news.xs4all.nl 2937 [2001:888:2000:d::a6]:51590 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80930 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' opinion as a fact. 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. If it sees 'map(,', I think it should say nothing. -- Terry Jan Reedy