Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'context': 0.07; 'subject:skip:b 10': 0.07; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'url:activestate': 0.09; 'bug': 0.12; 'language.': 0.14; 'block.': 0.16; 'lurking': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'language': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'issue,': 0.24; '---': 0.24; 'subject:/': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'url:code': 0.29; 'code': 0.31; '+0100,': 0.31; "d'aprano": 0.31; 'fans': 0.31; 'steven': 0.31; "who'd": 0.31; 'allows': 0.31; 'class': 0.32; 'run': 0.32; 'fri,': 0.33; 'there,': 0.34; 'test': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'useful': 0.36; 'thanks': 0.36; "i'll": 0.36; 'positive': 0.37; 'being': 0.38; 'manager': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'free': 0.61; 'viruses': 0.61; 'here:': 0.62; 'protection': 0.63; 'our': 0.64; 'within': 0.65; 'here': 0.66; 'antivirus': 0.68; 'forward,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: http://bugs.python.org/issue19495 timeit enhancement Date: Fri, 13 Jun 2014 09:48:32 +0100 References: <539a4967$0$29988$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-18-5-57.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <539a4967$0$29988$c3e8da3$5496439d@news.astraweb.com> X-Antivirus: avast! (VPS 140612-1, 12/06/2014), Outbound message X-Antivirus-Status: Clean 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402649332 news.xs4all.nl 2951 [2001:888:2000:d::a6]:51799 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:73256 On 13/06/2014 01:44, Steven D'Aprano wrote: > On Fri, 13 Jun 2014 00:35:43 +0100, Mark Lawrence wrote: > >> The request is for a class within timeit that allows you to test code >> inside a with block. It strikes me as being useful but there's only one >> response on the issue, albeit a positive one. If others here think this >> would be a useful addition I'll see if I can take this forward, unless >> there are any timeit fans lurking who'd like to run with it themselves. > > I have a Stopwatch() context manager which I have been using for a long > time, very successfully. There's an early version here: > > http://code.activestate.com/recipes/577896 > > I'll clean it up and submit it on the bug tracker. > I see it's there, thanks Steven :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com