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

Change to generator design #175

Open
dbosk opened this issue Sep 15, 2024 · 0 comments
Open

Change to generator design #175

dbosk opened this issue Sep 15, 2024 · 0 comments

Comments

@dbosk
Copy link
Owner

dbosk commented Sep 15, 2024

In most places we convert the generators to lists. We should stop doing that and be more careful with using generators instead.

The advantage is that when we're looking for a user object, we don't care from which course we get it. Sometimes we search through all courses. If we use a generator, we can do obj = next(matching_users). If we use lists, we first need to generate the whole list to just pop the first element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant