On Mon, Jul 30, 2012 at 12:20 PM, Tino Dai <obe...@gmail.com> wrote: > Yes, but that would involve surrounding the entire method with a try except > finally block. I was > told by the Python-Guru-In Residence that shouldn't emulate Java code in > Python, and that was > generally bad programming practice (no flame war intended)
It is true that you should use the idioms of each language in their domain. That doesn't mean you should ignore language features entirely. Wrapping everything in a single try/finally to handle this exception is as intended and not emulating the Java style of wrapping everything everywhere (be that good or bad). -- Brett Ritter / SwiftOne swift...@swiftone.org _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor