On Jan 22, 2008 11:36 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>
> On Jan 22, 2008 9:31 AM, Chris Mellon <[EMAIL PROTECTED]> wrote:
> > On Jan 22, 2008 9:36 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > > IMO (1) or (2) are both acceptable, but I'd prefer (2): swallow
> > > 'Exception'. There's a reason why hasattr() is different from
> > > getattr() with a default value; it's too early for me to explain it
> > > clearly, but I know it was discussed and argued at length when
> > > hasattr() was introduced.
> > >
> > > I don't see why AssertionError ought to be treated differently than
> > > TypeError or any other "regular" error. The key goal here is to avoid
> > > swallowing KeyboardInterrupt, and to a lesser extend SystemExit.
> > >
> > > --Guido
> > >
> >
> > A particularly nasty case is that it swallows RecursionLimitExceededError.
>
> Why is that nastier than other bugs?
>
>

Because when you mess up your hooks and end up with recursion through
hasattr, you get a hang followed by a segfault instead of an
exception. MemoryError might have similar effects.

(And of course I meant RuntimeError, not whatever thing I said)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to