From 00cf9e3d93601a9389fbc9cd85811d1be57db2b1 Mon Sep 17 00:00:00 2001
From: Joseph Ramsay <joseph.ramsay@stfc.ac.uk>
Date: Fri, 6 Oct 2017 11:31:24 +0100
Subject: [PATCH] Re #20816 Fixed table formatting in QueryMDWorkspace doctest

---
 docs/source/algorithms/QueryMDWorkspace-v1.rst | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/docs/source/algorithms/QueryMDWorkspace-v1.rst b/docs/source/algorithms/QueryMDWorkspace-v1.rst
index 258550f1feb..a7e8b512695 100644
--- a/docs/source/algorithms/QueryMDWorkspace-v1.rst
+++ b/docs/source/algorithms/QueryMDWorkspace-v1.rst
@@ -45,15 +45,11 @@ Usage
    print("Table contains {0} rows".format(nRows))
    print("first 11 of them are:")
    print("--------------------------------------------------------------------------------------------------------------")
-   for name in col_names:
-      print('| {0:19} '.format(name), end='')
-   print('|')
+   print(' '.join('| {0:19}'.format(name) for name in col_names) + ' |')
+	      
    print("--------------------------------------------------------------------------------------------------------------")
    for i in range(0,11):
-     for name in col_names:
-        col = table.column(name);
-        print('| {0:>19.4f} '.format(col[i]), end='')
-     print('|')
+      print(' '.join('| {0:>19.4f}'.format(table.column(name)[i]) for name in col_names) + ' |')
     
     
 **Output:**
-- 
GitLab