title: Using a dataclass to read a text file setting an attribute to be a datetime object
body: <p>I'm trying to force myself to get into the habit of using dataclasses. I'm reading a text file with rows of data, two of the columns contain a date. When I read the file into the class, why is the date not being converted to a datetime object?</p>
  <pre class="lang-py prettyprint-override"><code>import datetime
  from dataclasses import dataclass
  
  @dataclass
  class AC07:
      NAME: str
      MADE_FROM_DATE: datetime.datetime
      MADE_UPTO_DATE: datetime.datetime
      
  counter = 0
  deck = []
  with open(filename, encoding=&quot;latin-1&quot;) as file:
      for line in file:
          args = line.strip().split(&quot;|&quot;)[1:]  # not interested in first column
          data = AC07(*args)
          deck.append(data)
          counter += 1
          if counter == 10:
              break
          
  print (type(deck[0].MADE_FROM_DATE))
  &lt;class 'str'&gt;
  # Expected behavior &lt;class datetime.datetime&gt; 
  </code></pre>