[ANN] Multimethod.py -- multimethods for Python
Samuel A. Falvo II
kc5tja at garnet.armored.net
Tue Jan 11 18:12:06 EST 2000
In article <85fnbk$j6h$1 at nntp9.atl.mindspring.net>, Aahz Maruch wrote:
>IOW, similar to C++-style multiple dispatch?
C++ doesn't support multiple dispatch; it supports function overloading,
which isn't the same thing. Function overloading requires that all types of
all objects be known _precisely_ at compile time, so that the compiler can
find the correct (global) function to call.
Multiple dispatch takes all the types of the supplied arguments and, at _run
time_ decides which method to invoke. The types of methods need not be
known precisely at compile time.
--
KC5TJA/6, DM13, QRP-L #1447
Samuel A. Falvo II
Oceanside, CA
More information about the Python-list
mailing list