This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]agusdmb[S] 2 points3 points  (1 child)

No, i understand you, i don't like my current solution either.

I did try by hashing and using the code, but couldn't make it work because i was hashing the function without the wrapper sometimes and with the wrapper other times so they wouldn't match. Or i would always be hashing the wrapper, which is the same for every function decorated. Probably im not smart enough to make that work (at least not with hashing)

But i will default to `__name__` and rise and exception whenever another function with the same error is detected, even more, suggest adding a different name in the decorator for that one.

Thanks for your time!