python - lost self while decorating class multimethods
问题 I am trying to implement a multimethod approach based on this article http://www.artima.com/weblogs/viewpost.jsp?thread=101605. There are two differences from this approach: I only need to look at the first argument of the multimethod, so no need to form tuples of arg classes The multimethods will live in classes, they will not be regular functions. However I mixed up my classes a bit, and the call to self gets lost while dispatching a call to a class method. Here is my code: method_registry