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

R: [Python-Dev] Deprecating string exceptions

R: [Python-Dev] Deprecating string exceptions R: [Python-Dev] Deprecating string exceptionsGordon McMillan gmcm@hypernet.com
Thu, 28 Mar 2002 08:55:12 -0500
On 28 Mar 2002 at 8:29, Guido van Rossum wrote:

> One other, more practical reason to like the rule:
> "except Exception:" would become equivalent to
> "except:".  The advantage is that you can then
> write "except Exception, e:" and catch the exception
> instance in a local variable without having to call
> sys.exc_info(). 

Which, to my mind, is sufficient to justify the rule.

Hmm. If the rule were (eventually) strictly enforced,
could we get the C++-style "stack allocated object
whose destructor releases the resource" trick working?

(Which would allow killing off the recurrent "with" /
"using" thread.)

-- Gordon
http://www.mcmillan-inc.com/




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