lru_cache interferes with type checking done by single_dispatch
问题 I have a method dispatch decorator with three registered functions. One dispatches on int , which works fine. The second dispatched on a custom type, also works fine. The third is also a custom type, but the Class is wrapped with the lru_cache decorator. (To make things a little more complicated, the class is instantiated in a roundabout way via a methoddispatch on the __call__ method of another class.) @lru_cache(maxsize=None, typed=True) class QualifiedInterval: # stuff that works Inside