-
Notifications
You must be signed in to change notification settings - Fork 51
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
[WIP] Refactoring the codebase #79
base: main
Are you sure you want to change the base?
Conversation
@pipermerriam this is the code I have got till now. The function names and comments are bad as of now. This is because I am focussing on the correctness of the design as of now. The |
f1c0a5f
to
2e9d56b
Compare
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.
I'm having trouble understanding how this will work with a database. Would each of the node classes be given a handle to the database so they can look up values?
@pipermerriam yes, I was hoping to include an interface in each of the Node's class which would exclusively deal with the DB. And will change the code as per above suggestion.
|
The trie implementation should be agnostic to the database. No reason to lock into
|
Yes, I agree to this. The implementation should be agnostic to DB. But When I try to make some examples, I have no idea what should I pass as Now if I am right, here is the ScrachDB. This is just a wrapper for internal use. Shall we just make it as a wrapper, I mean a real wrapper to wrap the db, and enable a common db interface with it? This is my point. |
Yup, that's exactly right. If you just want an in-memory db, then a
There is already a generally accepted db interface: a MutableMapping (aka
|
@pipermerriam @carver I plan on continuing this. But as far as the specs go, to distinguish between |
Sounds okay in theory |
* repin flake8, bump tox to >=4.0.0 as that's where whitelist was deprecated, misc updates
What was wrong?
The code base can be refactored.
Issue #78
Cute Animal Picture