res = "A pdpipe pipline:\n"
res += "df -> " + self._stages[0].__str__() + "\n"
for stage in self._stages[1:]:
res += " -> " + stage.__str__() + "\n"
return res
After Change
res += "[ 0] " + "\n ".join(
textwrap.wrap(self._stages[0].__str__())) + "\n"
for i, stage in enumerate(self._stages[1:]):
res += "[{:>2}] ".format(i+1) + "\n ".join(
textwrap.wrap(stage.__str__())) + "\n"
return res