【发布时间】:2009-12-27 19:00:36
【问题描述】:
我不想使用 *args 或 **kwargs,因为我无法更改函数声明。
例如:
def foo( a, b, c ) """Lets say values passed to a, b and c are 1,2 and 3 respectively"""
...
...
""" I would like to generate an object preferably a dictionary such as {'a':1, 'b':2, 'c':3} """
...
...
谁能建议一种方法来做到这一点? 提前致谢。
【问题讨论】:
标签: python function object arguments