[Tutor] Overloading + factoring

FFlores fflores@arnet.com.ar
Fri, 3 Dec 1999 22:39:27 -0300

William Park <parkw@better.net> wrote:

>     class first:
> 	def __init__(self):
> 	    ...
>     class second(first):	# inherits from the first class
> 	def __init__(self):	# this overrides the first one.
> 	    ...

Well, that's another thing! I was referring to C++-like
overloading (i. e. several definitions of the same method,
to be tested in order until the parameters fit). But I've
already been told that's not possible.

> > 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
> > numbers?
> Not to my knowledge.  But, you could probably write one yourself.

Oh yes, I could make a function that gives me the prime numbers
I need. But I'd become old and die while the interpreter is still
calculating. :) Thanks anyway.

--Pablo Flores