Type checking

George Sakkis gsakkis at rutgers.edu
Fri Jul 2 06:01:17 CEST 2004


Christopher T King <squirrel at WPI.EDU> wrote in message news:<Pine.LNX.4.44.0407010856480.31307-100000 at ccc1.wpi.edu>...
> 
> (...) some functions need to behave differently depending 
> on the types of their arguments (...)

Uhm.. this doesn't seem very OO to me; if a function needs to behave
differently for different argument types, it's an indication that it
should be defined as method, overriden for each type of interest (or
multiple-dispatched if more than one arguments are involved).

George



More information about the Python-list mailing list