Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:not': 0.03; 'broken': 0.04; '-tkc': 0.16; 'broken.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'hits.': 0.16; 'iterator': 0.16; 'roy': 0.16; 'storing': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'proposed': 0.22; 'tend': 0.24; '(see': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'subject:that': 0.31; 'yields': 0.31; "i'd": 0.34; 'agree': 0.35; 'case,': 0.35; 'charset:us-ascii': 0.36; 'subject:?': 0.36; 'should': 0.36; 'behind': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'smith': 0.68; 'received:50.22': 0.84; 'scenes': 0.84; 'subject:Test': 0.84; 'subject:very': 0.91 Date: Thu, 7 Aug 2014 12:37:41 -0500 From: Tim Chase To: python-list@python.org Subject: Re: Test for an empty directory that could be very large if it is not empty? In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com 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: 1407433146 news.xs4all.nl 2919 [2001:888:2000:d::a6]:45778 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75855 On 2014-08-07 08:19, Roy Smith wrote: > > My glob.iglob() uses os.listdir() behind the scenes (see glob1() > > in glob.py) > > > > -tkc > > In which case, the documentation for iglob() is broken. It says: > > "Return an iterator which yields the same values as glob() without > actually storing them all simultaneously." I'd tend to agree that iglob() is broken and should use the proposed .scandir() instead for exactly those reasons. Unfortunately, it seems that it might not get back-ported until .scandir() hits. -tkc