Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorthand for timing function call #159

Open
jw3126 opened this issue Oct 5, 2022 · 3 comments
Open

Shorthand for timing function call #159

jw3126 opened this issue Oct 5, 2022 · 3 comments

Comments

@jw3126
Copy link
Contributor

jw3126 commented Oct 5, 2022

I think it would be nice to have

@timeit to myfunc_has_long_name(my, args)

as a shord hand

@timeit to "myfunc_has_long_name" myfunc_has_long_name(my, args)

If people agree, I can make a PR.

@ahbarnett
Copy link
Contributor

Playing around having read the docs, for this I use

to(myfunc_has_long_name)(my, args)

It's clearer to the reader if you call the timeroutput object TIME or something.

@KristofferC
Copy link
Owner

Seems reasonable to have the syntax as given in the OP as well.

@marius311
Copy link

marius311 commented Apr 2, 2023

@jw3126 you might like #106 or perhaps even turn that into a bonafide package, which I haven't had the motivation to do but anyone is welcome to. Not to take away from that your narrower proposal could just fit in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants