@[email protected] to [email protected]English • edit-29 months agoWine acronymlemmy.caimagemessage-square92fedilinkarrow-up1559
arrow-up1559imageWine acronymlemmy.ca@[email protected] to [email protected]English • edit-29 months agomessage-square92fedilink
minus-squareѕєχυαℓ ρσℓутσρєlinkfedilink2•9 months agoI haven’t really done much recursion in Python, but can’t we do a tail-recursive version so that it (almost) never reaches recursion depth issues?
minus-square@[email protected]linkfedilink5•9 months agoWe cannot, Python explicitly doesn’t do TCO. http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html?m=1
I haven’t really done much recursion in Python, but can’t we do a tail-recursive version so that it (almost) never reaches recursion depth issues?
We cannot, Python explicitly doesn’t do TCO.
http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html?m=1