【发布时间】:2012-05-19 07:17:45
【问题描述】:
这是我的行动:
>>> def show(d):
print d
...
>>> test = {"result": True}
>>> show(test)
{'result': True}
>>> show(test["info"]="Some info")
File "<console>", line 1
SyntaxError: keyword can't be an expression
为什么我不能将表达式作为参数传递给函数?
【问题讨论】:
标签: python python-2.7