Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19631

surprising result all (generator) (bug??)

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:bug': 0.04; 'unexpected': 0.07; 'behavior:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:result': 0.16; 'xrange': 0.16; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.33; 'header:X-Complaints-To:1': 0.34; 'received:org': 0.37; 'subject: (': 0.39; 'to:addr:python.org': 0.40; 'bitten': 0.84; 'received:139': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Neal Becker <ndbecker2@gmail.com>
Subject surprising result all (generator) (bug??)
Date Tue, 31 Jan 2012 07:40:02 -0500
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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5237.1328013618.27778.python-list@python.org> (permalink)
Lines 8
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328013618 news.xs4all.nl 6965 [2001:888:2000:d::a6]:46642
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19631

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

surprising result all (generator) (bug??) Neal Becker <ndbecker2@gmail.com> - 2012-01-31 07:40 -0500
  Re: surprising result all (generator) (bug??) Mark Dickinson <mdickinson@enthought.com> - 2012-01-31 04:44 -0800
    Re: surprising result all (generator) (bug??) Neal Becker <ndbecker2@gmail.com> - 2012-01-31 08:24 -0500
      Re: surprising result all (generator) (bug??) Mark Dickinson <mdickinson@enthought.com> - 2012-01-31 06:25 -0800

csiph-web