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-March/062804.html below:

[Python-Dev] Another PEP 343 contextmanager glitch

[Python-Dev] Another PEP 343 contextmanager glitch [Python-Dev] Another PEP 343 contextmanager glitchGuido van Rossum guido at python.org
Sat Mar 25 00:05:46 CET 2006
Oops, that's definitely a bug. Please go ahead and fix in both places.

(I'm still trying to fathom the other PEP 343 issue you brought up.)

--Guido

On 3/24/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> It appears that the contextmanager implementation (both in the stdlib and
> as described in the PEP) doesn't correctly handle the case where the
> generator yields a new value in response to throw().  It responds by
> suppressing the original exception, but IIRC earlier versions of the PEP
> threw a RuntimeError for this scenario.
>
> Unless there are any objections, I'd like to restore this by replacing the
> "return True" that follows the throw(), with:
>
>      raise RuntimeError("generator didn't stop after throw()")
>
> and again, update the PEP accordingly.
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


--
--Guido van Rossum (home page: http://www.python.org/~guido/)
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