projects
/
quizzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c18db2f
)
Make get_question() a bit more interesting
author
W. Trevor King
<wking@tremily.us>
Tue, 5 Feb 2013 14:07:18 +0000
(09:07 -0500)
committer
W. Trevor King
<wking@tremily.us>
Tue, 5 Feb 2013 14:07:59 +0000
(09:07 -0500)
quizzer/ui/__init__.py
patch
|
blob
|
history
diff --git
a/quizzer/ui/__init__.py
b/quizzer/ui/__init__.py
index afb07266db8b837120715b60d164f2985afd85b1..eb8682d7220a52dc1178880bb62922868c649b19 100644
(file)
--- a/
quizzer/ui/__init__.py
+++ b/
quizzer/ui/__init__.py
@@
-10,7
+10,8
@@
class UserInterface (object):
raise NotImplementedError()
def get_question(self):
- return self.quiz[0]
+ remaining = [q for q in self.quiz if q not in self.answers]
+ return remaining[0]
def process_answer(self, question, answer):
if question not in self.answers: