{"action":"opened","issue":{"url":"https://api.github.com/repos/fnl/patricia-trie/issues/4","labels_url":"https://api.github.com/repos/fnl/patricia-trie/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/fnl/patricia-trie/issues/4/comments","events_url":"https://api.github.com/repos/fnl/patricia-trie/issues/4/events","html_url":"https://github.com/fnl/patricia-trie/issues/4","id":122001102,"number":4,"title":"Non-existing key being reported","user":{"login":"fnl","id":109501,"avatar_url":"https://avatars.githubusercontent.com/u/109501?v=3","gravatar_id":"","url":"https://api.github.com/users/fnl","html_url":"https://github.com/fnl","followers_url":"https://api.github.com/users/fnl/followers","following_url":"https://api.github.com/users/fnl/following{/other_user}","gists_url":"https://api.github.com/users/fnl/gists{/gist_id}","starred_url":"https://api.github.com/users/fnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnl/subscriptions","organizations_url":"https://api.github.com/users/fnl/orgs","repos_url":"https://api.github.com/users/fnl/repos","events_url":"https://api.github.com/users/fnl/events{/privacy}","received_events_url":"https://api.github.com/users/fnl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-14T09:07:30Z","updated_at":"2015-12-14T09:07:30Z","closed_at":null,"body":"The output of `key()` should be a value in the list provided by `keys()`.\r\n\r\nHowever, when I insert the following:\r\n\r\n```\r\n0a\r\n0a0a\r\n0a0a0a\r\n0a0a0000\r\n```\r\n\r\nand the look for a match for `0a0a0001`, I expect to see `0a0a`, but what I get is `0a0a0`:\r\n\r\n```\r\nIn [1]: import patricia\r\nIn [2]: t = patricia.trie()\r\nIn [3]: for value, key in enumerate([\"0a\", \"0a0a\", \"0a0a0a\", \"0a0a0000\"]):\r\n   ...:     t[key] = value\r\n   ...:     \r\nIn [4]: t.key('0a0a0001')\r\nOut[4]: '0a0a0'\r\n```"}}