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

match should not be an iterator #36

Open
tooxie opened this issue May 27, 2017 · 1 comment
Open

match should not be an iterator #36

tooxie opened this issue May 27, 2017 · 1 comment

Comments

@tooxie
Copy link

tooxie commented May 27, 2017

I think it makes it more complicated to work with the function because in order to subscript it one has to force it into a list first. If each result had to be fetched from the server then it would make a lot of sense to yield them one by one, but since the response is already downloaded and parsed, returning all results at once makes no difference.

@sampsyo
Copy link
Member

sampsyo commented May 27, 2017

Hi! Thanks for the suggestion. I generally like iterator-based APIs, though, and they're quite common in modern Python. Even dict.items(), for example, is an iterator these days. I agree there's not a huge performance problem to be solved here, but I think the difference is small enough that it's probably not worth the effort to change.

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

2 participants