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/2004-September/048636.html below:

[Python-Dev] Re: Dangerous exceptions (was Re: Another test_compilermystery)

[Python-Dev] Re: Dangerous exceptions (was Re: Another test_compilermystery)Fredrik Lundh fredrik at pythonware.com
Mon Sep 6 09:44:12 CEST 2004
Jeremy Hylton wrote:

> The current exception hierarchy isn't too far from what you suggest.
> We just got the names wrong.  That is, there is a base class,
> StandardException, that captures most exceptions other than
> MemoryError, SystemError, and KeyboardInterrupt.  If we renamed that
> Exception, then we'd be 90% of the way there.  You could also change
> your code, right now, to say "except StandardError:" and avoid the
> problem entirely.

when was that changed?

Python 2.4a3 (#1, Sep  3 2004, 11:32:03)
>>> StandardException
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'StandardException' is not defined
>>> StandardError
<class exceptions.StandardError at 0x401a329c>
>>> issubclass(MemoryError, StandardError)
True
>>> issubclass(KeyboardInterrupt, StandardError)
True
>>> issubclass(SystemExit, StandardError)
False
>>> issubclass(StopIteration, StandardError)
False
>>> issubclass(ImportError, StandardError)
True

</F> 



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