Gabriel Genellina wrote:
> En Mon, 21 Jan 2008 18:33:10 -0200, Frederic Rentsch
> <[EMAIL PROTECTED]> escribió:
>
>> Hi, here's something that puzzles me:
>>
>>  >>> class Fix_Point (long):
>>         def __init__ (self, l):
>>            long.__init__ (self, l * 0x10000):
>>
>>  >>> fp = Fix_Point (99)
>>  >>> fp
>>     99
>
> You have to override __new__, not __init__. Immutable types like numbers
> and tuples don't use __init__.
> See http://docs.python.org/ref/customization.html
That's a big help! Thank you very much.

Frederic

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to