[Tutor] Overloading + factoring
Fri, 3 Dec 1999 10:52:48 -0500
On Thu, Dec 02, 1999 at 03:30:44PM -0300, FFlores wrote:
> A question about class methods:
> Can you overload the definition of a method,
> especially __init__?
Yes. For example,
class second(first): # inherits from the first class
def __init__(self): # this overrides the first one.
> And something else, though it's not Python-related:
> is there a nice method for factoring numbers, calculating
> lcd, gcd, and/or a good library of such functions for rational
Not to my knowledge. But, you could probably write one yourself.