Skip to content

Prefer str | list[str] over Sequence[str] #240

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

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

MarcoGorelli
Copy link
Contributor

see #212

This would make it clearer that you can either pass a single column name, or a list of column names.

Sequence[str] would accept 'abcd' but it's ambiguous whether that means "column 'abcd'" or "columns 'a', 'b', 'c', 'd'", given that str is itself a Sequence[str]

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Marco. +1 on being able to write keys='colname'

@kkraus14
Copy link
Collaborator

Are there any concerns about people wanting to be able to pass iterables other than list types? I.E. tuples or anything else?

@MarcoGorelli
Copy link
Contributor Author

thanks for your reviews

not sure it's worth worrying about tuples tbh

@MarcoGorelli MarcoGorelli merged commit 97d4dfc into data-apis:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants