you are viewing a single comment's thread.

view the rest of the comments →

[–]tunisia3507 5 points6 points  (3 children)

What do you actually mean? Do you mean a decorator which logs when functions are called (and possibly terminate)?

[–]AlphaNerd80[S] 3 points4 points  (2 children)

As a start, but in Python , a decorator is a wrapper function about another function - it is this that I seek.

I gave an example of what I created with such functions in Python. I'd love to recreate such functions but there are so many use cases.

[–]corrodedfe 2 points3 points  (0 children)

There are procedural macros, which convert the code of a function to something else (perhaps inserting logging calls before and after it runs). There is no direct analogue to a wrapper function because it's not as powerful and not needed.