我有我用python编写的这段代码:
from Purchase import Transaction
from Purchase import MoneyStatement
if __name__ == '__main__':
p= {Transaction('costco','me', 45, "AmEx"),Transaction('costco','me', 45, "AmEx")}
ms= MoneyStatement('AmEx 10-19-2012', p)
print(ms)
它在 python 中工作,但是当我尝试在 jython 中运行它时,它给了我这个错误:
p= {Transaction('costco','me', 45, "AmEx"),Transaction('costco','me', 45, "AmEx")}
^
SyntaxError:不匹配的输入','需要冒号