<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recursion on Shai Asher</title><link>https://slow-is-smooth.io/tags/recursion/</link><description>Recent content in Recursion on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 22 Jul 2018 09:00:00 +0300</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/recursion/index.xml" rel="self" type="application/rss+xml"/><item><title>Every Python Call Is a C Call</title><link>https://slow-is-smooth.io/blog/every-python-call-is-a-c-call/</link><pubDate>Sun, 22 Jul 2018 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/every-python-call-is-a-c-call/</guid><description>&lt;p&gt;In Python 3.7, a function that calls itself 22,000 times crashes the interpreter outright: no&#10;exception, no traceback, just &lt;code&gt;Segmentation fault&lt;/code&gt; and exit status 139. Python&amp;rsquo;s own recursion limit&#10;stops that from happening, by default, at a depth of 1,000. That limit is not a rule of the language.&#10;It&amp;rsquo;s a guess about the C stack, which CPython uses up at 384 bytes per Python call on this&#10;build. Raise the limit far enough, or reach the C stack through a path the limit never counts, and&#10;the guess runs out.&lt;/p&gt;</description></item></channel></rss>