如何创建复杂类型以及如何传递复杂类型中的值,以及如何调用它们。
下面是采用复杂类型的transferBalance方法
(TransferBalance){
transDetails =
(MoneyTransfer){
transferDate = None
debitAccount = None
creditAccount = None
transferAmount = None
}
}
答案 0 :(得分:4)
您使用工厂:
MT = client.factory.create('MoneyTransfer')
MT.transferDate = '01/01/01'
MT.debitAccount = '01234567'
MT.creditAccount = '87654321'
MT.transferAmount = 1000000.00
TB = client.factory.create('TransferBalance')
TB.transDetails = MT