gerrit.holl at pobox.com
Mon Jun 28 04:59:21 EDT 1999
On Sun, Jun 27, 1999 at 10:27:04PM -0400, Tim Peters wrote:
> From: "Tim Peters" <tim_one at email.msn.com>
> To: "Gerrit Holl" <gerrit.holl at pobox.com>, <python-list at python.org>
> Subject: RE: RuntimeError?
> Date: Sun, 27 Jun 1999 22:27:04 -0400
> [Gerrit Holl]
> > can someone please give me an example when a RuntimeError is raised?
> > I don't understand: if none of the others are raised.
> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import sys
> >>> del sys.stdout
> >>> print "hi"
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> RuntimeError: lost sys.stdout
> Honestly, I had never seen a RuntimeError before! I found this one by
> digging thru the source code to see when it gets raised. There's really no
> pattern to it, and the RuntimeError docstring in Lib/exceptions.py
> ("Unspecified run-time error.") is as accurate as anything that says nothing
> can be <wink>. It generally seems to mean something bad and unexpected
> happened, but not bad enough to shut down the interpreter (things *that* bad
> raise SystemError).
Ah, I understand. But what kind of things are bad enough to raise SystemError?
The Dutch Linuxgames homepage: http://linuxgames.nl.linux.org
Personal homepage: http://www.nl.linux.org/~gerrit/
Discoverb is a python program (in several languages) which tests the words you
learned by asking it. Homepage: http://www.nl.linux.org/~gerrit/discoverb/
More information about the Python-list