On Fri, 14 Sep 2007 21:43:38 -0300, Eduardo O. Padoan wrote:

>> How do I subclass int and/or long so that my class also auto-converts
>> only when needed?
> 
> What about just subclassing long - is this not an option?

Of course it's an option. As it turned out, that was the easiest way for 
me to proceed. I was a little concerned that the overhead of using longs 
might have been excessive, but for values close to zero (and by close I 
mean < millions) there's no significant time difference between 
arithmetic with ints and longints.


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

Reply via email to