Commits

Mikhail Korobov committed 7e9772f

rebuild wrapper

Comments (0)

Files changed (13)

src/_base_types.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_completer.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dawg_builder.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary_builder.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary_unit.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_guide_builder.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_guide_unit.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/b64_decode.cpp

-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
+/* Generated by Cython 0.17 on Sat Sep  8 01:02:31 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
 struct __pyx_opt_args_4dawg_10RecordDAWG_items;
 struct __pyx_opt_args_4dawg_7IntDAWG_get;
 
-/* "dawg.pyx":145
- *         self.guide.Clear()
+/* "dawg.pyx":150
+ *         del self.completer
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
   PyObject *prefix;
 };
 
-/* "dawg.pyx":229
+/* "dawg.pyx":234
  *         return res
  * 
  *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
   PyObject *__pyx_default;
 };
 
-/* "dawg.pyx":282
+/* "dawg.pyx":288
  * 
  * 
  *     cpdef list items(self, unicode prefix=""):             # <<<<<<<<<<<<<<
   PyObject *prefix;
 };
 
-/* "dawg.pyx":327
+/* "dawg.pyx":328
  *         return res
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
   PyObject *prefix;
 };
 
-/* "dawg.pyx":396
+/* "dawg.pyx":393
  * 
  * 
  *     cpdef list items(self, unicode prefix=""):             # <<<<<<<<<<<<<<
   PyObject *prefix;
 };
 
-/* "dawg.pyx":443
+/* "dawg.pyx":440
  *         return res
  * 
  *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
   PyObject *__pyx_default;
 };
 
-/* "dawg.pyx":372
+/* "dawg.pyx":369
  *     cdef _struct
  * 
  *     def __init__(self, fmt, arg=None):             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":415
+/* "dawg.pyx":412
  * 
  *         if isinstance(arg, collections.Mapping):
  *             iterable = ((key, arg[key]) for key in arg)             # <<<<<<<<<<<<<<
 struct __pyx_obj_4dawg_CompletionDAWG {
   struct __pyx_obj_4dawg_DAWG __pyx_base;
   dawgdic::Guide guide;
-};
-
-
-/* "dawg.pyx":194
+  dawgdic::Completer *completer;
+};
+
+
+/* "dawg.pyx":199
  * DEF MAX_VALUE_SIZE = 32768
  * 
  * cdef class BytesDAWG(CompletionDAWG):             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":387
+/* "dawg.pyx":384
  *             arg = []
  * 
  *         keys = ((d[0], self._struct.pack(*d[1])) for d in arg)             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":203
+/* "dawg.pyx":208
  *     """
  * 
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":406
+/* "dawg.pyx":403
  *     It can store integer values for unicode keys.
  *     """
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":401
+/* "dawg.pyx":398
  * 
  * 
  * cdef class IntDAWG(DAWG):             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":210
+/* "dawg.pyx":215
  *             arg = []
  * 
  *         keys = (self._raw_key(d[0], d[1]) for d in arg)             # <<<<<<<<<<<<<<
 };
 
 
-/* "dawg.pyx":355
+/* "dawg.pyx":352
  * 
  * 
  * cdef class RecordDAWG(BytesDAWG):             # <<<<<<<<<<<<<<
 static struct __pyx_vtabstruct_4dawg_CompletionDAWG *__pyx_vtabptr_4dawg_CompletionDAWG;
 
 
-/* "dawg.pyx":194
+/* "dawg.pyx":199
  * DEF MAX_VALUE_SIZE = 32768
  * 
  * cdef class BytesDAWG(CompletionDAWG):             # <<<<<<<<<<<<<<
   PyObject *(*get)(struct __pyx_obj_4dawg_BytesDAWG *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4dawg_9BytesDAWG_get *__pyx_optional_args);
   int (*_follow_key)(struct __pyx_obj_4dawg_BytesDAWG *, PyObject *, dawgdic::BaseType *);
   PyObject *(*get_value)(struct __pyx_obj_4dawg_BytesDAWG *, PyObject *, int __pyx_skip_dispatch);
+  PyObject *(*_value_for_index)(struct __pyx_obj_4dawg_BytesDAWG *, dawgdic::BaseType);
   PyObject *(*b_get_value)(struct __pyx_obj_4dawg_BytesDAWG *, PyObject *, int __pyx_skip_dispatch);
   PyObject *(*items)(struct __pyx_obj_4dawg_BytesDAWG *, int __pyx_skip_dispatch, struct __pyx_opt_args_4dawg_9BytesDAWG_items *__pyx_optional_args);
 };
 static struct __pyx_vtabstruct_4dawg_BytesDAWG *__pyx_vtabptr_4dawg_BytesDAWG;
 
 
-/* "dawg.pyx":355
+/* "dawg.pyx":352
  * 
  * 
  * cdef class RecordDAWG(BytesDAWG):             # <<<<<<<<<<<<<<
 static struct __pyx_vtabstruct_4dawg_RecordDAWG *__pyx_vtabptr_4dawg_RecordDAWG;
 
 
-/* "dawg.pyx":401
+/* "dawg.pyx":398
  * 
  * 
  * cdef class IntDAWG(DAWG):             # <<<<<<<<<<<<<<
     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,0};
     PyObject* values[1] = {0};
 
-    /* "dawg.pyx":137
- *     cdef Guide guide
+    /* "dawg.pyx":138
+ *     cdef Completer* completer
  * 
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
  *         super(CompletionDAWG, self).__init__(arg)
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("dawg.CompletionDAWG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("__init__", 0);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 137);
-
-  /* "dawg.pyx":138
+  __Pyx_TraceCall("__init__", __pyx_f[0], 138);
+
+  /* "dawg.pyx":139
  * 
  *     def __init__(self, arg=None):
  *         super(CompletionDAWG, self).__init__(arg)             # <<<<<<<<<<<<<<
  *         if not _guide_builder.Build(self.dawg, self.dct, &self.guide):
  *             raise Exception("Error building completion information")
  */
-  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_CompletionDAWG)));
   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4dawg_CompletionDAWG)));
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_arg);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_arg);
   __Pyx_GIVEREF(__pyx_v_arg);
-  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
 
