97 results
Open links in new tab
  1. contextlib — Utilities for with-statement contexts - Python

    2 days ago · Source code: Lib/contextlib.py This module provides utilities for common tasks involving the with statement. For more …

  2. contextvars — Context Variables — Python 3.15.2 documentation

    1 day ago · This module provides APIs to manage, store, and access context-local state. The ContextVar class is used to declare …

  3. 28.7. contextlib — Utilities for with-statement contexts - Python

    Feb 7, 2018 · contextlib. contextmanager (func) ¶ This function is a decorator that can be used to define a factory function for with …

  4. Correct usage of contextlib.ContextDecorator? - Python Help ...

    Dec 20, 2022 · I wonder if anyone with more experience in contextlib can comment on this? I have to enter a stack of unknown depth …

  5. Adding a `contextlib.ModificationContext` base class

    Jan 7, 2025 · (Extracted from the umask thread) In discussing the possibility of adding a stdlib context manager to support applying …

  6. PEP 806 – Mixed sync/async context managers with precise async …

    Sep 5, 2025 · Finally, it has the error-prone semantics around exception handling which led contextlib.nested () to be deprecated in …

  7. PEP 343 – The “with” Statement | peps.python.org

    Jun 2, 2005 · This PEP adds a new statement “with” to the Python language to make it possible to factor out standard uses of …

  8. Welcome to Python.org

    The official home of the Python Programming Language

  9. Historical and deprecated features — typing documentation

    Historical and deprecated features ¶ Over the course of the development of the Python type system, several changes were made to …

  10. Modernizing Superseded Typing Features

    Modernizing Superseded Typing Features ¶ Introduction ¶ This guide helps to modernize your code by replacing older typing …