【发布时间】:2009-12-17 20:46:00
【问题描述】:
我来自 Java,我想做一些像这样的data transfer objects (DTO):
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?
或者有更好的方法吗?
【问题讨论】:
标签: python