-  /* "dawg.pyx":139
+  /* "dawg.pyx":140
  *     def __init__(self, arg=None):
  *         super(CompletionDAWG, self).__init__(arg)
  *         if not _guide_builder.Build(self.dawg, self.dct, &self.guide):             # <<<<<<<<<<<<<<
  *             raise Exception("Error building completion information")
- * 
+ *         if not self.completer:
  */
   __pyx_t_4 = (!dawgdic::GuideBuilder::Build(__pyx_v_self->__pyx_base.dawg, __pyx_v_self->__pyx_base.dct, (&__pyx_v_self->guide)));
   if (__pyx_t_4) {
 
-    /* "dawg.pyx":140
+    /* "dawg.pyx":141
  *         super(CompletionDAWG, self).__init__(arg)
  *         if not _guide_builder.Build(self.dawg, self.dct, &self.guide):
  *             raise Exception("Error building completion information")             # <<<<<<<<<<<<<<
- * 
- *     def __dealloc__(self):
- */
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *         if not self.completer:
+ *             self.completer = new Completer(self.dct, self.guide)
+ */
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
+  /* "dawg.pyx":142
+ *         if not _guide_builder.Build(self.dawg, self.dct, &self.guide):
+ *             raise Exception("Error building completion information")
+ *         if not self.completer:             # <<<<<<<<<<<<<<
+ *             self.completer = new Completer(self.dct, self.guide)
+ * 
+ */
+  __pyx_t_4 = (!(__pyx_v_self->completer != 0));
+  if (__pyx_t_4) {
+
+    /* "dawg.pyx":143
+ *             raise Exception("Error building completion information")
+ *         if not self.completer:
+ *             self.completer = new Completer(self.dct, self.guide)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_v_self->completer = new dawgdic::Completer(__pyx_v_self->__pyx_base.dct, __pyx_v_self->guide);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
   __pyx_r = 0;
   goto __pyx_L0;
   __pyx_L1_error:;
   __Pyx_RefNannyFinishContext();
 }
 
-/* "dawg.pyx":142
- *             raise Exception("Error building completion information")
+/* "dawg.pyx":146
+ * 
  * 
  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
  *         self.guide.Clear()
- * 
+ *         del self.completer
  */
 
 static void __pyx_pf_4dawg_14CompletionDAWG_2__dealloc__(struct __pyx_obj_4dawg_CompletionDAWG *__pyx_v_self) {
   __Pyx_RefNannyDeclarations
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("__dealloc__", 0);
-  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 142);
-
-  /* "dawg.pyx":143
+  __Pyx_TraceCall("__dealloc__", __pyx_f[0], 146);
+
+  /* "dawg.pyx":147
  * 
  *     def __dealloc__(self):
  *         self.guide.Clear()             # <<<<<<<<<<<<<<
+ *         del self.completer
+ * 
+ */
+  __pyx_v_self->guide.Clear();
+
+  /* "dawg.pyx":148
+ *     def __dealloc__(self):
+ *         self.guide.Clear()
+ *         del self.completer             # <<<<<<<<<<<<<<
  * 
  *     cpdef list keys(self, unicode prefix=""):
  */
-  __pyx_v_self->guide.Clear();
+  delete __pyx_v_self->completer;
 
   __Pyx_TraceReturn(Py_None);
   __Pyx_RefNannyFinishContext();
 }
 
-/* "dawg.pyx":145
- *         self.guide.Clear()
+/* "dawg.pyx":150
+ *         del self.completer
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
   PyObject *__pyx_v_key = 0;
   dawgdic::BaseType __pyx_v_index;
   PyObject *__pyx_v_res = 0;
-  dawgdic::Completer *__pyx_v_completer;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("keys", 0);
-  __Pyx_TraceCall("keys", __pyx_f[0], 145);
+  __Pyx_TraceCall("keys", __pyx_f[0], 150);
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_prefix = __pyx_optional_args->prefix;
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_14CompletionDAWG_5keys)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_prefix));
       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_prefix));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_prefix));
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_r = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "dawg.pyx":146
+  /* "dawg.pyx":151
  * 
  *     cpdef list keys(self, unicode prefix=""):
  *         cdef bytes b_prefix = prefix.encode('utf8')             # <<<<<<<<<<<<<<
  */
   if (unlikely(((PyObject *)__pyx_v_prefix) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_prefix)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_prefix)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_b_prefix = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "dawg.pyx":148
+  /* "dawg.pyx":153
  *         cdef bytes b_prefix = prefix.encode('utf8')
  *         cdef unicode key
  *         cdef BaseType index = self.dct.root()             # <<<<<<<<<<<<<<
  */
   __pyx_v_index = __pyx_v_self->__pyx_base.dct.root();
 
-  /* "dawg.pyx":149
+  /* "dawg.pyx":154
  *         cdef unicode key
  *         cdef BaseType index = self.dct.root()
  *         cdef list res = []             # <<<<<<<<<<<<<<
  * 
  *         if not self.dct.Follow(b_prefix, &index):
  */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_res = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "dawg.pyx":151
+  /* "dawg.pyx":156
  *         cdef list res = []
  * 
  *         if not self.dct.Follow(b_prefix, &index):             # <<<<<<<<<<<<<<
  *             return res
  * 
  */
-  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_b_prefix)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyBytes_AsString(((PyObject *)__pyx_v_b_prefix)); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_5 = (!__pyx_v_self->__pyx_base.dct.Follow(__pyx_t_4, (&__pyx_v_index)));
   if (__pyx_t_5) {
 
-    /* "dawg.pyx":152
+    /* "dawg.pyx":157
  * 
  *         if not self.dct.Follow(b_prefix, &index):
  *             return res             # <<<<<<<<<<<<<<
  * 
- *         cdef Completer* completer = new Completer(self.dct, self.guide)
+ *         self.completer.Start(index, b_prefix)
  */
     __Pyx_XDECREF(((PyObject *)__pyx_r));
     __Pyx_INCREF(((PyObject *)__pyx_v_res));
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":154
+  /* "dawg.pyx":159
  *             return res
  * 
- *         cdef Completer* completer = new Completer(self.dct, self.guide)             # <<<<<<<<<<<<<<
- *         try:
- *             completer.Start(index, b_prefix)
- */
-  __pyx_v_completer = new dawgdic::Completer(__pyx_v_self->__pyx_base.dct, __pyx_v_self->guide);
-
-  /* "dawg.pyx":155
- * 
- *         cdef Completer* completer = new Completer(self.dct, self.guide)
- *         try:             # <<<<<<<<<<<<<<
- *             completer.Start(index, b_prefix)
- *             while completer.Next():
- */
-  /*try:*/ {
-
-    /* "dawg.pyx":156
- *         cdef Completer* completer = new Completer(self.dct, self.guide)
- *         try:
- *             completer.Start(index, b_prefix)             # <<<<<<<<<<<<<<
- *             while completer.Next():
- *                 key = (<char*>completer.key()).decode('utf8')
- */
-    __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_b_prefix)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L5;}
-    __pyx_v_completer->Start(__pyx_v_index, __pyx_t_6);
-
-    /* "dawg.pyx":157
- *         try:
- *             completer.Start(index, b_prefix)
- *             while completer.Next():             # <<<<<<<<<<<<<<
- *                 key = (<char*>completer.key()).decode('utf8')
- *                 res.append(key)
- */
-    while (1) {
-      __pyx_t_5 = __pyx_v_completer->Next();
-      if (!__pyx_t_5) break;
-
-      /* "dawg.pyx":158
- *             completer.Start(index, b_prefix)
- *             while completer.Next():
- *                 key = (<char*>completer.key()).decode('utf8')             # <<<<<<<<<<<<<<
- *                 res.append(key)
- * 
- */
-      __pyx_t_6 = ((char *)__pyx_v_completer->key());
-      __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      if (!(likely(PyUnicode_CheckExact(((PyObject *)__pyx_t_1)))||((((PyObject *)__pyx_t_1)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_INCREF(__pyx_t_1);
-      __Pyx_XDECREF(((PyObject *)__pyx_v_key));
-      __pyx_v_key = ((PyObject*)__pyx_t_1);
-      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-
-      /* "dawg.pyx":159
- *             while completer.Next():
- *                 key = (<char*>completer.key()).decode('utf8')
- *                 res.append(key)             # <<<<<<<<<<<<<<
- * 
- *         finally:
- */
-      __pyx_t_7 = PyList_Append(__pyx_v_res, ((PyObject *)__pyx_v_key)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L5;}
-    }
-  }
-
-  /* "dawg.pyx":162
- * 
- *         finally:
- *             del completer             # <<<<<<<<<<<<<<
+ *         self.completer.Start(index, b_prefix)             # <<<<<<<<<<<<<<
+ *         while self.completer.Next():
+ *             key = (<char*>self.completer.key()).decode('utf8')
+ */
+  __pyx_t_6 = PyBytes_AsString(((PyObject *)__pyx_v_b_prefix)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_self->completer->Start(__pyx_v_index, __pyx_t_6);
+
+  /* "dawg.pyx":160
+ * 
+ *         self.completer.Start(index, b_prefix)
+ *         while self.completer.Next():             # <<<<<<<<<<<<<<
+ *             key = (<char*>self.completer.key()).decode('utf8')
+ *             res.append(key)
+ */
+  while (1) {
+    __pyx_t_5 = __pyx_v_self->completer->Next();
+    if (!__pyx_t_5) break;
+
+    /* "dawg.pyx":161
+ *         self.completer.Start(index, b_prefix)
+ *         while self.completer.Next():
+ *             key = (<char*>self.completer.key()).decode('utf8')             # <<<<<<<<<<<<<<
+ *             res.append(key)
+ * 
+ */
+    __pyx_t_6 = ((char *)__pyx_v_self->completer->key());
+    __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    if (!(likely(PyUnicode_CheckExact(((PyObject *)__pyx_t_1)))||((((PyObject *)__pyx_t_1)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_INCREF(__pyx_t_1);
+    __Pyx_XDECREF(((PyObject *)__pyx_v_key));
+    __pyx_v_key = ((PyObject*)__pyx_t_1);
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+
+    /* "dawg.pyx":162
+ *         while self.completer.Next():
+ *             key = (<char*>self.completer.key()).decode('utf8')
+ *             res.append(key)             # <<<<<<<<<<<<<<
  * 
  *         return res
  */
-  /*finally:*/ {
-    int __pyx_why;
-    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
-    int __pyx_exc_lineno;
-    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
-    __pyx_why = 0; goto __pyx_L6;
-    __pyx_L5: {
-      __pyx_why = 4;
-      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
-      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
-      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
-      __pyx_exc_lineno = __pyx_lineno;
-      goto __pyx_L6;
-    }
-    __pyx_L6:;
-    delete __pyx_v_completer;
-    switch (__pyx_why) {
-      case 4: {
-        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
-        __pyx_lineno = __pyx_exc_lineno;
-        __pyx_exc_type = 0;
-        __pyx_exc_value = 0;
-        __pyx_exc_tb = 0;
-        goto __pyx_L1_error;
-      }
-    }
+    __pyx_t_7 = PyList_Append(__pyx_v_res, ((PyObject *)__pyx_v_key)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
 
   /* "dawg.pyx":164
- *             del completer
+ *             res.append(key)
  * 
  *         return res             # <<<<<<<<<<<<<<
  * 
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "keys") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "keys") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("keys", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("keys", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("dawg.CompletionDAWG.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prefix), (&PyUnicode_Type), 1, "prefix", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prefix), (&PyUnicode_Type), 1, "prefix", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_pf_4dawg_14CompletionDAWG_4keys(((struct __pyx_obj_4dawg_CompletionDAWG *)__pyx_v_self), __pyx_v_prefix);
   goto __pyx_L0;
   __pyx_L1_error:;
   return __pyx_r;
 }
 
-/* "dawg.pyx":145
- *         self.guide.Clear()
+/* "dawg.pyx":150
+ *         del self.completer
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("keys", 0);
-  __Pyx_TraceCall("keys", __pyx_f[0], 145);
+  __Pyx_TraceCall("keys", __pyx_f[0], 150);
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_2.__pyx_n = 1;
   __pyx_t_2.prefix = __pyx_v_prefix;
-  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_CompletionDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->keys(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_CompletionDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->keys(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
  *         try:
  *             self.dct.Read(<istream *> stream)             # <<<<<<<<<<<<<<
  *             self.guide.Read(<istream *> stream)
- *         finally:
+ * 
  */
     try {__pyx_t_5 = __pyx_v_self->__pyx_base.dct.Read(((std::istream *)__pyx_v_stream));} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L4;}}
 
  *         try:
  *             self.dct.Read(<istream *> stream)
  *             self.guide.Read(<istream *> stream)             # <<<<<<<<<<<<<<
+ * 
+ *             if self.completer:
+ */
+    __pyx_v_self->guide.Read(((std::istream *)__pyx_v_stream));
+
+    /* "dawg.pyx":185
+ *             self.guide.Read(<istream *> stream)
+ * 
+ *             if self.completer:             # <<<<<<<<<<<<<<
+ *                 del self.completer
+ *             self.completer = new Completer(self.dct, self.guide)
+ */
+    __pyx_t_5 = (__pyx_v_self->completer != 0);
+    if (__pyx_t_5) {
+
+      /* "dawg.pyx":186
+ * 
+ *             if self.completer:
+ *                 del self.completer             # <<<<<<<<<<<<<<
+ *             self.completer = new Completer(self.dct, self.guide)
+ * 
+ */
+      delete __pyx_v_self->completer;
+      goto __pyx_L6;
+    }
+    __pyx_L6:;
+
+    /* "dawg.pyx":187
+ *             if self.completer:
+ *                 del self.completer
+ *             self.completer = new Completer(self.dct, self.guide)             # <<<<<<<<<<<<<<
+ * 
  *         finally:
- *             del stream
- */
-    __pyx_v_self->guide.Read(((std::istream *)__pyx_v_stream));
-  }
-
-  /* "dawg.pyx":185
- *             self.guide.Read(<istream *> stream)
+ */
+    __pyx_v_self->completer = new dawgdic::Completer(__pyx_v_self->__pyx_base.dct, __pyx_v_self->guide);
+  }
+
+  /* "dawg.pyx":190
+ * 
  *         finally:
  *             del stream             # <<<<<<<<<<<<<<
  *         return self
     }
   }
 
-  /* "dawg.pyx":186
+  /* "dawg.pyx":191
  *         finally:
  *             del stream
  *         return self             # <<<<<<<<<<<<<<
     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,0};
     PyObject* values[1] = {0};
 
-    /* "dawg.pyx":203
+    /* "dawg.pyx":208
  *     """
  * 
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("dawg.BytesDAWG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
 }
 static PyObject *__pyx_gb_4dawg_9BytesDAWG_8__init___2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
 
-/* "dawg.pyx":210
+/* "dawg.pyx":215
  *             arg = []
  * 
  *         keys = (self._raw_key(d[0], d[1]) for d in arg)             # <<<<<<<<<<<<<<
   __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4dawg___pyx_scope_struct____init__ *) __pyx_self;
   __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
-  __Pyx_TraceCall("genexpr", __pyx_f[0], 210);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 215);
   {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4dawg_9BytesDAWG_8__init___2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4dawg_9BytesDAWG_8__init___2generator, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_cur_scope);
     __Pyx_RefNannyFinishContext();
     return (PyObject *) gen;
     return NULL;
   }
   __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg)) { __Pyx_RaiseClosureNameError("arg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg)) { __Pyx_RaiseClosureNameError("arg"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
   if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg)) {
     __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
     __pyx_t_3 = NULL;
   } else {
-    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
   }
     if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
       if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
       if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
       #if CYTHON_COMPILING_IN_CPYTHON
-      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #else
-      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
     } else {
       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
       if (unlikely(!__pyx_t_4)) {
         if (PyErr_Occurred()) {
           if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
-          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
     __Pyx_GIVEREF(__pyx_t_4);
     __pyx_cur_scope->__pyx_v_d = __pyx_t_4;
     __pyx_t_4 = 0;
-    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-    __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_d, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+    __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_d, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_d, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_d, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
-    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_raw_key(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, ((PyObject*)__pyx_t_4), ((PyObject*)__pyx_t_5), 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_raw_key(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, ((PyObject*)__pyx_t_4), ((PyObject*)__pyx_t_5), 0)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     __Pyx_XGOTREF(__pyx_t_1);
     __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
     __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
-    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   PyErr_SetNone(PyExc_StopIteration);
   return NULL;
 }
 
-/* "dawg.pyx":203
+/* "dawg.pyx":208
  *     """
  * 
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
     return -1;
   }
   __Pyx_GOTREF(__pyx_cur_scope);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 203);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 208);
   __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
   __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
   __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg);
   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg);
 
-  /* "dawg.pyx":207
+  /* "dawg.pyx":212
  *         ``arg`` must be an iterable of tuples (unicode_key, bytes_payload).
  *         """
  *         if arg is None:             # <<<<<<<<<<<<<<
   __pyx_t_1 = (__pyx_cur_scope->__pyx_v_arg == Py_None);
   if (__pyx_t_1) {
 
-    /* "dawg.pyx":208
+    /* "dawg.pyx":213
  *         """
  *         if arg is None:
  *             arg = []             # <<<<<<<<<<<<<<
  * 
  *         keys = (self._raw_key(d[0], d[1]) for d in arg)
  */
-    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
     __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_arg);
     __Pyx_DECREF(__pyx_cur_scope->__pyx_v_arg);
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":210
+  /* "dawg.pyx":215
  *             arg = []
  * 
  *         keys = (self._raw_key(d[0], d[1]) for d in arg)             # <<<<<<<<<<<<<<
  * 
  *         super(BytesDAWG, self).__init__(keys)
  */
-  __pyx_t_2 = __pyx_pf_4dawg_9BytesDAWG_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __pyx_pf_4dawg_9BytesDAWG_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_v_keys = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "dawg.pyx":212
+  /* "dawg.pyx":217
  *         keys = (self._raw_key(d[0], d[1]) for d in arg)
  * 
  *         super(BytesDAWG, self).__init__(keys)             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_BytesDAWG)));
   PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_4dawg_BytesDAWG)));
   __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_self));
-  __pyx_t_3 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(__pyx_v_keys);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_keys);
   __Pyx_GIVEREF(__pyx_v_keys);
-  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   return __pyx_r;
 }
 
-/* "dawg.pyx":215
+/* "dawg.pyx":220
  * 
  * 
  *     cpdef bytes _raw_key(self, unicode key, bytes payload):             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("_raw_key", 0);
-  __Pyx_TraceCall("_raw_key", __pyx_f[0], 215);
+  __Pyx_TraceCall("_raw_key", __pyx_f[0], 220);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___raw_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___raw_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_9BytesDAWG_3_raw_key)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_key));
       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_key));
       __Pyx_INCREF(((PyObject *)__pyx_v_payload));
       PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_payload));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_payload));
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_r = ((PyObject*)__pyx_t_3);
       __pyx_t_3 = 0;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "dawg.pyx":216
+  /* "dawg.pyx":221
  * 
  *     cpdef bytes _raw_key(self, unicode key, bytes payload):
  *         cdef bytes encoded_payload = b2a_base64(payload)             # <<<<<<<<<<<<<<
  *         return key.encode('utf8') + PAYLOAD_SEPARATOR + encoded_payload
  * 
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__b2a_base64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__b2a_base64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_INCREF(((PyObject *)__pyx_v_payload));
   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_payload));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_payload));
-  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_encoded_payload = ((PyObject*)__pyx_t_2);
   __pyx_t_2 = 0;
 
-  /* "dawg.pyx":217
+  /* "dawg.pyx":222
  *     cpdef bytes _raw_key(self, unicode key, bytes payload):
  *         cdef bytes encoded_payload = b2a_base64(payload)
  *         return key.encode('utf8') + PAYLOAD_SEPARATOR + encoded_payload             # <<<<<<<<<<<<<<
   __Pyx_XDECREF(((PyObject *)__pyx_r));
   if (unlikely(((PyObject *)__pyx_v_key) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_2 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_key)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_key)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_b_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_b_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_t_2 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_v_encoded_payload)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyNumber_Add(__pyx_t_3, ((PyObject *)__pyx_v_encoded_payload)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = ((PyObject*)__pyx_t_2);
   __pyx_t_2 = 0;
   goto __pyx_L0;
         case  1:
         if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__payload)) != 0)) kw_args--;
         else {
-          __Pyx_RaiseArgtupleInvalid("_raw_key", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+          __Pyx_RaiseArgtupleInvalid("_raw_key", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_raw_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_raw_key") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
       goto __pyx_L5_argtuple_error;
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("_raw_key", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("_raw_key", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("dawg.BytesDAWG._raw_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return NULL;
   __pyx_L4_argument_unpacking_done:;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyUnicode_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_payload), (&PyBytes_Type), 1, "payload", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyUnicode_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_payload), (&PyBytes_Type), 1, "payload", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_pf_4dawg_9BytesDAWG_2_raw_key(((struct __pyx_obj_4dawg_BytesDAWG *)__pyx_v_self), __pyx_v_key, __pyx_v_payload);
   goto __pyx_L0;
   __pyx_L1_error:;
   return __pyx_r;
 }
 
-/* "dawg.pyx":215
+/* "dawg.pyx":220
  * 
  * 
  *     cpdef bytes _raw_key(self, unicode key, bytes payload):             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("_raw_key", 0);
-  __Pyx_TraceCall("_raw_key", __pyx_f[0], 215);
+  __Pyx_TraceCall("_raw_key", __pyx_f[0], 220);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_raw_key(__pyx_v_self, __pyx_v_key, __pyx_v_payload, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_raw_key(__pyx_v_self, __pyx_v_key, __pyx_v_payload, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   return __pyx_r;
 }
 
-/* "dawg.pyx":219
+/* "dawg.pyx":224
  *         return key.encode('utf8') + PAYLOAD_SEPARATOR + encoded_payload
  * 
  *     cpdef bint b_has_key(self, bytes key) except -1:             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("b_has_key", 0);
-  __Pyx_TraceCall("b_has_key", __pyx_f[0], 219);
+  __Pyx_TraceCall("b_has_key", __pyx_f[0], 224);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__b_has_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__b_has_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_9BytesDAWG_5b_has_key)) {
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_key));
       PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_key));
       __Pyx_GIVEREF(((PyObject *)__pyx_v_key));
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
       __pyx_r = __pyx_t_4;
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "dawg.pyx":221
+  /* "dawg.pyx":226
  *     cpdef bint b_has_key(self, bytes key) except -1:
  *         cdef BaseType index
  *         return self._follow_key(key, &index)             # <<<<<<<<<<<<<<
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("b_has_key (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBytes_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBytes_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_pf_4dawg_9BytesDAWG_4b_has_key(((struct __pyx_obj_4dawg_BytesDAWG *)__pyx_v_self), ((PyObject*)__pyx_v_key));
   goto __pyx_L0;
   __pyx_L1_error:;
   return __pyx_r;
 }
 
-/* "dawg.pyx":219
+/* "dawg.pyx":224
  *         return key.encode('utf8') + PAYLOAD_SEPARATOR + encoded_payload
  * 
  *     cpdef bint b_has_key(self, bytes key) except -1:             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("b_has_key", 0);
-  __Pyx_TraceCall("b_has_key", __pyx_f[0], 219);
+  __Pyx_TraceCall("b_has_key", __pyx_f[0], 224);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.b_has_key(((struct __pyx_obj_4dawg_DAWG *)__pyx_v_self), __pyx_v_key, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.b_has_key(((struct __pyx_obj_4dawg_DAWG *)__pyx_v_self), __pyx_v_key, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __pyx_r = __pyx_t_2;
   __pyx_t_2 = 0;
   return __pyx_r;
 }
 
-/* "dawg.pyx":223
+/* "dawg.pyx":228
  *         return self._follow_key(key, &index)
  * 
  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("__getitem__", 0);
-  __Pyx_TraceCall("__getitem__", __pyx_f[0], 223);
-
-  /* "dawg.pyx":224
+  __Pyx_TraceCall("__getitem__", __pyx_f[0], 228);
+
+  /* "dawg.pyx":229
  * 
  *     def __getitem__(self, key):
  *         cdef list res = self.get(key)             # <<<<<<<<<<<<<<
  *         if res is None:
  *             raise KeyError(key)
  */
-  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_res = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "dawg.pyx":225
+  /* "dawg.pyx":230
  *     def __getitem__(self, key):
  *         cdef list res = self.get(key)
  *         if res is None:             # <<<<<<<<<<<<<<
   __pyx_t_2 = (__pyx_v_res == ((PyObject*)Py_None));
   if (__pyx_t_2) {
 
-    /* "dawg.pyx":226
+    /* "dawg.pyx":231
  *         cdef list res = self.get(key)
  *         if res is None:
  *             raise KeyError(key)             # <<<<<<<<<<<<<<
  *         return res
  * 
  */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_INCREF(__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
     __Pyx_GIVEREF(__pyx_v_key);
-    __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
     __Pyx_Raise(__pyx_t_3, 0, 0, 0);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":227
+  /* "dawg.pyx":232
  *         if res is None:
  *             raise KeyError(key)
  *         return res             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "dawg.pyx":229
+/* "dawg.pyx":234
  *         return res
  * 
  *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("get", 0);
-  __Pyx_TraceCall("get", __pyx_f[0], 229);
+  __Pyx_TraceCall("get", __pyx_f[0], 234);
   if (__pyx_optional_args) {
     if (__pyx_optional_args->__pyx_n > 0) {
       __pyx_v_default = __pyx_optional_args->__pyx_default;
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_9BytesDAWG_9get)) {
       __Pyx_XDECREF(__pyx_r);
-      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(__pyx_v_key);
       PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
       __Pyx_INCREF(__pyx_v_default);
       PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_default);
       __Pyx_GIVEREF(__pyx_v_default);
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_3);
       __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
       __pyx_r = __pyx_t_3;
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
-  /* "dawg.pyx":236
+  /* "dawg.pyx":241
  *         cdef list res
  * 
  *         if isinstance(key, unicode):             # <<<<<<<<<<<<<<
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   if (__pyx_t_4) {
 
-    /* "dawg.pyx":237
+    /* "dawg.pyx":242
  * 
  *         if isinstance(key, unicode):
  *             res = self.get_value(key)             # <<<<<<<<<<<<<<
  *         else:
  *             res = self.b_get_value(key)
  */
-    if (!(likely(PyUnicode_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(PyUnicode_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_1 = __pyx_v_key;
     __Pyx_INCREF(__pyx_t_1);
-    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     __pyx_v_res = ((PyObject*)__pyx_t_3);
   }
   /*else*/ {
 
-    /* "dawg.pyx":239
+    /* "dawg.pyx":244
  *             res = self.get_value(key)
  *         else:
  *             res = self.b_get_value(key)             # <<<<<<<<<<<<<<
  * 
  *         if not res:
  */
-    if (!(likely(PyBytes_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(PyBytes_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_3 = __pyx_v_key;
     __Pyx_INCREF(__pyx_t_3);
-    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, ((PyObject*)__pyx_t_3), 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, ((PyObject*)__pyx_t_3), 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __pyx_v_res = ((PyObject*)__pyx_t_1);
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":241
+  /* "dawg.pyx":246
  *             res = self.b_get_value(key)
  * 
  *         if not res:             # <<<<<<<<<<<<<<
   __pyx_t_5 = (!__pyx_t_4);
   if (__pyx_t_5) {
 
-    /* "dawg.pyx":242
+    /* "dawg.pyx":247
  * 
  *         if not res:
  *             return default             # <<<<<<<<<<<<<<
   }
   __pyx_L4:;
 
-  /* "dawg.pyx":243
+  /* "dawg.pyx":248
  *         if not res:
  *             return default
  *         return res             # <<<<<<<<<<<<<<
  * 
- * 
+ *     cdef bint _follow_key(self, bytes key, BaseType* index):
  */
   __Pyx_XDECREF(__pyx_r);
   __Pyx_INCREF(((PyObject *)__pyx_v_res));
     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__default,0};
     PyObject* values[2] = {0,0};
 
-    /* "dawg.pyx":229
+    /* "dawg.pyx":234
  *         return res
  * 
  *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
         }
       }
       if (unlikely(kw_args > 0)) {
-        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     } else {
       switch (PyTuple_GET_SIZE(__pyx_args)) {
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("dawg.BytesDAWG.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("get", 0);
-  __Pyx_TraceCall("get", __pyx_f[0], 229);
+  __Pyx_TraceCall("get", __pyx_f[0], 234);
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_2.__pyx_n = 1;
   __pyx_t_2.__pyx_default = __pyx_v_default;
-  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_r = __pyx_t_1;
   __pyx_t_1 = 0;
   return __pyx_r;
 }
 
-/* "dawg.pyx":246
- * 
+/* "dawg.pyx":250
+ *         return res
  * 
  *     cdef bint _follow_key(self, bytes key, BaseType* index):             # <<<<<<<<<<<<<<
  *         index[0] = self.dct.root()
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("_follow_key", 0);
-  __Pyx_TraceCall("_follow_key", __pyx_f[0], 246);
-
-  /* "dawg.pyx":247
+  __Pyx_TraceCall("_follow_key", __pyx_f[0], 250);
+
+  /* "dawg.pyx":251
  * 
  *     cdef bint _follow_key(self, bytes key, BaseType* index):
  *         index[0] = self.dct.root()             # <<<<<<<<<<<<<<
  */
   (__pyx_v_index[0]) = __pyx_v_self->__pyx_base.__pyx_base.dct.root();
 
-  /* "dawg.pyx":248
+  /* "dawg.pyx":252
  *     cdef bint _follow_key(self, bytes key, BaseType* index):
  *         index[0] = self.dct.root()
  *         if not self.dct.Follow(key, len(key), index):             # <<<<<<<<<<<<<<
  *             return False
  *         return self.dct.Follow(PAYLOAD_SEPARATOR, index)
  */
-  __pyx_t_1 = PyBytes_AsString(((PyObject *)__pyx_v_key)); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyBytes_AsString(((PyObject *)__pyx_v_key)); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   if (unlikely(((PyObject *)__pyx_v_key) == Py_None)) {
     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_2 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_key)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_key)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_t_3 = (!__pyx_v_self->__pyx_base.__pyx_base.dct.Follow(__pyx_t_1, __pyx_t_2, __pyx_v_index));
   if (__pyx_t_3) {
 
-    /* "dawg.pyx":249
+    /* "dawg.pyx":253
  *         index[0] = self.dct.root()
  *         if not self.dct.Follow(key, len(key), index):
  *             return False             # <<<<<<<<<<<<<<
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":250
+  /* "dawg.pyx":254
  *         if not self.dct.Follow(key, len(key), index):
  *             return False
  *         return self.dct.Follow(PAYLOAD_SEPARATOR, index)             # <<<<<<<<<<<<<<
   return __pyx_r;
 }
 
-/* "dawg.pyx":252
+/* "dawg.pyx":256
  *         return self.dct.Follow(PAYLOAD_SEPARATOR, index)
  * 
  *     cpdef list get_value(self, unicode key):             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("get_value", 0);
-  __Pyx_TraceCall("get_value", __pyx_f[0], 252);
+  __Pyx_TraceCall("get_value", __pyx_f[0], 256);
   /* Check if called by wrapper */
   if (unlikely(__pyx_skip_dispatch)) ;
   /* Check if overriden in Python */
   else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
     if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_9BytesDAWG_11get_value)) {
       __Pyx_XDECREF(((PyObject *)__pyx_r));
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_INCREF(((PyObject *)__pyx_v_key));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_key));
-      __Pyx_GIVEREF(((PyObject *)__pyx_v_key));
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-      if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_r = ((PyObject*)__pyx_t_3);
-      __pyx_t_3 = 0;
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      goto __pyx_L0;
-    }
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  }
-
-  /* "dawg.pyx":253
- * 
- *     cpdef list get_value(self, unicode key):
- *         cdef bytes b_key = key.encode('utf8')             # <<<<<<<<<<<<<<
- *         return self.b_get_value(b_key)
- * 
- */
-  if (unlikely(((PyObject *)__pyx_v_key) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_key)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_b_key = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-
-  /* "dawg.pyx":254
- *     cpdef list get_value(self, unicode key):
- *         cdef bytes b_key = key.encode('utf8')
- *         return self.b_get_value(b_key)             # <<<<<<<<<<<<<<
- * 
- *     cpdef list b_get_value(self, bytes key):
- */
-  __Pyx_XDECREF(((PyObject *)__pyx_r));
-  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, __pyx_v_b_key, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = ((PyObject*)__pyx_t_1);
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_XDECREF(__pyx_t_2);
-  __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("dawg.BytesDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = 0;
-  __pyx_L0:;
-  __Pyx_XDECREF(__pyx_v_b_key);
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* Python wrapper */
-static PyObject *__pyx_pw_4dawg_9BytesDAWG_11get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pw_4dawg_9BytesDAWG_11get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
-  PyObject *__pyx_r = 0;
-  __Pyx_RefNannyDeclarations
-  __Pyx_RefNannySetupContext("get_value (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyUnicode_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_4dawg_9BytesDAWG_10get_value(((struct __pyx_obj_4dawg_BytesDAWG *)__pyx_v_self), ((PyObject*)__pyx_v_key));
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "dawg.pyx":252
- *         return self.dct.Follow(PAYLOAD_SEPARATOR, index)
- * 
- *     cpdef list get_value(self, unicode key):             # <<<<<<<<<<<<<<
- *         cdef bytes b_key = key.encode('utf8')
- *         return self.b_get_value(b_key)
- */
-
-static PyObject *__pyx_pf_4dawg_9BytesDAWG_10get_value(struct __pyx_obj_4dawg_BytesDAWG *__pyx_v_self, PyObject *__pyx_v_key) {
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("get_value", 0);
-  __Pyx_TraceCall("get_value", __pyx_f[0], 252);
-  __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_r = __pyx_t_1;
-  __pyx_t_1 = 0;
-  goto __pyx_L0;
-
-  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
-  goto __pyx_L0;
-  __pyx_L1_error:;
-  __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("dawg.BytesDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
-  __pyx_L0:;
-  __Pyx_XGIVEREF(__pyx_r);
-  __Pyx_TraceReturn(__pyx_r);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "dawg.pyx":256
- *         return self.b_get_value(b_key)
- * 
- *     cpdef list b_get_value(self, bytes key):             # <<<<<<<<<<<<<<
- *         cdef BaseType index
- *         cdef list res = []
- */
-
-static PyObject *__pyx_pw_4dawg_9BytesDAWG_13b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_f_4dawg_9BytesDAWG_b_get_value(struct __pyx_obj_4dawg_BytesDAWG *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
-  dawgdic::BaseType __pyx_v_index;
-  PyObject *__pyx_v_res = 0;
-  PyObject *__pyx_v_payload = 0;
-  int __pyx_v__len;
-  base64::decoder __pyx_v__b64_decoder;
-  char __pyx_v__b64_decoder_storage[32768];
-  dawgdic::Completer *__pyx_v_completer;
-  PyObject *__pyx_r = NULL;
-  __Pyx_RefNannyDeclarations
-  PyObject *__pyx_t_1 = NULL;
-  PyObject *__pyx_t_2 = NULL;
-  PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_lineno = 0;
-  const char *__pyx_filename = NULL;
-  int __pyx_clineno = 0;
-  __Pyx_TraceDeclarations
-  __Pyx_RefNannySetupContext("b_get_value", 0);
-  __Pyx_TraceCall("b_get_value", __pyx_f[0], 256);
-  /* Check if called by wrapper */
-  if (unlikely(__pyx_skip_dispatch)) ;
-  /* Check if overriden in Python */
-  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
-    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__b_get_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_9BytesDAWG_13b_get_value)) {
-      __Pyx_XDECREF(((PyObject *)__pyx_r));
       __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_2);
       __Pyx_INCREF(((PyObject *)__pyx_v_key));
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
 
+  /* "dawg.pyx":257
+ * 
+ *     cpdef list get_value(self, unicode key):
+ *         cdef bytes b_key = key.encode('utf8')             # <<<<<<<<<<<<<<
+ *         return self.b_get_value(b_key)
+ * 
+ */
+  if (unlikely(((PyObject *)__pyx_v_key) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = ((PyObject *)PyUnicode_AsUTF8String(__pyx_v_key)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  if (!(likely(PyBytes_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_b_key = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+
   /* "dawg.pyx":258
- *     cpdef list b_get_value(self, bytes key):
- *         cdef BaseType index
+ *     cpdef list get_value(self, unicode key):
+ *         cdef bytes b_key = key.encode('utf8')
+ *         return self.b_get_value(b_key)             # <<<<<<<<<<<<<<
+ * 
+ *     cdef list _value_for_index(self, BaseType index):
+ */
+  __Pyx_XDECREF(((PyObject *)__pyx_r));
+  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, __pyx_v_b_key, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = ((PyObject*)__pyx_t_1);
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_2);
+  __Pyx_XDECREF(__pyx_t_3);
+  __Pyx_AddTraceback("dawg.BytesDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
+  __pyx_L0:;
+  __Pyx_XDECREF(__pyx_v_b_key);
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* Python wrapper */
+static PyObject *__pyx_pw_4dawg_9BytesDAWG_11get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pw_4dawg_9BytesDAWG_11get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get_value (wrapper)", 0);
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyUnicode_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_4dawg_9BytesDAWG_10get_value(((struct __pyx_obj_4dawg_BytesDAWG *)__pyx_v_self), ((PyObject*)__pyx_v_key));
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "dawg.pyx":256
+ *         return self.dct.Follow(PAYLOAD_SEPARATOR, index)
+ * 
+ *     cpdef list get_value(self, unicode key):             # <<<<<<<<<<<<<<
+ *         cdef bytes b_key = key.encode('utf8')
+ *         return self.b_get_value(b_key)
+ */
+
+static PyObject *__pyx_pf_4dawg_9BytesDAWG_10get_value(struct __pyx_obj_4dawg_BytesDAWG *__pyx_v_self, PyObject *__pyx_v_key) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get_value", 0);
+  __Pyx_TraceCall("get_value", __pyx_f[0], 256);
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_r = __pyx_t_1;
+  __pyx_t_1 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_AddTraceback("dawg.BytesDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = NULL;
+  __pyx_L0:;
+  __Pyx_XGIVEREF(__pyx_r);
+  __Pyx_TraceReturn(__pyx_r);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "dawg.pyx":260
+ *         return self.b_get_value(b_key)
+ * 
+ *     cdef list _value_for_index(self, BaseType index):             # <<<<<<<<<<<<<<
+ *         cdef list res = []
+ *         cdef int _len
+ */
+
+static PyObject *__pyx_f_4dawg_9BytesDAWG__value_for_index(struct __pyx_obj_4dawg_BytesDAWG *__pyx_v_self, dawgdic::BaseType __pyx_v_index) {
+  PyObject *__pyx_v_res = 0;
+  int __pyx_v__len;
+  base64::decoder __pyx_v__b64_decoder;
+  char __pyx_v__b64_decoder_storage[32768];
+  PyObject *__pyx_v_payload = 0;
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  int __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("_value_for_index", 0);
+  __Pyx_TraceCall("_value_for_index", __pyx_f[0], 260);
+
+  /* "dawg.pyx":261
+ * 
+ *     cdef list _value_for_index(self, BaseType index):
  *         cdef list res = []             # <<<<<<<<<<<<<<
- *         cdef bytes payload
- * 
- */
-  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *         cdef int _len
+ *         cdef b64_decode.decoder _b64_decoder
+ */
+  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_res = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "dawg.pyx":261
+  /* "dawg.pyx":267
  *         cdef bytes payload
  * 
- *         if not self._follow_key(key, &index):             # <<<<<<<<<<<<<<
- *             return res
- * 
- */
-  __pyx_t_4 = (!((struct __pyx_vtabstruct_4dawg_BytesDAWG *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_follow_key(__pyx_v_self, __pyx_v_key, (&__pyx_v_index)));
-  if (__pyx_t_4) {
-
-    /* "dawg.pyx":262
- * 
- *         if not self._follow_key(key, &index):
- *             return res             # <<<<<<<<<<<<<<
- * 
- *         cdef int _len
- */
-    __Pyx_XDECREF(((PyObject *)__pyx_r));
-    __Pyx_INCREF(((PyObject *)__pyx_v_res));
-    __pyx_r = __pyx_v_res;
-    goto __pyx_L0;
-    goto __pyx_L3;
-  }
-  __pyx_L3:;
+ *         self.completer.Start(index)             # <<<<<<<<<<<<<<
+ *         while self.completer.Next():
+ *             _b64_decoder.init()
+ */
+  __pyx_v_self->__pyx_base.completer->Start(__pyx_v_index);
 
   /* "dawg.pyx":268
- *         cdef char[MAX_VALUE_SIZE] _b64_decoder_storage
- * 
- *         cdef Completer* completer = new Completer(self.dct, self.guide)             # <<<<<<<<<<<<<<
- *         try:
- *             completer.Start(index)
- */
-  __pyx_v_completer = new dawgdic::Completer(__pyx_v_self->__pyx_base.__pyx_base.dct, __pyx_v_self->__pyx_base.guide);
-
-  /* "dawg.pyx":269
- * 
- *         cdef Completer* completer = new Completer(self.dct, self.guide)
- *         try:             # <<<<<<<<<<<<<<
- *             completer.Start(index)
- *             while completer.Next():
- */
-  /*try:*/ {
-
-    /* "dawg.pyx":270
- *         cdef Completer* completer = new Completer(self.dct, self.guide)
- *         try:
- *             completer.Start(index)             # <<<<<<<<<<<<<<
- *             while completer.Next():
- *                 _b64_decoder.init()
- */
-    __pyx_v_completer->Start(__pyx_v_index);
-
-    /* "dawg.pyx":271
- *         try:
- *             completer.Start(index)
- *             while completer.Next():             # <<<<<<<<<<<<<<
- *                 _b64_decoder.init()
- *                 _len = _b64_decoder.decode(completer.key(), completer.length(), _b64_decoder_storage)
- */
-    while (1) {
-      __pyx_t_4 = __pyx_v_completer->Next();
-      if (!__pyx_t_4) break;
-
-      /* "dawg.pyx":272
- *             completer.Start(index)
- *             while completer.Next():
- *                 _b64_decoder.init()             # <<<<<<<<<<<<<<
- *                 _len = _b64_decoder.decode(completer.key(), completer.length(), _b64_decoder_storage)
- *                 payload = _b64_decoder_storage[:_len]
- */
-      __pyx_v__b64_decoder.init();
-
-      /* "dawg.pyx":273
- *             while completer.Next():
- *                 _b64_decoder.init()
- *                 _len = _b64_decoder.decode(completer.key(), completer.length(), _b64_decoder_storage)             # <<<<<<<<<<<<<<
- *                 payload = _b64_decoder_storage[:_len]
- *                 res.append(payload)
- */
-      __pyx_v__len = __pyx_v__b64_decoder.decode(__pyx_v_completer->key(), __pyx_v_completer->length(), __pyx_v__b64_decoder_storage);
-
-      /* "dawg.pyx":274
- *                 _b64_decoder.init()
- *                 _len = _b64_decoder.decode(completer.key(), completer.length(), _b64_decoder_storage)
- *                 payload = _b64_decoder_storage[:_len]             # <<<<<<<<<<<<<<
- *                 res.append(payload)
- *         finally:
- */
-      __pyx_t_1 = PyBytes_FromStringAndSize(((const char*)__pyx_v__b64_decoder_storage) + 0, __pyx_v__len - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      __Pyx_XDECREF(((PyObject *)__pyx_v_payload));
-      __pyx_v_payload = __pyx_t_1;
-      __pyx_t_1 = 0;
-
-      /* "dawg.pyx":275
- *                 _len = _b64_decoder.decode(completer.key(), completer.length(), _b64_decoder_storage)
- *                 payload = _b64_decoder_storage[:_len]
- *                 res.append(payload)             # <<<<<<<<<<<<<<
- *         finally:
- *             del completer
- */
-      __pyx_t_5 = PyList_Append(__pyx_v_res, ((PyObject *)__pyx_v_payload)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L5;}
-    }
-  }
-
-  /* "dawg.pyx":277
- *                 res.append(payload)
- *         finally:
- *             del completer             # <<<<<<<<<<<<<<
+ * 
+ *         self.completer.Start(index)
+ *         while self.completer.Next():             # <<<<<<<<<<<<<<
+ *             _b64_decoder.init()
+ *             _len = _b64_decoder.decode(
+ */
+  while (1) {
+    __pyx_t_2 = __pyx_v_self->__pyx_base.completer->Next();
+    if (!__pyx_t_2) break;
+
+    /* "dawg.pyx":269
+ *         self.completer.Start(index)
+ *         while self.completer.Next():
+ *             _b64_decoder.init()             # <<<<<<<<<<<<<<
+ *             _len = _b64_decoder.decode(
+ *                 self.completer.key(),
+ */
+    __pyx_v__b64_decoder.init();
+
+    /* "dawg.pyx":274
+ *                 self.completer.length(),
+ *                 _b64_decoder_storage
+ *             )             # <<<<<<<<<<<<<<
+ *             payload = _b64_decoder_storage[:_len]
+ *             res.append(payload)
+ */
+    __pyx_v__len = __pyx_v__b64_decoder.decode(__pyx_v_self->__pyx_base.completer->key(), __pyx_v_self->__pyx_base.completer->length(), __pyx_v__b64_decoder_storage);
+
+    /* "dawg.pyx":275
+ *                 _b64_decoder_storage
+ *             )
+ *             payload = _b64_decoder_storage[:_len]             # <<<<<<<<<<<<<<
+ *             res.append(payload)
+ * 
+ */
+    __pyx_t_1 = PyBytes_FromStringAndSize(((const char*)__pyx_v__b64_decoder_storage) + 0, __pyx_v__len - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+    __Pyx_XDECREF(((PyObject *)__pyx_v_payload));
+    __pyx_v_payload = __pyx_t_1;
+    __pyx_t_1 = 0;
+
+    /* "dawg.pyx":276
+ *             )
+ *             payload = _b64_decoder_storage[:_len]
+ *             res.append(payload)             # <<<<<<<<<<<<<<
  * 
  *         return res