Problem with algorithm

Michael Hoffman cam.ac.uk at mh391.invalid
Fri Apr 13 08:24:31 EDT 2007


azrael wrote:
> I think that this would be very silly to do. bad  kung foo. The
> recoursion technique would be more satisfying. You sholud consider
> that this would take about 4 lines to write. Also be avare of the
> default recoursion depth in python wich is 1000. you can get and set
> the recoursion limit hrough importing the "sys" module and using
> getrecoursionlimit() and setrecoursionlimit().

Well, you'd have to spell sys.getrecursionlimit() correctly, but yes ;)

At least in the past, raising the recursion limit past a certain point 
would result in the CPython interpreter crashing, so it's not completely 
scalable.
-- 
Michael Hoffman



More information about the Python-list mailing list