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

min() and max() do not work for list comprehensions #3409

Closed
oleksiyskononenko opened this issue Jan 11, 2023 · 0 comments · Fixed by #3407
Closed

min() and max() do not work for list comprehensions #3409

oleksiyskononenko opened this issue Jan 11, 2023 · 0 comments · Fixed by #3407
Assignees
Labels
improve Improvement of an existing functionality
Milestone

Comments

@oleksiyskononenko
Copy link
Contributor

The python built-in min() and max() functions work perfectly fine with the list comprehensions

min(i for i in range(5)) # 0
max(i for i in range(5)) # 4

However, even though we're trying to keep them working after importing the corresponding functions from datatable, this is not the case for comprehensions

from datatable import min
min(i for i in range(5)) # throws TypeError: 'generator' object is not subscriptable
@oleksiyskononenko oleksiyskononenko added the improve Improvement of an existing functionality label Jan 11, 2023
@oleksiyskononenko oleksiyskononenko added this to the Release 1.1.0 milestone Jan 11, 2023
@oleksiyskononenko oleksiyskononenko self-assigned this Jan 11, 2023
@oleksiyskononenko oleksiyskononenko changed the title min() and max() do not work on generators min() and max() do not work for list comprehensions Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve Improvement of an existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant