I think that a time decorator will be a useful addition to the sandard library, as i find the current way of measuring execution time a bit tedious:
timeit.timeit("fun_to_time(a, b)", setup="from __main__ import a, b", number=1) compared to: @timef def fun_to_time(a, b): ... or timef(print)("Hello world!"). I already made a basic implementation of it, and it's working well.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/