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

Use pythonic sequence ducktyping instead of hardcoding to list type #50

Closed
Bartvds opened this issue May 26, 2016 · 0 comments
Closed

Comments

@Bartvds
Copy link

Bartvds commented May 26, 2016

The list of objects,and the update_fields and exclude_fields arguments break when passed a set, tuple, iterable or any other sequence type that is not specifically a list.

This is not very pythonic, most API's allow to pass whatever and will convert if their internals require a specific type of sequence.

This is annoying if we pass things like dict.keys() as update_fields, or a set of deduped objects etc.

aykut pushed a commit that referenced this issue May 22, 2017
aykut added a commit that referenced this issue May 22, 2017
cast update and exclude fields to list #50
@aykut aykut closed this as completed May 22, 2017
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