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

[Python-Dev] PEP 342 support for string exceptions in throw()

[Python-Dev] PEP 342 support for string exceptions in throw() [Python-Dev] PEP 342 support for string exceptions in throw()Phillip J. Eby pje at telecommunity.com
Fri Mar 24 23:56:39 CET 2006
At 02:36 PM 3/24/2006 -0800, Guido van Rossum wrote:
>I think it's overkill to warn for any string exceptions thrown this
>way. Since the only use case for using throw() is to pass an exception
>you just caught, I don't see that putting the warning is useful --
>it's just more code that in practice is never triggered.

My proposal was that throw() should only succeed or fail, never warn.

If you throw() a string exception with a traceback, it Just Works.

If you throw() a string exception without a traceback, you get an immediate 
TypeError, just like in the 2.5 trunk now.

Is that acceptable?  i.e., was that what you were "-0"-ing?

The only change is that throw() would now *accept* string exceptions 
without warning or error, if and only if you supply a traceback.  That is, 
if you are effectively re-raising an existing exception.


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