Ville> Or in Python 2.4 (strict_type is hypothetical for now):
Ville> def foo(a,b) [typecheck(type1, type2):
Ville> pass
Ville> def foo(a,b) [typecheck(type3, type4):
Ville> pass
Ville> which is even nicer :-).
Damn, my brain never works properly on sat/sun morning. Obviously I
meant that there could be wrappers for:
asserttype: check all args w/ isinstance
multimethod: dynamically choose the func/method to execute. Slow, but
sometimes people need it.
And if someone wonders what I'm going on about, check out:
http://www.python.org/peps/pep-0318.html
This might also be a good time to dream up all kinds of cool wrappers
we can think about :)
--
Ville Vainio http://tinyurl.com/2prnb