I Solved THIS Python Bug #python #code #programming

preview_player
Показать описание
I Solved THIS Python Bug #python #code #programming
Рекомендации по теме
Комментарии
Автор

Yo dawg, I hear you like decorators, so I put decorators in your decorator so you can decorate while you decorate.

__christopher__
Автор

It's not a bug, decorator returns wrapper, that's why it has wrapper name and docstring

georgiyveter
Автор

This code is passing the calculate function as an argument to the decorator function, and then calling the decorator function, which returns the wrapper function, which is the final function being called, that's why we have the wrapper docstring showing in the terminal

cee
Автор

Nice! Yet another trick about Python that I didn't know that you taught this old dog. Thanks, indently! Your videos are always great.

vorpal
Автор

Or you could just set wrapper.__name__ =func.__name__ and same for docs.

worldanvilbild
welcome to shbcf.ru