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

[Python-Dev] Breaking bug #411881 into manageable pieces

[Python-Dev] Breaking bug #411881 into manageable piecesAahz aahz@pythoncraft.com
Wed, 20 Mar 2002 15:38:02 -0500
On Wed, Mar 20, 2002, Tim Peters wrote:
> [Aahz]
>>
>> May I suggest yet one more alteration:
>>
>>     try:
>>         ...code...
>>     except (KeyboardInterrupt,SystemExit):
>>         raise
>>     except:
>>         ...handler...
> 
> Not unless you want to run around editing hundreds of modules.  To quote
> someone who shall remain anonymous:
> 
>     The joy of coding Python should be in seeing short, concise,
>     readable classes that express a lot of action in a small amount of
>     clear code -- not in reams of trivial code that bores the reader to
>     death.

How many bare except: clauses that should be bare are there?  To my way
of thinking, requiring the above construct on top of a bare except: is
precisely the kind of wart we wish to encourage in order to *dis*courage
bare except: clauses.  In any event, it was Guido's idea to add the 

    except KeyboardInterrupt:

in the first place; I'm simply adding the logical extension.  Perhaps
instead of the StandardError idea suggested by others, we should add a
new exception called ExitException that inherits from both SystemExit
and KeyboardInterrupt.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.  --Aahz



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