Message68578
| Author |
pitrou |
| Recipients |
Rhamphoryncus, benjamin.peterson, gvanrossum, pitrou |
| Date |
2008年06月22日.19:48:52 |
| SpamBayes Score |
0.050333563 |
| Marked as misclassified |
No |
| Message-id |
<1214164129.6056.63.camel@fsol> |
| In-reply-to |
<aac2c7cb0806221223w2d49b83evfbe0eaed49808167@mail.gmail.com> |
| Content |
Le dimanche 22 juin 2008 à 19:23 +0000, Adam Olsen a écrit :
> For this behaviour, this is the most natural way to write it.
> Conceptually, there shouldn't be a cycle
I agree your example is not far-fetched. How about avoiding cycles for
implicit chaining, and letting users shoot themselves in the foot with
explicit recursive chaining if they want? Detection would be cheap
enough, just a simple loop without any memory allocation.
> the traceback should be the
> lookup, then the fallback, then whatever code is about this - exactly
> the order the code executed in.
It would be the reverse: first the fallback, then the re-raised
exception. The last caught exception is always reported last, because
it's supposed to be the "main" or "highest-level" one. |
|