title: How can I use functools.singledispatch with instance methods?
body: <p>Python 3.4 <a href="https://docs.python.org/3/library/functools.html#functools.singledispatch">added</a> the ability to define function overloading with static methods. This is essentially the example from the documentation:</p>
  
  <pre><code>from functools import singledispatch
  
  
  class TestClass(object):
      @singledispatch
      def test_method(arg, verbose=False):
          if verbose:
              print("Let me just say,", end=" ")
  
          print(arg)
  
      @test_method.register(int)
      def _(arg):
          print("Strength in numbers, eh?", end=" ")
          print(arg)
  
      @test_method.register(list)
      def _(arg):
          print("Enumerate this:")
  
          for i, elem in enumerate(arg):
              print(i, elem)
  
  if __name__ == '__main__':
      TestClass.test_method(55555)
      TestClass.test_method([33, 22, 11])
  </code></pre>
  
  <p>In its purest form, the <code>singledispatch</code> implementation relies on the first argument to identify type, therefore making it tricky to extend this functionality to instance methods. </p>
  
  <p>Does anyone have any advice for how to use (or jerry-rig) this functionality to get it to work with instance methods?</p>