A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-April/064514.html below:

[Python-Dev] Must objects with __enter__/__exit__ also supply __context__?

[Python-Dev] Must objects with __enter__/__exit__ also supply __context__? [Python-Dev] Must objects with __enter__/__exit__ also supply __context__?Edward Loper edloper at gradient.cis.upenn.edu
Fri Apr 28 02:16:18 CEST 2006
Nick Coghlan wrote:
> OTOH, if the two protocols are made orthogonal, then it's clear that the 
> manager is always the original object with the __context__ method. Then the 
> three cases are:
> 
>   - a pure context manager (only provides __context__)
>   - a pure managed context (only provides __enter__/__exit__)
>   - a managed context which can be its own context manager (provides all three) 

+1 on keeping the two protocols orthogonal and using this terminology 
(context manager/managed context).

-Edward
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4