From da7ccde95a00c9eac955729961c592149ae50193 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 7 Feb 2013 16:11:41 -0500 Subject: [PATCH] ui.cli: Unwrap multiline answers in display_result No need to surprise the user with the internal list representation. --- quizzer/ui/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quizzer/ui/cli.py b/quizzer/ui/cli.py index 4663077..94255a2 100644 --- a/quizzer/ui/cli.py +++ b/quizzer/ui/cli.py @@ -159,7 +159,10 @@ class CommandLineInterface (UserInterface): else: correct = 'incorrect' correct = _colorize(self.colors[correct], correct) - print(' you answered: {}'.format(answer['answer'])) + ans = answer['answer'] + if question.multiline: + ans = '\n '.join(ans) + print(' you answered: {}'.format(ans)) print(' which was: {}'.format(correct)) def display_totals(self): -- 2.26.2