【发布时间】:2012-08-06 13:51:18
【问题描述】:
我需要调用一个函数来处理可以具有默认值的参数列表:
示例代码:
web.input(name=None, age=None, desc=None, alert=None, country=None, lang=None)
如何使用列表或字典像这样调用 web.input?我被困在:
getattr(web, 'input').__call__()
【问题讨论】:
-
为什么是
getattr(web, 'input').__call__()?只要web.input()就可以了。