why it is like stop running after a 3 seconds

John Gordon gordon at panix.com
Thu Jun 9 13:59:10 EDT 2016


In <35cd5920-1fbb-441f-9fc6-2f3f2e5f8568 at googlegroups.com> Ho Yeung Lee <davidbenny2000 at gmail.com> writes:

> i write a program, it is like forever loop
> but i only restrict it to run 2 level recursively, 

I don't think the restriction is working.  There is "if deep > 0:"
at the top of the function, but the recursive calls aren't inside that
if block.  DFS keeps calling itself with smaller and smaller values of
deep.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list