Some pythonic advice needed
Sean 'Shaleh' Perry
shalehperry at attbi.com
Sun Jun 1 13:17:23 EDT 2003
> Sorry if I can't explain my problem very clear.
>
> I guess I'm looking for a class with the following functions:
>
> - getQuestion(Language) which would return a tuple (questionID,
> question, answer, [alternatives]). Alternatives would be a list of
> (answer, ID) pairs. This would allow me to update the score of an
> alternative too if she would enter that instead of the expected answer.
>
> - updateQuestion(questionID, Score)
> This would update the score of an word-pair, pushing it further back in
> the list of questions.
long term you are going to want a database behind this. Perhaps not a full
SQL daemon process but something with a little more support than a dict. If
you try to code this yourself you will end up writing a special purpose
database anyways.
Perhaps something like gadfly will accelerate your learning curve.
More information about the Python-list
mailing list