Intermediate Vocabulary #python #decorators #asyncio #type-hints

Python Vocabulary

5 exercises — decorators, generators, context managers, asyncio/async-await, and type hints. The Python-specific terms you need to discuss code fluently in English.

0 / 5 completed
Python-specific English vocabulary reference
  • decorator — @-syntax wrapper function; e.g. @property, @staticmethod, @app.route()
  • generator — function with yield; produces values lazily one at a time
  • context managerwith statement; guarantees cleanup via __enter__/__exit__
  • coroutineasync def function; can be paused with await
  • type hint — annotation like def f(x: int) -> str:; checked by mypy, not enforced at runtime
1 / 5
A code review comment says: "This function would be cleaner as a decorator." In Python, a decorator is: