Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33478
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| 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; 'exception': 0.03; 'method.': 0.05; 'executed': 0.07; 'python': 0.09; 'loop.': 0.09; 'page?': 0.09; 'subject:module': 0.09; 'throws': 0.09; 'cc:addr :python-list': 0.10; 'times,': 0.13; 'contributes': 0.16; 'iterated': 0.16; 'wrote:': 0.17; '2.x': 0.22; 'trace': 0.22; 'cc:2**0': 0.23; 'insert': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'object,': 0.27; 'maybe': 0.29; 'figure': 0.30; 'gets': 0.32; 'anyone': 0.33; 'times.': 0.33; 'list': 0.35; 'pm,': 0.35; 'too.': 0.35; 'tool': 0.36; 'but': 0.36; 'depends': 0.36; 'method': 0.36; 'subject:: ': 0.38; 'nothing': 0.38; 'page': 0.38; 'received:192': 0.39; 'called': 0.39; 'received:192.168': 0.40; 'end': 0.40; 'range': 0.60; 'profile': 0.61; 'times': 0.63; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'special': 0.73; 'received:74.208.4.194': 0.84; 'items,': 0.91 |
| Date | Sat, 17 Nov 2012 13:37:23 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | rh <richard_hubbe11@lavabit.com> |
| Subject | Re: module trace and counts |
| References | <20121117092502.12c53a8f48072cd249108b47@lavabit.com> |
| In-Reply-To | <20121117092502.12c53a8f48072cd249108b47@lavabit.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:jjrt8JkeIlcWN/9bIT6ferA7fvPOmDM+ZiR2SCc+EBz Vc5WVv4TTYhOdbO9UROKFFmBNjH0SDW/ujBF5HfevzKiHPaVfA wApgHkAL7oYSIk+vSzgb9aEZ9z+CqQQ8auIuUgX9JFxokGr6J/ 5uTPP5j1eGZjWP1SEye6E87MmH6wGP1apraHc2Q82ZpaOzLq+3 c4Iop59BV2TiZ4ZFA3uEpKkJlsUNo+/TzvLuwimdxjTrVC68wc l9RU7UEkb4NjbrbM/4e9pPxdloAlPHtPK7ROKHpv4wjWU9HWW4 JII6xcQKppUqrqAm8RKL2dBLU+9++PW9GI+TOrk9WbKBjL+QQ= = |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.3777.1353177465.27098.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1353177465 news.xs4all.nl 6876 [2001:888:2000:d::a6]:46558 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:33478 |
Show key headers only | View raw
On 11/17/2012 12:25 PM, rh wrote: > Is it for or range that is executed 8000 times when I > for i in range(3,8000,2): Nothing is executed 8000 times. I figure it at 3998 times. Anyway, neither the for nor the range is executed multiple times. Deciphering this depends on whether this is Python 2.x or Python 3.x. If Python 2.x, range returns a list of 3998 items, and that is iterated over. If Python 3.x, range returns a range object, which has an __iter__() special method. That method gets called 3999 times, and the last time it throws an exception to end the loop. > > Maybe the for and the range contributes to that total. > > Can anyone recommend their favorite trace or profile type tool that > spits out an html page? I like trace because I don't have to insert my > program into it but would like a html page too. > -- DaveA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: module trace and counts Dave Angel <d@davea.name> - 2012-11-17 13:37 -0500
Re: module trace and counts Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-18 01:30 +0000
Re: module trace and counts Dave Angel <d@davea.name> - 2012-11-17 21:54 -0500
csiph-web