Hypothetically, if __enter__ could be a generator, with the with body running for each yielded value, that would give us the power to implement class Loop: def __enter__(self): self._do_continue = ...
Formal plans for a Python that supports true parallelism are finally on the table. Here’s how a GIL-free Python will finally come together. After much debate, the Python Steering Council intends to ...