Hi Michael,
On Tue, Aug 16, 2011 at 2:06 PM, Michael Foord wrote:
> I assume the difference is that int has an __init__ method on pypy.
No, it doesn't; the issue is that the call int.__init__("12") is not
strictly equivalent to object.__init__("12"). It is on CPython, but
that's a bit by chance
On 16 August 2011 12:32, Massa, Harald Armin wrote:
> On Tue, Aug 16, 2011 at 11:59 AM, Massa, Harald Armin
>> wrote:
>> class fisch(int):
>> > ... def __init__(self, value):
>> > ... int.__init__(value)
>>
>> You probably mean "int.__init__(self, value)" here. Your code is bug
>
> On Tue, Aug 16, 2011 at 11:59 AM, Massa, Harald Armin
> wrote:
> class fisch(int):
> > ... def __init__(self, value):
> > ... int.__init__(value)
>
> You probably mean "int.__init__(self, value)" here. Your code is buggy :-)
>
just submitted the fix to the pyPdf author :) m
Hi,
On Tue, Aug 16, 2011 at 11:59 AM, Massa, Harald Armin wrote:
class fisch(int):
> ... def __init__(self, value):
> ... int.__init__(value)
You probably mean "int.__init__(self, value)" here. Your code is buggy :-)
It works on CPython anyway, which is a bit strange in my opi
cPython 2.6.6 is able to initialize subclassed int-objects from strings:
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class fisch(int):
... def __init__(self, value):
...