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.

classification
Title: timeit documentation should have example with function arguments
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: davidak, docs@python, miss-islington, vstinner, xtreak
Priority: normal Keywords: easy, patch

Created on 2018-11-01 16:45 by davidak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9787 merged davidak, 2018-11-01 18:42
PR 13295 merged miss-islington, 2019-05-13 19:27
Messages (5)
msg329079 - (view) Author: (davidak) * Date: 2018-11-01 16:45
It is described here: https://www.pythoncentral.io/time-a-python-function/

I have just tested it. Works as expected.

Best would be if timeit supports this natively.
msg329085 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-11-01 18:16
There is an open PR that adds a similar example. Is it the same as the one you are proposing and I think you can add a review comment to add it with the same PR if it's different?

PR : https://github.com/python/cpython/pull/9787

Thanks
msg342376 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-13 19:27
New changeset 8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8 by Victor Stinner (Anders Hovmöller) in branch 'master':
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
https://github.com/python/cpython/commit/8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8
msg342378 - (view) Author: miss-islington (miss-islington) Date: 2019-05-13 19:41
New changeset 7f485ea4fc17c5afb38cd0478ff15326fb5a47fc by Miss Islington (bot) in branch '3.7':
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
https://github.com/python/cpython/commit/7f485ea4fc17c5afb38cd0478ff15326fb5a47fc
msg342391 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-13 21:53
Thanks Anders Hovmöller! Example added to Python 3.7 and 3.8 documentation :-)
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79319
2019-05-13 21:53:18vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg342391

stage: patch review -> resolved
2019-05-13 19:41:35miss-islingtonsetnosy: + miss-islington
messages: + msg342378
2019-05-13 19:27:40miss-islingtonsetpull_requests: + pull_request13205
2019-05-13 19:27:23vstinnersetnosy: + vstinner
messages: + msg342376
2018-11-01 18:42:49davidaksetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request9598
2018-11-01 18:16:46xtreaksetnosy: + xtreak
messages: + msg329085
2018-11-01 17:12:45serhiy.storchakasetkeywords: + easy
stage: needs patch
type: enhancement
versions: + Python 3.8
2018-11-01 16:45:34davidakcreate