Python Function Attributes Part III - Comparison with Class Wrappers
The previous articles about the topic of Python function attributes gave an example of how a decorator can be used to add functionality to a given function using function attributes. It then introduced an alternative approach using classes, and no function attributes, to achieve similar functionality.
The purpose of this article is to examine these two approaches in-depth to see if they hold up as "interchangeable", or if perhaps one approach has distinct advantages over the other. At its end, I'll share my view on the status of function attributes. Read more...