title: Define a list with type
body: <p>I come from Java, and I want to do some <a href="https://en.wikipedia.org/wiki/Data_transfer_object" rel="noreferrer">data transfer objects</a> (DTOs) like this:</p>
  
  <pre><code>class ErrorDefinition():
      code = ''
      message = ''
      exception = ''
  
  class ResponseDTO():
      sucess = True
      errors = list() # How do I say it that it is directly of the ErrorDefinition() type, to not import it every time that I'm going to append an error definition?
  </code></pre>
  
  <p>Or is there a better way to do this?</p>