Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5963
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <crebert@ucsd.edu> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.032 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; '21,': 0.09; 'loop.': 0.09; 'pm,': 0.10; '>>>': 0.12; 'wrote:': 0.14; '1024': 0.16; 'rebert': 0.16; 'received:209.85.213.174': 0.16; 'received:mail- yx0-f174.google.com': 0.16; 'cc:addr:python-list': 0.17; 'meant': 0.18; 'cheers,': 0.19; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'message-id:@mail.gmail.com': 0.28; 'sat,': 0.29; 'cc:addr:python.org': 0.30; '"why': 0.30; 'rather': 0.34; 'question': 0.34; 'chris': 0.34; 'there': 0.35; 'explicit': 0.35; 'received:132': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'assuming': 0.37; 'received:209.85.213': 0.37; 'but': 0.38; 'subject:: ': 0.38; 'case,': 0.39; 'should': 0.39; 'received:209': 0.39; 'more': 0.60; 'your': 0.60; '10.': 0.65; 'believe': 0.66; 'cause': 0.67; '11,': 0.68; 'mere': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=simple/simple; d=ucsd.edu; i=crebert@ucsd.edu; q=dns/txt; s=041709-iport; t=1306047358; x=1337583358; h=mime-version:in-reply-to:references:date:message-id: subject:from:to:cc; z=MIME-Version:=201.0|In-Reply-To:=20<iraam0$dfi$1@dont-em ail.me>|References:=20<ira8ti$6no$1@dont-email.me>=0D=0A =09<mailman.1903.1306045726.9059.python-list@python.org> =0D=0A=09<iraam0$dfi$1@dont-email.me>|Date:=20Sat,=2021 =20May=202011=2023:55:46=20-0700|Message-ID:=20<BANLkTi =3DqYQj7MXPks_FPTLhfL4YFEKdsCg@mail.gmail.com>|Subject: =20Re:=20count=20strangeness|From:=20Chris=20Rebert=20<cr ebert@ucsd.edu>|To:=20James=20Stroud=20<jstroud@mbi.ucla. edu>|Cc:=20python-list@python.org; bh=1Jmqr3+5Z60eTOyQIBpSNMRIzUG2zEy9zcBiL68c1TI=; b=qAvb0L6sVXu/Zogfm/dQ3HL3zEHVtfL6q6POMq+b6DAHp3SmQI+R7z4q 9lpxhDLl/+pOklRPC7EUdwaBLDmgNcjJXNLPeVpFViuSuE0sLpTFMF1ZS sLekDb9P76a5La/+ikL1zhXedCaee5X9WJ6h3Y9AkUrduG8u+edgCIhI5 c=; |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | Ao0FADuy2E2E7/kU/2dsb2JhbACEXKE8CHioRYtfhkuIdIErg2eBBwSGUIlBhCGGZDuDAFU |
| X-IronPort-AV | E=Sophos;i="4.65,251,1304319600"; d="scan'208";a="522384596" |
| X-Spam-Status | No |
| X-Spam-Level | |
| MIME-Version | 1.0 |
| In-Reply-To | <iraam0$dfi$1@dont-email.me> |
| References | <ira8ti$6no$1@dont-email.me> <mailman.1903.1306045726.9059.python-list@python.org> <iraam0$dfi$1@dont-email.me> |
| Date | Sat, 21 May 2011 23:55:46 -0700 |
| Subject | Re: count strangeness |
| From | Chris Rebert <crebert@ucsd.edu> |
| To | James Stroud <jstroud@mbi.ucla.edu> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | python-list@python.org |
| 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.1907.1306047359.9059.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1306047359 news.xs4all.nl 49041 [::ffff:82.94.164.166]:56591 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:5963 |
Show key headers only | View raw
On Sat, May 21, 2011 at 11:32 PM, James Stroud <jstroud@mbi.ucla.edu> wrote:
> Chris Rebert wrote:
>>>
>>> WTF?
>>
>> Assuming your question is "Why is 1024 there twice?", the answer is
>
> The question is "Why is 1024 there at all?" It should be 10.
Ah. This is why it's better to be more explicit about what your
question is than a mere "WTF?".
In that case, I believe you meant to write:
count += c.doit()
rather than:
count += c.doit(count)
Recall that count is continually increasing as you go through your loop.
Although you'll then get 11, not 10, but the cause of that is obvious
(`count += 1`).
Cheers,
Chris
--
http://rebertia.com
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-21 23:02 -0700
Re: count strangeness Chris Rebert <crebert@ucsd.edu> - 2011-05-21 23:27 -0700
Re: count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-21 23:32 -0700
Re: count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-21 23:39 -0700
Re: count strangeness Chris Rebert <crebert@ucsd.edu> - 2011-05-21 23:55 -0700
Re: count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-22 00:03 -0700
Re: count strangeness Peter Otten <__peter__@web.de> - 2011-05-22 08:31 +0200
Re: count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-21 23:34 -0700
Re: count strangeness Peter Otten <__peter__@web.de> - 2011-05-22 09:13 +0200
Re: count strangeness James Stroud <jstroud@mbi.ucla.edu> - 2011-05-21 23:56 -0700
Re: count strangeness Roy Smith <roy@panix.com> - 2011-05-22 09:36 -0400
csiph-web