-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
astuple method #77
Comments
Your use case is compelling indeed. |
|
I'd be glad to add my commit to this wonderful library ;) I'll try to submit a pull request during the week. |
How do you think that |
does recursing make even sense with tuples? oO |
We should probably try to mirror For nested attr classes, this would be:
For built-in collections... Just do what
Another side of the mirroring: an non-nested attr class can be dumped and loaded like this:
so tuples work in a similar way:
Thoughts? |
Hello,
For the usage of attr with DB API 2.0 libraries (like Sqlite3), it would be great to have a
astuple
method.This method would return the object values in a tuple, ordered by the order of declaration of it's attributes.
For example we could do things like this :
This would be useful for DB API libraries but also for other needs probably.
What is your opinion about it ?
The text was updated successfully, but these errors were encountered: