ColdWater@lemmy.ca to linuxmemes@lemmy.worldEnglish · edit-25 months agoWine acronymlemmy.caexternal-linkmessage-square83fedilinkarrow-up1558arrow-down114
arrow-up1544arrow-down1external-linkWine acronymlemmy.caColdWater@lemmy.ca to linuxmemes@lemmy.worldEnglish · edit-25 months agomessage-square83fedilink
minus-squareѕєχυαℓ ρσℓутσρє@lemmy.sdf.orglinkfedilinkarrow-up2·5 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-squarelightnegative@lemmy.worldlinkfedilinkarrow-up5·5 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