-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-131323: Add comprehensive key-value type documentation to dbm module #137972
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
Doc/library/dbm.rst
Outdated
|
|
||
| **Keys:** | ||
|
|
||
| * **All backends**: Accept :class:`str` and :class:`bytes` objects |
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.
The sqlite backend accepts integers and floats as keys, but that is not mentioned here.
The structure for the Keys and Values section is slightly different, it would be nice to have them the same. Are there any differences in how keys and values are handled? If not, we might even combine the keys and values sections.
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.
Thanks. I've updated the doc to reflect that SQLite accepts int/float (and the other listed types) for both keys and values, an kept a single combined keys/values section since they're handled the same. I also increased test coverage for those key/value types.
dbmsince 3.13 #131323📚 Documentation preview 📚: https://cpython-previews--137972.org.readthedocs.build/