This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients LambertDW, docs@python, eli.bendersky, fdrake, rhettinger, rurpy, terry.reedy
Date 2010-09-13.17:23:49
SpamBayes Score 4.5095987e-08
Marked as misclassified No
Message-id <1284398631.92.0.455482343294.issue1397474@psf.upfronthosting.co.za>
In-reply-to
Content
Terry,

I'm attaching a patch for 2.7, however it's more proof-of-concept than final, because I have a few comments. The patch generally implements your documentation suggestion without the `import *` warning and without adding the final example. The latter for a couple of reasons:

1) My tests show that passing the callable instead of the string 'test()' actually takes longer to run.

2) When the callable is passed, the setup of importing 'test' from '__main__' is necessary, because the timed code doesn't have to lookup the 'test' symbol. If you want to leave that example in, the setup string can be ditched.

Let me know your thoughts and I will update the patch.
History
Date User Action Args
2010-09-13 17:23:52eli.benderskysetrecipients: + eli.bendersky, fdrake, rhettinger, terry.reedy, rurpy, LambertDW, docs@python
2010-09-13 17:23:51eli.benderskysetmessageid: <1284398631.92.0.455482343294.issue1397474@psf.upfronthosting.co.za>
2010-09-13 17:23:50eli.benderskylinkissue1397474 messages
2010-09-13 17:23:50eli.benderskycreate