teaching OO
Ian Bicking
ianb at colorstudy.com
Wed Nov 24 14:56:41 EST 2004
Gabriel Zachmann wrote:
>> The concept of overloading is easy, you can go one step further by
>> introducing generic functions / multimethods through one of the
>> modules floating around the net.
>
>
> You mean in Python? (or C++)
> Could you give me a pointer to one of those modules?
There's a simple example of multimethods in the Python Cookbook
(online). PEAK now includes a generic function implementation, a bit
more at http://dirtsimple.org/2004/11/generic-functions-have-landed.html
Adaptation and interfaces are related idea. I feel like they are a
little vague at this point, as far as best-practices go.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Python-list
mailing list