Python riddle

kyle.tk kyle.tk at gmail.com
Mon Dec 5 22:42:14 EST 2005


SPE - Stani's Python Editor wrote:
> I know that this code is nonsense, but why does this print 'Why?'
>
> a = 1
> if a >2:
>     try:
>         5/0
>     except:
>         raise
> else:
>     print 'why?'

last time i checked this should print 'why?'
I have no idea how you got it to print 'Why?'




More information about the Python-list mailing list