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

Add keys_with_prefix and iterkeys_with_prefix methods #4

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update hat_trie.pyx
  • Loading branch information
yflau committed Aug 15, 2013
commit 02d4225c5f1b8bf80180f6bf632b96b42aa9e625
2 changes: 1 addition & 1 deletion src/hat_trie.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ cdef class Trie(BaseTrie):

def setdefault(self, unicode key, int value):
cdef bytes bkey = key.encode('utf8')
self._setdefault(bkey, value)
return self._setdefault(bkey, value)

def keys(self):
return [key.decode('utf8') for key in self.iterkeys()]