Bugs item #1397474, was opened at 2006-01-05 04:50 Message generated for change (Settings changed) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1397474&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Submitted By: rurpy (rurpy) >Assigned to: Fred L. Drake, Jr. (fdrake) Summary: timeit execution enviroment Initial Comment: library reference manual, section 10.10 The documentation for the timeit module does not make clear exactly what enviroment the timed code will be run in, particularly when a function in the current program is being timed (as opposed to an external program.) This information is available in the examples section but examples should illustrate already described behavior, not present new information. I think the following text should be appended below the third paragraph in the "class Timer" section which reads: To measure the execution time of the first statement, use the timeit() method. The repeat() method is a convenience to call timeit() multiple times and return a list of results. Proposed addition: The timed statement is executed in the namespace of the timeit module. If a function in the __main__ module is being timed, it can be made accessible to the timer module by using a setup statement like "from __main__ import xx" where xx is the function's name in __main__. Of course "__main__" can be a different module name if appropriate. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1397474&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com