define a list with type
<p>I come from Java and I wanna do some Data Transfer Objects like this:</p>

<pre><code>class ErrorDefinition():
    code = ''
    message = ''
    exception = ''

class ResponseDTO():
    sucess = True
    errors = list() # how to say it that is directly of ErrorDefinition() type, to not import it every time that im going to append a Error def.
</code></pre>

<p>or Is there a better way to do this?</p>
