cul*_*rón 1 python arguments map
这是我的一段代码.Lambda接受3个参数,我想将它们作为位置参数的元组传递,但显然map将它们作为单个参数提供.
我如何在底部提供这些元组作为参数列表?(我知道我可以重写lambda,但它会变得不易阅读)
adds = map((lambda j, f, a:
j.join([f.format(i) for i in parse.options[a]]) if parse.options[a] else ''),
((' ', ' -not -path "{0}" ', 'exclude'),
(' -or ', '-path "{0}"', 'include')))
Run Code Online (Sandbox Code Playgroud)