python: decorating a class (intermediate) anthony explains #194

preview_player
Показать описание
we talked about decorators before but I didn't show how to write a class decorator (or how it works)!

==========

I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Рекомендации по теме
Комментарии
Автор

you did write a class decorator before, in explains #188: Singleton

sadhlife
Автор

It is great to watch your videos multiple times :)

yaron-ehsass
Автор

Doing this causes a removal of intellisense for the added functionality from class D. My IDE (VS Code) does not know about the method "foo" on instances of class C. I tried the same snippet in PyCharm and it seemed to put two and two together. Guess it's good to note that there could be some UX bugs if you use this in your codebase.

brandonbahret
Автор

python's metacalss vs inhritance video?

talalkalai