Code24Lab

Decorator Factories & Stacking Order

Lesson 4 of 21 Lab 🔒 Locked

Lessons in this course

  1. Functions as Objects: Closures & nonlocal StateLabFree
  2. Late Binding: The Loop-Variable Closure TrapLab Locked
  3. Writing Decorators: Wrappers, State & functools.wrapsLab Locked
  4. Decorator Factories & Stacking OrderLab Locked
  5. Memoization with lru_cache: Hits, Misses & Cache GrowthLab Locked
  6. The Iterator Protocol: __iter__, __next__ & ExhaustionLab Locked
  7. Generators & Laziness: Short-Circuiting and Partial ConsumptionLab Locked
  8. send(), Priming & Generator-Based CoroutinesLab Locked
  9. itertools in Practice: groupby, accumulate & Shared IteratorsLab Locked
  10. Lazy Pipelines vs Lists: Memory Peaks & batched()Lab Locked
  11. Context Managers: __enter__, __exit__ & RollbackLab Locked
  12. @contextmanager, try/finally & Nested TimersLab Locked
  13. Type Hints: Static Checks, Any & Run-Time RealityLab Locked
  14. asyncio Scheduling: await, gather & SemaphoresLab Locked
  15. Blocking the Event Loop: time.sleep vs await & to_threadLab Locked
  16. Big-O in Practice: Counting Comparisons, list vs setLab Locked
  17. Profiling with cProfile: tottime, Hotspots & Amdahl's LawLab Locked
  18. __slots__ & Dataclasses: Memory per ObjectLab Locked
  19. Pythonic Design Patterns: Strategy & Registration DecoratorsLab Locked
  20. Packaging: pyproject.toml & Version SpecifiersLab Locked
  21. Capstone: A Retrying, Batched, Rate-Limited Async UploaderLab Locked