Commit a505f5a3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5b482387
......@@ -184,12 +184,12 @@ def _iterAllStructs(klo, khi, keyv, maxdepth, maxsplit):
# emit Tree -> Trees -> ...
if maxdepth == 0:
continue
ichildren = [] # of _iterAllStructs for each child link
ichildrenv = [] # of _iterAllStructs for each child link
for (xlo, xhi) in zip(ksplitv[:-1], ksplitv[1:]): # (klo, s1), (s1, s2), ..., (sN, khi)
ichildren.append( _iterAllStructs(
ichildrenv.append( _iterAllStructs(
xlo, xhi, _keyvSliceBy(keyv, xlo, xhi), maxdepth - 1, maxsplit))
for children in itertools.product(ichildren):
for children in itertools.product(*ichildrenv):
yield Tree(ksplitv[1:-1], *children) # (s1, s2, ..., sN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment