def pass_keywords():
"""
Helper function that extracts the arguments of the callee (must be a (class) method) and returns them.
Credits to `Kelly Yancey <http://kbyanc.blogspot.de/2007/07/python-aggregating-function-arguments.html>`_
"""
args, _, _, locals = inspect.getargvalues(inspect.stack()[1][0])
args.pop(0)
kwargs = {i: j for i, j in locals.items() if i in args}
return kwargs
operators.py 文件源码
python
阅读 33
收藏 0
点赞 0
评论 0
评论列表
文章目录