This batch of posts deals with Python decorators, how the simple pattern most people use isn't correct and how to implement a better decorator.
- How you implemented your Python decorator is wrong.
- The interaction between decorators and descriptors.
- Implementing a factory for creating decorators.
- Implementing a universal decorator.
- Decorators which accept arguments.
- Maintaining decorator state using a class.
- The missing @synchronized decorator.
- The @synchronized decorator as context manager.
- Performance overhead of using decorators.
- Performance overhead when applying decorators to methods.
This batch of posts deals with issues around the more general problem of monkey patching Python code.