We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
taskflow/taskflow/db/mem.py
Line 43 in 2b46c6b
So happy to see that littletable is useful in your project.
littletable
Since you created a unique index on the "id" attribute, you can replace this line with:
return self.__tasks.by.id[id]
which will either return the matching task, or raise KeyError.
KeyError
In the end, it is equivalent to the code you have now, just wanted to make you aware of the table.by.<index_name> form of using indexed attributes.
table.by.<index_name>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
taskflow/taskflow/db/mem.py
Line 43 in 2b46c6b
So happy to see that
littletable
is useful in your project.Since you created a unique index on the "id" attribute, you can replace this line with:
which will either return the matching task, or raise
KeyError
.In the end, it is equivalent to the code you have now, just wanted to make you aware of the
table.by.<index_name>
form of using indexed attributes.The text was updated successfully, but these errors were encountered: