FIX do not use itertools.repeat

`itertools.repeat` returns references to the same object, whereas we need distinct objects so that updates do not affect all of them.