Recursion

Matthias Urlichs smurf at noris.de
Fri Jul 19 08:03:13 EDT 2002


Abhijit Soman <abhijit_som at yahoo.co.in> wrote:
>     def showbits(x):
>         if x != 1:
>           showbits(x >> 1)        
>         if x & 01:
>           print 1,
>         else:
>           print 0,

It's interesting that nobody seems to have caught the infinite recursion
when you try to show a value which happens to be zero...

-- 
Matthias Urlichs
-- 
No cute .sig today...



More information about the Python-list mailing list