Problem with algorithm
jura.grozni at gmail.com
Fri Apr 13 15:39:33 CEST 2007
sorry for the bad grammar. I didn't investigate the StackLess Python,
but as I have been reading about it (so if it was correct), the
recursionlimit should not be the problem using StackLess Python.
>From my expirience with python and recursions, it works well to the
depth of about 200 to 500 (depending od algorithm and purpose). I
think that in this case it should work well with about 500. If you
need a bigger string, then lett it repeat and merge the different
You could also generate multidimensional hash.
On Apr 13, 2:24 pm, Michael Hoffman <cam.ac... at mh391.invalid> wrote:
> 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
> Michael Hoffman
More information about the Python-list