Python decorators, SRP, and testability
Posted by Mike on Jun 4th, 2010
On the SRP:
For those unfamiliar with the Single Responsibility Principle (SRP), it states that there should never be more than one reason for a class to change.
That is to say: do one thing, do it well.
Decorators (not to be confused with the decorator pattern) can add behaviors or side-effects to a method, and this can [...]
- Filed under software development, testing
- Tagged with patterns, python, testing, unit testing
- Comments(6)
