更确切地说
@string_supply #This should supply **string** from foo1 into foo2
def foo2(x):
#Cannot use global string. string changes
return list(itertools.compress(string, x)) # **string** needed here
def foo1(startrange, string):
temp = None
temp_list = map(temp, start_range_compute_list(startrange))
ls_of = map(foo2, temp_list)
yield ls_of
@string_supply 装饰器可以这样写吗?我对装饰师没有经验。