Skip to main content

All Questions

Filter by
Sorted by
Tagged with
-3 votes
2 answers
209 views

How to prevent a recursion error implementing factorial in Python

I'm developing a math suite and am currently having issues implementing the recursive version of the factorial function. The issue is when I use it in my Bayesian combination function: C(n,k) = n! / k!...
CobraPi's user avatar
  • 392
5 votes
0 answers
749 views

Removing call from stack trace in python

I'm using a recursive function that doesn't directly call itself, but throught other private methods, for example: def recur(x): # do something __a(x) def __a(x): # do something __b(...
Matan David's user avatar
3 votes
3 answers
80 views

Recursion done inside of a variable

I am a bit confused on how the compiler does recursion if it is in a variable. The only way to easily explain the question is if I show an example. def recur_var(s1, s2): '''Test for recursion in ...
Tazzure's user avatar
  • 31
0 votes
2 answers
482 views

Python Max Recursion Depth

I am implementing some sorting algorithm in Python and encountered a somewhat strange bug related to max recursion depth being exceeded. In one module, I have implemented an insertion,m erge, and ...
MEric's user avatar
  • 956