Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46379
| References | <CAN1F8qXPEM4B=2e7KOhWeTKzxmeeb_w_S97wYiHCMXH3jfzL6g@mail.gmail.com> <CAHVvXxTxzZjhsmDw3x0Wm-wyLmdx5VehzKahnfkTSNrmigKMUA@mail.gmail.com> <51A5FC7D.8080202@davea.name> |
|---|---|
| From | Joshua Landau <joshua.landau.ws@gmail.com> |
| Date | 2013-05-29 15:05 +0100 |
| Subject | Re: Fatal Python error |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2358.1369836402.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On 29 May 2013 14:02, Dave Angel <davea@davea.name> wrote:
> On 05/29/2013 08:45 AM, Oscar Benjamin wrote:
> Joshua: Avoid doing anything complex inside an exception handler.
Unfortunately, Ranger (the file manager in question) wraps a lot of stuff
in one big exception handler. Hence there isn't much choice. The original
wasn't actually in an infinite recursion, too, but just a recursion over a
large directory.
Is there a reason that Python 3 can't be made to work like Python 2 and
PyPy, and -if not- should it? The catchable fail would be much nicer than
just bombing the program.
In the meantime the algorithm should just be reworked, but it seems like a
larger step than should be needed.
If nothing else, the exception frame is huge. I probably would have
> spotted it except for the indentation problem triggered by html. The top
> level code following your function didn't have any loops, so it wasn't a
> problem.
>
> Can anyone help Joshua put his gmail into text mode?
I've found a new option. As a test, here's a simplified version without the
property:
def loop():
try:
(lambda: None)()
except:
pass
loop()
try:
loop()
except RuntimeError:
pass
which is pretty much Oscar Benjamin's, but less stupid.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Fatal Python error Joshua Landau <joshua.landau.ws@gmail.com> - 2013-05-29 15:05 +0100 Re: Fatal Python error nn <pruebauno@latinmail.com> - 2013-05-31 07:31 -0700
csiph-web