![Bob Belderbos | @bbelderbos@fosstodon.org on Twitter: "When writing #Python decorators, it's best practice to use functools.wraps to not lose the docstring and other metadata of the function you are decorating: https://t.co/8IAp1ZYuJx" / Bob Belderbos | @bbelderbos@fosstodon.org on Twitter: "When writing #Python decorators, it's best practice to use functools.wraps to not lose the docstring and other metadata of the function you are decorating: https://t.co/8IAp1ZYuJx" /](https://pbs.twimg.com/media/FGBZufVXMAMp927.jpg:large)
Bob Belderbos | @bbelderbos@fosstodon.org on Twitter: "When writing #Python decorators, it's best practice to use functools.wraps to not lose the docstring and other metadata of the function you are decorating: https://t.co/8IAp1ZYuJx" /
![Simplify Your Functions with Functools' Partial and Singledispatch | by Khuyen Tran | Towards Data Science Simplify Your Functions with Functools' Partial and Singledispatch | by Khuyen Tran | Towards Data Science](https://i.ytimg.com/vi/B9ky-ziWQmY/maxresdefault.jpg)
Simplify Your Functions with Functools' Partial and Singledispatch | by Khuyen Tran | Towards Data Science
Rodrigo 🐍📝 on Twitter: "Python 🐍 decorators are very powerful! But they can override some important meta-information about your functions... 😱 For example, when you decorate your functions, they lose their docstring...
![Daily Python Tip 🐍🐧 on Twitter: "Debugging a decorated function: If you decorate a function, its __name__, __doc__ and __module__ might be different than what you expect. Try @functools.wraps to get the Daily Python Tip 🐍🐧 on Twitter: "Debugging a decorated function: If you decorate a function, its __name__, __doc__ and __module__ might be different than what you expect. Try @functools.wraps to get the](https://pbs.twimg.com/media/DtsTOU5XQAEMrvU.jpg)
Daily Python Tip 🐍🐧 on Twitter: "Debugging a decorated function: If you decorate a function, its __name__, __doc__ and __module__ might be different than what you expect. Try @functools.wraps to get the
![Partial functions in python functools.partial. With applications and examples. | by Siddharth Kshirsagar | Medium Partial functions in python functools.partial. With applications and examples. | by Siddharth Kshirsagar | Medium](https://miro.medium.com/max/1400/1*NN-t7Rm_g_yipHirmZ-_hg.png)
Partial functions in python functools.partial. With applications and examples. | by Siddharth Kshirsagar | Medium
![functools.wraps inferred signature breaks with non-standard wrapper arguments · Issue #3939 · microsoft/pyright · GitHub functools.wraps inferred signature breaks with non-standard wrapper arguments · Issue #3939 · microsoft/pyright · GitHub](https://user-images.githubusercontent.com/13813363/189932716-74b5da52-1312-4ced-a6e6-9e5f42d28994.png)