Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:bug': 0.04; 'unexpected': 0.07; '>>>>': 0.09; 'behavior:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'am,': 0.12; 'numpy': 0.16; 'subject:result': 0.16; 'xrange': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'work,': 0.26; 'import': 0.27; 'least': 0.30; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'header:X-Complaints-To:1': 0.34; 'but': 0.37; 'received:org': 0.37; 'subject: (': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; '31,': 0.64; 'bitten': 0.84; 'received:139': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Neal Becker Subject: Re: surprising result all (generator) (bug??) Date: Tue, 31 Jan 2012 08:24:38 -0500 References: <3ba87a5d-7092-432e-9bb8-c394fe69fe81@n12g2000yqb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: 139.85.237.19 User-Agent: KNode/4.8.0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328016289 news.xs4all.nl 6866 [2001:888:2000:d::a6]:55154 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19635 Mark Dickinson wrote: > On Jan 31, 6:40 am, Neal Becker wrote: >> I was just bitten by this unexpected behavior: >> >> In [24]: all ([i > 0 for i in xrange (10)]) >> Out[24]: False >> >> In [25]: all (i > 0 for i in xrange (10)) >> Out[25]: True > > What does: > >>>> import numpy >>>> all is numpy.all > > give you? > > -- > Mark In [31]: all is numpy.all Out[31]: True Excellent detective work, Mark! But it still is unexpected, at least to me.