From d688da2c586e3165bc366772668ecb008d03eca3 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 4 Jun 2019 04:57:46 -0400 Subject: fix print for python27 --- Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py index 78fe196..9f54c1e 100755 --- a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py +++ b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py @@ -167,13 +167,12 @@ class Algorithm(object): t = 0 else: t = sum(timing)/len(timing) - el = [ self.iteration-1, - self.max_iteration, - "{:.3f}".format(t), - self.get_last_objective() ] - - string = self.objective_to_string() - out = "{:>9} {:>10} {:>13} {}".format(*el[:-1] , string) + out = "{:>9} {:>10} {:>13} {}".format( + self.iteration-1, + self.max_iteration, + "{:.3f}".format(t), + self.objective_to_string() + ) return out def objective_to_string(self): @@ -204,4 +203,4 @@ class Algorithm(object): '', '[s]', '') - return out \ No newline at end of file + return out -- cgit v1.2.3