Hi Christopher I did notice the unusual command line, but didn't think any more of it. I thought everything I needed to look at was already in the message.
A reference to https://pypi.org/project/importhook/ would have helped me. I don't see importhook providing a practical implementation of the original poster's request. Going back to that, I don't see why something like a = Timer(time_consuming_function)() shouldn't actually provide the semantics wanted for @Timer a = time_consuming_function() My preference is for code that's easier to read rather than quicker to type. It's said that easy reading is hard writing. https://quoteinvestigator.com/2014/11/05/hard-writing/ I'm also reminded of Einstein's (or is it?) Everything Should Be Made as Simple as Possible, But Not Simpler. https://quoteinvestigator.com/2011/05/13/einstein-simple/ -- Jonathan
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/G7ZG5V3DX62XECP5G7IEVITVPNQCNUO2/ Code of Conduct: http://python.org/psf/codeofconduct/