Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompute questions, answers, and comments #9

Open
e-caste opened this issue Feb 5, 2021 · 0 comments
Open

Precompute questions, answers, and comments #9

e-caste opened this issue Feb 5, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@e-caste
Copy link
Owner

e-caste commented Feb 5, 2021

To lift the weight of the computation needed to do the parsing after any question is requested to the bot, it would be simpler to keep all these data in memory after an initialization in a dict such as:

qacs: Dict[int, Dict[str, str]] = {
    1: {
       'q': 'This is a question',
       'a': 'C',
       'c': 'This is a comment'
    },
    ...
}
@e-caste e-caste added enhancement New feature or request good first issue Good for newcomers labels Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant