Tom Ritchford
Apr 29, 2024

--

There are other reasons to decorate classes: for example, some class decorators decorate every public method on instances of those classes.

I don't remember where I first saw this idea, but I stole it for my very useful library, https://github.com/rec/tdir, which runs a function or a class's methods in a temporary directory. (It's generally most useful for unit tests.)

Fun article, accept claps!

--

--