On 27 June 2010 17:47, Payal <payal-pyt...@scriptkitchen.com> wrote:

> Hi,
> Again a few queries regarding exceptions,
>
> a. What is the difference between,
>
> except ZeroDivisionError as e: print 'Msg : ' , e
> except ZeroDivisionError ,e: print 'Msg : ' , e
>
> Both show,
> Msg :  integer division or modulo by zero
>
> b. What is portable and correct way of writing,
>
> except (NameError, ZeroDivisionError) as e: print 'Msg : ' , e
>
> c. What is the correct Python of writing,
> except  as e: print 'Msg : ' , e        # Capturing all exceptions
>
> Thanks a lot for the help in advance.
> With warm regards,
> -Payal
> --
>
> p.s. I am always confused where does one put the "?" when I am framing the
> questions like I have done above (a, b and c)?
> This is completely OT query for native english speaking people :-)
>
>
I think the 'as' syntax is only available in Python 3.x


Question marks go at the end of the sentence where you would normally put a
full stop if it wasn't a question.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to