<story><title>Weird Python Integers</title><url>https://kate.io/blog/2017/08/22/weird-python-integers/</url></story><parent_chain><item><author>std_throwaway</author><text>Summary: Integers in python are full blown objects. Small numbers are stored in a central preallocated table where each entry represents one number. Setting a variable to a small integer makes it point to an entry in that table. Multiple variables may point to the same small integer objects in that table. Fooling around with the table leads to funny results.</text></item></parent_chain><comment><author>concede_pluto</author><text>It&amp;#x27;s just like Fortran, where everything &lt;i&gt;including a constant&lt;/i&gt; is passed by reference, so if you assign to your arguments you might corrupt your program&amp;#x27;s only copy of 7 unless the linker put it in a read-only page.</text></comment>
<story><title>Weird Python Integers</title><url>https://kate.io/blog/2017/08/22/weird-python-integers/</url></story><parent_chain><item><author>std_throwaway</author><text>Summary: Integers in python are full blown objects. Small numbers are stored in a central preallocated table where each entry represents one number. Setting a variable to a small integer makes it point to an entry in that table. Multiple variables may point to the same small integer objects in that table. Fooling around with the table leads to funny results.</text></item></parent_chain><comment><author>leipert</author><text>The same is true for Java apparently:
&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;stackoverflow.com&amp;#x2F;a&amp;#x2F;2001861&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;stackoverflow.com&amp;#x2F;a&amp;#x2F;2001861&lt;/a&gt;</text></comment>