8f9b9d7504
The folded form combined multiple targets into one, which is not the desired result. ''' unfolded l=['gcc5,', 'mingw5,'] e='gcc5,' p=('gcc5', '') l=['gcc5,', 'mingw5,'] e='mingw5,' p=('mingw5', '') folded l=['gcc5,', 'mingw5,'] e='mingw5,' p=('gcc5', '', 'mingw5', '') ''' import itertools l = ['gcc5,', 'mingw5,'] print('unfolded') for e in l: for p in itertools.product(*[v.split('+') for v in e.split(',')]): print("l=%r e=%r p=%r" % (l, e, p)) print('folded') for p in itertools.product(*[ v.split('+') \ for e in l \ for v in e.split(',') \ ]): print("l=%r e=%r p=%r" % (l, e, p)) |
||
---|---|---|
common | ||
contrib | ||
d1x-rebirth | ||
d2x-rebirth | ||
Documentation | ||
similar | ||
.gitignore | ||
COPYING.txt | ||
GPL-3.txt | ||
INSTALL.markdown | ||
SConstruct |