是否可以检查f是否在泳池内?另外,什么是仅捕获特定错误的好捕获?
a = [[1, 2], [1, 2]]
def g(x):
return x
def f(x):
try:
with Pool(2) as p:
print(p.map(g, x))
except Exception as e:
print(type(e))
return x
with Pool(2) as p:
print(p.map(f, a))
答案 0 :(得分:0)
这对我有用
{{1}}