On 3/13/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> > Would this apply to Python code as well? I.e. if you use > a raise statement with a class, it doesn't get instantiated > immediately? And if you catch it with an except clause which > doesn't capture the exception, it's never instantiated? > That would be a bonus. I *think* that's how it works now, and I don't intend to break this.
Eh, I don't see how it can, when you do 'raise ExceptionClass(args)' (like you want everyone to use :). It certainly doesn't, now; the arguments to 'raise' are just expressions, there is no specialcasing of calling anything. I don't believe it does so with the two-argument raise either -- at least, when experimenting, the body of an exception class's __init__ method is executed before the body of a 'finally' suite. -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ 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