[Tutor] constructors
Prahlad Vaidyanathan
slime@vsnl.net
Fri, 12 Apr 2002 10:45:25 -0400
Hi,
On Fri, 12 Apr 2002 Alexandre Ratti spewed into the ether:
[-- snippity --]
> Here is a definition I came across:
>
> <QUOTE>
> Generally, the ability to appear in many forms. In object-oriented
> programming, polymorphism refers to a programming language's ability to
> process objects differently depending on their data type or class. More
> specifically, it is the ability to redefine methods for derived classes.
Ok, this is what I had guessed.
> For example, given a base class shape, polymorphism enables the programmer
> to define different circumference methods for any number of derived
> classes, such as circles, rectangles and triangles. No matter what shape an
> object is, applying the circumference method to it will return the correct
> results. Polymorphism is considered to be a requirement of any true
> object-oriented programming language (OOPL).
> The type of polymorphism described above is sometimes called parametric
> polymorphism to distinguish it from another type of polymorphism called
> overloading.
Overloading, I presume, is redifining the double-underscore methods,
like __setitem__, __len__, etc ?
Thanks !
pv.
--
Prahlad Vaidyanathan <http://www.symonds.net/~prahladv/>
I know the answer! The answer lies within the heart of all mankind!
The answer is twelve? I think I'm in the wrong building.
-- Charles Schulz