- 1. Python Decorators
- 2. Decorators
- 2.1. Use cases for decorators in Python
- 2.2. Decorators: simple example
- 2.3. Decorators - Pytest
- 2.4. Decorators - Flask
- 2.5. Testing Flask
- 3. Core built-in decorators
- 3.1. OOP - classmethod - staticmethod
- 4. Functools
- 4.1. Decorators caching - no cache
- 4.2. Decorators caching - with lru_cache
- 4.3. LRU - Least recently used cache
- 4.4. LRU - Least recently used cache
- 5. Functions and closures
- 5.1. Function assignment
- 5.2. Function assignment - alias print to say
- 5.3. Function assignment - don't do this
- 5.4. Passing functions as parameters
- 5.5. Traversing directory tree
- 5.6. Declaring Functions inside other function
- 5.7. Returning a new function from a function
- 5.8. Returning a closure
- 6. Decorator
- 6.1. A simple function - use as it is
- 6.2. wrapper
- 6.3. Use wrapper as a function
- 6.4. Use wrapper as a decorator
- 6.5. Decorator to register function
- 6.6. A recursive Fibonacci
- 6.7. trace fibo
- 6.8. tron decorator
- 6.9. Decorate with direct call
- 6.10. Decorate with parameter
- 6.11. Decorator accepting parameter
- 6.12. Decorate function with any signature
- 6.13. Decorate function with any signature - implementation
- 6.14. Decorate function with any signature - skeleton
- 6.15. Decorate function with any signature - skeleton with name
- 6.16. Functool - partial
- 6.17. Exercise: Logger decorator
- 6.18. Exercise: decorators decorator
- 6.19. Solution: Logger decorator
- 6.20. Solution: Logger decorator (testing)
- 6.21. Solution decorators decorator
- 6.22. A list of functions
- 6.23. Insert element in sorted list using insort