|
|
|
Or you can just use RuleDispatch ;]
http://www-128.ibm.com/developer...rary/l-cppeak2/
Karl Guertin |
Homepage |
06/10/25 - 11:01 pm | #
|
|
or maybe simplegeneric
http://cheeseshop.python.org/pyp...i/
simplegeneric
Kent Johnson |
Homepage |
06/10/26 - 2:37 pm | #
|
|
I like this a lot, and it would be interesting to see how well it performs against RuleDispatch, since its simpler.
might it be possible to use a decorator syntax instead of the numeric approach ? i.e.
@overload
def __init__(...)
mike bayer |
06/10/26 - 9:50 pm | #
|
|
Decorators would probably work, and would avoid the numeric approach - but you'd need to decorate every overloaded method (my approach works with a single metaclass declaration).
There might also need to be some trickery to avoid similarly named methods from different classes clashing, this approach contains it all within the class declaration.
I like the *effect* of the Peak Predicative dispatch, but not the strings used for the type specification.
Fuzzyman |
Homepage |
06/10/27 - 12:59 am | #
|
|
|
Commenting by HaloScan
|