<div>cPython 2.6.6 is able to initialize subclassed int-objects from strings:</div><div><br></div><div>Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on</div><div>win32</div><div>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</div>
<div>&gt;&gt;&gt; class fisch(int):</div><div>...     def __init__(self, value):</div><div>...         int.__init__(value)</div><div>...</div><div>&gt;&gt;&gt; a=fisch(&quot;12&quot;)</div><div>&gt;&gt;&gt;</div><div><br>
</div><div><br></div><div>pypy 1.5.0 is not able to do this:</div><div><br></div><div>Python 2.7.1 (aefc70438132+, Apr 29 2011, 12:45:42)</div><div>[PyPy 1.5.0-alpha0 with MSC v.1600 32 bit] on win32</div><div>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</div>
<div>And now for something completely different: ``topics are for the feeble</div><div>minded&#39;&#39;</div><div>&gt;&gt;&gt;&gt; class fisch(int):</div><div>....     def __init__(self, value):</div><div>....         int.__init__(value)</div>
<div>....</div><div>&gt;&gt;&gt;&gt; a=fisch(&quot;12&quot;)</div><div>Traceback (most recent call last):</div><div>  File &quot;&lt;console&gt;&quot;, line 1, in &lt;module&gt;</div><div>  File &quot;&lt;console&gt;&quot;, line 3, in __init__</div>
<div>TypeError: unbound method __init__() must be called with int instance as first a</div><div>rgument (got str instance instead)</div><div><br></div><div><br></div><div>(detected this behavior difference when trying to pypy pyPdf)</div>
<div><br></div><div>why is this?</div><div><br></div><div>Harald</div><div>-- </div>GHUM GmbH<br>Harald Armin Massa<br>Spielberger Straße 49<br>70435 Stuttgart<br>0173/9409607<br><br>Amtsgericht Stuttgart, HRB 734971<br>-<br>
persuadere.<br>et programmare<br>