[issue35138] timeit documentation should have example with function arguments

New submission from davidak <bugs.python.org+xdnb@davidak.de>: 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. ---------- assignee: docs@python components: Documentation messages: 329079 nosy: davidak, docs@python priority: normal severity: normal status: open title: timeit documentation should have example with function arguments versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

Change by Serhiy Storchaka <storchaka+cpython@gmail.com>: ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment: 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 ---------- nosy: +xtreak _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

Change by davidak <bugs.python.org+xdnb@davidak.de>: ---------- keywords: +patch pull_requests: +9598 stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

STINNER Victor <vstinner@redhat.com> added the comment: 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/8da5ebe11e0cb6599af682b22f7c2b2b7b9... ---------- nosy: +vstinner _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +13205 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: 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/7f485ea4fc17c5afb38cd0478ff15326fb5... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________

STINNER Victor <vstinner@redhat.com> added the comment: Thanks Anders Hovmöller! Example added to Python 3.7 and 3.8 documentation :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35138> _______________________________________
participants (5)
-
davidak
-
Karthikeyan Singaravelan
-
miss-islington
-
Serhiy Storchaka
-
STINNER Victor