From 34308fe1fc45cc8ea1f809c54168f418a146f0ca Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Fri, 25 May 2018 05:29:24 +1000 Subject: [PATCH] docs: python bindings howto DITA * Updated the example code for the groups work around to actually do what the documentation said (instead of having all results match group_lists). --- lang/python/docs/dita/howto/part06/group-lines.dita | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lang/python/docs/dita/howto/part06/group-lines.dita b/lang/python/docs/dita/howto/part06/group-lines.dita index 50d63df0..f4aca74c 100644 --- a/lang/python/docs/dita/howto/part06/group-lines.dita +++ b/lang/python/docs/dita/howto/part06/group-lines.dita @@ -22,11 +22,13 @@ for i in range(len(lines)): groups = line.split(":")[-1].replace('"', '').split(',') -group_lines = groups -for i in range(len(group_lines)): - group_lines[i] = group_lines[i].split("=") +group_lines = [] +group_lists = [] + +for i in range(len(groups)): + group_lines.append(groups[i].split("=")) + group_lists.append(groups[i].split("=")) -group_lists = group_lines for i in range(len(group_lists)): group_lists[i][1] = group_lists[i][1].split()