-
Notifications
You must be signed in to change notification settings - Fork 581
Returning a count from addN (#833) #834
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
base: main
Are you sure you want to change the base?
Conversation
rdflib/graph.py
Outdated
| import warnings | ||
|
|
||
| from hashlib import md5 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please keep commits concise, don't change random other things...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. They are unused though.
| ) | ||
| if triples_stored is None: | ||
| return -1 | ||
| return triples_stored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this won't really work without also at least updating the store interface in store.py
also i'd prefer a simple return in front of the dispatch to store... i don't see how -1 is better than simply returning None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. I don't actually recall why I went with -1.
The intention is to make it optional. I have added a flag member variable to indicate whether addN returns a count on a store I maintain, but I didn't see a reason to make it official interface.
|
Open/Close Travis |
No description provided.