[issue34917] add time decorator to timeit.py

2018-10-06 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the decorator, however this should probably be discussed on python-ideas first to decide if a decorator should be added in the first place. If the idea is accepted, the exact implementation should be discussed and defined, and finally a pull reques

[issue34917] add time decorator to timeit.py

2018-10-06 Thread AmjadHD
New submission from AmjadHD : I made this simple time decorator, it's not perfect but it does make python more pythonic :) : it can be used as a decorator: ``` @timef def fun_to_time(a, b): ... ``` or as a function call `timef(print)("Hello world!")` just a simple decorator no need for `tim