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

Using @wraps in decorators #23

Open
matham opened this issue May 31, 2023 · 0 comments
Open

Using @wraps in decorators #23

matham opened this issue May 31, 2023 · 0 comments

Comments

@matham
Copy link
Contributor

matham commented May 31, 2023

Using @wraps in decorators is a common pattern to help us know where the decorator originated when debugging or when saving it as a name, otherwise, when you get a hold of the function, it's impossible to know where it came from.

Also, @wraps makes sure the doc string etc match the original function.

Originally posted by @matham in #1 (comment)

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

1 participant