Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46602

Re: Fatal Python error

Newsgroups comp.lang.python
Date 2013-05-31 07:31 -0700
References <CAN1F8qXPEM4B=2e7KOhWeTKzxmeeb_w_S97wYiHCMXH3jfzL6g@mail.gmail.com> <CAHVvXxTxzZjhsmDw3x0Wm-wyLmdx5VehzKahnfkTSNrmigKMUA@mail.gmail.com> <51A5FC7D.8080202@davea.name> <mailman.2358.1369836402.3114.python-list@python.org>
Message-ID <25cc650c-9047-4533-bf8d-cf5b8dcf6a05@v2g2000yqa.googlegroups.com> (permalink)
Subject Re: Fatal Python error
From nn <pruebauno@latinmail.com>

Show all headers | View raw


On May 29, 10:05 am, Joshua Landau <joshua.landau...@gmail.com> wrote:
> On 29 May 2013 14:02, Dave Angel <da...@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.

If nobody else has, I would recommend you submit a bug at
bugs.python.org.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


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