TensaCo / tensacode

2 stars 1 forks source link

Use `overloaded` library instead of internal utility #9

Open JacobFV opened 1 year ago

JacobFV commented 1 year ago

See the code in the overloaded repo. You should be able to overload methods in both the implementing class as well as in the class being acted upon.

One issue right now is that, say when the user overloads tc.encode, they are passing the external method handle, but not the internal method handle to the overload dictionary. As a result, it will make a new entry instead of overloading the existing one. (Maybe it'll even raise an error since the base method wasn't annotated with overloadable.)

Possible solution, -. This should be fixed for this particular case instead of trying to make an unusably general solution