Ville> Or in Python 2.4 (strict_type is hypothetical for now):
Ville> def foo(a,b) [typecheck(type1, type2):
Ville> def foo(a,b) [typecheck(type3, type4):
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:
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