title: Can a function be a Python dataclass member?
body: <p>I'm trying to keep some functions together and tried a Python dataclass for this. I could not come up with or find how to assign a type to a function within a dataclass. </p>
  
  <p>In example below I used a dummy type <code>int</code>, but what I should use correctly instead of <code>int</code>?</p>
  
  <pre><code>from dataclasses import dataclass
  
  inc = lambda x : x+1
  
  @dataclass
  class Holder:
    func: int # but I need a better type signature here
  
  h = Holder(inc)
  
  assert h.func(1) == 2
  </code></pre>