[EMAIL PROTECTED] wrote: > How can I add a method to the int class? sub class it
>>> class MyInt(int): >>> def times(self,multiple): >>> return self * multiple >>> >>> a = 2 >>> print a 2 >>> a = MyInt(2) >>> print a >>> 2 >>> print a.times(2) 4 --Cheers -- http://mail.python.org/mailman/listinfo/python-list