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 named tuples for BookmarkVar values #652

Closed
LeXofLeviafan opened this issue Dec 15, 2022 · 0 comments · Fixed by #660
Closed

Use named tuples for BookmarkVar values #652

LeXofLeviafan opened this issue Dec 15, 2022 · 0 comments · Fixed by #660

Comments

@LeXofLeviafan
Copy link
Collaborator

I believe that using keywords/field names is better practice than magic numbers (i.e. row.title instead of row[2]), which is perfectly achievable when using named tuples (or their typed equivalent) instead of plain tuples – which is how the BookmarkVar type is defined at the moment.

This likely won't take much effort to implement, since converting a plain tuple to a named tuple is as simple as passing a (starred) tuple value to the constructor: BookmarkVar(*resultset[0]).

LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 7, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 7, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 7, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 22, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 22, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 22, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 22, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 22, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 23, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 27, 2023
LeXofLeviafan added a commit to LeXofLeviafan/buku that referenced this issue Jan 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant