Commits

Mikhail Korobov committed 109c3ac

rebuild wrapper

Comments (0)

Files changed (13)

src/_base_types.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_completer.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dawg_builder.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary_builder.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_dictionary_unit.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_guide_builder.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/_guide_unit.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"

src/b64_decode.cpp

-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-/* Generated by Cython 0.17 on Tue Sep  4 18:15:46 2012 */
+/* Generated by Cython 0.17 on Wed Sep  5 18:47:49 2012 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
 };
 
 /*--- Type declarations ---*/
-struct __pyx_obj_4dawg_DAWG;
-struct __pyx_obj_4dawg_IntDict;
 struct __pyx_obj_4dawg___pyx_scope_struct_2___init__;
 struct __pyx_obj_4dawg___pyx_scope_struct_5_genexpr;
+struct __pyx_obj_4dawg_DAWG;
 struct __pyx_obj_4dawg_CompletionDAWG;
 struct __pyx_obj_4dawg_BytesDAWG;
 struct __pyx_obj_4dawg___pyx_scope_struct_3_genexpr;
 struct __pyx_obj_4dawg___pyx_scope_struct____init__;
 struct __pyx_obj_4dawg___pyx_scope_struct_4___init__;
+struct __pyx_obj_4dawg_IntDAWG;
 struct __pyx_obj_4dawg___pyx_scope_struct_1_genexpr;
 struct __pyx_obj_4dawg_RecordDAWG;
 struct __pyx_opt_args_4dawg_14CompletionDAWG_keys;
 struct __pyx_opt_args_4dawg_9BytesDAWG_items;
 struct __pyx_opt_args_4dawg_9BytesDAWG_keys;
 struct __pyx_opt_args_4dawg_10RecordDAWG_items;
+struct __pyx_opt_args_4dawg_7IntDAWG_get;
 
 /* "dawg.pyx":145
  *         self.guide.Clear()
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef bytes key
+ *         cdef unicode key
  */
 struct __pyx_opt_args_4dawg_14CompletionDAWG_keys {
   int __pyx_n;
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef str u_key
+ *         cdef unicode u_key
  */
 struct __pyx_opt_args_4dawg_9BytesDAWG_keys {
   int __pyx_n;
   PyObject *prefix;
 };
 
-/* "dawg.pyx":22
- * from binascii import a2b_base64, b2a_base64
- * 
- * cdef class DAWG:             # <<<<<<<<<<<<<<
- *     """
- *     Base DAWG wrapper.
- */
-struct __pyx_obj_4dawg_DAWG {
-  PyObject_HEAD
-  struct __pyx_vtabstruct_4dawg_DAWG *__pyx_vtab;
-  dawgdic::Dictionary dct;
-  dawgdic::Dawg dawg;
-};
-
-
-/* "dawg.pyx":402
- * 
- * 
- * cdef class IntDict(DAWG):             # <<<<<<<<<<<<<<
- *     """
- *     Dict-like class based on DAWG.
- */
-struct __pyx_obj_4dawg_IntDict {
-  struct __pyx_obj_4dawg_DAWG __pyx_base;
-};
-
+/* "dawg.pyx":443
+ *         return res
+ * 
+ *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
+ *         """
+ *         Returns a list of payloads (as byte objects) for a given key
+ */
+struct __pyx_opt_args_4dawg_7IntDAWG_get {
+  int __pyx_n;
+  PyObject *__pyx_default;
+};
 
 /* "dawg.pyx":372
  *     cdef _struct
 };
 
 
-/* "dawg.pyx":412
+/* "dawg.pyx":415
  * 
  *         if isinstance(arg, collections.Mapping):
  *             iterable = ((key, arg[key]) for key in arg)             # <<<<<<<<<<<<<<
 };
 
 
+/* "dawg.pyx":22
+ * from binascii import a2b_base64, b2a_base64
+ * 
+ * cdef class DAWG:             # <<<<<<<<<<<<<<
+ *     """
+ *     Base DAWG wrapper.
+ */
+struct __pyx_obj_4dawg_DAWG {
+  PyObject_HEAD
+  struct __pyx_vtabstruct_4dawg_DAWG *__pyx_vtab;
+  dawgdic::Dictionary dct;
+  dawgdic::Dawg dawg;
+};
+
+
 /* "dawg.pyx":131
  * 
  * 
 };
 
 
-/* "dawg.pyx":407
+/* "dawg.pyx":406
  *     It can store integer values for unicode keys.
  *     """
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
- *         if arg is None:
- *             arg = []
+ *         """
+ *         ``arg`` must be an iterable of tuples (unicode_key, int_value)
  */
 struct __pyx_obj_4dawg___pyx_scope_struct_4___init__ {
   PyObject_HEAD
 };
 
 
+/* "dawg.pyx":401
+ * 
+ * 
+ * cdef class IntDAWG(DAWG):             # <<<<<<<<<<<<<<
+ *     """
+ *     Dict-like class based on DAWG.
+ */
+struct __pyx_obj_4dawg_IntDAWG {
+  struct __pyx_obj_4dawg_DAWG __pyx_base;
+};
+
+
 /* "dawg.pyx":210
  *             arg = []
  * 
 static struct __pyx_vtabstruct_4dawg_RecordDAWG *__pyx_vtabptr_4dawg_RecordDAWG;
 
 
-/* "dawg.pyx":402
- * 
- * 
- * cdef class IntDict(DAWG):             # <<<<<<<<<<<<<<
+/* "dawg.pyx":401
+ * 
+ * 
+ * cdef class IntDAWG(DAWG):             # <<<<<<<<<<<<<<
  *     """
  *     Dict-like class based on DAWG.
  */
 
-struct __pyx_vtabstruct_4dawg_IntDict {
+struct __pyx_vtabstruct_4dawg_IntDAWG {
   struct __pyx_vtabstruct_4dawg_DAWG __pyx_base;
-  int (*get_value)(struct __pyx_obj_4dawg_IntDict *, PyObject *, int __pyx_skip_dispatch);
-  int (*b_get_value)(struct __pyx_obj_4dawg_IntDict *, PyObject *, int __pyx_skip_dispatch);
-};
-static struct __pyx_vtabstruct_4dawg_IntDict *__pyx_vtabptr_4dawg_IntDict;
+  PyObject *(*get)(struct __pyx_obj_4dawg_IntDAWG *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4dawg_7IntDAWG_get *__pyx_optional_args);
+  int (*get_value)(struct __pyx_obj_4dawg_IntDAWG *, PyObject *, int __pyx_skip_dispatch);
+  int (*b_get_value)(struct __pyx_obj_4dawg_IntDAWG *, PyObject *, int __pyx_skip_dispatch);
+};
+static struct __pyx_vtabstruct_4dawg_IntDAWG *__pyx_vtabptr_4dawg_IntDAWG;
 #ifndef CYTHON_REFNANNY
   #define CYTHON_REFNANNY 0
 #endif
 
 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
 
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+         const char* encoding, const char* errors,
+         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+#include <string.h>
+
 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
 
 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
 }
 
-static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
-         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
-         const char* encoding, const char* errors,
-         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
-
 #if CYTHON_COMPILING_IN_CPYTHON
 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
     PyListObject* L = (PyListObject*) list;
 static PyTypeObject *__pyx_ptype_4dawg_CompletionDAWG = 0;
 static PyTypeObject *__pyx_ptype_4dawg_BytesDAWG = 0;
 static PyTypeObject *__pyx_ptype_4dawg_RecordDAWG = 0;
-static PyTypeObject *__pyx_ptype_4dawg_IntDict = 0;
+static PyTypeObject *__pyx_ptype_4dawg_IntDAWG = 0;
 static PyTypeObject *__pyx_ptype_4dawg___pyx_scope_struct____init__ = 0;
 static PyTypeObject *__pyx_ptype_4dawg___pyx_scope_struct_1_genexpr = 0;
 static PyTypeObject *__pyx_ptype_4dawg___pyx_scope_struct_2___init__ = 0;
 static PyObject *__pyx_builtin_Exception;
 static PyObject *__pyx_builtin_KeyError;
 static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_ValueError;
 static void __pyx_pf_4dawg_4DAWG___dealloc__(struct __pyx_obj_4dawg_DAWG *__pyx_v_self); /* proto */
 static int __pyx_pf_4dawg_4DAWG_2__init__(struct __pyx_obj_4dawg_DAWG *__pyx_v_self, PyObject *__pyx_v_arg); /* proto */
 static PyObject *__pyx_pf_4dawg_4DAWG_4_build_from_iterable(struct __pyx_obj_4dawg_DAWG *__pyx_v_self, PyObject *__pyx_v_iterable); /* proto */
 static int __pyx_pf_4dawg_10RecordDAWG___init__(struct __pyx_obj_4dawg_RecordDAWG *__pyx_v_self, PyObject *__pyx_v_fmt, PyObject *__pyx_v_arg); /* proto */
 static PyObject *__pyx_pf_4dawg_10RecordDAWG_2b_get_value(struct __pyx_obj_4dawg_RecordDAWG *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
 static PyObject *__pyx_pf_4dawg_10RecordDAWG_4items(struct __pyx_obj_4dawg_RecordDAWG *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
-static PyObject *__pyx_pf_4dawg_7IntDict_8__init___genexpr(PyObject *__pyx_self); /* proto */
-static int __pyx_pf_4dawg_7IntDict___init__(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_arg); /* proto */
-static PyObject *__pyx_pf_4dawg_7IntDict_2_build_from_iterable(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_iterable); /* proto */
-static PyObject *__pyx_pf_4dawg_7IntDict_4__getitem__(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
-static PyObject *__pyx_pf_4dawg_7IntDict_6get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
-static PyObject *__pyx_pf_4dawg_7IntDict_8b_get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_8__init___genexpr(PyObject *__pyx_self); /* proto */
+static int __pyx_pf_4dawg_7IntDAWG___init__(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_arg); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_2_build_from_iterable(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_iterable); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_4__getitem__(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_6get(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_8get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
+static PyObject *__pyx_pf_4dawg_7IntDAWG_10b_get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
 static char __pyx_k_1[] = "_build_from_iterable";
 static char __pyx_k_5[] = "Error building completion information";
 static char __pyx_k_7[] = "";
-static char __pyx_k_9[] = "\377";
+static char __pyx_k_8[] = "\377";
+static char __pyx_k_10[] = "Negative values are not supported";
 static char __pyx_k__r[] = "r";
 static char __pyx_k__w[] = "w";
 static char __pyx_k__arg[] = "arg";
 static char __pyx_k__super[] = "super";
 static char __pyx_k__write[] = "write";
 static char __pyx_k__Struct[] = "Struct";
-static char __pyx_k__decode[] = "decode";
 static char __pyx_k__encode[] = "encode";
 static char __pyx_k__prefix[] = "prefix";
 static char __pyx_k__sorted[] = "sorted";
 static char __pyx_k__b_has_key[] = "b_has_key";
 static char __pyx_k__frombytes[] = "frombytes";
 static char __pyx_k__get_value[] = "get_value";
+static char __pyx_k__ValueError[] = "ValueError";
 static char __pyx_k__a2b_base64[] = "a2b_base64";
 static char __pyx_k__b2a_base64[] = "b2a_base64";
 static char __pyx_k__itemgetter[] = "itemgetter";
 static char __pyx_k__b_get_value[] = "b_get_value";
 static char __pyx_k__collections[] = "collections";
 static PyObject *__pyx_n_s_1;
+static PyObject *__pyx_kp_u_10;
 static PyObject *__pyx_kp_u_5;
 static PyObject *__pyx_kp_u_7;
-static PyObject *__pyx_kp_b_9;
+static PyObject *__pyx_kp_b_8;
 static PyObject *__pyx_n_s__Exception;
 static PyObject *__pyx_n_s__KeyError;
 static PyObject *__pyx_n_s__Mapping;
 static PyObject *__pyx_n_s__Struct;
+static PyObject *__pyx_n_s__ValueError;
 static PyObject *__pyx_n_s____class__;
 static PyObject *__pyx_n_s____enter__;
 static PyObject *__pyx_n_s____exit__;
 static PyObject *__pyx_n_s__b_has_key;
 static PyObject *__pyx_n_s__binascii;
 static PyObject *__pyx_n_s__collections;
-static PyObject *__pyx_n_s__decode;
 static PyObject *__pyx_n_s__default;
 static PyObject *__pyx_n_s__encode;
 static PyObject *__pyx_n_s__fmt;
 static PyObject *__pyx_n_u__w;
 static PyObject *__pyx_n_s__write;
 static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_neg_1;
 static PyObject *__pyx_k_tuple_2;
 static PyObject *__pyx_k_tuple_3;
 static PyObject *__pyx_k_tuple_4;
 static PyObject *__pyx_k_tuple_6;
-static PyObject *__pyx_k_tuple_8;
-static PyObject *__pyx_k_tuple_10;
+static PyObject *__pyx_k_tuple_9;
 static PyObject *__pyx_k_tuple_11;
+static PyObject *__pyx_k_tuple_12;
 
 /* Python wrapper */
 static void __pyx_pw_4dawg_4DAWG_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef bytes key
+ *         cdef unicode key
  */
 
 static PyObject *__pyx_pw_4dawg_14CompletionDAWG_5keys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  * 
  *     cpdef list keys(self, unicode prefix=""):
  *         cdef bytes b_prefix = prefix.encode('utf8')             # <<<<<<<<<<<<<<
- *         cdef bytes key
+ *         cdef unicode key
  *         cdef BaseType index = self.dct.root()
  */
   if (unlikely(((PyObject *)__pyx_v_prefix) == Py_None)) {
 
   /* "dawg.pyx":148
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef bytes key
+ *         cdef unicode key
  *         cdef BaseType index = self.dct.root()             # <<<<<<<<<<<<<<
  *         cdef list res = []
  * 
   __pyx_v_index = __pyx_v_self->__pyx_base.dct.root();
 
   /* "dawg.pyx":149
- *         cdef bytes key
+ *         cdef unicode key
  *         cdef BaseType index = self.dct.root()
  *         cdef list res = []             # <<<<<<<<<<<<<<
  * 
  *         try:
  *             completer.Start(index, b_prefix)             # <<<<<<<<<<<<<<
  *             while completer.Next():
- *                 key = completer.key()
+ *                 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);
  *         try:
  *             completer.Start(index, b_prefix)
  *             while completer.Next():             # <<<<<<<<<<<<<<
- *                 key = completer.key()
- *                 res.append(key.decode('utf8'))
+ *                 key = (<char*>completer.key()).decode('utf8')
+ *                 res.append(key)
  */
     while (1) {
       __pyx_t_5 = __pyx_v_completer->Next();
       /* "dawg.pyx":158
  *             completer.Start(index, b_prefix)
  *             while completer.Next():
- *                 key = completer.key()             # <<<<<<<<<<<<<<
- *                 res.append(key.decode('utf8'))
- * 
- */
-      __pyx_t_1 = PyBytes_FromString(__pyx_v_completer->key()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L5;}
+ *                 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 = __pyx_t_1;
-      __pyx_t_1 = 0;
+      __pyx_v_key = ((PyObject*)__pyx_t_1);
+      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
 
       /* "dawg.pyx":159
  *             while completer.Next():
- *                 key = completer.key()
- *                 res.append(key.decode('utf8'))             # <<<<<<<<<<<<<<
+ *                 key = (<char*>completer.key()).decode('utf8')
+ *                 res.append(key)             # <<<<<<<<<<<<<<
  * 
  *         finally:
  */
-      __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_key), __pyx_n_s__decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_GOTREF(__pyx_t_3);
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      __pyx_t_7 = PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L5;}
-      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+      __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;}
     }
   }
 
     __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_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
       __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
       __pyx_exc_lineno = __pyx_lineno;
       goto __pyx_L6;
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef bytes key
+ *         cdef unicode key
  */
 
 static PyObject *__pyx_pf_4dawg_14CompletionDAWG_4keys(struct __pyx_obj_4dawg_CompletionDAWG *__pyx_v_self, PyObject *__pyx_v_prefix) {
   }
   __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_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_kp_b_9)); 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 = 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 = 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;}
  * 
  *     cpdef list get_value(self, unicode key):
  */
-  __pyx_r = __pyx_v_self->__pyx_base.__pyx_base.dct.Follow(__pyx_k_9, __pyx_v_index);
+  __pyx_r = __pyx_v_self->__pyx_base.__pyx_base.dct.Follow(__pyx_k_8, __pyx_v_index);
   goto __pyx_L0;
 
   __pyx_r = 0;
  *     cpdef list items(self, unicode prefix=""):
  *         cdef bytes b_prefix = prefix.encode('utf8')             # <<<<<<<<<<<<<<
  *         cdef bytes value, b_value
- *         cdef str u_key
+ *         cdef unicode u_key
  */
   if (unlikely(((PyObject *)__pyx_v_prefix) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
   __pyx_t_1 = 0;
 
   /* "dawg.pyx":287
- *         cdef str u_key
+ *         cdef unicode u_key
  *         cdef int i
  *         cdef list res = []             # <<<<<<<<<<<<<<
  *         cdef char* raw_key
  */
       __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_raw_key, 0, __pyx_v_i, NULL, NULL, PyUnicode_DecodeUTF8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L5;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      if (!(likely(PyString_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L5;}
+      if (!(likely(PyUnicode_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L5;}
       __Pyx_XDECREF(((PyObject *)__pyx_v_u_key));
       __pyx_v_u_key = ((PyObject*)__pyx_t_1);
       __pyx_t_1 = 0;
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef str u_key
+ *         cdef unicode u_key
  */
 
 static PyObject *__pyx_pw_4dawg_9BytesDAWG_17keys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  * 
  *     cpdef list keys(self, unicode prefix=""):
  *         cdef bytes b_prefix = prefix.encode('utf8')             # <<<<<<<<<<<<<<
- *         cdef str u_key
+ *         cdef unicode u_key
  *         cdef int i
  */
   if (unlikely(((PyObject *)__pyx_v_prefix) == Py_None)) {
   __pyx_t_1 = 0;
 
   /* "dawg.pyx":331
- *         cdef str u_key
+ *         cdef unicode u_key
  *         cdef int i
  *         cdef list res = []             # <<<<<<<<<<<<<<
  *         cdef char* raw_key
  */
       __pyx_t_1 = ((PyObject *)__Pyx_decode_c_string(__pyx_v_raw_key, 0, __pyx_v_i, NULL, NULL, PyUnicode_DecodeUTF8)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5;}
       __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-      if (!(likely(PyString_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected str, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5;}
+      if (!(likely(PyUnicode_CheckExact(((PyObject *)__pyx_t_1)))||(PyErr_Format(PyExc_TypeError, "Expected unicode, got %.200s", Py_TYPE(((PyObject *)__pyx_t_1))->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5;}
       __Pyx_XDECREF(((PyObject *)__pyx_v_u_key));
       __pyx_v_u_key = ((PyObject*)__pyx_t_1);
       __pyx_t_1 = 0;
  * 
  *     cpdef list keys(self, unicode prefix=""):             # <<<<<<<<<<<<<<
  *         cdef bytes b_prefix = prefix.encode('utf8')
- *         cdef str u_key
+ *         cdef unicode u_key
  */
 
 static PyObject *__pyx_pf_4dawg_9BytesDAWG_16keys(struct __pyx_obj_4dawg_BytesDAWG *__pyx_v_self, PyObject *__pyx_v_prefix) {
 }
 
 /* Python wrapper */
-static int __pyx_pw_4dawg_7IntDict_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pw_4dawg_7IntDict_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+static int __pyx_pw_4dawg_7IntDAWG_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4dawg_7IntDAWG___init__[] = "\n        ``arg`` must be an iterable of tuples (unicode_key, int_value)\n        or a dict {unicode_key: int_value}.\n        ";
+#if CYTHON_COMPILING_IN_CPYTHON
+struct wrapperbase __pyx_wrapperbase_4dawg_7IntDAWG___init__;
+#endif
+static int __pyx_pw_4dawg_7IntDAWG_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
   PyObject *__pyx_v_arg = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,0};
     PyObject* values[1] = {0};
 
-    /* "dawg.pyx":407
+    /* "dawg.pyx":406
  *     It can store integer values for unicode keys.
  *     """
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
- *         if arg is None:
- *             arg = []
+ *         """
+ *         ``arg`` must be an iterable of tuples (unicode_key, int_value)
  */
     values[0] = ((PyObject *)Py_None);
     if (unlikely(__pyx_kwds)) {
         }
       }
       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 = 407; __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 = 406; __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 = 407; __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 = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
-  __Pyx_AddTraceback("dawg.IntDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __Pyx_RefNannyFinishContext();
   return -1;
   __pyx_L4_argument_unpacking_done:;
-  __pyx_r = __pyx_pf_4dawg_7IntDict___init__(((struct __pyx_obj_4dawg_IntDict *)__pyx_v_self), __pyx_v_arg);
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-static PyObject *__pyx_gb_4dawg_7IntDict_8__init___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
-
-/* "dawg.pyx":412
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG___init__(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), __pyx_v_arg);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+static PyObject *__pyx_gb_4dawg_7IntDAWG_8__init___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */
+
+/* "dawg.pyx":415
  * 
  *         if isinstance(arg, collections.Mapping):
  *             iterable = ((key, arg[key]) for key in arg)             # <<<<<<<<<<<<<<
  *             iterable = arg
  */
 
-static PyObject *__pyx_pf_4dawg_7IntDict_8__init___genexpr(PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4dawg_7IntDAWG_8__init___genexpr(PyObject *__pyx_self) {
   struct __pyx_obj_4dawg___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4dawg___pyx_scope_struct_4___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], 412);
+  __Pyx_TraceCall("genexpr", __pyx_f[0], 415);
   {
-    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4dawg_7IntDict_8__init___2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4dawg_7IntDAWG_8__init___2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_cur_scope);
     __Pyx_RefNannyFinishContext();
     return (PyObject *) gen;
   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   goto __pyx_L0;
   __pyx_L1_error:;
-  __Pyx_AddTraceback("dawg.IntDict.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
   return __pyx_r;
 }
 
-static PyObject *__pyx_gb_4dawg_7IntDict_8__init___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
+static PyObject *__pyx_gb_4dawg_7IntDAWG_8__init___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
 {
   struct __pyx_obj_4dawg___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4dawg___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
   PyObject *__pyx_r = NULL;
     return NULL;
   }
   __pyx_L3_first_run:;
-  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
+  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __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 = 415; __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 = 412; __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 = 415; __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 = 412; __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 = 415; __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 = 412; __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 = 415; __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 = 412; __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 = 415; __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 = 412; __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 = 415; __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
     __Pyx_GIVEREF(__pyx_t_4);
     __pyx_cur_scope->__pyx_v_key = __pyx_t_4;
     __pyx_t_4 = 0;
-    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg, __pyx_cur_scope->__pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_arg, __pyx_cur_scope->__pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_5);
     __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key);
     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_key);
     __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 = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   PyErr_SetNone(PyExc_StopIteration);
   return NULL;
 }
 
-/* "dawg.pyx":407
+/* "dawg.pyx":406
  *     It can store integer values for unicode keys.
  *     """
  *     def __init__(self, arg=None):             # <<<<<<<<<<<<<<
- *         if arg is None:
- *             arg = []
- */
-
-static int __pyx_pf_4dawg_7IntDict___init__(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_arg) {
+ *         """
+ *         ``arg`` must be an iterable of tuples (unicode_key, int_value)
+ */
+
+static int __pyx_pf_4dawg_7IntDAWG___init__(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_arg) {
   struct __pyx_obj_4dawg___pyx_scope_struct_4___init__ *__pyx_cur_scope;
   PyObject *__pyx_v_iterable = NULL;
   int __pyx_r;
     return -1;
   }
   __Pyx_GOTREF(__pyx_cur_scope);
-  __Pyx_TraceCall("__init__", __pyx_f[0], 407);
+  __Pyx_TraceCall("__init__", __pyx_f[0], 406);
   __pyx_cur_scope->__pyx_v_arg = __pyx_v_arg;
   __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg);
   __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg);
 
-  /* "dawg.pyx":408
- *     """
- *     def __init__(self, arg=None):
+  /* "dawg.pyx":411
+ *         or a dict {unicode_key: int_value}.
+ *         """
  *         if arg is None:             # <<<<<<<<<<<<<<
  *             arg = []
  * 
   __pyx_t_1 = (__pyx_cur_scope->__pyx_v_arg == Py_None);
   if (__pyx_t_1) {
 
-    /* "dawg.pyx":409
- *     def __init__(self, arg=None):
+    /* "dawg.pyx":412
+ *         """
  *         if arg is None:
  *             arg = []             # <<<<<<<<<<<<<<
  * 
  *         if isinstance(arg, collections.Mapping):
  */
-    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __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 = 412; __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":411
+  /* "dawg.pyx":414
  *             arg = []
  * 
  *         if isinstance(arg, collections.Mapping):             # <<<<<<<<<<<<<<
  */
   __pyx_t_2 = __pyx_cur_scope->__pyx_v_arg;
   __Pyx_INCREF(__pyx_t_2);
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__collections); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Mapping); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__Mapping); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_IsInstance(__pyx_t_2, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   if (__pyx_t_1) {
 
-    /* "dawg.pyx":412
+    /* "dawg.pyx":415
  * 
  *         if isinstance(arg, collections.Mapping):
  *             iterable = ((key, arg[key]) for key in arg)             # <<<<<<<<<<<<<<
  *         else:
  *             iterable = arg
  */
-    __pyx_t_4 = __pyx_pf_4dawg_7IntDict_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = __pyx_pf_4dawg_7IntDAWG_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
     __pyx_v_iterable = __pyx_t_4;
     __pyx_t_4 = 0;
   }
   /*else*/ {
 
-    /* "dawg.pyx":414
+    /* "dawg.pyx":417
  *             iterable = ((key, arg[key]) for key in arg)
  *         else:
  *             iterable = arg             # <<<<<<<<<<<<<<
   }
   __pyx_L4:;
 
-  /* "dawg.pyx":416
+  /* "dawg.pyx":419
  *             iterable = arg
  * 
  *         iterable = sorted(iterable, key=operator.itemgetter(0))             # <<<<<<<<<<<<<<
- *         super(IntDict, self).__init__(iterable)
- * 
- */
-  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *         super(IntDAWG, self).__init__(iterable)
+ * 
+ */
+  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_INCREF(__pyx_v_iterable);
   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_iterable);
   __Pyx_GIVEREF(__pyx_v_iterable);
-  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__operator); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__operator); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__itemgetter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__itemgetter); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_5);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
-  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__key), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__key), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_Call(__pyx_builtin_sorted, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __pyx_v_iterable = __pyx_t_3;
   __pyx_t_3 = 0;
 
-  /* "dawg.pyx":417
+  /* "dawg.pyx":420
  * 
  *         iterable = sorted(iterable, key=operator.itemgetter(0))
- *         super(IntDict, self).__init__(iterable)             # <<<<<<<<<<<<<<
- * 
- * 
- */
-  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *         super(IntDAWG, self).__init__(iterable)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDict)));
-  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDict)));
-  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDict)));
+  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDAWG)));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDAWG)));
+  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4dawg_IntDAWG)));
   __Pyx_INCREF(((PyObject *)__pyx_v_self));
   PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
-  __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
-  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __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 = 417; __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 = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_INCREF(__pyx_v_iterable);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_iterable);
   __Pyx_GIVEREF(__pyx_v_iterable);
-  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_4);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_XDECREF(__pyx_t_3);
   __Pyx_XDECREF(__pyx_t_4);
   __Pyx_XDECREF(__pyx_t_5);
-  __Pyx_AddTraceback("dawg.IntDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = -1;
   __pyx_L0:;
   __Pyx_XDECREF(__pyx_v_iterable);
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_4dawg_7IntDict_3_build_from_iterable(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable); /*proto*/
-static PyObject *__pyx_pw_4dawg_7IntDict_3_build_from_iterable(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_3_build_from_iterable(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable); /*proto*/
+static PyObject *__pyx_pw_4dawg_7IntDAWG_3_build_from_iterable(PyObject *__pyx_v_self, PyObject *__pyx_v_iterable) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("_build_from_iterable (wrapper)", 0);
-  __pyx_r = __pyx_pf_4dawg_7IntDict_2_build_from_iterable(((struct __pyx_obj_4dawg_IntDict *)__pyx_v_self), ((PyObject *)__pyx_v_iterable));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "dawg.pyx":420
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG_2_build_from_iterable(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), ((PyObject *)__pyx_v_iterable));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "dawg.pyx":423
  * 
  * 
  *     def _build_from_iterable(self, iterable):             # <<<<<<<<<<<<<<
  * 
  */
 
-static PyObject *__pyx_pf_4dawg_7IntDict_2_build_from_iterable(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_iterable) {
+static PyObject *__pyx_pf_4dawg_7IntDAWG_2_build_from_iterable(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_iterable) {
   dawgdic::DawgBuilder __pyx_v_dawg_builder;
   PyObject *__pyx_v_b_key = 0;
   PyObject *__pyx_v_key = NULL;
   PyObject *__pyx_t_6 = NULL;
   PyObject *__pyx_t_7 = NULL;
   PyObject *(*__pyx_t_8)(PyObject *);
-  dawgdic::CharType *__pyx_t_9;
-  dawgdic::ValueType __pyx_t_10;
+  int __pyx_t_9;
+  dawgdic::CharType *__pyx_t_10;
+  dawgdic::ValueType __pyx_t_11;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("_build_from_iterable", 0);
-  __Pyx_TraceCall("_build_from_iterable", __pyx_f[0], 420);
-
-  /* "dawg.pyx":424
+  __Pyx_TraceCall("_build_from_iterable", __pyx_f[0], 423);
+
+  /* "dawg.pyx":427
  * 
  *         cdef bytes b_key
  *         for key, value in iterable:             # <<<<<<<<<<<<<<
- *             b_key = key.encode('utf8')
- *             dawg_builder.Insert(b_key, value)
+ *             if value < 0:
+ *                 raise ValueError("Negative values are not supported")
  */
   if (PyList_CheckExact(__pyx_v_iterable) || PyTuple_CheckExact(__pyx_v_iterable)) {
     __pyx_t_1 = __pyx_v_iterable; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
     __pyx_t_3 = NULL;
   } else {
-    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_iterable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __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 = 424; __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 = 427; __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 = 424; __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 = 427; __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 = 424; __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 = 427; __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 = 424; __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 = 427; __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 = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
         }
         break;
       }
       if (unlikely(size != 2)) {
         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
-        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       }
       #if CYTHON_COMPILING_IN_CPYTHON
       if (likely(PyTuple_CheckExact(sequence))) {
       __Pyx_INCREF(__pyx_t_5);
       __Pyx_INCREF(__pyx_t_6);
       #else
-      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       #endif
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
     } else
     {
       Py_ssize_t index = -1;
-      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_7);
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
       __Pyx_GOTREF(__pyx_t_5);
       index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
       __Pyx_GOTREF(__pyx_t_6);
-      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_t_8 = NULL;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       goto __pyx_L6_unpacking_done;
       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
       __pyx_t_8 = NULL;
       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
-      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __pyx_L6_unpacking_done:;
     }
     __Pyx_XDECREF(__pyx_v_key);
     __pyx_v_value = __pyx_t_6;
     __pyx_t_6 = 0;
 
-    /* "dawg.pyx":425
+    /* "dawg.pyx":428
  *         cdef bytes b_key
  *         for key, value in iterable:
+ *             if value < 0:             # <<<<<<<<<<<<<<
+ *                 raise ValueError("Negative values are not supported")
+ *             b_key = key.encode('utf8')
+ */
+    __pyx_t_4 = PyObject_RichCompare(__pyx_v_value, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+    if (__pyx_t_9) {
+
+      /* "dawg.pyx":429
+ *         for key, value in iterable:
+ *             if value < 0:
+ *                 raise ValueError("Negative values are not supported")             # <<<<<<<<<<<<<<
+ *             b_key = key.encode('utf8')
+ *             dawg_builder.Insert(b_key, value)
+ */
+      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_4);
+      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+
+    /* "dawg.pyx":430
+ *             if value < 0:
+ *                 raise ValueError("Negative values are not supported")
  *             b_key = key.encode('utf8')             # <<<<<<<<<<<<<<
  *             dawg_builder.Insert(b_key, value)
  * 
  */
-    __pyx_t_4 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_4 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__encode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_4);
-    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_6);
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-    if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_XDECREF(((PyObject *)__pyx_v_b_key));
     __pyx_v_b_key = ((PyObject*)__pyx_t_6);
     __pyx_t_6 = 0;
 
-    /* "dawg.pyx":426
- *         for key, value in iterable:
+    /* "dawg.pyx":431
+ *                 raise ValueError("Negative values are not supported")
  *             b_key = key.encode('utf8')
  *             dawg_builder.Insert(b_key, value)             # <<<<<<<<<<<<<<
  * 
  *         cdef _dawg.Dawg dawg
  */
-    __pyx_t_9 = PyBytes_AsString(((PyObject *)__pyx_v_b_key)); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_t_10 = __Pyx_PyInt_from_py_dawgdic__ValueType(__pyx_v_value); if (unlikely((__pyx_t_10 == (dawgdic::ValueType)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __pyx_v_dawg_builder.Insert(__pyx_t_9, __pyx_t_10);
+    __pyx_t_10 = PyBytes_AsString(((PyObject *)__pyx_v_b_key)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_11 = __Pyx_PyInt_from_py_dawgdic__ValueType(__pyx_v_value); if (unlikely((__pyx_t_11 == (dawgdic::ValueType)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_dawg_builder.Insert(__pyx_t_10, __pyx_t_11);
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 
-  /* "dawg.pyx":429
+  /* "dawg.pyx":434
  * 
  *         cdef _dawg.Dawg dawg
  *         dawg_builder.Finish(&dawg)             # <<<<<<<<<<<<<<
  */
   __pyx_v_dawg_builder.Finish((&__pyx_v_dawg));
 
-  /* "dawg.pyx":430
+  /* "dawg.pyx":435
  *         cdef _dawg.Dawg dawg
  *         dawg_builder.Finish(&dawg)
  *         _dictionary_builder.Build(dawg, &(self.dct))             # <<<<<<<<<<<<<<
  * 
- * 
+ *     def __getitem__(self, key):
  */
   dawgdic::DictionaryBuilder::Build(__pyx_v_dawg, (&__pyx_v_self->__pyx_base.dct));
 
   __Pyx_XDECREF(__pyx_t_5);
   __Pyx_XDECREF(__pyx_t_6);
   __Pyx_XDECREF(__pyx_t_7);
-  __Pyx_AddTraceback("dawg.IntDict._build_from_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG._build_from_iterable", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XDECREF(__pyx_v_b_key);
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_4dawg_7IntDict_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pw_4dawg_7IntDict_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pw_4dawg_7IntDAWG_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
-  __pyx_r = __pyx_pf_4dawg_7IntDict_4__getitem__(((struct __pyx_obj_4dawg_IntDict *)__pyx_v_self), ((PyObject *)__pyx_v_key));
-  __Pyx_RefNannyFinishContext();
-  return __pyx_r;
-}
-
-/* "dawg.pyx":433
- * 
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG_4__getitem__(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), ((PyObject *)__pyx_v_key));
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+/* "dawg.pyx":437
+ *         _dictionary_builder.Build(dawg, &(self.dct))
  * 
  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
- *         cdef int res
- * 
- */
-
-static PyObject *__pyx_pf_4dawg_7IntDict_4__getitem__(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key) {
+ *         cdef int res = self.get(key, -1)
+ *         if res == -1:
+ */
+
+static PyObject *__pyx_pf_4dawg_7IntDAWG_4__getitem__(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key) {
   int __pyx_v_res;
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
-  int __pyx_t_2;
-  PyObject *__pyx_t_3 = NULL;
+  struct __pyx_opt_args_4dawg_7IntDAWG_get __pyx_t_2;
+  int __pyx_t_3;
+  int __pyx_t_4;
+  PyObject *__pyx_t_5 = NULL;
   int __pyx_lineno = 0;
   const char *__pyx_filename = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("__getitem__", 0);
-  __Pyx_TraceCall("__getitem__", __pyx_f[0], 433);
-
-  /* "dawg.pyx":436
+  __Pyx_TraceCall("__getitem__", __pyx_f[0], 437);
+
+  /* "dawg.pyx":438
+ * 
+ *     def __getitem__(self, key):
+ *         cdef int res = self.get(key, -1)             # <<<<<<<<<<<<<<
+ *         if res == -1:
+ *             raise KeyError(key)
+ */
+  __pyx_t_2.__pyx_n = 1;
+  __pyx_t_2.__pyx_default = __pyx_int_neg_1;
+  __pyx_t_1 = ((struct __pyx_vtabstruct_4dawg_IntDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_res = __pyx_t_3;
+
+  /* "dawg.pyx":439
+ *     def __getitem__(self, key):
+ *         cdef int res = self.get(key, -1)
+ *         if res == -1:             # <<<<<<<<<<<<<<
+ *             raise KeyError(key)
+ *         return res
+ */
+  __pyx_t_4 = (__pyx_v_res == -1);
+  if (__pyx_t_4) {
+
+    /* "dawg.pyx":440
+ *         cdef int res = self.get(key, -1)
+ *         if res == -1:
+ *             raise KeyError(key)             # <<<<<<<<<<<<<<
+ *         return res
+ * 
+ */
+    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __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_5 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_5);
+    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    goto __pyx_L3;
+  }
+  __pyx_L3:;
+
+  /* "dawg.pyx":441
+ *         if res == -1:
+ *             raise KeyError(key)
+ *         return res             # <<<<<<<<<<<<<<
+ * 
+ *     cpdef get(self, key, default=None):
+ */
+  __Pyx_XDECREF(__pyx_r);
+  __pyx_t_5 = PyInt_FromLong(__pyx_v_res); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_5);
+  __pyx_r = __pyx_t_5;
+  __pyx_t_5 = 0;
+  goto __pyx_L0;
+
+  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+  goto __pyx_L0;
+  __pyx_L1_error:;
+  __Pyx_XDECREF(__pyx_t_1);
+  __Pyx_XDECREF(__pyx_t_5);
+  __Pyx_AddTraceback("dawg.IntDAWG.__getitem__", __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":443
+ *         return res
+ * 
+ *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
+ *         """
+ *         Returns a list of payloads (as byte objects) for a given key
+ */
+
+static PyObject *__pyx_pw_4dawg_7IntDAWG_7get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_f_4dawg_7IntDAWG_get(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch, struct __pyx_opt_args_4dawg_7IntDAWG_get *__pyx_optional_args) {
+  PyObject *__pyx_v_default = ((PyObject *)Py_None);
+  int __pyx_v_res;
+  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_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get", 0);
+  __Pyx_TraceCall("get", __pyx_f[0], 443);
+  if (__pyx_optional_args) {
+    if (__pyx_optional_args->__pyx_n > 0) {
+      __pyx_v_default = __pyx_optional_args->__pyx_default;
+    }
+  }
+  /* 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); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __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_7IntDAWG_7get)) {
+      __Pyx_XDECREF(__pyx_r);
+      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __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_GIVEREF(__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 = 443; __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_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":450
  *         cdef int res
  * 
  *         if isinstance(key, unicode):             # <<<<<<<<<<<<<<
  */
   __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
   __Pyx_INCREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_key, __pyx_t_1); 
+  __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_key, __pyx_t_1); 
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (__pyx_t_2) {
-
-    /* "dawg.pyx":437
+  if (__pyx_t_4) {
+
+    /* "dawg.pyx":451
  * 
  *         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 = 437; __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 = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_1 = __pyx_v_key;
     __Pyx_INCREF(__pyx_t_1);
-    __pyx_v_res = ((struct __pyx_vtabstruct_4dawg_IntDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0);
+    __pyx_v_res = ((struct __pyx_vtabstruct_4dawg_IntDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
     goto __pyx_L3;
   }
   /*else*/ {
 
-    /* "dawg.pyx":439
+    /* "dawg.pyx":453
  *             res = self.get_value(key)
  *         else:
  *             res = self.b_get_value(key)             # <<<<<<<<<<<<<<
  * 
  *         if res == -1:
  */
-    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 = 439; __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 = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_t_1 = __pyx_v_key;
     __Pyx_INCREF(__pyx_t_1);
-    __pyx_v_res = ((struct __pyx_vtabstruct_4dawg_IntDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0);
+    __pyx_v_res = ((struct __pyx_vtabstruct_4dawg_IntDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, ((PyObject*)__pyx_t_1), 0);
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
   __pyx_L3:;
 
-  /* "dawg.pyx":441
+  /* "dawg.pyx":455
  *             res = self.b_get_value(key)
  * 
  *         if res == -1:             # <<<<<<<<<<<<<<
- *             raise KeyError(key)
+ *             return default
  *         return res
  */
-  __pyx_t_2 = (__pyx_v_res == -1);
-  if (__pyx_t_2) {
-
-    /* "dawg.pyx":442
+  __pyx_t_4 = (__pyx_v_res == -1);
+  if (__pyx_t_4) {
+
+    /* "dawg.pyx":456
  * 
  *         if res == -1:
- *             raise KeyError(key)             # <<<<<<<<<<<<<<
+ *             return default             # <<<<<<<<<<<<<<
  *         return res
  * 
  */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __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 = 442; __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 = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_XDECREF(__pyx_r);
+    __Pyx_INCREF(__pyx_v_default);
+    __pyx_r = __pyx_v_default;
+    goto __pyx_L0;
     goto __pyx_L4;
   }
   __pyx_L4:;
 
-  /* "dawg.pyx":443
+  /* "dawg.pyx":457
  *         if res == -1:
- *             raise KeyError(key)
+ *             return default
  *         return res             # <<<<<<<<<<<<<<
  * 
- * 
+ *     cpdef int get_value(self, unicode key):
  */
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_3 = PyInt_FromLong(__pyx_v_res); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __pyx_r = __pyx_t_3;
-  __pyx_t_3 = 0;
+  __pyx_t_1 = PyInt_FromLong(__pyx_v_res); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __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_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_AddTraceback("dawg.IntDict.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
-  __pyx_r = NULL;
+  __Pyx_AddTraceback("dawg.IntDAWG.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __pyx_r = 0;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   __Pyx_TraceReturn(__pyx_r);
   return __pyx_r;
 }
 
-/* "dawg.pyx":446
- * 
+/* Python wrapper */
+static PyObject *__pyx_pw_4dawg_7IntDAWG_7get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_4dawg_7IntDAWG_6get[] = "\n        Returns a list of payloads (as byte objects) for a given key\n        or ``default`` if the key is not found.\n        ";
+static PyObject *__pyx_pw_4dawg_7IntDAWG_7get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+  PyObject *__pyx_v_key = 0;
+  PyObject *__pyx_v_default = 0;
+  PyObject *__pyx_r = 0;
+  __Pyx_RefNannyDeclarations
+  __Pyx_RefNannySetupContext("get (wrapper)", 0);
+  {
+    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__default,0};
+    PyObject* values[2] = {0,0};
+
+    /* "dawg.pyx":443
+ *         return res
+ * 
+ *     cpdef get(self, key, default=None):             # <<<<<<<<<<<<<<
+ *         """
+ *         Returns a list of payloads (as byte objects) for a given key
+ */
+    values[1] = ((PyObject *)Py_None);
+    if (unlikely(__pyx_kwds)) {
+      Py_ssize_t kw_args;
+      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+      switch (pos_args) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        case  0: break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+      kw_args = PyDict_Size(__pyx_kwds);
+      switch (pos_args) {
+        case  0:
+        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key)) != 0)) kw_args--;
+        else goto __pyx_L5_argtuple_error;
+        case  1:
+        if (kw_args > 0) {
+          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
+          if (value) { values[1] = value; kw_args--; }
+        }
+      }
+      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 = 443; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      }
+    } else {
+      switch (PyTuple_GET_SIZE(__pyx_args)) {
+        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+        break;
+        default: goto __pyx_L5_argtuple_error;
+      }
+    }
+    __pyx_v_key = values[0];
+    __pyx_v_default = values[1];
+  }
+  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 = 443; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __pyx_L3_error:;
+  __Pyx_AddTraceback("dawg.IntDAWG.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_RefNannyFinishContext();
+  return NULL;
+  __pyx_L4_argument_unpacking_done:;
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG_6get(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), __pyx_v_key, __pyx_v_default);
+  __Pyx_RefNannyFinishContext();
+  return __pyx_r;
+}
+
+static PyObject *__pyx_pf_4dawg_7IntDAWG_6get(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) {
+  PyObject *__pyx_r = NULL;
+  __Pyx_RefNannyDeclarations
+  PyObject *__pyx_t_1 = NULL;
+  struct __pyx_opt_args_4dawg_7IntDAWG_get __pyx_t_2;
+  int __pyx_lineno = 0;
+  const char *__pyx_filename = NULL;
+  int __pyx_clineno = 0;
+  __Pyx_TraceDeclarations
+  __Pyx_RefNannySetupContext("get", 0);
+  __Pyx_TraceCall("get", __pyx_f[0], 443);
+  __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_IntDAWG *)__pyx_v_self->__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 = 443; __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.IntDAWG.get", __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":459
+ *         return res
  * 
  *     cpdef int get_value(self, unicode key):             # <<<<<<<<<<<<<<
  *         cdef bytes b_key = key.encode('utf8')
  *         return self.dct.Find(b_key)
  */
 
-static PyObject *__pyx_pw_4dawg_7IntDict_7get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static int __pyx_f_4dawg_7IntDict_get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_9get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static int __pyx_f_4dawg_7IntDAWG_get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
   PyObject *__pyx_v_b_key = 0;
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("get_value", 0);
-  __Pyx_TraceCall("get_value", __pyx_f[0], 446);
+  __Pyx_TraceCall("get_value", __pyx_f[0], 459);
   /* 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 = 446; __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 = 459; __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_7IntDict_7get_value)) {
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_7IntDAWG_9get_value)) {
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __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 = 446; __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 = 459; __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_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __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":447
+  /* "dawg.pyx":460
  * 
  *     cpdef int get_value(self, unicode key):
  *         cdef bytes b_key = key.encode('utf8')             # <<<<<<<<<<<<<<
  */
   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 = 447; __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 = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __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 = 460; __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 = 447; __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 = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_b_key = ((PyObject*)__pyx_t_1);
   __pyx_t_1 = 0;
 
-  /* "dawg.pyx":448
+  /* "dawg.pyx":461
  *     cpdef int get_value(self, unicode key):
  *         cdef bytes b_key = key.encode('utf8')
  *         return self.dct.Find(b_key)             # <<<<<<<<<<<<<<
  * 
  *     cpdef int b_get_value(self, bytes key):
  */
-  __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_b_key)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_b_key)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_v_self->__pyx_base.dct.Find(__pyx_t_5);
   goto __pyx_L0;
 
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_WriteUnraisable("dawg.IntDict.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_WriteUnraisable("dawg.IntDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_XDECREF(__pyx_v_b_key);
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_4dawg_7IntDict_7get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pw_4dawg_7IntDict_7get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_9get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pw_4dawg_7IntDAWG_9get_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 = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_4dawg_7IntDict_6get_value(((struct __pyx_obj_4dawg_IntDict *)__pyx_v_self), ((PyObject*)__pyx_v_key));
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyUnicode_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG_8get_value(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), ((PyObject*)__pyx_v_key));
   goto __pyx_L0;
   __pyx_L1_error:;
   __pyx_r = NULL;
   return __pyx_r;
 }
 
-/* "dawg.pyx":446
- * 
+/* "dawg.pyx":459
+ *         return res
  * 
  *     cpdef int get_value(self, unicode key):             # <<<<<<<<<<<<<<
  *         cdef bytes b_key = key.encode('utf8')
  *         return self.dct.Find(b_key)
  */
 
-static PyObject *__pyx_pf_4dawg_7IntDict_6get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pf_4dawg_7IntDAWG_8get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("get_value", 0);
-  __Pyx_TraceCall("get_value", __pyx_f[0], 446);
+  __Pyx_TraceCall("get_value", __pyx_f[0], 459);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_4dawg_IntDict *)__pyx_v_self->__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 = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_4dawg_IntDAWG *)__pyx_v_self->__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 = 459; __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_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("dawg.IntDict.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   return __pyx_r;
 }
 
-/* "dawg.pyx":450
+/* "dawg.pyx":463
  *         return self.dct.Find(b_key)
  * 
  *     cpdef int b_get_value(self, bytes key):             # <<<<<<<<<<<<<<
  *         return self.dct.Find(key)
  */
 
-static PyObject *__pyx_pw_4dawg_7IntDict_9b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static int __pyx_f_4dawg_7IntDict_b_get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_11b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static int __pyx_f_4dawg_7IntDAWG_b_get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
   int __pyx_r;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("b_get_value", 0);
-  __Pyx_TraceCall("b_get_value", __pyx_f[0], 450);
+  __Pyx_TraceCall("b_get_value", __pyx_f[0], 463);
   /* 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 = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __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 = 463; __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_7IntDict_9b_get_value)) {
-      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4dawg_7IntDAWG_11b_get_value)) {
+      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __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 = 450; __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 = 463; __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_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __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":451
+  /* "dawg.pyx":464
  * 
  *     cpdef int b_get_value(self, bytes key):
  *         return self.dct.Find(key)             # <<<<<<<<<<<<<<
  */
-  __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_key)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = PyBytes_AsString(((PyObject *)__pyx_v_key)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_v_self->__pyx_base.dct.Find(__pyx_t_5);
   goto __pyx_L0;
 
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_WriteUnraisable("dawg.IntDict.b_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_WriteUnraisable("dawg.IntDAWG.b_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = 0;
   __pyx_L0:;
   __Pyx_TraceReturn(Py_None);
 }
 
 /* Python wrapper */
-static PyObject *__pyx_pw_4dawg_7IntDict_9b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
-static PyObject *__pyx_pw_4dawg_7IntDict_9b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pw_4dawg_7IntDAWG_11b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
+static PyObject *__pyx_pw_4dawg_7IntDAWG_11b_get_value(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = 0;
   __Pyx_RefNannyDeclarations
   __Pyx_RefNannySetupContext("b_get_value (wrapper)", 0);
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBytes_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_r = __pyx_pf_4dawg_7IntDict_8b_get_value(((struct __pyx_obj_4dawg_IntDict *)__pyx_v_self), ((PyObject*)__pyx_v_key));
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBytes_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_r = __pyx_pf_4dawg_7IntDAWG_10b_get_value(((struct __pyx_obj_4dawg_IntDAWG *)__pyx_v_self), ((PyObject*)__pyx_v_key));
   goto __pyx_L0;
   __pyx_L1_error:;
   __pyx_r = NULL;
   return __pyx_r;
 }
 
-/* "dawg.pyx":450
+/* "dawg.pyx":463
  *         return self.dct.Find(b_key)
  * 
  *     cpdef int b_get_value(self, bytes key):             # <<<<<<<<<<<<<<
  *         return self.dct.Find(key)
  */
 
-static PyObject *__pyx_pf_4dawg_7IntDict_8b_get_value(struct __pyx_obj_4dawg_IntDict *__pyx_v_self, PyObject *__pyx_v_key) {
+static PyObject *__pyx_pf_4dawg_7IntDAWG_10b_get_value(struct __pyx_obj_4dawg_IntDAWG *__pyx_v_self, PyObject *__pyx_v_key) {
   PyObject *__pyx_r = NULL;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   int __pyx_clineno = 0;
   __Pyx_TraceDeclarations
   __Pyx_RefNannySetupContext("b_get_value", 0);
-  __Pyx_TraceCall("b_get_value", __pyx_f[0], 450);
+  __Pyx_TraceCall("b_get_value", __pyx_f[0], 463);
   __Pyx_XDECREF(__pyx_r);
-  __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_4dawg_IntDict *)__pyx_v_self->__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyInt_FromLong(((struct __pyx_vtabstruct_4dawg_IntDAWG *)__pyx_v_self->__pyx_base.__pyx_vtab)->b_get_value(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __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_L1_error:;
   __Pyx_XDECREF(__pyx_t_1);
-  __Pyx_AddTraceback("dawg.IntDict.b_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+  __Pyx_AddTraceback("dawg.IntDAWG.b_get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
   __pyx_r = NULL;
   __pyx_L0:;
   __Pyx_XGIVEREF(__pyx_r);
   0, /*tp_version_tag*/
   #endif
 };
-static struct __pyx_vtabstruct_4dawg_IntDict __pyx_vtable_4dawg_IntDict;
-
-static PyObject *__pyx_tp_new_4dawg_IntDict(PyTypeObject *t, PyObject *a, PyObject *k) {
-  struct __pyx_obj_4dawg_IntDict *p;
+static struct __pyx_vtabstruct_4dawg_IntDAWG __pyx_vtable_4dawg_IntDAWG;
+
+static PyObject *__pyx_tp_new_4dawg_IntDAWG(PyTypeObject *t, PyObject *a, PyObject *k) {
+  struct __pyx_obj_4dawg_IntDAWG *p;
   PyObject *o = __pyx_tp_new_4dawg_DAWG(t, a, k);
   if (!o) return 0;
-  p = ((struct __pyx_obj_4dawg_IntDict *)o);
-  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4dawg_DAWG*)__pyx_vtabptr_4dawg_IntDict;
+  p = ((struct __pyx_obj_4dawg_IntDAWG *)o);
+  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4dawg_DAWG*)__pyx_vtabptr_4dawg_IntDAWG;
   return o;
 }
-static PyObject *__pyx_sq_item_4dawg_IntDict(PyObject *o, Py_ssize_t i) {
+static PyObject *__pyx_sq_item_4dawg_IntDAWG(PyObject *o, Py_ssize_t i) {
   PyObject *r;
   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   return r;
 }
 
-static PyMethodDef __pyx_methods_4dawg_IntDict[] = {
-  {__Pyx_NAMESTR("_build_from_iterable"), (PyCFunction)__pyx_pw_4dawg_7IntDict_3_build_from_iterable, METH_O, __Pyx_DOCSTR(0)},
-  {__Pyx_NAMESTR("get_value"), (PyCFunction)__pyx_pw_4dawg_7IntDict_7get_value, METH_O, __Pyx_DOCSTR(0)},
-  {__Pyx_NAMESTR("b_get_value"), (PyCFunction)__pyx_pw_4dawg_7IntDict_9b_get_value, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4dawg_IntDAWG[] = {
+  {__Pyx_NAMESTR("_build_from_iterable"), (PyCFunction)__pyx_pw_4dawg_7IntDAWG_3_build_from_iterable, METH_O, __Pyx_DOCSTR(0)},
+  {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4dawg_7IntDAWG_7get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4dawg_7IntDAWG_6get)},
+  {__Pyx_NAMESTR("get_value"), (PyCFunction)__pyx_pw_4dawg_7IntDAWG_9get_value, METH_O, __Pyx_DOCSTR(0)},
+  {__Pyx_NAMESTR("b_get_value"), (PyCFunction)__pyx_pw_4dawg_7IntDAWG_11b_get_value, METH_O, __Pyx_DOCSTR(0)},
   {0, 0, 0, 0}
 };
 
-static PyNumberMethods __pyx_tp_as_number_IntDict = {
+static PyNumberMethods __pyx_tp_as_number_IntDAWG = {
   0, /*nb_add*/
   0, /*nb_subtract*/
   0, /*nb_multiply*/
   #endif
 };
 
-static PySequenceMethods __pyx_tp_as_sequence_IntDict = {
+static PySequenceMethods __pyx_tp_as_sequence_IntDAWG = {
   0, /*sq_length*/
   0, /*sq_concat*/
   0, /*sq_repeat*/
-  __pyx_sq_item_4dawg_IntDict, /*sq_item*/
+  __pyx_sq_item_4dawg_IntDAWG, /*sq_item*/
   0, /*sq_slice*/
   0, /*sq_ass_item*/
   0, /*sq_ass_slice*/
   0, /*sq_inplace_repeat*/
 };
 
-static PyMappingMethods __pyx_tp_as_mapping_IntDict = {
+static PyMappingMethods __pyx_tp_as_mapping_IntDAWG = {
   0, /*mp_length*/
-  __pyx_pw_4dawg_7IntDict_5__getitem__, /*mp_subscript*/
+  __pyx_pw_4dawg_7IntDAWG_5__getitem__, /*mp_subscript*/
   0, /*mp_ass_subscript*/
 };
 
-static PyBufferProcs __pyx_tp_as_buffer_IntDict = {
+static PyBufferProcs __pyx_tp_as_buffer_IntDAWG = {
   #if PY_MAJOR_VERSION < 3
   0, /*bf_getreadbuffer*/
   #endif
   #endif
 };
 
-static PyTypeObject __pyx_type_4dawg_IntDict = {
+static PyTypeObject __pyx_type_4dawg_IntDAWG = {
   PyVarObject_HEAD_INIT(0, 0)
-  __Pyx_NAMESTR("dawg.IntDict"), /*tp_name*/
-  sizeof(struct __pyx_obj_4dawg_IntDict), /*tp_basicsize*/
+  __Pyx_NAMESTR("dawg.IntDAWG"), /*tp_name*/
+  sizeof(struct __pyx_obj_4dawg_IntDAWG), /*tp_basicsize*/
   0, /*tp_itemsize*/
   __pyx_tp_dealloc_4dawg_DAWG, /*tp_dealloc*/
   0, /*tp_print*/
   0, /*reserved*/
   #endif
   0, /*tp_repr*/
-  &__pyx_tp_as_number_IntDict, /*tp_as_number*/
-  &__pyx_tp_as_sequence_IntDict, /*tp_as_sequence*/
-  &__pyx_tp_as_mapping_IntDict, /*tp_as_mapping*/
+  &__pyx_tp_as_number_IntDAWG, /*tp_as_number*/
+  &__pyx_tp_as_sequence_IntDAWG, /*tp_as_sequence*/
+  &__pyx_tp_as_mapping_IntDAWG, /*tp_as_mapping*/
   0, /*tp_hash*/
   0, /*tp_call*/
   0, /*tp_str*/
   0, /*tp_getattro*/
   0, /*tp_setattro*/
-  &__pyx_tp_as_buffer_IntDict, /*tp_as_buffer*/
+  &__pyx_tp_as_buffer_IntDAWG, /*tp_as_buffer*/
   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
   __Pyx_DOCSTR("\n    Dict-like class based on DAWG.\n    It can store integer values for unicode keys.\n    "), /*tp_doc*/
   0, /*tp_traverse*/
   0, /*tp_weaklistoffset*/
   0, /*tp_iter*/
   0, /*tp_iternext*/
-  __pyx_methods_4dawg_IntDict, /*tp_methods*/
+  __pyx_methods_4dawg_IntDAWG, /*tp_methods*/
   0, /*tp_members*/
   0, /*tp_getset*/
   0, /*tp_base*/
   0, /*tp_descr_get*/
   0, /*tp_descr_set*/
   0, /*tp_dictoffset*/
-  __pyx_pw_4dawg_7IntDict_1__init__, /*tp_init*/
+  __pyx_pw_4dawg_7IntDAWG_1__init__, /*tp_init*/
   0, /*tp_alloc*/
-  __pyx_tp_new_4dawg_IntDict, /*tp_new*/
+  __pyx_tp_new_4dawg_IntDAWG, /*tp_new*/
   0, /*tp_free*/
   0, /*tp_is_gc*/
   0, /*tp_bases*/
 
 static __Pyx_StringTabEntry __pyx_string_tab[] = {
   {&__pyx_n_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 1},
+  {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 1, 0, 0},
   {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0, 0},
   {&__pyx_kp_u_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 1, 0, 0},
-  {&__pyx_kp_b_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 0, 0},
+  {&__pyx_kp_b_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 0, 0},
   {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
   {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
   {&__pyx_n_s__Mapping, __pyx_k__Mapping, sizeof(__pyx_k__Mapping), 0, 0, 1, 1},
   {&__pyx_n_s__Struct, __pyx_k__Struct, sizeof(__pyx_k__Struct), 0, 0, 1, 1},
+  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
   {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
   {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1},
   {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1},
   {&__pyx_n_s__b_has_key, __pyx_k__b_has_key, sizeof(__pyx_k__b_has_key), 0, 0, 1, 1},
   {&__pyx_n_s__binascii, __pyx_k__binascii, sizeof(__pyx_k__binascii), 0, 0, 1, 1},
   {&__pyx_n_s__collections, __pyx_k__collections, sizeof(__pyx_k__collections), 0, 0, 1, 1},
-  {&__pyx_n_s__decode, __pyx_k__decode, sizeof(__pyx_k__decode), 0, 0, 1, 1},
   {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 0, 0, 1, 1},
   {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1},
   {&__pyx_n_s__fmt, __pyx_k__fmt, sizeof(__pyx_k__fmt), 0, 0, 1, 1},