title: Python Dataclass gives me 'function' object has no attribute '__mro__'?
body: <p>As in the last question:<a href="https://stackoverflow.com/questions/54556930/typeerror-int-object-is-not-iterable-while-no-iteration-exists">TypeError: &#39;int&#39; object is not iterable while no iteration exists?</a>, I find a problem in my program. That is:
  In Python,</p>
  
  <ul>
  <li><code>set( (0,0) )</code>actually gives you <code>{0}</code>, but I want <code>{(0,0)}</code></li>
  <li><code>collections.deque( ((0, 0), [ (0, 0) ] ) ).popleft()</code>actually gives you <code>(0,0)</code> , whereas I want <code>((0, 0), [ (0, 0) ] )</code></li>
  </ul>
  
  <p>So now I',m thinking about designing data classes of my own. Yet in test code I came across an 'function' object has no attribute "<strong>mro</strong>" problem.</p>
  
  <p><strong>Test code 1</strong>:</p>
  
  <pre><code>from dataclasses import dataclass
  @dataclass
  def DequeItems():
      current:tuple
      path:list
  
  a=DequeItems(current=(0, 0),\
          path=[ (0, 0) ] )
  print(a)
  </code></pre>
  
  <p><strong>Test code 1 error screenshot</strong>:</p>
  
  <p><a href="https://i.stack.imgur.com/YxOc5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YxOc5.png" alt="enter image description here"></a></p>
  
  <p><strong>Test code 2</strong>:</p>
  
  <pre><code>from dataclasses import dataclass
  
  @dataclass(init=True)
  def Pair():
      visit:tuple
  
  a=Pair( visit=(0,0)) 
  print(a)   
  </code></pre>
  
  <p><strong>Test code 2 error scrrenshot</strong>:
  <a href="https://i.stack.imgur.com/FH3FB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FH3FB.png" alt="enter image description here"></a></p>
  
  <p>My Python version is Anaconda 3.6.8</p>