[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 decorat

[issue33102] get the nth folder of a given path

2018-03-21 Thread AmjadHD
AmjadHD <amjadbenhedh...@outlook.com> added the comment: Yes but i dont know if this is cross platform solution, i guess this function should be in the os.path module. -- ___ Python tracker <rep...@bugs.python.org> <https://

[issue33103] Syntax to get multiple arbitrary items from an iterable

2018-03-21 Thread AmjadHD
AmjadHD <amjadbenhedh...@outlook.com> added the comment: Yes that's a way to do it but "a, b, c = my_list[1, 3, -1]" seems so pythonic and straight forward, it's like formatting, python had already 3 methods to do it when it introduced a 4th one (f-strings), easier is b