My function creates a chain of generators:
def bar(num):
import itertools
some_sequence = (x*1.5 for x in range(num))
some_other_sequence = (x*2.6 fo
In theory you can't because chained objects may even contain infinite sequences such as itertools.count(...)
.
You should try to reverse your generators/sequences or use reversed(iterable)
for each sequence if applicable and then chain them together last-to-first. Of course this highly depends on your use case.