/* Generated by Cython 0.22 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "src/vedis.h"
        ]
    }
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_22"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
  #define __Pyx_PyFrozenSet_Size(s)         PyObject_Size(s)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  #define __Pyx_PyFrozenSet_Size(s)         PySet_Size(s)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None)
#ifdef __cplusplus
template<typename T>
void __Pyx_call_destructor(T* x) {
    x->~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(T& ref) : ptr(&ref) { }
    T *operator->() { return ptr; }
    operator T&() { return *ptr; }
  private:
    T *ptr;
};
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__vedis
#define __PYX_HAVE_API__vedis
#include "string.h"
#include "stdlib.h"
#include "src/vedis.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (    \
    (sizeof(type) < sizeof(Py_ssize_t))  ||             \
    (sizeof(type) > sizeof(Py_ssize_t) &&               \
          likely(v < (type)PY_SSIZE_T_MAX ||            \
                 v == (type)PY_SSIZE_T_MAX)  &&         \
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||       \
                                v == (type)PY_SSIZE_T_MIN)))  ||  \
    (sizeof(type) == sizeof(Py_ssize_t) &&              \
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||        \
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "vedis.pyx",
};

/*--- Type declarations ---*/
struct __pyx_obj_5vedis_Vedis;
struct __pyx_obj_5vedis_VedisContext;
struct __pyx_obj_5vedis_Transaction;
struct __pyx_obj_5vedis_Hash;
struct __pyx_obj_5vedis_Set;
struct __pyx_obj_5vedis_List;
struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success;
struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list;
struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr;
struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten;
struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr;
struct __pyx_obj_5vedis___pyx_scope_struct_5_register;
struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__;
struct __pyx_obj_5vedis___pyx_scope_struct_7_gen;
struct __pyx_opt_args_5vedis_5Vedis_execute;
struct __pyx_opt_args_5vedis_5Vedis_str_split;

/* "vedis.pyx":204
 * 
 * 
 * ctypedef int (*vedis_command)(vedis_context *, int, vedis_value **)             # <<<<<<<<<<<<<<
 * 
 * 
 */
typedef int (*__pyx_t_5vedis_vedis_command)(vedis_context *, int, vedis_value **);

/* "vedis.pyx":357
 *         return self.exists(key)
 * 
 *     cpdef execute(self, basestring cmd, tuple params=None, bint result=True):             # <<<<<<<<<<<<<<
 *         cdef list escaped_params
 *         if params is not None:
 */
struct __pyx_opt_args_5vedis_5Vedis_execute {
  int __pyx_n;
  PyObject *params;
  int result;
};

/* "vedis.pyx":490
 *         return self.execute('STRIP_TAG %s', (html,))
 * 
 *     cpdef list str_split(self, basestring s, int nchars=1):             # <<<<<<<<<<<<<<
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))
 * 
 */
struct __pyx_opt_args_5vedis_5Vedis_str_split {
  int __pyx_n;
  int nchars;
};

/* "vedis.pyx":207
 * 
 * 
 * cdef class Vedis(object):             # <<<<<<<<<<<<<<
 *     """
 *     Vedis database wrapper.
 */
struct __pyx_obj_5vedis_Vedis {
  PyObject_HEAD
  struct __pyx_vtabstruct_5vedis_Vedis *__pyx_vtab;
  struct vedis *database;
  int is_memory;
  int is_open;
  PyObject *filename;
  int open_database;
};


/* "vedis.pyx":768
 * 
 * 
 * cdef class VedisContext(object):             # <<<<<<<<<<<<<<
 *     cdef vedis_context *context
 * 
 */
struct __pyx_obj_5vedis_VedisContext {
  PyObject_HEAD
  struct __pyx_vtabstruct_5vedis_VedisContext *__pyx_vtab;
  vedis_context *context;
};


/* "vedis.pyx":945
 * 
 * 
 * cdef class Transaction(object):             # <<<<<<<<<<<<<<
 *     """Expose transaction as a context manager."""
 *     cdef Vedis vedis
 */
struct __pyx_obj_5vedis_Transaction {
  PyObject_HEAD
  struct __pyx_obj_5vedis_Vedis *vedis;
};


/* "vedis.pyx":967
 * 
 * 
 * cdef class Hash(object):             # <<<<<<<<<<<<<<
 *     cdef Vedis vedis
 *     cdef basestring key
 */
struct __pyx_obj_5vedis_Hash {
  PyObject_HEAD
  struct __pyx_obj_5vedis_Vedis *vedis;
  PyObject *key;
};


/* "vedis.pyx":1027
 * 
 * 
 * cdef class Set(object):             # <<<<<<<<<<<<<<
 *     cdef readonly Vedis vedis
 *     cdef readonly basestring key
 */
struct __pyx_obj_5vedis_Set {
  PyObject_HEAD
  struct __pyx_obj_5vedis_Vedis *vedis;
  PyObject *key;
};


/* "vedis.pyx":1072
 * 
 * 
 * cdef class List(object):             # <<<<<<<<<<<<<<
 *     cdef Vedis vedis
 *     cdef basestring key
 */
struct __pyx_obj_5vedis_List {
  PyObject_HEAD
  struct __pyx_obj_5vedis_Vedis *vedis;
  PyObject *key;
};


/* "vedis.pyx":445
 *         return Transaction(self)
 * 
 *     def commit_on_success(self, fn):             # <<<<<<<<<<<<<<
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():
 */
struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success {
  PyObject_HEAD
  PyObject *__pyx_v_fn;
  struct __pyx_obj_5vedis_Vedis *__pyx_v_self;
};


/* "vedis.pyx":679
 * 
 *     # Internal helpers.
 *     cdef basestring _flatten_list(self, list args):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)
 */
struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list {
  PyObject_HEAD
  PyObject *__pyx_v_args;
  struct __pyx_obj_5vedis_Vedis *__pyx_v_self;
};


/* "vedis.pyx":681
 *     cdef basestring _flatten_list(self, list args):
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)             # <<<<<<<<<<<<<<
 * 
 *     cdef basestring _flatten(self, dict kwargs):
 */
struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *__pyx_outer_scope;
  PyObject *__pyx_v_key;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
};


/* "vedis.pyx":683
 *         return ' '.join(self._escape(key) for key in args)
 * 
 *     cdef basestring _flatten(self, dict kwargs):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(
 */
struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten {
  PyObject_HEAD
  PyObject *__pyx_v_kwargs;
  struct __pyx_obj_5vedis_Vedis *__pyx_v_self;
};


/* "vedis.pyx":686
 *         cdef basestring key
 *         return ' '.join(
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))             # <<<<<<<<<<<<<<
 *             for key in kwargs)
 * 
 */
struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr {
  PyObject_HEAD
  struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *__pyx_outer_scope;
  PyObject *__pyx_v_key;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
};


/* "vedis.pyx":704
 *         return List(self, key)
 * 
 *     def register(self, command_name):             # <<<<<<<<<<<<<<
 *         def decorator(fn):
 *             cdef vedis_command command_callback
 */
struct __pyx_obj_5vedis___pyx_scope_struct_5_register {
  PyObject_HEAD
  PyObject *__pyx_v_command_name;
  struct __pyx_obj_5vedis_Vedis *__pyx_v_self;
};


/* "vedis.pyx":1095
 *         return self.vedis.lmpush(self.key, values)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         def gen():
 *             l = len(self)
 */
struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ {
  PyObject_HEAD
  struct __pyx_obj_5vedis_List *__pyx_v_self;
};


/* "vedis.pyx":1096
 * 
 *     def __iter__(self):
 *         def gen():             # <<<<<<<<<<<<<<
 *             l = len(self)
 *             for i in range(l):
 */
struct __pyx_obj_5vedis___pyx_scope_struct_7_gen {
  PyObject_HEAD
  struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *__pyx_outer_scope;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_l;
  Py_ssize_t __pyx_t_0;
  Py_ssize_t __pyx_t_1;
};



/* "vedis.pyx":207
 * 
 * 
 * cdef class Vedis(object):             # <<<<<<<<<<<<<<
 *     """
 *     Vedis database wrapper.
 */

struct __pyx_vtabstruct_5vedis_Vedis {
  PyObject *(*open)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*close)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*disable_autocommit)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*store)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*fetch)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*delete)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*exists)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*update)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*execute)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_execute *__pyx_optional_args);
  PyObject *(*get_result)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*check_call)(struct __pyx_obj_5vedis_Vedis *, int);
  PyObject *(*_build_exception_for_error)(struct __pyx_obj_5vedis_Vedis *, int);
  PyObject *(*_get_last_error)(struct __pyx_obj_5vedis_Vedis *);
  PyObject *(*begin)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*commit)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*rollback)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*random_string)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch);
  int (*random_int)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  int (*copy)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*move)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*rand)(struct __pyx_obj_5vedis_Vedis *, int, int, int __pyx_skip_dispatch);
  PyObject *(*randstr)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch);
  PyObject *(*time)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*date)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*operating_system)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*strip_tags)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*str_split)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_str_split *__pyx_optional_args);
  PyObject *(*size_format)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch);
  PyObject *(*soundex)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*base64)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*base64_decode)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*table_list)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch);
  PyObject *(*get)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*mget)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*mset)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*setnx)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*msetnx)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_set)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*strlen)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*incr)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*decr)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*incr_by)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch);
  int (*decr_by)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch);
  int (*hset)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*hsetnx)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hget)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*hdel)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*hmdel)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hkeys)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hvals)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hgetall)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hitems)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*hlen)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*hexists)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*hmset)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*hmget)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*sadd)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*smadd)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*scard)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*sismember)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*spop)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*speek)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*stop)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*srem)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*smrem)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*smembers)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*sdiff)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*sinter)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*slen)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*lindex)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch);
  int (*llen)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*lpop)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  int (*lpush)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*lmpush)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*lpushx)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  int (*lmpushx)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_flatten_list)(struct __pyx_obj_5vedis_Vedis *, PyObject *);
  PyObject *(*_flatten)(struct __pyx_obj_5vedis_Vedis *, PyObject *);
  PyObject *(*_escape)(struct __pyx_obj_5vedis_Vedis *, PyObject *);
  PyObject *(*Hash)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*Set)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*List)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5vedis_Vedis *__pyx_vtabptr_5vedis_Vedis;


/* "vedis.pyx":768
 * 
 * 
 * cdef class VedisContext(object):             # <<<<<<<<<<<<<<
 *     cdef vedis_context *context
 * 
 */

struct __pyx_vtabstruct_5vedis_VedisContext {
  PyObject *(*set_context)(struct __pyx_obj_5vedis_VedisContext *, vedis_context *);
  vedis_value *(*create_value)(struct __pyx_obj_5vedis_VedisContext *, PyObject *);
  PyObject *(*release_value)(struct __pyx_obj_5vedis_VedisContext *, vedis_value *);
  PyObject *(*store)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*fetch)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*delete)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*exists)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_5vedis_VedisContext *__pyx_vtabptr_5vedis_VedisContext;

/* --- Runtime support code (head) --- */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {                            \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_XDECREF(tmp);                              \
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {                             \
        PyObject *tmp = (PyObject *) r;                         \
        r = v; __Pyx_DECREF(tmp);                               \
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name);

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact);

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);

static CYTHON_INLINE int __Pyx_IterFinish(void);

static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
                                             int is_tuple, int has_known_size, int decref_tuple);

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return __Pyx_PyObject_GetAttrStr(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#else
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
    PyCFunctionObject func;
#if PY_VERSION_HEX < 0x030500A0
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj;
    void *defaults;
    int defaults_pyobjects;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *self,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __Pyx_CyFunction_init(void);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback);

#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

#include <string.h>

static int __Pyx_SetVtable(PyObject *dict, void *vtable);

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

#define __Pyx_Generator_USED
#include <structmember.h>
#include <frameobject.h>
typedef PyObject *(*__pyx_generator_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_generator_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_GeneratorObject;
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname);
static int __pyx_Generator_init(void);
static int __Pyx_Generator_clear(PyObject* self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static int __Pyx_check_binary_version(void);

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static PyObject *__pyx_f_5vedis_5Vedis_open(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_close(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_disable_autocommit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_store(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_fetch(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_delete(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_append(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_exists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_update(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_execute(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_cmd, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_execute *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get_result(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_check_call(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_result); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis__build_exception_for_error(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_status); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis__get_last_error(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_begin(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_commit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_rollback(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_random_string(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_random_int(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_copy(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_move(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_rand(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_minimum, int __pyx_v_maximum, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_randstr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_time(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_date(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_operating_system(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_strip_tags(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_html, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_str_split(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_str_split *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_size_format(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_soundex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_base64(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_base64_decode(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_table_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_mget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_keys, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_mset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_setnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_msetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_strlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_incr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_decr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_incr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_decr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hsetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hmdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hkeys(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hvals(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hgetall(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hitems(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hexists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_hmset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hmget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_sadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_smadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_scard(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_sismember(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_spop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_speek(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_stop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_srem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_smrem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_smembers(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_sdiff(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_sinter(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_slen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_lindex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_index, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_llen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_lpop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_lpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_lmpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_lpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_5vedis_5Vedis_lmpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis__flatten_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_args); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis__flatten(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis__escape(CYTHON_UNUSED struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_Hash(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_Set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_5Vedis_List(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_set_context(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, vedis_context *__pyx_v_context); /* proto*/
static vedis_value *__pyx_f_5vedis_12VedisContext_create_value(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_release_value(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, vedis_value *__pyx_v_ptr); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_store(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_fetch(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_delete(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_append(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_exists(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch); /* proto*/

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'vedis' */
static PyTypeObject *__pyx_ptype_5vedis_Vedis = 0;
static PyTypeObject *__pyx_ptype_5vedis_VedisContext = 0;
static PyTypeObject *__pyx_ptype_5vedis_Transaction = 0;
static PyTypeObject *__pyx_ptype_5vedis_Hash = 0;
static PyTypeObject *__pyx_ptype_5vedis_Set = 0;
static PyTypeObject *__pyx_ptype_5vedis_List = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct__commit_on_success = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_1__flatten_list = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_2_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_3__flatten = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_4_genexpr = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_5_register = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_6___iter__ = 0;
static PyTypeObject *__pyx_ptype_5vedis___pyx_scope_struct_7_gen = 0;
static PyObject *__pyx_v_5vedis_py_command_registry = 0;
static int __pyx_f_5vedis_py_command_wrapper(vedis_context *, int, vedis_value **); /*proto*/
static PyObject *__pyx_f_5vedis_vedis_value_to_python(vedis_value *); /*proto*/
static vedis_value *__pyx_f_5vedis_python_to_vedis_value(vedis_context *, PyObject *); /*proto*/
static vedis_value *__pyx_f_5vedis_create_vedis_scalar(vedis_context *, PyObject *); /*proto*/
static vedis_value *__pyx_f_5vedis_create_vedis_array(vedis_context *, PyObject *); /*proto*/
static PyObject *__pyx_f_5vedis_push_result(vedis_context *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "vedis"
int __pyx_module_is_main_vedis = 0;

/* Implementation of 'vedis' */
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_TypeError;
static int __pyx_pf_5vedis_5Vedis___cinit__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static void __pyx_pf_5vedis_5Vedis_2__dealloc__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_5Vedis_4__init__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_open_database); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_6open(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_8close(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_10__enter__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_12__exit__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_14disable_autocommit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_16store(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_18fetch(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_20delete(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_22append(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_24exists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_26update(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static int __pyx_pf_5vedis_5Vedis_28__setitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_30__getitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_5Vedis_32__delitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_5Vedis_34__contains__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_36execute(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_cmd, PyObject *__pyx_v_params, int __pyx_v_result); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_38get_result(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_40begin(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_42commit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_44rollback(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_46transaction(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_17commit_on_success_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_48commit_on_success(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_50random_string(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_52random_int(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_54copy(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_56move(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_58rand(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_minimum, int __pyx_v_maximum); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_60randstr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_62time(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_64date(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_66operating_system(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_68strip_tags(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_html); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_70str_split(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_v_nchars); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_72size_format(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_74soundex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_76base64(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_78base64_decode(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_80table_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_82get(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_84set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_86mget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_88mset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_90setnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_92msetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_94get_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_96strlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_98incr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_100decr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_102incr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_104decr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_106hset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_108hsetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_110hget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_112hdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_114hmdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_116hkeys(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_118hvals(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_120hgetall(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_122hitems(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_124hlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_126hexists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_128hmset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_130hmget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_132sadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_134smadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_136scard(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_138sismember(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_140spop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_142speek(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_144stop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_146srem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_148smrem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_150smembers(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_152sdiff(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_154sinter(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_156slen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_158lindex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_index); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_160llen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_162lpop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_164lpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_166lmpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_168lpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_170lmpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_13_flatten_list_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_8_flatten_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_172lib_version(CYTHON_UNUSED struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_174Hash(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_176Set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_178List(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_8register_9decorator_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_8register_decorator(PyObject *__pyx_self, PyObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_180register(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_command_name); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_182delete_command(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_command_name); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_9is_memory___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_7is_open___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_5Vedis_8filename___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_12VedisContext___cinit__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_2store(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_4fetch(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_6delete(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_8append(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_10exists(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_12VedisContext_12__setitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_12VedisContext_14__getitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_12VedisContext_16__delitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_12VedisContext_18__contains__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_11Transaction___init__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self, PyObject *__pyx_v_vedis); /* proto */
static PyObject *__pyx_pf_5vedis_11Transaction_2__enter__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_11Transaction_4__exit__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self, PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb); /* proto */
static int __pyx_pf_5vedis_4Hash___init__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_2get(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_4mget(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_6set(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_8delete(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_10mdelete(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_keys); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_12keys(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_14values(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_16items(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_18update(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_20to_dict(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_5vedis_4Hash_22__len__(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_4Hash_24__contains__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_4Hash_26__setitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_28__getitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_5vedis_4Hash_30__delitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_32__iter__(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4Hash_34__repr__(struct __pyx_obj_5vedis_Hash *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_3Set___init__(struct __pyx_obj_5vedis_Set *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_2add(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static Py_ssize_t __pyx_pf_5vedis_3Set_4__len__(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_3Set_6__contains__(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_8pop(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_10peek(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_12top(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_14remove(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static int __pyx_pf_5vedis_3Set_16__delitem__(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_18__iter__(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_20to_set(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_22__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_24__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_5vedis___get__(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_3Set_3key___get__(struct __pyx_obj_5vedis_Set *__pyx_v_self); /* proto */
static int __pyx_pf_5vedis_4List___init__(struct __pyx_obj_5vedis_List *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_5vedis_4List_2__getitem__(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static Py_ssize_t __pyx_pf_5vedis_4List_4__len__(struct __pyx_obj_5vedis_List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4List_6pop(struct __pyx_obj_5vedis_List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5vedis_4List_8append(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5vedis_4List_10extend(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_5vedis_4List_8__iter___gen(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5vedis_4List_12__iter__(struct __pyx_obj_5vedis_List *__pyx_v_self); /* proto */
static PyObject *__pyx_tp_new_5vedis_Vedis(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis_VedisContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis_Transaction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis_Hash(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis_Set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis_List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct__commit_on_success(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_1__flatten_list(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_3__flatten(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_5_register(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_6___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_7_gen(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_i[] = "i";
static char __pyx_k_l[] = "l";
static char __pyx_k_s[] = "s";
static char __pyx_k_OS[] = "OS";
static char __pyx_k_fn[] = "fn";
static char __pyx_k_k1[] = "k1";
static char __pyx_k_k2[] = "k2";
static char __pyx_k_Set[] = "Set";
static char __pyx_k__10[] = " ";
static char __pyx_k__11[] = "\"";
static char __pyx_k__12[] = "\\\"";
static char __pyx_k_arg[] = "arg";
static char __pyx_k_cmd[] = "cmd";
static char __pyx_k_gen[] = "gen";
static char __pyx_k_get[] = "get";
static char __pyx_k_key[] = "key";
static char __pyx_k_mem[] = ":mem:";
static char __pyx_k_s_2[] = "\"%s\"";
static char __pyx_k_s_3[] = "%s";
static char __pyx_k_s_4[] = "%%s";
static char __pyx_k_s_s[] = "%s %s";
static char __pyx_k_set[] = "set";
static char __pyx_k_src[] = "src";
static char __pyx_k_zip[] = "zip";
static char __pyx_k_DATE[] = "DATE";
static char __pyx_k_Hash[] = "Hash";
static char __pyx_k_List[] = "List";
static char __pyx_k_TIME[] = "TIME";
static char __pyx_k_args[] = "args";
static char __pyx_k_copy[] = "copy";
static char __pyx_k_data[] = "data";
static char __pyx_k_date[] = "date";
static char __pyx_k_decr[] = "decr";
static char __pyx_k_dest[] = "dest";
static char __pyx_k_exit[] = "__exit__";
static char __pyx_k_hdel[] = "hdel";
static char __pyx_k_hget[] = "hget";
static char __pyx_k_hlen[] = "hlen";
static char __pyx_k_hset[] = "hset";
static char __pyx_k_incr[] = "incr";
static char __pyx_k_join[] = "join";
static char __pyx_k_keys[] = "keys";
static char __pyx_k_llen[] = "llen";
static char __pyx_k_lpop[] = "lpop";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_mget[] = "mget";
static char __pyx_k_move[] = "move";
static char __pyx_k_mset[] = "mset";
static char __pyx_k_open[] = "open";
static char __pyx_k_rand[] = "rand";
static char __pyx_k_sadd[] = "sadd";
static char __pyx_k_send[] = "send";
static char __pyx_k_slen[] = "slen";
static char __pyx_k_spop[] = "spop";
static char __pyx_k_srem[] = "srem";
static char __pyx_k_stop[] = "stop";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_time[] = "time";
static char __pyx_k_begin[] = "begin";
static char __pyx_k_close[] = "close";
static char __pyx_k_enter[] = "__enter__";
static char __pyx_k_fetch[] = "fetch";
static char __pyx_k_hkeys[] = "hkeys";
static char __pyx_k_hmdel[] = "hmdel";
static char __pyx_k_hmget[] = "hmget";
static char __pyx_k_hmset[] = "hmset";
static char __pyx_k_hvals[] = "hvals";
static char __pyx_k_index[] = "index";
static char __pyx_k_lpush[] = "lpush";
static char __pyx_k_range[] = "range";
static char __pyx_k_scard[] = "scard";
static char __pyx_k_sdiff[] = "sdiff";
static char __pyx_k_setnx[] = "setnx";
static char __pyx_k_smadd[] = "smadd";
static char __pyx_k_smrem[] = "smrem";
static char __pyx_k_speek[] = "speek";
static char __pyx_k_store[] = "store";
static char __pyx_k_throw[] = "throw";
static char __pyx_k_utf_8[] = "utf-8";
static char __pyx_k_value[] = "value";
static char __pyx_k_vedis[] = "vedis";
static char __pyx_k_DECR_s[] = "DECR %s";
static char __pyx_k_HLEN_s[] = "HLEN %s";
static char __pyx_k_Hash_s[] = "<Hash: %s>";
static char __pyx_k_INCR_s[] = "INCR %s";
static char __pyx_k_LLEN_s[] = "LLEN %s";
static char __pyx_k_LPOP_s[] = "LPOP %s";
static char __pyx_k_MGET_s[] = "MGET %s";
static char __pyx_k_MSET_s[] = "MSET %s";
static char __pyx_k_SLEN_s[] = "SLEN %s";
static char __pyx_k_SPOP_s[] = "SPOP %s";
static char __pyx_k_STOP_s[] = "STOP %s";
static char __pyx_k_amount[] = "amount";
static char __pyx_k_append[] = "append";
static char __pyx_k_base64[] = "base64";
static char __pyx_k_commit[] = "commit";
static char __pyx_k_delete[] = "delete";
static char __pyx_k_encode[] = "encode";
static char __pyx_k_exc_tb[] = "exc_tb";
static char __pyx_k_exists[] = "exists";
static char __pyx_k_hitems[] = "hitems";
static char __pyx_k_hsetnx[] = "hsetnx";
static char __pyx_k_kwargs[] = "kwargs";
static char __pyx_k_lindex[] = "lindex";
static char __pyx_k_lmpush[] = "lmpush";
static char __pyx_k_lpushx[] = "lpushx";
static char __pyx_k_msetnx[] = "msetnx";
static char __pyx_k_nchars[] = "nchars";
static char __pyx_k_params[] = "params";
static char __pyx_k_remove[] = "remove";
static char __pyx_k_result[] = "result";
static char __pyx_k_sinter[] = "sinter";
static char __pyx_k_strlen[] = "strlen";
static char __pyx_k_update[] = "update";
static char __pyx_k_values[] = "values";
static char __pyx_k_HKEYS_s[] = "HKEYS %s";
static char __pyx_k_HVALS_s[] = "HVALS %s";
static char __pyx_k_IOError[] = "IOError";
static char __pyx_k_SCARD_s[] = "SCARD %s";
static char __pyx_k_SPEEK_s[] = "SPEEK %s";
static char __pyx_k_decr_by[] = "decr_by";
static char __pyx_k_exc_val[] = "exc_val";
static char __pyx_k_execute[] = "execute";
static char __pyx_k_genexpr[] = "genexpr";
static char __pyx_k_get_set[] = "get_set";
static char __pyx_k_hexists[] = "hexists";
static char __pyx_k_hgetall[] = "hgetall";
static char __pyx_k_incr_by[] = "incr_by";
static char __pyx_k_lmpushx[] = "lmpushx";
static char __pyx_k_maximum[] = "maximum";
static char __pyx_k_minimum[] = "minimum";
static char __pyx_k_randstr[] = "randstr";
static char __pyx_k_replace[] = "replace";
static char __pyx_k_soundex[] = "soundex";
static char __pyx_k_wrapped[] = "wrapped";
static char __pyx_k_wrapper[] = "wrapper";
static char __pyx_k_BASE64_s[] = "BASE64 %s";
static char __pyx_k_COPY_s_s[] = "COPY %s %s";
static char __pyx_k_HDEL_s_s[] = "HDEL %s %s";
static char __pyx_k_HGET_s_s[] = "HGET %s %s";
static char __pyx_k_KeyError[] = "KeyError";
static char __pyx_k_MOVE_s_s[] = "MOVE %s %s";
static char __pyx_k_MSETNX_s[] = "MSETNX %s";
static char __pyx_k_RAND_s_s[] = "RAND %s %s";
static char __pyx_k_SADD_s_s[] = "SADD %s %s";
static char __pyx_k_SREM_s_s[] = "SREM %s %s";
static char __pyx_k_STRLEN_s[] = "STRLEN %s";
static char __pyx_k_exc_type[] = "exc_type";
static char __pyx_k_filename[] = "filename";
static char __pyx_k_hash_key[] = "hash_key";
static char __pyx_k_rollback[] = "rollback";
static char __pyx_k_smembers[] = "smembers";
static char __pyx_k_Exception[] = "Exception";
static char __pyx_k_HGETALL_s[] = "HGETALL %s";
static char __pyx_k_HMGET_s_s[] = "HMGET %%s %s";
static char __pyx_k_HMSET_s_s[] = "HMSET %%s %s";
static char __pyx_k_LPUSH_s_s[] = "LPUSH %s %s";
static char __pyx_k_RANDSTR_s[] = "RANDSTR %s";
static char __pyx_k_SDIFF_s_s[] = "SDIFF %s %s";
static char __pyx_k_SETNX_s_s[] = "SETNX %s %s";
static char __pyx_k_SOUNDEX_s[] = "SOUNDEX %s";
static char __pyx_k_TypeError[] = "TypeError";
static char __pyx_k_decorator[] = "decorator";
static char __pyx_k_sismember[] = "sismember";
static char __pyx_k_str_split[] = "str_split";
static char __pyx_k_DECRBY_s_s[] = "DECRBY %%s %s";
static char __pyx_k_GETSET_s_s[] = "GETSET %s %s";
static char __pyx_k_HDEL_s_s_2[] = "HDEL %%s %s";
static char __pyx_k_HSET_s_s_s[] = "HSET %s %s %s";
static char __pyx_k_INCRBY_s_s[] = "INCRBY %%s %s";
static char __pyx_k_LINDEX_s_s[] = "LINDEX %%s %s";
static char __pyx_k_LPUSHX_s_s[] = "LPUSHX %s %s";
static char __pyx_k_SADD_s_s_2[] = "SADD %%s %s";
static char __pyx_k_SINTER_s_s[] = "SINTER %s %s";
static char __pyx_k_SIZE_FMT_s[] = "SIZE_FMT %s";
static char __pyx_k_SMEMBERS_s[] = "SMEMBERS %s";
static char __pyx_k_SREM_s_s_2[] = "SREM %%s %s";
static char __pyx_k_TABLE_LIST[] = "TABLE_LIST";
static char __pyx_k_get_result[] = "get_result";
static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static char __pyx_k_random_int[] = "random_int";
static char __pyx_k_strip_tags[] = "strip_tags";
static char __pyx_k_table_list[] = "table_list";
static char __pyx_k_HEXISTS_s_s[] = "HEXISTS %s %s";
static char __pyx_k_LPUSH_s_s_2[] = "LPUSH %%s %s";
static char __pyx_k_MemoryError[] = "MemoryError";
static char __pyx_k_STRIP_TAG_s[] = "STRIP_TAG %s";
static char __pyx_k_size_format[] = "size_format";
static char __pyx_k_transaction[] = "transaction";
static char __pyx_k_BASE64_DEC_s[] = "BASE64_DEC %s";
static char __pyx_k_HSETNX_s_s_s[] = "HSETNX %s %s %s";
static char __pyx_k_LPUSHX_s_s_2[] = "LPUSHX %%s %s";
static char __pyx_k_SISMEMBER_s_s[] = "SISMEMBER %s %s";
static char __pyx_k_STR_SPLIT_s_s[] = "STR_SPLIT %%s %s";
static char __pyx_k_base64_decode[] = "base64_decode";
static char __pyx_k_direct_params[] = "direct_params";
static char __pyx_k_open_database[] = "open_database";
static char __pyx_k_random_string[] = "random_string";
static char __pyx_k_command_string[] = "command_string";
static char __pyx_k_command_callback[] = "command_callback";
static char __pyx_k_operating_system[] = "operating_system";
static char __pyx_k_Unrecognized_type[] = "Unrecognized type.";
static char __pyx_k_iter___locals_gen[] = "__iter__.<locals>.gen";
static char __pyx_k_Unsupported_type_s[] = "Unsupported type: %s.";
static char __pyx_k_disable_autocommit[] = "disable_autocommit";
static char __pyx_k_NotImplementedError[] = "NotImplementedError";
static char __pyx_k_register_locals_decorator[] = "register.<locals>.decorator";
static char __pyx_k_Vedis__flatten_locals_genexpr[] = "Vedis._flatten.<locals>.genexpr";
static char __pyx_k_home_charles_Dropbox_code_vedis[] = "/home/charles/Dropbox/code/vedis-python/vedis.pyx";
static char __pyx_k_Error_disabling_autocommit_for_i[] = "Error disabling autocommit for in-memory database.";
static char __pyx_k_Vedis__flatten_list_locals_genex[] = "Vedis._flatten_list.<locals>.genexpr";
static char __pyx_k_commit_on_success_locals_wrapper[] = "commit_on_success.<locals>.wrapper";
static char __pyx_k_register_locals_decorator_locals[] = "register.<locals>.decorator.<locals>.wrapper";
static PyObject *__pyx_kp_s_BASE64_DEC_s;
static PyObject *__pyx_kp_s_BASE64_s;
static PyObject *__pyx_kp_s_COPY_s_s;
static PyObject *__pyx_n_s_DATE;
static PyObject *__pyx_kp_s_DECRBY_s_s;
static PyObject *__pyx_kp_s_DECR_s;
static PyObject *__pyx_kp_s_Error_disabling_autocommit_for_i;
static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_kp_s_GETSET_s_s;
static PyObject *__pyx_kp_s_HDEL_s_s;
static PyObject *__pyx_kp_s_HDEL_s_s_2;
static PyObject *__pyx_kp_s_HEXISTS_s_s;
static PyObject *__pyx_kp_s_HGETALL_s;
static PyObject *__pyx_kp_s_HGET_s_s;
static PyObject *__pyx_kp_s_HKEYS_s;
static PyObject *__pyx_kp_s_HLEN_s;
static PyObject *__pyx_kp_s_HMGET_s_s;
static PyObject *__pyx_kp_s_HMSET_s_s;
static PyObject *__pyx_kp_s_HSETNX_s_s_s;
static PyObject *__pyx_kp_s_HSET_s_s_s;
static PyObject *__pyx_kp_s_HVALS_s;
static PyObject *__pyx_n_s_Hash;
static PyObject *__pyx_kp_s_Hash_s;
static PyObject *__pyx_kp_s_INCRBY_s_s;
static PyObject *__pyx_kp_s_INCR_s;
static PyObject *__pyx_n_s_IOError;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_kp_s_LINDEX_s_s;
static PyObject *__pyx_kp_s_LLEN_s;
static PyObject *__pyx_kp_s_LPOP_s;
static PyObject *__pyx_kp_s_LPUSHX_s_s;
static PyObject *__pyx_kp_s_LPUSHX_s_s_2;
static PyObject *__pyx_kp_s_LPUSH_s_s;
static PyObject *__pyx_kp_s_LPUSH_s_s_2;
static PyObject *__pyx_n_s_List;
static PyObject *__pyx_kp_s_MGET_s;
static PyObject *__pyx_kp_s_MOVE_s_s;
static PyObject *__pyx_kp_s_MSETNX_s;
static PyObject *__pyx_kp_s_MSET_s;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_NotImplementedError;
static PyObject *__pyx_n_s_OS;
static PyObject *__pyx_kp_s_RANDSTR_s;
static PyObject *__pyx_kp_s_RAND_s_s;
static PyObject *__pyx_kp_s_SADD_s_s;
static PyObject *__pyx_kp_s_SADD_s_s_2;
static PyObject *__pyx_kp_s_SCARD_s;
static PyObject *__pyx_kp_s_SDIFF_s_s;
static PyObject *__pyx_kp_s_SETNX_s_s;
static PyObject *__pyx_kp_s_SINTER_s_s;
static PyObject *__pyx_kp_s_SISMEMBER_s_s;
static PyObject *__pyx_kp_s_SIZE_FMT_s;
static PyObject *__pyx_kp_s_SLEN_s;
static PyObject *__pyx_kp_s_SMEMBERS_s;
static PyObject *__pyx_kp_s_SOUNDEX_s;
static PyObject *__pyx_kp_s_SPEEK_s;
static PyObject *__pyx_kp_s_SPOP_s;
static PyObject *__pyx_kp_s_SREM_s_s;
static PyObject *__pyx_kp_s_SREM_s_s_2;
static PyObject *__pyx_kp_s_STOP_s;
static PyObject *__pyx_kp_s_STRIP_TAG_s;
static PyObject *__pyx_kp_s_STRLEN_s;
static PyObject *__pyx_kp_s_STR_SPLIT_s_s;
static PyObject *__pyx_n_s_Set;
static PyObject *__pyx_n_s_TABLE_LIST;
static PyObject *__pyx_n_s_TIME;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_s_Unrecognized_type;
static PyObject *__pyx_kp_s_Unsupported_type_s;
static PyObject *__pyx_n_s_Vedis__flatten_list_locals_genex;
static PyObject *__pyx_n_s_Vedis__flatten_locals_genexpr;
static PyObject *__pyx_kp_s__10;
static PyObject *__pyx_kp_s__11;
static PyObject *__pyx_kp_s__12;
static PyObject *__pyx_n_s_amount;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_arg;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_base64;
static PyObject *__pyx_n_s_base64_decode;
static PyObject *__pyx_n_s_begin;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_cmd;
static PyObject *__pyx_n_s_command_callback;
static PyObject *__pyx_n_s_command_string;
static PyObject *__pyx_n_s_commit;
static PyObject *__pyx_n_s_commit_on_success_locals_wrapper;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_decorator;
static PyObject *__pyx_n_s_decr;
static PyObject *__pyx_n_s_decr_by;
static PyObject *__pyx_n_s_delete;
static PyObject *__pyx_n_s_dest;
static PyObject *__pyx_n_s_direct_params;
static PyObject *__pyx_n_s_disable_autocommit;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enter;
static PyObject *__pyx_n_s_exc_tb;
static PyObject *__pyx_n_s_exc_type;
static PyObject *__pyx_n_s_exc_val;
static PyObject *__pyx_n_s_execute;
static PyObject *__pyx_n_s_exists;
static PyObject *__pyx_n_s_exit;
static PyObject *__pyx_n_s_fetch;
static PyObject *__pyx_n_s_filename;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_n_s_gen;
static PyObject *__pyx_n_s_genexpr;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_result;
static PyObject *__pyx_n_s_get_set;
static PyObject *__pyx_n_s_hash_key;
static PyObject *__pyx_n_s_hdel;
static PyObject *__pyx_n_s_hexists;
static PyObject *__pyx_n_s_hget;
static PyObject *__pyx_n_s_hgetall;
static PyObject *__pyx_n_s_hitems;
static PyObject *__pyx_n_s_hkeys;
static PyObject *__pyx_n_s_hlen;
static PyObject *__pyx_n_s_hmdel;
static PyObject *__pyx_n_s_hmget;
static PyObject *__pyx_n_s_hmset;
static PyObject *__pyx_kp_s_home_charles_Dropbox_code_vedis;
static PyObject *__pyx_n_s_hset;
static PyObject *__pyx_n_s_hsetnx;
static PyObject *__pyx_n_s_hvals;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_incr;
static PyObject *__pyx_n_s_incr_by;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_iter___locals_gen;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_k1;
static PyObject *__pyx_n_s_k2;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_lindex;
static PyObject *__pyx_n_s_llen;
static PyObject *__pyx_n_s_lmpush;
static PyObject *__pyx_n_s_lmpushx;
static PyObject *__pyx_n_s_lpop;
static PyObject *__pyx_n_s_lpush;
static PyObject *__pyx_n_s_lpushx;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maximum;
static PyObject *__pyx_kp_s_mem;
static PyObject *__pyx_n_s_mget;
static PyObject *__pyx_n_s_minimum;
static PyObject *__pyx_n_s_move;
static PyObject *__pyx_n_s_mset;
static PyObject *__pyx_n_s_msetnx;
static PyObject *__pyx_n_s_nchars;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_open_database;
static PyObject *__pyx_n_s_operating_system;
static PyObject *__pyx_n_s_params;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_rand;
static PyObject *__pyx_n_s_random_int;
static PyObject *__pyx_n_s_random_string;
static PyObject *__pyx_n_s_randstr;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_register_locals_decorator;
static PyObject *__pyx_n_s_register_locals_decorator_locals;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_rollback;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_kp_s_s_2;
static PyObject *__pyx_kp_s_s_3;
static PyObject *__pyx_kp_s_s_4;
static PyObject *__pyx_kp_s_s_s;
static PyObject *__pyx_n_s_sadd;
static PyObject *__pyx_n_s_scard;
static PyObject *__pyx_n_s_sdiff;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_setnx;
static PyObject *__pyx_n_s_sinter;
static PyObject *__pyx_n_s_sismember;
static PyObject *__pyx_n_s_size_format;
static PyObject *__pyx_n_s_slen;
static PyObject *__pyx_n_s_smadd;
static PyObject *__pyx_n_s_smembers;
static PyObject *__pyx_n_s_smrem;
static PyObject *__pyx_n_s_soundex;
static PyObject *__pyx_n_s_speek;
static PyObject *__pyx_n_s_spop;
static PyObject *__pyx_n_s_src;
static PyObject *__pyx_n_s_srem;
static PyObject *__pyx_n_s_stop;
static PyObject *__pyx_n_s_store;
static PyObject *__pyx_n_s_str_split;
static PyObject *__pyx_n_s_strip_tags;
static PyObject *__pyx_n_s_strlen;
static PyObject *__pyx_n_s_table_list;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_time;
static PyObject *__pyx_n_s_transaction;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_vedis;
static PyObject *__pyx_n_s_wrapped;
static PyObject *__pyx_n_s_wrapper;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_slice__6;
static PyObject *__pyx_slice__7;
static PyObject *__pyx_slice__8;
static PyObject *__pyx_slice__9;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_codeobj__5;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__23;

/* "vedis.pyx":217
 *     cdef bint open_database
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.database = <vedis *>0
 *         self.is_memory = False
 */

/* Python wrapper */
static int __pyx_pw_5vedis_5Vedis_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_5Vedis_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_5vedis_5Vedis___cinit__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_5Vedis___cinit__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "vedis.pyx":218
 * 
 *     def __cinit__(self):
 *         self.database = <vedis *>0             # <<<<<<<<<<<<<<
 *         self.is_memory = False
 *         self.is_open = False
 */
  __pyx_v_self->database = ((struct vedis *)0);

  /* "vedis.pyx":219
 *     def __cinit__(self):
 *         self.database = <vedis *>0
 *         self.is_memory = False             # <<<<<<<<<<<<<<
 *         self.is_open = False
 * 
 */
  __pyx_v_self->is_memory = 0;

  /* "vedis.pyx":220
 *         self.database = <vedis *>0
 *         self.is_memory = False
 *         self.is_open = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->is_open = 0;

  /* "vedis.pyx":217
 *     cdef bint open_database
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.database = <vedis *>0
 *         self.is_memory = False
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":222
 *         self.is_open = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.is_open:
 *             vedis_close(self.database)
 */

/* Python wrapper */
static void __pyx_pw_5vedis_5Vedis_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_5vedis_5Vedis_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_5vedis_5Vedis_2__dealloc__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_5vedis_5Vedis_2__dealloc__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "vedis.pyx":223
 * 
 *     def __dealloc__(self):
 *         if self.is_open:             # <<<<<<<<<<<<<<
 *             vedis_close(self.database)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->is_open != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":224
 *     def __dealloc__(self):
 *         if self.is_open:
 *             vedis_close(self.database)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, filename=':mem:', open_database=True):
 */
    vedis_close(__pyx_v_self->database);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":222
 *         self.is_open = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.is_open:
 *             vedis_close(self.database)
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "vedis.pyx":226
 *             vedis_close(self.database)
 * 
 *     def __init__(self, filename=':mem:', open_database=True):             # <<<<<<<<<<<<<<
 *         self.filename = filename
 *         self.is_memory = filename == ':mem:'
 */

/* Python wrapper */
static int __pyx_pw_5vedis_5Vedis_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_5Vedis_5__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_open_database = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_open_database,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)__pyx_kp_s_mem);
    values[1] = ((PyObject *)Py_True);
    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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_open_database);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      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 = 226; __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);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_open_database = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_4__init__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_filename, __pyx_v_open_database);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_5Vedis_4__init__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_open_database) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vedis.pyx":227
 * 
 *     def __init__(self, filename=':mem:', open_database=True):
 *         self.filename = filename             # <<<<<<<<<<<<<<
 *         self.is_memory = filename == ':mem:'
 *         self.open_database = open_database
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_filename))||((__pyx_v_filename) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_filename)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_filename;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->filename);
  __Pyx_DECREF(__pyx_v_self->filename);
  __pyx_v_self->filename = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":228
 *     def __init__(self, filename=':mem:', open_database=True):
 *         self.filename = filename
 *         self.is_memory = filename == ':mem:'             # <<<<<<<<<<<<<<
 *         self.open_database = open_database
 *         if self.open_database:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_filename, __pyx_kp_s_mem, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->is_memory = __pyx_t_2;

  /* "vedis.pyx":229
 *         self.filename = filename
 *         self.is_memory = filename == ':mem:'
 *         self.open_database = open_database             # <<<<<<<<<<<<<<
 *         if self.open_database:
 *             self.open()
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_open_database); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->open_database = __pyx_t_2;

  /* "vedis.pyx":230
 *         self.is_memory = filename == ':mem:'
 *         self.open_database = open_database
 *         if self.open_database:             # <<<<<<<<<<<<<<
 *             self.open()
 * 
 */
  __pyx_t_2 = (__pyx_v_self->open_database != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":231
 *         self.open_database = open_database
 *         if self.open_database:
 *             self.open()             # <<<<<<<<<<<<<<
 * 
 *     cpdef open(self):
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->open(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":226
 *             vedis_close(self.database)
 * 
 *     def __init__(self, filename=':mem:', open_database=True):             # <<<<<<<<<<<<<<
 *         self.filename = filename
 *         self.is_memory = filename == ':mem:'
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":233
 *             self.open()
 * 
 *     cpdef open(self):             # <<<<<<<<<<<<<<
 *         """Open database connection."""
 *         cdef int ret
 */

static PyObject *__pyx_pw_5vedis_5Vedis_7open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_open(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  char const *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("open", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __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_5vedis_5Vedis_7open)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":237
 *         cdef int ret
 * 
 *         if self.is_open:             # <<<<<<<<<<<<<<
 *             self.close()
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_open != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":238
 * 
 *         if self.is_open:
 *             self.close()             # <<<<<<<<<<<<<<
 * 
 *         self.check_call(vedis_open(
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":242
 *         self.check_call(vedis_open(
 *             &self.database,
 *             self.filename))             # <<<<<<<<<<<<<<
 * 
 *         self.is_open = True
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":240
 *             self.close()
 * 
 *         self.check_call(vedis_open(             # <<<<<<<<<<<<<<
 *             &self.database,
 *             self.filename))
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_open((&__pyx_v_self->database), __pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":244
 *             self.filename))
 * 
 *         self.is_open = True             # <<<<<<<<<<<<<<
 * 
 *     cpdef close(self):
 */
  __pyx_v_self->is_open = 1;

  /* "vedis.pyx":233
 *             self.open()
 * 
 *     cpdef open(self):             # <<<<<<<<<<<<<<
 *         """Open database connection."""
 *         cdef int ret
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_7open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_6open[] = "Open database connection.";
static PyObject *__pyx_pw_5vedis_5Vedis_7open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("open (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_6open(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_6open(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("open", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_open(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":246
 *         self.is_open = True
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         """Close database connection."""
 *         if self.is_open:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_close(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __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_5vedis_5Vedis_9close)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":248
 *     cpdef close(self):
 *         """Close database connection."""
 *         if self.is_open:             # <<<<<<<<<<<<<<
 *             self.check_call(vedis_close(self.database))
 *             self.is_open = 0
 */
  __pyx_t_5 = (__pyx_v_self->is_open != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":249
 *         """Close database connection."""
 *         if self.is_open:
 *             self.check_call(vedis_close(self.database))             # <<<<<<<<<<<<<<
 *             self.is_open = 0
 *             self.database = <vedis *>0
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_close(__pyx_v_self->database)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "vedis.pyx":250
 *         if self.is_open:
 *             self.check_call(vedis_close(self.database))
 *             self.is_open = 0             # <<<<<<<<<<<<<<
 *             self.database = <vedis *>0
 * 
 */
    __pyx_v_self->is_open = 0;

    /* "vedis.pyx":251
 *             self.check_call(vedis_close(self.database))
 *             self.is_open = 0
 *             self.database = <vedis *>0             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
    __pyx_v_self->database = ((struct vedis *)0);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":246
 *         self.is_open = True
 * 
 *     cpdef close(self):             # <<<<<<<<<<<<<<
 *         """Close database connection."""
 *         if self.is_open:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_8close[] = "Close database connection.";
static PyObject *__pyx_pw_5vedis_5Vedis_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_8close(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_8close(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("close", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":253
 *             self.database = <vedis *>0
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         """Use database connection as a context manager."""
 *         if not self.is_open:
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_11__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_10__enter__[] = "Use database connection as a context manager.";
static PyObject *__pyx_pw_5vedis_5Vedis_11__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_10__enter__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_10__enter__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "vedis.pyx":255
 *     def __enter__(self):
 *         """Use database connection as a context manager."""
 *         if not self.is_open:             # <<<<<<<<<<<<<<
 *             self.open()
 *         return self
 */
  __pyx_t_1 = ((!(__pyx_v_self->is_open != 0)) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":256
 *         """Use database connection as a context manager."""
 *         if not self.is_open:
 *             self.open()             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->open(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":257
 *         if not self.is_open:
 *             self.open()
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "vedis.pyx":253
 *             self.database = <vedis *>0
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         """Use database connection as a context manager."""
 *         if not self.is_open:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":259
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_13__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_13__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_val,&__pyx_n_s_exc_tb,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_exc_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_val)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_tb)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_exc_type = values[0];
    __pyx_v_exc_val = values[1];
    __pyx_v_exc_tb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_12__exit__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_12__exit__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "vedis.pyx":260
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         self.close()             # <<<<<<<<<<<<<<
 * 
 *     cpdef disable_autocommit(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->close(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":259
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         self.close()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":262
 *         self.close()
 * 
 *     cpdef disable_autocommit(self):             # <<<<<<<<<<<<<<
 *         if not self.is_memory:
 *             # Disable autocommit for file-based databases.
 */

static PyObject *__pyx_pw_5vedis_5Vedis_15disable_autocommit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_disable_autocommit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disable_autocommit", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_disable_autocommit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __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_5vedis_5Vedis_15disable_autocommit)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":263
 * 
 *     cpdef disable_autocommit(self):
 *         if not self.is_memory:             # <<<<<<<<<<<<<<
 *             # Disable autocommit for file-based databases.
 *             ret = vedis_config(
 */
  __pyx_t_5 = ((!(__pyx_v_self->is_memory != 0)) != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":265
 *         if not self.is_memory:
 *             # Disable autocommit for file-based databases.
 *             ret = vedis_config(             # <<<<<<<<<<<<<<
 *                 self.database,
 *                 VEDIS_CONFIG_DISABLE_AUTO_COMMIT)
 */
    __pyx_v_ret = vedis_config(__pyx_v_self->database, VEDIS_CONFIG_DISABLE_AUTO_COMMIT);

    /* "vedis.pyx":268
 *                 self.database,
 *                 VEDIS_CONFIG_DISABLE_AUTO_COMMIT)
 *             if ret != VEDIS_OK:             # <<<<<<<<<<<<<<
 *                 raise NotImplementedError('Error disabling autocommit for '
 *                                           'in-memory database.')
 */
    __pyx_t_5 = ((__pyx_v_ret != VEDIS_OK) != 0);
    if (__pyx_t_5) {

      /* "vedis.pyx":269
 *                 VEDIS_CONFIG_DISABLE_AUTO_COMMIT)
 *             if ret != VEDIS_OK:
 *                 raise NotImplementedError('Error disabling autocommit for '             # <<<<<<<<<<<<<<
 *                                           'in-memory database.')
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":262
 *         self.close()
 * 
 *     cpdef disable_autocommit(self):             # <<<<<<<<<<<<<<
 *         if not self.is_memory:
 *             # Disable autocommit for file-based databases.
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.disable_autocommit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_15disable_autocommit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_15disable_autocommit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("disable_autocommit (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_14disable_autocommit(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_14disable_autocommit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("disable_autocommit", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_disable_autocommit(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.disable_autocommit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":272
 *                                           'in-memory database.')
 * 
 *     cpdef store(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Store key/value."""
 *         self.check_call(vedis_kv_store(
 */

static PyObject *__pyx_pw_5vedis_5Vedis_17store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_store(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("store", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_store); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __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_5vedis_5Vedis_17store)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":276
 *         self.check_call(vedis_kv_store(
 *             self.database,
 *             <const char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <const char *>value,
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":278
 *             <const char *>key,
 *             -1,
 *             <const char *>value,             # <<<<<<<<<<<<<<
 *             len(value)))
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":279
 *             -1,
 *             <const char *>value,
 *             len(value)))             # <<<<<<<<<<<<<<
 * 
 *     cpdef fetch(self, basestring key):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":274
 *     cpdef store(self, basestring key, basestring value):
 *         """Store key/value."""
 *         self.check_call(vedis_kv_store(             # <<<<<<<<<<<<<<
 *             self.database,
 *             <const char *>key,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_kv_store(__pyx_v_self->database, ((char const *)__pyx_t_7), -1, ((char const *)__pyx_t_8), __pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":272
 *                                           'in-memory database.')
 * 
 *     cpdef store(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Store key/value."""
 *         self.check_call(vedis_kv_store(
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_17store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vedis_5Vedis_16store[] = "Store key/value.";
static PyObject *__pyx_pw_5vedis_5Vedis_17store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("store (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("store", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "store") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("store", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_16store(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_16store(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("store", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_store(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":281
 *             len(value)))
 * 
 *     cpdef fetch(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 */

static PyObject *__pyx_pw_5vedis_5Vedis_19fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_fetch(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  char *__pyx_v_buf;
  vedis_int64 __pyx_v_buf_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __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_5vedis_5Vedis_19fetch)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":283
 *     cpdef fetch(self, basestring key):
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0             # <<<<<<<<<<<<<<
 *         cdef vedis_int64 buf_size = 0
 * 
 */
  __pyx_v_buf = ((char *)0);

  /* "vedis.pyx":284
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0             # <<<<<<<<<<<<<<
 * 
 *         self.check_call(vedis_kv_fetch(
 */
  __pyx_v_buf_size = 0;

  /* "vedis.pyx":288
 *         self.check_call(vedis_kv_fetch(
 *             self.database,
 *             <char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <void *>0,
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":286
 *         cdef vedis_int64 buf_size = 0
 * 
 *         self.check_call(vedis_kv_fetch(             # <<<<<<<<<<<<<<
 *             self.database,
 *             <char *>key,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_kv_fetch(__pyx_v_self->database, ((char *)__pyx_t_6), -1, ((void *)0), (&__pyx_v_buf_size))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":293
 *             &buf_size))
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             buf = <char *>malloc(buf_size)
 *             self.check_call(vedis_kv_fetch(
 */
  /*try:*/ {

    /* "vedis.pyx":294
 * 
 *         try:
 *             buf = <char *>malloc(buf_size)             # <<<<<<<<<<<<<<
 *             self.check_call(vedis_kv_fetch(
 *                 self.database,
 */
    __pyx_v_buf = ((char *)malloc(__pyx_v_buf_size));

    /* "vedis.pyx":297
 *             self.check_call(vedis_kv_fetch(
 *                 self.database,
 *                 <char *>key,             # <<<<<<<<<<<<<<
 *                 -1,
 *                 <void *>buf,
 */
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L4_error;}

    /* "vedis.pyx":295
 *         try:
 *             buf = <char *>malloc(buf_size)
 *             self.check_call(vedis_kv_fetch(             # <<<<<<<<<<<<<<
 *                 self.database,
 *                 <char *>key,
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_kv_fetch(__pyx_v_self->database, ((char *)__pyx_t_6), -1, ((void *)__pyx_v_buf), (&__pyx_v_buf_size))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "vedis.pyx":302
 *                 &buf_size))
 * 
 *             return buf[:buf_size]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(buf)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buf + 0, __pyx_v_buf_size - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "vedis.pyx":304
 *             return buf[:buf_size]
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef delete(self, basestring key):
 */
  /*finally:*/ {
    /*exception exit:*/{
      __pyx_L4_error:;
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buf);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buf);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "vedis.pyx":281
 *             len(value)))
 * 
 *     cpdef fetch(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_19fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_5vedis_5Vedis_18fetch[] = "Retrieve value at given key. Raises `KeyError` if key not found.";
static PyObject *__pyx_pw_5vedis_5Vedis_19fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_18fetch(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_18fetch(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_fetch(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":306
 *             free(buf)
 * 
 *     cpdef delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Delete the value stored at the given key."""
 *         self.check_call(vedis_kv_delete(self.database, <char *>key, -1))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_21delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_delete(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delete", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delete); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __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_5vedis_5Vedis_21delete)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":308
 *     cpdef delete(self, basestring key):
 *         """Delete the value stored at the given key."""
 *         self.check_call(vedis_kv_delete(self.database, <char *>key, -1))             # <<<<<<<<<<<<<<
 * 
 *     cpdef append(self, basestring key, basestring value):
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_kv_delete(__pyx_v_self->database, ((char *)__pyx_t_6), -1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":306
 *             free(buf)
 * 
 *     cpdef delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Delete the value stored at the given key."""
 *         self.check_call(vedis_kv_delete(self.database, <char *>key, -1))
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_21delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_5vedis_5Vedis_20delete[] = "Delete the value stored at the given key.";
static PyObject *__pyx_pw_5vedis_5Vedis_21delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_20delete(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_20delete(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delete", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_delete(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":310
 *         self.check_call(vedis_kv_delete(self.database, <char *>key, -1))
 * 
 *     cpdef append(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Append to the value stored in the given key."""
 *         self.check_call(vedis_kv_append(
 */

static PyObject *__pyx_pw_5vedis_5Vedis_23append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_append(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __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_5vedis_5Vedis_23append)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":314
 *         self.check_call(vedis_kv_append(
 *             self.database,
 *             <const char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <const char *>value,
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":316
 *             <const char *>key,
 *             -1,
 *             <const char *>value,             # <<<<<<<<<<<<<<
 *             len(value)))
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":317
 *             -1,
 *             <const char *>value,
 *             len(value)))             # <<<<<<<<<<<<<<
 * 
 *     cpdef exists(self, basestring key):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":312
 *     cpdef append(self, basestring key, basestring value):
 *         """Append to the value stored in the given key."""
 *         self.check_call(vedis_kv_append(             # <<<<<<<<<<<<<<
 *             self.database,
 *             <const char *>key,
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_kv_append(__pyx_v_self->database, ((char const *)__pyx_t_7), -1, ((char const *)__pyx_t_8), __pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":310
 *         self.check_call(vedis_kv_delete(self.database, <char *>key, -1))
 * 
 *     cpdef append(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Append to the value stored in the given key."""
 *         self.check_call(vedis_kv_append(
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_23append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vedis_5Vedis_22append[] = "Append to the value stored in the given key.";
static PyObject *__pyx_pw_5vedis_5Vedis_23append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "append") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_22append(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_22append(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_append(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":319
 *             len(value)))
 * 
 *     cpdef exists(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0
 */

static PyObject *__pyx_pw_5vedis_5Vedis_25exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_exists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  CYTHON_UNUSED char *__pyx_v_buf;
  vedis_int64 __pyx_v_buf_size;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exists", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __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_5vedis_5Vedis_25exists)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":320
 * 
 *     cpdef exists(self, basestring key):
 *         cdef char *buf = <char *>0             # <<<<<<<<<<<<<<
 *         cdef vedis_int64 buf_size = 0
 *         cdef int ret
 */
  __pyx_v_buf = ((char *)0);

  /* "vedis.pyx":321
 *     cpdef exists(self, basestring key):
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_v_buf_size = 0;

  /* "vedis.pyx":326
 *         ret = vedis_kv_fetch(
 *             self.database,
 *             <char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <void *>0,
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":324
 *         cdef int ret
 * 
 *         ret = vedis_kv_fetch(             # <<<<<<<<<<<<<<
 *             self.database,
 *             <char *>key,
 */
  __pyx_v_ret = vedis_kv_fetch(__pyx_v_self->database, ((char *)__pyx_t_6), -1, ((void *)0), (&__pyx_v_buf_size));

  /* "vedis.pyx":330
 *             <void *>0,
 *             &buf_size)
 *         if ret == VEDIS_NOTFOUND:             # <<<<<<<<<<<<<<
 *             return False
 *         elif ret == VEDIS_OK:
 */
  __pyx_t_7 = ((__pyx_v_ret == VEDIS_NOTFOUND) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":331
 *             &buf_size)
 *         if ret == VEDIS_NOTFOUND:
 *             return False             # <<<<<<<<<<<<<<
 *         elif ret == VEDIS_OK:
 *             return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "vedis.pyx":332
 *         if ret == VEDIS_NOTFOUND:
 *             return False
 *         elif ret == VEDIS_OK:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  __pyx_t_7 = ((__pyx_v_ret == VEDIS_OK) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":333
 *             return False
 *         elif ret == VEDIS_OK:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         raise self._build_exception_for_error(ret)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }

  /* "vedis.pyx":335
 *             return True
 * 
 *         raise self._build_exception_for_error(ret)             # <<<<<<<<<<<<<<
 * 
 *     cpdef update(self, dict values):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_build_exception_for_error(__pyx_v_self, __pyx_v_ret); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":319
 *             len(value)))
 * 
 *     cpdef exists(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_25exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_25exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("exists (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_24exists(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_24exists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exists", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_exists(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":337
 *         raise self._build_exception_for_error(ret)
 * 
 *     cpdef update(self, dict values):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         for key in values:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_27update(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_update(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_update); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __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_5vedis_5Vedis_27update)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_values);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_values);
        __Pyx_GIVEREF(__pyx_v_values);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":339
 *     cpdef update(self, dict values):
 *         cdef basestring key
 *         for key in values:             # <<<<<<<<<<<<<<
 *             self.store(key, values[key])
 * 
 */
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_values == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_values, 1, ((PyObject *)NULL), (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_2;
  __pyx_t_2 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_2, NULL, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "vedis.pyx":340
 *         cdef basestring key
 *         for key in values:
 *             self.store(key, values[key])             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, basestring key, basestring value):
 */
    if (unlikely(__pyx_v_values == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_values, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->store(__pyx_v_self, __pyx_v_key, ((PyObject*)__pyx_t_2), 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":337
 *         raise self._build_exception_for_error(ret)
 * 
 *     cpdef update(self, dict values):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         for key in values:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_27update(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_27update(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyDict_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_26update(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_values));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_26update(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_update(__pyx_v_self, __pyx_v_values, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":342
 *             self.store(key, values[key])
 * 
 *     def __setitem__(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         self.store(key, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_5Vedis_29__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5vedis_5Vedis_29__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_28__setitem__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key), ((PyObject*)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_5Vedis_28__setitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "vedis.pyx":343
 * 
 *     def __setitem__(self, basestring key, basestring value):
 *         self.store(key, value)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->store(__pyx_v_self, __pyx_v_key, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":342
 *             self.store(key, values[key])
 * 
 *     def __setitem__(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         self.store(key, value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":345
 *         self.store(key, value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if isinstance(key, basestring):
 *             return self.fetch(key)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_31__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_31__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_30__getitem__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_30__getitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "vedis.pyx":346
 * 
 *     def __getitem__(self, key):
 *         if isinstance(key, basestring):             # <<<<<<<<<<<<<<
 *             return self.fetch(key)
 *         elif isinstance(key, list):
 */
  __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_key); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":347
 *     def __getitem__(self, key):
 *         if isinstance(key, basestring):
 *             return self.fetch(key)             # <<<<<<<<<<<<<<
 *         elif isinstance(key, list):
 *             return self.mget(key)
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->fetch(__pyx_v_self, ((PyObject*)__pyx_v_key), 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":348
 *         if isinstance(key, basestring):
 *             return self.fetch(key)
 *         elif isinstance(key, list):             # <<<<<<<<<<<<<<
 *             return self.mget(key)
 * 
 */
  __pyx_t_2 = PyList_Check(__pyx_v_key); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":349
 *             return self.fetch(key)
 *         elif isinstance(key, list):
 *             return self.mget(key)             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, basestring key):
 */
    __Pyx_XDECREF(__pyx_r);
    if (!(likely(PyList_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->mget(__pyx_v_self, ((PyObject*)__pyx_v_key), 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":345
 *         self.store(key, value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if isinstance(key, basestring):
 *             return self.fetch(key)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.Vedis.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":351
 *             return self.mget(key)
 * 
 *     def __delitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.delete(key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_5Vedis_33__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_5Vedis_33__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_32__delitem__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_5Vedis_32__delitem__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "vedis.pyx":352
 * 
 *     def __delitem__(self, basestring key):
 *         self.delete(key)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, basestring key):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->delete(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":351
 *             return self.mget(key)
 * 
 *     def __delitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.delete(key)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":354
 *         self.delete(key)
 * 
 *     def __contains__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.exists(key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_5Vedis_35__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_5Vedis_35__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_34__contains__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_5Vedis_34__contains__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "vedis.pyx":355
 * 
 *     def __contains__(self, basestring key):
 *         return self.exists(key)             # <<<<<<<<<<<<<<
 * 
 *     cpdef execute(self, basestring cmd, tuple params=None, bint result=True):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->exists(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "vedis.pyx":354
 *         self.delete(key)
 * 
 *     def __contains__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.exists(key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":357
 *         return self.exists(key)
 * 
 *     cpdef execute(self, basestring cmd, tuple params=None, bint result=True):             # <<<<<<<<<<<<<<
 *         cdef list escaped_params
 *         if params is not None:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_37execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_execute(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_cmd, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_execute *__pyx_optional_args) {
  PyObject *__pyx_v_params = ((PyObject*)Py_None);
  int __pyx_v_result = ((int)1);
  PyObject *__pyx_v_escaped_params = 0;
  PyObject *__pyx_v_p = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("execute", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_params = __pyx_optional_args->params;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_result = __pyx_optional_args->result;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_cmd);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_execute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __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_5vedis_5Vedis_37execute)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_cmd);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_cmd);
      __Pyx_GIVEREF(__pyx_v_cmd);
      __Pyx_INCREF(__pyx_v_params);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_params);
      __Pyx_GIVEREF(__pyx_v_params);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":359
 *     cpdef execute(self, basestring cmd, tuple params=None, bint result=True):
 *         cdef list escaped_params
 *         if params is not None:             # <<<<<<<<<<<<<<
 *             escaped_params = [self._escape(p) for p in params]
 *             cmd = cmd % tuple(escaped_params)
 */
  __pyx_t_8 = (__pyx_v_params != ((PyObject*)Py_None));
  __pyx_t_9 = (__pyx_t_8 != 0);
  if (__pyx_t_9) {

    /* "vedis.pyx":360
 *         cdef list escaped_params
 *         if params is not None:
 *             escaped_params = [self._escape(p) for p in params]             # <<<<<<<<<<<<<<
 *             cmd = cmd % tuple(escaped_params)
 *         self.check_call(vedis_exec(self.database, <const char *>cmd, -1))
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(__pyx_v_params == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __pyx_v_params; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
      __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4);
      __pyx_t_4 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_p))||((__pyx_v_p) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_p)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_escape(__pyx_v_self, ((PyObject*)__pyx_v_p)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_escaped_params = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "vedis.pyx":361
 *         if params is not None:
 *             escaped_params = [self._escape(p) for p in params]
 *             cmd = cmd % tuple(escaped_params)             # <<<<<<<<<<<<<<
 *         self.check_call(vedis_exec(self.database, <const char *>cmd, -1))
 *         if result:
 */
    __pyx_t_1 = PyList_AsTuple(__pyx_v_escaped_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Remainder(__pyx_v_cmd, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_cmd, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "vedis.pyx":362
 *             escaped_params = [self._escape(p) for p in params]
 *             cmd = cmd % tuple(escaped_params)
 *         self.check_call(vedis_exec(self.database, <const char *>cmd, -1))             # <<<<<<<<<<<<<<
 *         if result:
 *             return self.get_result()
 */
  __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_cmd); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_exec(__pyx_v_self->database, ((char const *)__pyx_t_10), -1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":363
 *             cmd = cmd % tuple(escaped_params)
 *         self.check_call(vedis_exec(self.database, <const char *>cmd, -1))
 *         if result:             # <<<<<<<<<<<<<<
 *             return self.get_result()
 * 
 */
  __pyx_t_9 = (__pyx_v_result != 0);
  if (__pyx_t_9) {

    /* "vedis.pyx":364
 *         self.check_call(vedis_exec(self.database, <const char *>cmd, -1))
 *         if result:
 *             return self.get_result()             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_result(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->get_result(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":357
 *         return self.exists(key)
 * 
 *     cpdef execute(self, basestring cmd, tuple params=None, bint result=True):             # <<<<<<<<<<<<<<
 *         cdef list escaped_params
 *         if params is not None:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vedis.Vedis.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_escaped_params);
  __Pyx_XDECREF(__pyx_v_p);
  __Pyx_XDECREF(__pyx_v_cmd);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_37execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_37execute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cmd = 0;
  PyObject *__pyx_v_params = 0;
  int __pyx_v_result;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("execute (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmd,&__pyx_n_s_params,&__pyx_n_s_result,0};
    PyObject* values[3] = {0,0,0};
    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  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_cmd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_params);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "execute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_cmd = ((PyObject*)values[0]);
    __pyx_v_params = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_result = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_result == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_result = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("execute", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmd), (&PyBaseString_Type), 1, "cmd", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_params), (&PyTuple_Type), 1, "params", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_36execute(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_cmd, __pyx_v_params, __pyx_v_result);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_36execute(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_cmd, PyObject *__pyx_v_params, int __pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("execute", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.params = __pyx_v_params;
  __pyx_t_2.result = __pyx_v_result;
  __pyx_t_1 = __pyx_vtabptr_5vedis_Vedis->execute(__pyx_v_self, __pyx_v_cmd, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.execute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":366
 *             return self.get_result()
 * 
 *     cpdef get_result(self):             # <<<<<<<<<<<<<<
 *         cdef vedis_value* value = <vedis_value *>0
 *         vedis_exec_result(self.database, &value)
 */

static PyObject *__pyx_pw_5vedis_5Vedis_39get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get_result(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  vedis_value *__pyx_v_value;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __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_5vedis_5Vedis_39get_result)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":367
 * 
 *     cpdef get_result(self):
 *         cdef vedis_value* value = <vedis_value *>0             # <<<<<<<<<<<<<<
 *         vedis_exec_result(self.database, &value)
 *         return vedis_value_to_python(value)
 */
  __pyx_v_value = ((vedis_value *)0);

  /* "vedis.pyx":368
 *     cpdef get_result(self):
 *         cdef vedis_value* value = <vedis_value *>0
 *         vedis_exec_result(self.database, &value)             # <<<<<<<<<<<<<<
 *         return vedis_value_to_python(value)
 * 
 */
  vedis_exec_result(__pyx_v_self->database, (&__pyx_v_value));

  /* "vedis.pyx":369
 *         cdef vedis_value* value = <vedis_value *>0
 *         vedis_exec_result(self.database, &value)
 *         return vedis_value_to_python(value)             # <<<<<<<<<<<<<<
 * 
 *     cdef check_call(self, int result):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_vedis_value_to_python(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":366
 *             return self.get_result()
 * 
 *     cpdef get_result(self):             # <<<<<<<<<<<<<<
 *         cdef vedis_value* value = <vedis_value *>0
 *         vedis_exec_result(self.database, &value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_39get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_39get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_38get_result(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_38get_result(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_get_result(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":371
 *         return vedis_value_to_python(value)
 * 
 *     cdef check_call(self, int result):             # <<<<<<<<<<<<<<
 *         """
 *         Check for a successful Vedis library call, raising an exception
 */

static PyObject *__pyx_f_5vedis_5Vedis_check_call(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_call", 0);

  /* "vedis.pyx":376
 *         if the result is other than `VEDIS_OK`.
 *         """
 *         if result != VEDIS_OK:             # <<<<<<<<<<<<<<
 *             raise self._build_exception_for_error(result)
 * 
 */
  __pyx_t_1 = ((__pyx_v_result != VEDIS_OK) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":377
 *         """
 *         if result != VEDIS_OK:
 *             raise self._build_exception_for_error(result)             # <<<<<<<<<<<<<<
 * 
 *     cdef _build_exception_for_error(self, int status):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_build_exception_for_error(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "vedis.pyx":371
 *         return vedis_value_to_python(value)
 * 
 *     cdef check_call(self, int result):             # <<<<<<<<<<<<<<
 *         """
 *         Check for a successful Vedis library call, raising an exception
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis.check_call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":379
 *             raise self._build_exception_for_error(result)
 * 
 *     cdef _build_exception_for_error(self, int status):             # <<<<<<<<<<<<<<
 *         cdef dict exc_map
 * 
 */

static PyObject *__pyx_f_5vedis_5Vedis__build_exception_for_error(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_status) {
  PyObject *__pyx_v_exc_map = 0;
  PyObject *__pyx_v_exc_klass = NULL;
  PyObject *__pyx_v_message = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_build_exception_for_error", 0);

  /* "vedis.pyx":382
 *         cdef dict exc_map
 * 
 *         exc_map = {             # <<<<<<<<<<<<<<
 *             VEDIS_NOMEM: MemoryError,
 *             VEDIS_IOERR: IOError,
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "vedis.pyx":383
 * 
 *         exc_map = {
 *             VEDIS_NOMEM: MemoryError,             # <<<<<<<<<<<<<<
 *             VEDIS_IOERR: IOError,
 *             VEDIS_CORRUPT: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_NOMEM); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_MemoryError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":384
 *         exc_map = {
 *             VEDIS_NOMEM: MemoryError,
 *             VEDIS_IOERR: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_CORRUPT: IOError,
 *             VEDIS_LOCKED: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_IOERR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":385
 *             VEDIS_NOMEM: MemoryError,
 *             VEDIS_IOERR: IOError,
 *             VEDIS_CORRUPT: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_LOCKED: IOError,
 *             VEDIS_BUSY: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_CORRUPT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":386
 *             VEDIS_IOERR: IOError,
 *             VEDIS_CORRUPT: IOError,
 *             VEDIS_LOCKED: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_BUSY: IOError,
 *             VEDIS_LOCKERR: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_LOCKED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":387
 *             VEDIS_CORRUPT: IOError,
 *             VEDIS_LOCKED: IOError,
 *             VEDIS_BUSY: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_LOCKERR: IOError,
 *             VEDIS_NOTIMPLEMENTED: NotImplementedError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_BUSY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":388
 *             VEDIS_LOCKED: IOError,
 *             VEDIS_BUSY: IOError,
 *             VEDIS_LOCKERR: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_NOTIMPLEMENTED: NotImplementedError,
 *             VEDIS_NOTFOUND: KeyError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_LOCKERR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":389
 *             VEDIS_BUSY: IOError,
 *             VEDIS_LOCKERR: IOError,
 *             VEDIS_NOTIMPLEMENTED: NotImplementedError,             # <<<<<<<<<<<<<<
 *             VEDIS_NOTFOUND: KeyError,
 *             VEDIS_NOOP: NotImplementedError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_NOTIMPLEMENTED); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_NotImplementedError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":390
 *             VEDIS_LOCKERR: IOError,
 *             VEDIS_NOTIMPLEMENTED: NotImplementedError,
 *             VEDIS_NOTFOUND: KeyError,             # <<<<<<<<<<<<<<
 *             VEDIS_NOOP: NotImplementedError,
 *             VEDIS_EOF: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_NOTFOUND); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_KeyError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":391
 *             VEDIS_NOTIMPLEMENTED: NotImplementedError,
 *             VEDIS_NOTFOUND: KeyError,
 *             VEDIS_NOOP: NotImplementedError,             # <<<<<<<<<<<<<<
 *             VEDIS_EOF: IOError,
 *             VEDIS_FULL: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_NOOP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_NotImplementedError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":392
 *             VEDIS_NOTFOUND: KeyError,
 *             VEDIS_NOOP: NotImplementedError,
 *             VEDIS_EOF: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_FULL: IOError,
 *             VEDIS_CANTOPEN: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_EOF); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":393
 *             VEDIS_NOOP: NotImplementedError,
 *             VEDIS_EOF: IOError,
 *             VEDIS_FULL: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_CANTOPEN: IOError,
 *             VEDIS_READ_ONLY: IOError,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_FULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":394
 *             VEDIS_EOF: IOError,
 *             VEDIS_FULL: IOError,
 *             VEDIS_CANTOPEN: IOError,             # <<<<<<<<<<<<<<
 *             VEDIS_READ_ONLY: IOError,
 *         }
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_CANTOPEN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":395
 *             VEDIS_FULL: IOError,
 *             VEDIS_CANTOPEN: IOError,
 *             VEDIS_READ_ONLY: IOError,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(VEDIS_READ_ONLY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_builtin_IOError) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_exc_map = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":398
 *         }
 * 
 *         exc_klass = exc_map.get(status, Exception)             # <<<<<<<<<<<<<<
 *         if status != VEDIS_NOTFOUND:
 *             message = self._get_last_error()
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_status); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_exc_map, __pyx_t_1, __pyx_builtin_Exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_exc_klass = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vedis.pyx":399
 * 
 *         exc_klass = exc_map.get(status, Exception)
 *         if status != VEDIS_NOTFOUND:             # <<<<<<<<<<<<<<
 *             message = self._get_last_error()
 *             return exc_klass(message)
 */
  __pyx_t_3 = ((__pyx_v_status != VEDIS_NOTFOUND) != 0);
  if (__pyx_t_3) {

    /* "vedis.pyx":400
 *         exc_klass = exc_map.get(status, Exception)
 *         if status != VEDIS_NOTFOUND:
 *             message = self._get_last_error()             # <<<<<<<<<<<<<<
 *             return exc_klass(message)
 *         else:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_get_last_error(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_message = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "vedis.pyx":401
 *         if status != VEDIS_NOTFOUND:
 *             message = self._get_last_error()
 *             return exc_klass(message)             # <<<<<<<<<<<<<<
 *         else:
 *             return exc_klass()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_exc_klass);
    __pyx_t_1 = __pyx_v_exc_klass; __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_message); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_message);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_message);
      __Pyx_GIVEREF(__pyx_v_message);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vedis.pyx":403
 *             return exc_klass(message)
 *         else:
 *             return exc_klass()             # <<<<<<<<<<<<<<
 * 
 *     cdef _get_last_error(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_exc_klass);
    __pyx_t_1 = __pyx_v_exc_klass; __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":379
 *             raise self._build_exception_for_error(result)
 * 
 *     cdef _build_exception_for_error(self, int status):             # <<<<<<<<<<<<<<
 *         cdef dict exc_map
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis._build_exception_for_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_exc_map);
  __Pyx_XDECREF(__pyx_v_exc_klass);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":405
 *             return exc_klass()
 * 
 *     cdef _get_last_error(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 *         cdef int size
 */

static PyObject *__pyx_f_5vedis_5Vedis__get_last_error(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  int __pyx_v_ret;
  int __pyx_v_size;
  char __pyx_v_buf[1024];
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_last_error", 0);

  /* "vedis.pyx":410
 *         cdef char buf[1024]
 * 
 *         ret = vedis_config(             # <<<<<<<<<<<<<<
 *             self.database,
 *             VEDIS_CONFIG_ERR_LOG,
 */
  __pyx_v_ret = vedis_config(__pyx_v_self->database, VEDIS_CONFIG_ERR_LOG, (&__pyx_v_buf), (&__pyx_v_size));

  /* "vedis.pyx":415
 *             &buf,
 *             &size)
 *         if ret != VEDIS_OK:             # <<<<<<<<<<<<<<
 *             return None
 * 
 */
  __pyx_t_1 = ((__pyx_v_ret != VEDIS_OK) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":416
 *             &size)
 *         if ret != VEDIS_OK:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         return buf[:size]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }

  /* "vedis.pyx":418
 *             return None
 * 
 *         return buf[:size]             # <<<<<<<<<<<<<<
 * 
 *     cpdef begin(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buf) + 0, __pyx_v_size - 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":405
 *             return exc_klass()
 * 
 *     cdef _get_last_error(self):             # <<<<<<<<<<<<<<
 *         cdef int ret
 *         cdef int size
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis._get_last_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":420
 *         return buf[:size]
 * 
 *     cpdef begin(self):             # <<<<<<<<<<<<<<
 *         """Begin a new transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_41begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_begin(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("begin", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_begin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __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_5vedis_5Vedis_41begin)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); 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(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":422
 *     cpdef begin(self):
 *         """Begin a new transaction. Only works for file-based databases."""
 *         if self.is_memory:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_memory != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":423
 *         """Begin a new transaction. Only works for file-based databases."""
 *         if self.is_memory:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.check_call(vedis_begin(self.database))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "vedis.pyx":425
 *             return
 * 
 *         self.check_call(vedis_begin(self.database))             # <<<<<<<<<<<<<<
 * 
 *     cpdef commit(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_begin(__pyx_v_self->database)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":420
 *         return buf[:size]
 * 
 *     cpdef begin(self):             # <<<<<<<<<<<<<<
 *         """Begin a new transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.begin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_41begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_40begin[] = "Begin a new transaction. Only works for file-based databases.";
static PyObject *__pyx_pw_5vedis_5Vedis_41begin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_40begin(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_40begin(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("begin", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_begin(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.begin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":427
 *         self.check_call(vedis_begin(self.database))
 * 
 *     cpdef commit(self):             # <<<<<<<<<<<<<<
 *         """Commit current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_43commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_commit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_commit); 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);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5vedis_5Vedis_43commit)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":429
 *     cpdef commit(self):
 *         """Commit current transaction. Only works for file-based databases."""
 *         if self.is_memory:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_memory != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":430
 *         """Commit current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.check_call(vedis_commit(self.database))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "vedis.pyx":432
 *             return
 * 
 *         self.check_call(vedis_commit(self.database))             # <<<<<<<<<<<<<<
 * 
 *     cpdef rollback(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_commit(__pyx_v_self->database)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":427
 *         self.check_call(vedis_begin(self.database))
 * 
 *     cpdef commit(self):             # <<<<<<<<<<<<<<
 *         """Commit current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_43commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_42commit[] = "Commit current transaction. Only works for file-based databases.";
static PyObject *__pyx_pw_5vedis_5Vedis_43commit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commit (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_42commit(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_42commit(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_commit(__pyx_v_self, 1); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.commit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":434
 *         self.check_call(vedis_commit(self.database))
 * 
 *     cpdef rollback(self):             # <<<<<<<<<<<<<<
 *         """Rollback current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

static PyObject *__pyx_pw_5vedis_5Vedis_45rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_rollback(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rollback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __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_5vedis_5Vedis_45rollback)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":436
 *     cpdef rollback(self):
 *         """Rollback current transaction. Only works for file-based databases."""
 *         if self.is_memory:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_5 = (__pyx_v_self->is_memory != 0);
  if (__pyx_t_5) {

    /* "vedis.pyx":437
 *         """Rollback current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.check_call(vedis_rollback(self.database))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "vedis.pyx":439
 *             return
 * 
 *         self.check_call(vedis_rollback(self.database))             # <<<<<<<<<<<<<<
 * 
 *     def transaction(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_rollback(__pyx_v_self->database)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":434
 *         self.check_call(vedis_commit(self.database))
 * 
 *     cpdef rollback(self):             # <<<<<<<<<<<<<<
 *         """Rollback current transaction. Only works for file-based databases."""
 *         if self.is_memory:
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_45rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_44rollback[] = "Rollback current transaction. Only works for file-based databases.";
static PyObject *__pyx_pw_5vedis_5Vedis_45rollback(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rollback (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_44rollback(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_44rollback(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rollback", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_rollback(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.rollback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":441
 *         self.check_call(vedis_rollback(self.database))
 * 
 *     def transaction(self):             # <<<<<<<<<<<<<<
 *         """Create context manager for wrapping a transaction."""
 *         return Transaction(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_47transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_46transaction[] = "Create context manager for wrapping a transaction.";
static PyObject *__pyx_pw_5vedis_5Vedis_47transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transaction (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_46transaction(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_46transaction(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("transaction", 0);

  /* "vedis.pyx":443
 *     def transaction(self):
 *         """Create context manager for wrapping a transaction."""
 *         return Transaction(self)             # <<<<<<<<<<<<<<
 * 
 *     def commit_on_success(self, fn):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); 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_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5vedis_Transaction)), __pyx_t_1, NULL); 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_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":441
 *         self.check_call(vedis_rollback(self.database))
 * 
 *     def transaction(self):             # <<<<<<<<<<<<<<
 *         """Create context manager for wrapping a transaction."""
 *         return Transaction(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis.transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":445
 *         return Transaction(self)
 * 
 *     def commit_on_success(self, fn):             # <<<<<<<<<<<<<<
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_49commit_on_success(PyObject *__pyx_v_self, PyObject *__pyx_v_fn); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_49commit_on_success(PyObject *__pyx_v_self, PyObject *__pyx_v_fn) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commit_on_success (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_48commit_on_success(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject *)__pyx_v_fn));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":446
 * 
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *             with self.transaction():
 *                 return fn(*args, **kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_17commit_on_success_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vedis_5Vedis_17commit_on_success_1wrapper = {"wrapper", (PyCFunction)__pyx_pw_5vedis_5Vedis_17commit_on_success_1wrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5vedis_5Vedis_17commit_on_success_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrapper (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapper", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_5vedis_5Vedis_17commit_on_success_wrapper(__pyx_self, __pyx_v_args, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_17commit_on_success_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *__pyx_cur_scope;
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapper", 0);
  __pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "vedis.pyx":447
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():             # <<<<<<<<<<<<<<
 *                 return fn(*args, **kwargs)
 *         return wrapper
 */
  /*with:*/ {
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_transaction); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    /*try:*/ {
      {
        __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "vedis.pyx":448
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():
 *                 return fn(*args, **kwargs)             # <<<<<<<<<<<<<<
 *         return wrapper
 * 
 */
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(!__pyx_cur_scope->__pyx_v_fn)) { __Pyx_RaiseClosureNameError("fn"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L7_error;} }
          __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __pyx_v_kwargs;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_fn, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L11_try_return;
        }
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "vedis.pyx":447
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():             # <<<<<<<<<<<<<<
 *                 return fn(*args, **kwargs)
 *         return wrapper
 */
        /*except:*/ {
          __Pyx_AddTraceback("vedis.Vedis.commit_on_success.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_10 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1);
            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L11_try_return:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        goto __pyx_L4_return;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L4_return: {
        __pyx_t_8 = __pyx_r;
        __pyx_r = 0;
        if (__pyx_t_4) {
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__3, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L0;
      }
      __pyx_L6:;
    }
    goto __pyx_L18;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L18:;
  }

  /* "vedis.pyx":446
 * 
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *             with self.transaction():
 *                 return fn(*args, **kwargs)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.commit_on_success.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":445
 *         return Transaction(self)
 * 
 *     def commit_on_success(self, fn):             # <<<<<<<<<<<<<<
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():
 */

static PyObject *__pyx_pf_5vedis_5Vedis_48commit_on_success(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_fn) {
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *__pyx_cur_scope;
  PyObject *__pyx_v_wrapper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("commit_on_success", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *)__pyx_tp_new_5vedis___pyx_scope_struct__commit_on_success(__pyx_ptype_5vedis___pyx_scope_struct__commit_on_success, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_fn = __pyx_v_fn;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn);

  /* "vedis.pyx":446
 * 
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *             with self.transaction():
 *                 return fn(*args, **kwargs)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vedis_5Vedis_17commit_on_success_1wrapper, 0, __pyx_n_s_commit_on_success_locals_wrapper, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vedis, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_wrapper = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vedis.pyx":449
 *             with self.transaction():
 *                 return fn(*args, **kwargs)
 *         return wrapper             # <<<<<<<<<<<<<<
 * 
 *     cpdef random_string(self, int nbytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "vedis.pyx":445
 *         return Transaction(self)
 * 
 *     def commit_on_success(self, fn):             # <<<<<<<<<<<<<<
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.commit_on_success", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":451
 *         return wrapper
 * 
 *     cpdef random_string(self, int nbytes):             # <<<<<<<<<<<<<<
 *         """Generate a random string of given length."""
 *         cdef char *buf
 */

static PyObject *__pyx_pw_5vedis_5Vedis_51random_string(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_random_string(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch) {
  char *__pyx_v_buf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random_string", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_random_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __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_5vedis_5Vedis_51random_string)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":454
 *         """Generate a random string of given length."""
 *         cdef char *buf
 *         buf = <char *>malloc(nbytes * sizeof(char))             # <<<<<<<<<<<<<<
 *         try:
 *             vedis_util_random_string(self.database, buf, nbytes)
 */
  __pyx_v_buf = ((char *)malloc((__pyx_v_nbytes * (sizeof(char)))));

  /* "vedis.pyx":455
 *         cdef char *buf
 *         buf = <char *>malloc(nbytes * sizeof(char))
 *         try:             # <<<<<<<<<<<<<<
 *             vedis_util_random_string(self.database, buf, nbytes)
 *             return buf[:nbytes]
 */
  /*try:*/ {

    /* "vedis.pyx":456
 *         buf = <char *>malloc(nbytes * sizeof(char))
 *         try:
 *             vedis_util_random_string(self.database, buf, nbytes)             # <<<<<<<<<<<<<<
 *             return buf[:nbytes]
 *         finally:
 */
    vedis_util_random_string(__pyx_v_self->database, __pyx_v_buf, __pyx_v_nbytes);

    /* "vedis.pyx":457
 *         try:
 *             vedis_util_random_string(self.database, buf, nbytes)
 *             return buf[:nbytes]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(buf)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buf + 0, __pyx_v_nbytes - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "vedis.pyx":459
 *             return buf[:nbytes]
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef int random_int(self):
 */
  /*finally:*/ {
    /*exception exit:*/{
      __pyx_L4_error:;
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buf);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buf);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "vedis.pyx":451
 *         return wrapper
 * 
 *     cpdef random_string(self, int nbytes):             # <<<<<<<<<<<<<<
 *         """Generate a random string of given length."""
 *         cdef char *buf
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.random_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_51random_string(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static char __pyx_doc_5vedis_5Vedis_50random_string[] = "Generate a random string of given length.";
static PyObject *__pyx_pw_5vedis_5Vedis_51random_string(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes) {
  int __pyx_v_nbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("random_string (wrapper)", 0);
  assert(__pyx_arg_nbytes); {
    __pyx_v_nbytes = __Pyx_PyInt_As_int(__pyx_arg_nbytes); if (unlikely((__pyx_v_nbytes == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.random_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_50random_string(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((int)__pyx_v_nbytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_50random_string(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random_string", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_random_string(__pyx_v_self, __pyx_v_nbytes, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.random_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":461
 *             free(buf)
 * 
 *     cpdef int random_int(self):             # <<<<<<<<<<<<<<
 *         """Generate a random integer."""
 *         return vedis_util_random_num(self.database)
 */

static PyObject *__pyx_pw_5vedis_5Vedis_53random_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_5vedis_5Vedis_random_int(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random_int", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_random_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __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_5vedis_5Vedis_53random_int)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_5;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":463
 *     cpdef int random_int(self):
 *         """Generate a random integer."""
 *         return vedis_util_random_num(self.database)             # <<<<<<<<<<<<<<
 * 
 *     # Misc.
 */
  __pyx_r = vedis_util_random_num(__pyx_v_self->database);
  goto __pyx_L0;

  /* "vedis.pyx":461
 *             free(buf)
 * 
 *     cpdef int random_int(self):             # <<<<<<<<<<<<<<
 *         """Generate a random integer."""
 *         return vedis_util_random_num(self.database)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("vedis.Vedis.random_int", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_53random_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5vedis_5Vedis_52random_int[] = "Generate a random integer.";
static PyObject *__pyx_pw_5vedis_5Vedis_53random_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("random_int (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_52random_int(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_52random_int(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random_int", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_random_int(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.random_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":466
 * 
 *     # Misc.
 *     cpdef bint copy(self, basestring src, basestring dest):             # <<<<<<<<<<<<<<
 *         return self.execute('COPY %s %s', (src, dest))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_55copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_copy(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __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_5vedis_5Vedis_55copy)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_src);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_src);
      __Pyx_GIVEREF(__pyx_v_src);
      __Pyx_INCREF(__pyx_v_dest);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_dest);
      __Pyx_GIVEREF(__pyx_v_dest);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":467
 *     # Misc.
 *     cpdef bint copy(self, basestring src, basestring dest):
 *         return self.execute('COPY %s %s', (src, dest))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint move(self, basestring src, basestring dest):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_src);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_src);
  __Pyx_GIVEREF(__pyx_v_src);
  __Pyx_INCREF(__pyx_v_dest);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dest);
  __Pyx_GIVEREF(__pyx_v_dest);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_COPY_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":466
 * 
 *     # Misc.
 *     cpdef bint copy(self, basestring src, basestring dest):             # <<<<<<<<<<<<<<
 *         return self.execute('COPY %s %s', (src, dest))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.copy", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_55copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_55copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_src = 0;
  PyObject *__pyx_v_dest = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_src,&__pyx_n_s_dest,0};
    PyObject* values[2] = {0,0};
    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_src)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("copy", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copy") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_src = ((PyObject*)values[0]);
    __pyx_v_dest = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("copy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), (&PyBaseString_Type), 1, "src", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), (&PyBaseString_Type), 1, "dest", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_54copy(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_src, __pyx_v_dest);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_54copy(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_copy(__pyx_v_self, __pyx_v_src, __pyx_v_dest, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":469
 *         return self.execute('COPY %s %s', (src, dest))
 * 
 *     cpdef bint move(self, basestring src, basestring dest):             # <<<<<<<<<<<<<<
 *         return self.execute('MOVE %s %s', (src, dest))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_57move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_move(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("move", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_move); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __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_5vedis_5Vedis_57move)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_src);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_src);
      __Pyx_GIVEREF(__pyx_v_src);
      __Pyx_INCREF(__pyx_v_dest);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_dest);
      __Pyx_GIVEREF(__pyx_v_dest);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":470
 * 
 *     cpdef bint move(self, basestring src, basestring dest):
 *         return self.execute('MOVE %s %s', (src, dest))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int rand(self, int minimum, int maximum):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_src);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_src);
  __Pyx_GIVEREF(__pyx_v_src);
  __Pyx_INCREF(__pyx_v_dest);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_dest);
  __Pyx_GIVEREF(__pyx_v_dest);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_MOVE_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":469
 *         return self.execute('COPY %s %s', (src, dest))
 * 
 *     cpdef bint move(self, basestring src, basestring dest):             # <<<<<<<<<<<<<<
 *         return self.execute('MOVE %s %s', (src, dest))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.move", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_57move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_57move(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_src = 0;
  PyObject *__pyx_v_dest = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("move (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_src,&__pyx_n_s_dest,0};
    PyObject* values[2] = {0,0};
    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_src)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "move") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_src = ((PyObject*)values[0]);
    __pyx_v_dest = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("move", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), (&PyBaseString_Type), 1, "src", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dest), (&PyBaseString_Type), 1, "dest", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_56move(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_src, __pyx_v_dest);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_56move(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_src, PyObject *__pyx_v_dest) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("move", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_move(__pyx_v_self, __pyx_v_src, __pyx_v_dest, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.move", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":472
 *         return self.execute('MOVE %s %s', (src, dest))
 * 
 *     cpdef int rand(self, int minimum, int maximum):             # <<<<<<<<<<<<<<
 *         return self.execute('RAND %s %s' % (minimum, maximum))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_59rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_rand(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_minimum, int __pyx_v_maximum, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __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_5vedis_5Vedis_59rand)) {
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_minimum); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_maximum); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = NULL;
      }
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_9;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":473
 * 
 *     cpdef int rand(self, int minimum, int maximum):
 *         return self.execute('RAND %s %s' % (minimum, maximum))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring randstr(self, int nbytes):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_minimum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_maximum); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RAND_s_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_9;
  goto __pyx_L0;

  /* "vedis.pyx":472
 *         return self.execute('MOVE %s %s', (src, dest))
 * 
 *     cpdef int rand(self, int minimum, int maximum):             # <<<<<<<<<<<<<<
 *         return self.execute('RAND %s %s' % (minimum, maximum))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("vedis.Vedis.rand", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_59rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_59rand(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_minimum;
  int __pyx_v_maximum;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rand (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_minimum,&__pyx_n_s_maximum,0};
    PyObject* values[2] = {0,0};
    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_minimum)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maximum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("rand", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rand") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_minimum = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_minimum == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_maximum = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_maximum == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rand", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_58rand(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_minimum, __pyx_v_maximum);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_58rand(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_minimum, int __pyx_v_maximum) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rand", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_rand(__pyx_v_self, __pyx_v_minimum, __pyx_v_maximum, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":475
 *         return self.execute('RAND %s %s' % (minimum, maximum))
 * 
 *     cpdef basestring randstr(self, int nbytes):             # <<<<<<<<<<<<<<
 *         return self.execute('RANDSTR %s' % nbytes)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_61randstr(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_randstr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("randstr", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_randstr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __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_5vedis_5Vedis_61randstr)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":476
 * 
 *     cpdef basestring randstr(self, int nbytes):
 *         return self.execute('RANDSTR %s' % nbytes)             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring time(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_RANDSTR_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":475
 *         return self.execute('RAND %s %s' % (minimum, maximum))
 * 
 *     cpdef basestring randstr(self, int nbytes):             # <<<<<<<<<<<<<<
 *         return self.execute('RANDSTR %s' % nbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.randstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_61randstr(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_61randstr(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes) {
  int __pyx_v_nbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("randstr (wrapper)", 0);
  assert(__pyx_arg_nbytes); {
    __pyx_v_nbytes = __Pyx_PyInt_As_int(__pyx_arg_nbytes); if (unlikely((__pyx_v_nbytes == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.randstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_60randstr(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((int)__pyx_v_nbytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_60randstr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("randstr", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_randstr(__pyx_v_self, __pyx_v_nbytes, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.randstr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":478
 *         return self.execute('RANDSTR %s' % nbytes)
 * 
 *     cpdef basestring time(self):             # <<<<<<<<<<<<<<
 *         return self.execute('TIME')
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_63time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_time(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __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_5vedis_5Vedis_63time)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":479
 * 
 *     cpdef basestring time(self):
 *         return self.execute('TIME')             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring date(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_n_s_TIME), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":478
 *         return self.execute('RANDSTR %s' % nbytes)
 * 
 *     cpdef basestring time(self):             # <<<<<<<<<<<<<<
 *         return self.execute('TIME')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_63time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_63time(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("time (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_62time(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_62time(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("time", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_time(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":481
 *         return self.execute('TIME')
 * 
 *     cpdef basestring date(self):             # <<<<<<<<<<<<<<
 *         return self.execute('DATE')
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_65date(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_date(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_date); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __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_5vedis_5Vedis_65date)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":482
 * 
 *     cpdef basestring date(self):
 *         return self.execute('DATE')             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring operating_system(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_n_s_DATE), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":481
 *         return self.execute('TIME')
 * 
 *     cpdef basestring date(self):             # <<<<<<<<<<<<<<
 *         return self.execute('DATE')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_65date(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_65date(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("date (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_64date(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_64date(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("date", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_date(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":484
 *         return self.execute('DATE')
 * 
 *     cpdef basestring operating_system(self):             # <<<<<<<<<<<<<<
 *         return self.execute('OS')
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_67operating_system(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_operating_system(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("operating_system", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_operating_system); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __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_5vedis_5Vedis_67operating_system)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":485
 * 
 *     cpdef basestring operating_system(self):
 *         return self.execute('OS')             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring strip_tags(self, basestring html):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_n_s_OS), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":484
 *         return self.execute('DATE')
 * 
 *     cpdef basestring operating_system(self):             # <<<<<<<<<<<<<<
 *         return self.execute('OS')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.operating_system", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_67operating_system(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_67operating_system(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("operating_system (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_66operating_system(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_66operating_system(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("operating_system", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_operating_system(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.operating_system", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":487
 *         return self.execute('OS')
 * 
 *     cpdef basestring strip_tags(self, basestring html):             # <<<<<<<<<<<<<<
 *         return self.execute('STRIP_TAG %s', (html,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_69strip_tags(PyObject *__pyx_v_self, PyObject *__pyx_v_html); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_strip_tags(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_html, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strip_tags", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strip_tags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __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_5vedis_5Vedis_69strip_tags)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_html); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_html);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_html);
        __Pyx_GIVEREF(__pyx_v_html);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":488
 * 
 *     cpdef basestring strip_tags(self, basestring html):
 *         return self.execute('STRIP_TAG %s', (html,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list str_split(self, basestring s, int nchars=1):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_html);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_html);
  __Pyx_GIVEREF(__pyx_v_html);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_STRIP_TAG_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":487
 *         return self.execute('OS')
 * 
 *     cpdef basestring strip_tags(self, basestring html):             # <<<<<<<<<<<<<<
 *         return self.execute('STRIP_TAG %s', (html,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.strip_tags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_69strip_tags(PyObject *__pyx_v_self, PyObject *__pyx_v_html); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_69strip_tags(PyObject *__pyx_v_self, PyObject *__pyx_v_html) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strip_tags (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_html), (&PyBaseString_Type), 1, "html", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_68strip_tags(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_html));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_68strip_tags(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_html) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strip_tags", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_strip_tags(__pyx_v_self, __pyx_v_html, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.strip_tags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":490
 *         return self.execute('STRIP_TAG %s', (html,))
 * 
 *     cpdef list str_split(self, basestring s, int nchars=1):             # <<<<<<<<<<<<<<
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_71str_split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_str_split(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_str_split *__pyx_optional_args) {
  int __pyx_v_nchars = ((int)1);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("str_split", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_nchars = __pyx_optional_args->nchars;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_str_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __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_5vedis_5Vedis_71str_split)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nchars); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":491
 * 
 *     cpdef list str_split(self, basestring s, int nchars=1):
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring size_format(self, int nbytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nchars); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_STR_SPLIT_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_4 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":490
 *         return self.execute('STRIP_TAG %s', (html,))
 * 
 *     cpdef list str_split(self, basestring s, int nchars=1):             # <<<<<<<<<<<<<<
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vedis.Vedis.str_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_71str_split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_71str_split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_s = 0;
  int __pyx_v_nchars;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("str_split (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_nchars,0};
    PyObject* values[2] = {0,0};
    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_s)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nchars);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "str_split") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __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_s = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_nchars = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nchars == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_nchars = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("str_split", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.str_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBaseString_Type), 1, "s", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_70str_split(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_s, __pyx_v_nchars);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_70str_split(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_v_nchars) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_str_split __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("str_split", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.nchars = __pyx_v_nchars;
  __pyx_t_1 = __pyx_vtabptr_5vedis_Vedis->str_split(__pyx_v_self, __pyx_v_s, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.str_split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":493
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))
 * 
 *     cpdef basestring size_format(self, int nbytes):             # <<<<<<<<<<<<<<
 *         return self.execute('SIZE_FMT %s' % nbytes)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_73size_format(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_size_format(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("size_format", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size_format); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __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_5vedis_5Vedis_73size_format)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":494
 * 
 *     cpdef basestring size_format(self, int nbytes):
 *         return self.execute('SIZE_FMT %s' % nbytes)             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring soundex(self, basestring s):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SIZE_FMT_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":493
 *         return self.execute('STR_SPLIT %%s %s' % nchars, (s,))
 * 
 *     cpdef basestring size_format(self, int nbytes):             # <<<<<<<<<<<<<<
 *         return self.execute('SIZE_FMT %s' % nbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.size_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_73size_format(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_73size_format(PyObject *__pyx_v_self, PyObject *__pyx_arg_nbytes) {
  int __pyx_v_nbytes;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("size_format (wrapper)", 0);
  assert(__pyx_arg_nbytes); {
    __pyx_v_nbytes = __Pyx_PyInt_As_int(__pyx_arg_nbytes); if (unlikely((__pyx_v_nbytes == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.size_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_5Vedis_72size_format(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((int)__pyx_v_nbytes));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_72size_format(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_v_nbytes) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("size_format", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_size_format(__pyx_v_self, __pyx_v_nbytes, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.size_format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":496
 *         return self.execute('SIZE_FMT %s' % nbytes)
 * 
 *     cpdef basestring soundex(self, basestring s):             # <<<<<<<<<<<<<<
 *         return self.execute('SOUNDEX %s', (s,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_75soundex(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_soundex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("soundex", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_soundex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __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_5vedis_5Vedis_75soundex)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_s);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_s);
        __Pyx_GIVEREF(__pyx_v_s);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":497
 * 
 *     cpdef basestring soundex(self, basestring s):
 *         return self.execute('SOUNDEX %s', (s,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring base64(self, basestring data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SOUNDEX_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":496
 *         return self.execute('SIZE_FMT %s' % nbytes)
 * 
 *     cpdef basestring soundex(self, basestring s):             # <<<<<<<<<<<<<<
 *         return self.execute('SOUNDEX %s', (s,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.soundex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_75soundex(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_75soundex(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("soundex (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBaseString_Type), 1, "s", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_74soundex(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_s));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_74soundex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("soundex", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_soundex(__pyx_v_self, __pyx_v_s, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.soundex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":499
 *         return self.execute('SOUNDEX %s', (s,))
 * 
 *     cpdef basestring base64(self, basestring data):             # <<<<<<<<<<<<<<
 *         return self.execute('BASE64 %s', (data,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_77base64(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_base64(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("base64", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __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_5vedis_5Vedis_77base64)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":500
 * 
 *     cpdef basestring base64(self, basestring data):
 *         return self.execute('BASE64 %s', (data,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring base64_decode(self, basestring data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_BASE64_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":499
 *         return self.execute('SOUNDEX %s', (s,))
 * 
 *     cpdef basestring base64(self, basestring data):             # <<<<<<<<<<<<<<
 *         return self.execute('BASE64 %s', (data,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.base64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_77base64(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_77base64(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("base64 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBaseString_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_76base64(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_76base64(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("base64", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_base64(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.base64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":502
 *         return self.execute('BASE64 %s', (data,))
 * 
 *     cpdef basestring base64_decode(self, basestring data):             # <<<<<<<<<<<<<<
 *         return self.execute('BASE64_DEC %s', (data,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_79base64_decode(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_base64_decode(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("base64_decode", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base64_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __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_5vedis_5Vedis_79base64_decode)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_data); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_data);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_data);
        __Pyx_GIVEREF(__pyx_v_data);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":503
 * 
 *     cpdef basestring base64_decode(self, basestring data):
 *         return self.execute('BASE64_DEC %s', (data,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list table_list(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_data);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_BASE64_DEC_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":502
 *         return self.execute('BASE64 %s', (data,))
 * 
 *     cpdef basestring base64_decode(self, basestring data):             # <<<<<<<<<<<<<<
 *         return self.execute('BASE64_DEC %s', (data,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.base64_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_79base64_decode(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_79base64_decode(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("base64_decode (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBaseString_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_78base64_decode(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_78base64_decode(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("base64_decode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_base64_decode(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.base64_decode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":505
 *         return self.execute('BASE64_DEC %s', (data,))
 * 
 *     cpdef list table_list(self):             # <<<<<<<<<<<<<<
 *         return self.execute('TABLE_LIST')
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_81table_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_table_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("table_list", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_table_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __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_5vedis_5Vedis_81table_list)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":506
 * 
 *     cpdef list table_list(self):
 *         return self.execute('TABLE_LIST')             # <<<<<<<<<<<<<<
 * 
 *     # Strings.
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_n_s_TABLE_LIST), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":505
 *         return self.execute('BASE64_DEC %s', (data,))
 * 
 *     cpdef list table_list(self):             # <<<<<<<<<<<<<<
 *         return self.execute('TABLE_LIST')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Vedis.table_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_81table_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_81table_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("table_list (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_80table_list(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_80table_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("table_list", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_table_list(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.table_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":509
 * 
 *     # Strings.
 *     cpdef basestring get(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.fetch(key)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_83get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __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_5vedis_5Vedis_83get)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":510
 *     # Strings.
 *     cpdef basestring get(self, basestring key):
 *         return self.fetch(key)             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring set(self, basestring key, basestring value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->fetch(__pyx_v_self, __pyx_v_key, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":509
 * 
 *     # Strings.
 *     cpdef basestring get(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.fetch(key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_83get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_83get(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_82get(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_82get(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_get(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":512
 *         return self.fetch(key)
 * 
 *     cpdef basestring set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.store(key, value)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_85set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __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_5vedis_5Vedis_85set)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":513
 * 
 *     cpdef basestring set(self, basestring key, basestring value):
 *         return self.store(key, value)             # <<<<<<<<<<<<<<
 * 
 *     cpdef list mget(self, list keys):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->store(__pyx_v_self, __pyx_v_key, __pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":512
 *         return self.fetch(key)
 * 
 *     cpdef basestring set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.store(key, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_85set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_85set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_84set(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_84set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_set(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":515
 *         return self.store(key, value)
 * 
 *     cpdef list mget(self, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute('MGET %s' % self._flatten_list(keys))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_87mget(PyObject *__pyx_v_self, PyObject *__pyx_v_keys); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_mget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_keys, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mget", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mget); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __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_5vedis_5Vedis_87mget)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_keys);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_keys);
        __Pyx_GIVEREF(__pyx_v_keys);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":516
 * 
 *     cpdef list mget(self, list keys):
 *         return self.execute('MGET %s' % self._flatten_list(keys))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint mset(self, dict kw):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MGET_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":515
 *         return self.store(key, value)
 * 
 *     cpdef list mget(self, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute('MGET %s' % self._flatten_list(keys))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.mget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_87mget(PyObject *__pyx_v_self, PyObject *__pyx_v_keys); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_87mget(PyObject *__pyx_v_self, PyObject *__pyx_v_keys) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mget (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_86mget(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_keys));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_86mget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_keys) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mget", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_mget(__pyx_v_self, __pyx_v_keys, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.mget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":518
 *         return self.execute('MGET %s' % self._flatten_list(keys))
 * 
 *     cpdef bint mset(self, dict kw):             # <<<<<<<<<<<<<<
 *         return self.execute('MSET %s' % self._flatten(kw))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_89mset(PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /*proto*/
static int __pyx_f_5vedis_5Vedis_mset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __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_5vedis_5Vedis_89mset)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_kw); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_kw);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_kw);
        __Pyx_GIVEREF(__pyx_v_kw);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":519
 * 
 *     cpdef bint mset(self, dict kw):
 *         return self.execute('MSET %s' % self._flatten(kw))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint setnx(self, basestring key, basestring value):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten(__pyx_v_self, __pyx_v_kw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MSET_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":518
 *         return self.execute('MGET %s' % self._flatten_list(keys))
 * 
 *     cpdef bint mset(self, dict kw):             # <<<<<<<<<<<<<<
 *         return self.execute('MSET %s' % self._flatten(kw))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.mset", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_89mset(PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_89mset(PyObject *__pyx_v_self, PyObject *__pyx_v_kw) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mset (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kw), (&PyDict_Type), 1, "kw", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_88mset(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_kw));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_88mset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_mset(__pyx_v_self, __pyx_v_kw, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.mset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":521
 *         return self.execute('MSET %s' % self._flatten(kw))
 * 
 *     cpdef bint setnx(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SETNX %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_91setnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_setnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setnx", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setnx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __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_5vedis_5Vedis_91setnx)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":522
 * 
 *     cpdef bint setnx(self, basestring key, basestring value):
 *         return self.execute('SETNX %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint msetnx(self, dict kw):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SETNX_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":521
 *         return self.execute('MSET %s' % self._flatten(kw))
 * 
 *     cpdef bint setnx(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SETNX %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.setnx", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_91setnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_91setnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setnx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setnx", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setnx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setnx", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.setnx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_90setnx(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_90setnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("setnx", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_setnx(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.setnx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":524
 *         return self.execute('SETNX %s %s', (key, value))
 * 
 *     cpdef bint msetnx(self, dict kw):             # <<<<<<<<<<<<<<
 *         return self.execute('MSETNX %s' % self._flatten(kw))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_93msetnx(PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /*proto*/
static int __pyx_f_5vedis_5Vedis_msetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msetnx", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_msetnx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __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_5vedis_5Vedis_93msetnx)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_kw); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_kw);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_kw);
        __Pyx_GIVEREF(__pyx_v_kw);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":525
 * 
 *     cpdef bint msetnx(self, dict kw):
 *         return self.execute('MSETNX %s' % self._flatten(kw))             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_set(self, basestring key, basestring value):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten(__pyx_v_self, __pyx_v_kw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MSETNX_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":524
 *         return self.execute('SETNX %s %s', (key, value))
 * 
 *     cpdef bint msetnx(self, dict kw):             # <<<<<<<<<<<<<<
 *         return self.execute('MSETNX %s' % self._flatten(kw))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.msetnx", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_93msetnx(PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_93msetnx(PyObject *__pyx_v_self, PyObject *__pyx_v_kw) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("msetnx (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kw), (&PyDict_Type), 1, "kw", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_92msetnx(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_kw));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_92msetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("msetnx", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_msetnx(__pyx_v_self, __pyx_v_kw, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.msetnx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":527
 *         return self.execute('MSETNX %s' % self._flatten(kw))
 * 
 *     cpdef get_set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('GETSET %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_95get_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_get_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_set", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __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_5vedis_5Vedis_95get_set)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":528
 * 
 *     cpdef get_set(self, basestring key, basestring value):
 *         return self.execute('GETSET %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int strlen(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_GETSET_s_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":527
 *         return self.execute('MSETNX %s' % self._flatten(kw))
 * 
 *     cpdef get_set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('GETSET %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.get_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_95get_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_95get_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.get_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_94get_set(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_94get_set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_get_set(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.get_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":530
 *         return self.execute('GETSET %s %s', (key, value))
 * 
 *     cpdef int strlen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('STRLEN %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_97strlen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_strlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strlen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __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_5vedis_5Vedis_97strlen)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":531
 * 
 *     cpdef int strlen(self, basestring key):
 *         return self.execute('STRLEN %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     # Counters.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_STRLEN_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":530
 *         return self.execute('GETSET %s %s', (key, value))
 * 
 *     cpdef int strlen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('STRLEN %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.strlen", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_97strlen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_97strlen(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("strlen (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_96strlen(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_96strlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("strlen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_strlen(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.strlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":534
 * 
 *     # Counters.
 *     cpdef int incr(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('INCR %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_99incr(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_incr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("incr", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_incr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __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_5vedis_5Vedis_99incr)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":535
 *     # Counters.
 *     cpdef int incr(self, basestring key):
 *         return self.execute('INCR %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int decr(self, basestring key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_INCR_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":534
 * 
 *     # Counters.
 *     cpdef int incr(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('INCR %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.incr", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_99incr(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_99incr(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("incr (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_98incr(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_98incr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("incr", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_incr(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.incr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":537
 *         return self.execute('INCR %s', (key,))
 * 
 *     cpdef int decr(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('DECR %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_101decr(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_decr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decr", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __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_5vedis_5Vedis_101decr)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":538
 * 
 *     cpdef int decr(self, basestring key):
 *         return self.execute('DECR %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int incr_by(self, basestring key, int amount):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_DECR_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":537
 *         return self.execute('INCR %s', (key,))
 * 
 *     cpdef int decr(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('DECR %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.decr", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_101decr(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_101decr(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decr (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_100decr(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_100decr(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decr", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_decr(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.decr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":540
 *         return self.execute('DECR %s', (key,))
 * 
 *     cpdef int incr_by(self, basestring key, int amount):             # <<<<<<<<<<<<<<
 *         return self.execute('INCRBY %%s %s' % amount, (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_103incr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_incr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("incr_by", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_incr_by); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __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_5vedis_5Vedis_103incr_by)) {
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_amount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_8;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":541
 * 
 *     cpdef int incr_by(self, basestring key, int amount):
 *         return self.execute('INCRBY %%s %s' % amount, (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int decr_by(self, basestring key, int amount):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_amount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_INCRBY_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __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_9.__pyx_n = 1;
  __pyx_t_9.params = ((PyObject*)__pyx_t_1);
  __pyx_t_4 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_8;
  goto __pyx_L0;

  /* "vedis.pyx":540
 *         return self.execute('DECR %s', (key,))
 * 
 *     cpdef int incr_by(self, basestring key, int amount):             # <<<<<<<<<<<<<<
 *         return self.execute('INCRBY %%s %s' % amount, (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("vedis.Vedis.incr_by", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_103incr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_103incr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  int __pyx_v_amount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("incr_by (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_amount,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_amount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("incr_by", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "incr_by") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_amount = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_amount == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("incr_by", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.incr_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_102incr_by(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_amount);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_102incr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("incr_by", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_incr_by(__pyx_v_self, __pyx_v_key, __pyx_v_amount, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.incr_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":543
 *         return self.execute('INCRBY %%s %s' % amount, (key,))
 * 
 *     cpdef int decr_by(self, basestring key, int amount):             # <<<<<<<<<<<<<<
 *         return self.execute('DECRBY %%s %s' % amount, (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_105decr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_decr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decr_by", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_decr_by); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __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_5vedis_5Vedis_105decr_by)) {
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_amount); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_8;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":544
 * 
 *     cpdef int decr_by(self, basestring key, int amount):
 *         return self.execute('DECRBY %%s %s' % amount, (key,))             # <<<<<<<<<<<<<<
 * 
 *     # Hash methods.
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_amount); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_DECRBY_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __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_9.__pyx_n = 1;
  __pyx_t_9.params = ((PyObject*)__pyx_t_1);
  __pyx_t_4 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_8;
  goto __pyx_L0;

  /* "vedis.pyx":543
 *         return self.execute('INCRBY %%s %s' % amount, (key,))
 * 
 *     cpdef int decr_by(self, basestring key, int amount):             # <<<<<<<<<<<<<<
 *         return self.execute('DECRBY %%s %s' % amount, (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("vedis.Vedis.decr_by", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_105decr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_105decr_by(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  int __pyx_v_amount;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decr_by (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_amount,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_amount)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("decr_by", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "decr_by") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_amount = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_amount == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("decr_by", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.decr_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_104decr_by(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_amount);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_104decr_by(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_amount) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decr_by", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_decr_by(__pyx_v_self, __pyx_v_key, __pyx_v_amount, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.decr_by", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":547
 * 
 *     # Hash methods.
 *     cpdef bint hset(self, basestring hash_key, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('HSET %s %s %s', (hash_key, key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_107hset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __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_5vedis_5Vedis_107hset)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":548
 *     # Hash methods.
 *     cpdef bint hset(self, basestring hash_key, basestring key, basestring value):
 *         return self.execute('HSET %s %s %s', (hash_key, key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint hsetnx(self, basestring hash_key, basestring key, basestring value):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HSET_s_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":547
 * 
 *     # Hash methods.
 *     cpdef bint hset(self, basestring hash_key, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('HSET %s %s %s', (hash_key, key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hset", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_107hset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_107hset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hset", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hset", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
    __pyx_v_value = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hset", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_106hset(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_106hset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_hset(__pyx_v_self, __pyx_v_hash_key, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":550
 *         return self.execute('HSET %s %s %s', (hash_key, key, value))
 * 
 *     cpdef bint hsetnx(self, basestring hash_key, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('HSETNX %s %s %s', (hash_key, key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_109hsetnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hsetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hsetnx", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hsetnx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __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_5vedis_5Vedis_109hsetnx)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":551
 * 
 *     cpdef bint hsetnx(self, basestring hash_key, basestring key, basestring value):
 *         return self.execute('HSETNX %s %s %s', (hash_key, key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring hget(self, basestring hash_key, basestring key):
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HSETNX_s_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":550
 *         return self.execute('HSET %s %s %s', (hash_key, key, value))
 * 
 *     cpdef bint hsetnx(self, basestring hash_key, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('HSETNX %s %s %s', (hash_key, key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hsetnx", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_109hsetnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_109hsetnx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hsetnx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hsetnx", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hsetnx", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hsetnx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
    __pyx_v_value = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hsetnx", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hsetnx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_108hsetnx(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_108hsetnx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hsetnx", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_hsetnx(__pyx_v_self, __pyx_v_hash_key, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hsetnx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":553
 *         return self.execute('HSETNX %s %s %s', (hash_key, key, value))
 * 
 *     cpdef basestring hget(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HGET %s %s', (hash_key, key))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_111hget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hget", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hget); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __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_5vedis_5Vedis_111hget)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":554
 * 
 *     cpdef basestring hget(self, basestring hash_key, basestring key):
 *         return self.execute('HGET %s %s', (hash_key, key))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int hdel(self, basestring hash_key, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HGET_s_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":553
 *         return self.execute('HSETNX %s %s %s', (hash_key, key, value))
 * 
 *     cpdef basestring hget(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HGET %s %s', (hash_key, key))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.hget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_111hget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_111hget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hget (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hget", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hget") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_110hget(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_110hget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hget", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hget(__pyx_v_self, __pyx_v_hash_key, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":556
 *         return self.execute('HGET %s %s', (hash_key, key))
 * 
 *     cpdef int hdel(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HDEL %s %s', (hash_key, key))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_113hdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hdel", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hdel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __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_5vedis_5Vedis_113hdel)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":557
 * 
 *     cpdef int hdel(self, basestring hash_key, basestring key):
 *         return self.execute('HDEL %s %s', (hash_key, key))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int hmdel(self, basestring hash_key, list keys):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HDEL_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":556
 *         return self.execute('HGET %s %s', (hash_key, key))
 * 
 *     cpdef int hdel(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HDEL %s %s', (hash_key, key))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hdel", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_113hdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_113hdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hdel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hdel", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hdel") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hdel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hdel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_112hdel(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_112hdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hdel", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_hdel(__pyx_v_self, __pyx_v_hash_key, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hdel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":559
 *         return self.execute('HDEL %s %s', (hash_key, key))
 * 
 *     cpdef int hmdel(self, basestring hash_key, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HDEL %%s %s' % self._flatten_list(keys),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_115hmdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hmdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmdel", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hmdel); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __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_5vedis_5Vedis_115hmdel)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_keys);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_keys);
      __Pyx_GIVEREF(__pyx_v_keys);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":561
 *     cpdef int hmdel(self, basestring hash_key, list keys):
 *         return self.execute(
 *             'HDEL %%s %s' % self._flatten_list(keys),             # <<<<<<<<<<<<<<
 *             (hash_key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_HDEL_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":562
 *         return self.execute(
 *             'HDEL %%s %s' % self._flatten_list(keys),
 *             (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list hkeys(self, basestring hash_key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);

  /* "vedis.pyx":560
 * 
 *     cpdef int hmdel(self, basestring hash_key, list keys):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'HDEL %%s %s' % self._flatten_list(keys),
 *             (hash_key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":559
 *         return self.execute('HDEL %s %s', (hash_key, key))
 * 
 *     cpdef int hmdel(self, basestring hash_key, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HDEL %%s %s' % self._flatten_list(keys),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hmdel", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_115hmdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_115hmdel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_keys = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hmdel (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_keys,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hmdel", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hmdel") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_keys = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hmdel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hmdel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_114hmdel(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_keys);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_114hmdel(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmdel", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_hmdel(__pyx_v_self, __pyx_v_hash_key, __pyx_v_keys, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hmdel", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":564
 *             (hash_key,))
 * 
 *     cpdef list hkeys(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HKEYS %s', (hash_key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_117hkeys(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hkeys(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hkeys", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hkeys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __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_5vedis_5Vedis_117hkeys)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_hash_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_hash_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hash_key);
        __Pyx_GIVEREF(__pyx_v_hash_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":565
 * 
 *     cpdef list hkeys(self, basestring hash_key):
 *         return self.execute('HKEYS %s', (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list hvals(self, basestring hash_key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HKEYS_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":564
 *             (hash_key,))
 * 
 *     cpdef list hkeys(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HKEYS %s', (hash_key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.hkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_117hkeys(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_117hkeys(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hkeys (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_116hkeys(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_hash_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_116hkeys(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hkeys", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hkeys(__pyx_v_self, __pyx_v_hash_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":567
 *         return self.execute('HKEYS %s', (hash_key,))
 * 
 *     cpdef list hvals(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HVALS %s', (hash_key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_119hvals(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hvals(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hvals", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __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_5vedis_5Vedis_119hvals)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_hash_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_hash_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hash_key);
        __Pyx_GIVEREF(__pyx_v_hash_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":568
 * 
 *     cpdef list hvals(self, basestring hash_key):
 *         return self.execute('HVALS %s', (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef dict hgetall(self, basestring hash_key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HVALS_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":567
 *         return self.execute('HKEYS %s', (hash_key,))
 * 
 *     cpdef list hvals(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HVALS %s', (hash_key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.hvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_119hvals(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_119hvals(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hvals (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_118hvals(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_hash_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_118hvals(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hvals", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hvals(__pyx_v_self, __pyx_v_hash_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":570
 *         return self.execute('HVALS %s', (hash_key,))
 * 
 *     cpdef dict hgetall(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_121hgetall(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hgetall(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hgetall", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hgetall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __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_5vedis_5Vedis_121hgetall)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_hash_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_hash_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hash_key);
        __Pyx_GIVEREF(__pyx_v_hash_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":572
 *     cpdef dict hgetall(self, basestring hash_key):
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))             # <<<<<<<<<<<<<<
 *         if results:
 *             return dict(zip(results[::2], results[1::2]))
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HGETALL_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":573
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:             # <<<<<<<<<<<<<<
 *             return dict(zip(results[::2], results[1::2]))
 *         else:
 */
  __pyx_t_7 = (__pyx_v_results != Py_None) && (PyList_GET_SIZE(__pyx_v_results) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":574
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:
 *             return dict(zip(results[::2], results[1::2]))             # <<<<<<<<<<<<<<
 *         else:
 *             return {}
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetItem(__pyx_v_results, __pyx_slice__6); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetItem(__pyx_v_results, __pyx_slice__7); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vedis.pyx":576
 *             return dict(zip(results[::2], results[1::2]))
 *         else:
 *             return {}             # <<<<<<<<<<<<<<
 * 
 *     cpdef list hitems(self, basestring hash_key):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":570
 *         return self.execute('HVALS %s', (hash_key,))
 * 
 *     cpdef dict hgetall(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.hgetall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_121hgetall(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_121hgetall(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hgetall (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_120hgetall(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_hash_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_120hgetall(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hgetall", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hgetall(__pyx_v_self, __pyx_v_hash_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hgetall", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":578
 *             return {}
 * 
 *     cpdef list hitems(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_123hitems(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hitems(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hitems", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hitems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __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_5vedis_5Vedis_123hitems)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_hash_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_hash_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hash_key);
        __Pyx_GIVEREF(__pyx_v_hash_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":580
 *     cpdef list hitems(self, basestring hash_key):
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))             # <<<<<<<<<<<<<<
 *         if results:
 *             return zip(results[::2], results[1::2])
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HGETALL_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":581
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:             # <<<<<<<<<<<<<<
 *             return zip(results[::2], results[1::2])
 *         else:
 */
  __pyx_t_7 = (__pyx_v_results != Py_None) && (PyList_GET_SIZE(__pyx_v_results) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":582
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:
 *             return zip(results[::2], results[1::2])             # <<<<<<<<<<<<<<
 *         else:
 *             return []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetItem(__pyx_v_results, __pyx_slice__8); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetItem(__pyx_v_results, __pyx_slice__9); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vedis.pyx":584
 *             return zip(results[::2], results[1::2])
 *         else:
 *             return []             # <<<<<<<<<<<<<<
 * 
 *     cpdef int hlen(self, basestring hash_key):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":578
 *             return {}
 * 
 *     cpdef list hitems(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('HGETALL %s', (hash_key,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.hitems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_123hitems(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_123hitems(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hitems (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_122hitems(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_hash_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_122hitems(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hitems", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hitems(__pyx_v_self, __pyx_v_hash_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hitems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":586
 *             return []
 * 
 *     cpdef int hlen(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HLEN %s', (hash_key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_125hlen(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_hlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hlen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __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_5vedis_5Vedis_125hlen)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_hash_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_hash_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_hash_key);
        __Pyx_GIVEREF(__pyx_v_hash_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":587
 * 
 *     cpdef int hlen(self, basestring hash_key):
 *         return self.execute('HLEN %s', (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint hexists(self, basestring hash_key, basestring key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HLEN_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":586
 *             return []
 * 
 *     cpdef int hlen(self, basestring hash_key):             # <<<<<<<<<<<<<<
 *         return self.execute('HLEN %s', (hash_key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.hlen", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_125hlen(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_125hlen(PyObject *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hlen (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_124hlen(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_hash_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_124hlen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hlen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_hlen(__pyx_v_self, __pyx_v_hash_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":589
 *         return self.execute('HLEN %s', (hash_key,))
 * 
 *     cpdef bint hexists(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HEXISTS %s %s', (hash_key, key))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_127hexists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hexists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hexists", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hexists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __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_5vedis_5Vedis_127hexists)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":590
 * 
 *     cpdef bint hexists(self, basestring hash_key, basestring key):
 *         return self.execute('HEXISTS %s %s', (hash_key, key))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int hmset(self, basestring hash_key, dict data):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_HEXISTS_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":589
 *         return self.execute('HLEN %s', (hash_key,))
 * 
 *     cpdef bint hexists(self, basestring hash_key, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('HEXISTS %s %s', (hash_key, key))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hexists", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_127hexists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_127hexists(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hexists (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hexists", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hexists") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hexists", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hexists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_126hexists(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_126hexists(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hexists", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_hexists(__pyx_v_self, __pyx_v_hash_key, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hexists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":592
 *         return self.execute('HEXISTS %s %s', (hash_key, key))
 * 
 *     cpdef int hmset(self, basestring hash_key, dict data):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HMSET %%s %s' % self._flatten(data),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_129hmset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_hmset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_data, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmset", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hmset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __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_5vedis_5Vedis_129hmset)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":594
 *     cpdef int hmset(self, basestring hash_key, dict data):
 *         return self.execute(
 *             'HMSET %%s %s' % self._flatten(data),             # <<<<<<<<<<<<<<
 *             (hash_key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten(__pyx_v_self, __pyx_v_data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_HMSET_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":595
 *         return self.execute(
 *             'HMSET %%s %s' % self._flatten(data),
 *             (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef list hmget(self, basestring hash_key, list keys):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);

  /* "vedis.pyx":593
 * 
 *     cpdef int hmset(self, basestring hash_key, dict data):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'HMSET %%s %s' % self._flatten(data),
 *             (hash_key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":592
 *         return self.execute('HEXISTS %s %s', (hash_key, key))
 * 
 *     cpdef int hmset(self, basestring hash_key, dict data):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HMSET %%s %s' % self._flatten(data),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.hmset", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_129hmset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_129hmset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hmset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hmset", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hmset") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_data = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hmset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hmset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyDict_Type), 1, "data", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_128hmset(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_128hmset(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmset", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_hmset(__pyx_v_self, __pyx_v_hash_key, __pyx_v_data, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hmset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":597
 *             (hash_key,))
 * 
 *     cpdef list hmget(self, basestring hash_key, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HMGET %%s %s' % self._flatten_list(keys),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_131hmget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_hmget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmget", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hmget); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __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_5vedis_5Vedis_131hmget)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_hash_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_hash_key);
      __Pyx_GIVEREF(__pyx_v_hash_key);
      __Pyx_INCREF(__pyx_v_keys);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_keys);
      __Pyx_GIVEREF(__pyx_v_keys);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":598
 * 
 *     cpdef list hmget(self, basestring hash_key, list keys):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'HMGET %%s %s' % self._flatten_list(keys),
 *             (hash_key,))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "vedis.pyx":599
 *     cpdef list hmget(self, basestring hash_key, list keys):
 *         return self.execute(
 *             'HMGET %%s %s' % self._flatten_list(keys),             # <<<<<<<<<<<<<<
 *             (hash_key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_HMGET_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":600
 *         return self.execute(
 *             'HMGET %%s %s' % self._flatten_list(keys),
 *             (hash_key,))             # <<<<<<<<<<<<<<
 * 
 *     # Set methods.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_hash_key);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hash_key);
  __Pyx_GIVEREF(__pyx_v_hash_key);

  /* "vedis.pyx":598
 * 
 *     cpdef list hmget(self, basestring hash_key, list keys):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'HMGET %%s %s' % self._flatten_list(keys),
 *             (hash_key,))
 */
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":597
 *             (hash_key,))
 * 
 *     cpdef list hmget(self, basestring hash_key, list keys):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'HMGET %%s %s' % self._flatten_list(keys),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.hmget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_131hmget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_131hmget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_hash_key = 0;
  PyObject *__pyx_v_keys = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hmget (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hash_key,&__pyx_n_s_keys,0};
    PyObject* values[2] = {0,0};
    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_hash_key)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keys)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hmget", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hmget") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_hash_key = ((PyObject*)values[0]);
    __pyx_v_keys = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hmget", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.hmget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hash_key), (&PyBaseString_Type), 1, "hash_key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_130hmget(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_hash_key, __pyx_v_keys);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_130hmget(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_hash_key, PyObject *__pyx_v_keys) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hmget", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_hmget(__pyx_v_self, __pyx_v_hash_key, __pyx_v_keys, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.hmget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":603
 * 
 *     # Set methods.
 *     cpdef int sadd(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SADD %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_133sadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_sadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sadd", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sadd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __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_5vedis_5Vedis_133sadd)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":604
 *     # Set methods.
 *     cpdef int sadd(self, basestring key, basestring value):
 *         return self.execute('SADD %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int smadd(self, basestring key, list values):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SADD_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":603
 * 
 *     # Set methods.
 *     cpdef int sadd(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SADD %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.sadd", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_133sadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_133sadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sadd (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sadd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sadd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sadd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.sadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_132sadd(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_132sadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sadd", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_sadd(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.sadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":606
 *         return self.execute('SADD %s %s', (key, value))
 * 
 *     cpdef int smadd(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'SADD %%s %s' % self._flatten_list(values),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_135smadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_smadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smadd", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_smadd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __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_5vedis_5Vedis_135smadd)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":608
 *     cpdef int smadd(self, basestring key, list values):
 *         return self.execute(
 *             'SADD %%s %s' % self._flatten_list(values),             # <<<<<<<<<<<<<<
 *             (key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SADD_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":609
 *         return self.execute(
 *             'SADD %%s %s' % self._flatten_list(values),
 *             (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int scard(self, basestring key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __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);

  /* "vedis.pyx":607
 * 
 *     cpdef int smadd(self, basestring key, list values):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'SADD %%s %s' % self._flatten_list(values),
 *             (key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":606
 *         return self.execute('SADD %s %s', (key, value))
 * 
 *     cpdef int smadd(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'SADD %%s %s' % self._flatten_list(values),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.smadd", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_135smadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_135smadd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("smadd (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("smadd", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "smadd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("smadd", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.smadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_134smadd(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_134smadd(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smadd", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_smadd(__pyx_v_self, __pyx_v_key, __pyx_v_values, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.smadd", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":611
 *             (key,))
 * 
 *     cpdef int scard(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SCARD %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_137scard(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_scard(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scard", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scard); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __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_5vedis_5Vedis_137scard)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":612
 * 
 *     cpdef int scard(self, basestring key):
 *         return self.execute('SCARD %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint sismember(self, basestring key, basestring value):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SCARD_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":611
 *             (key,))
 * 
 *     cpdef int scard(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SCARD %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.scard", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_137scard(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_137scard(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scard (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_136scard(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_136scard(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scard", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_scard(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.scard", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":614
 *         return self.execute('SCARD %s', (key,))
 * 
 *     cpdef bint sismember(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SISMEMBER %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_139sismember(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_sismember(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sismember", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sismember); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __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_5vedis_5Vedis_139sismember)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":615
 * 
 *     cpdef bint sismember(self, basestring key, basestring value):
 *         return self.execute('SISMEMBER %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring spop(self, basestring key):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SISMEMBER_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":614
 *         return self.execute('SCARD %s', (key,))
 * 
 *     cpdef bint sismember(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SISMEMBER %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.sismember", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_139sismember(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_139sismember(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sismember (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sismember", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sismember") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sismember", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.sismember", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_138sismember(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_138sismember(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sismember", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_sismember(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.sismember", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":617
 *         return self.execute('SISMEMBER %s %s', (key, value))
 * 
 *     cpdef basestring spop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SPOP %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_141spop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_spop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("spop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __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_5vedis_5Vedis_141spop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":618
 * 
 *     cpdef basestring spop(self, basestring key):
 *         return self.execute('SPOP %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring speek(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __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_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SPOP_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":617
 *         return self.execute('SISMEMBER %s %s', (key, value))
 * 
 *     cpdef basestring spop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SPOP %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.spop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_141spop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_141spop(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("spop (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_140spop(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_140spop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("spop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_spop(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.spop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":620
 *         return self.execute('SPOP %s', (key,))
 * 
 *     cpdef basestring speek(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SPEEK %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_143speek(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_speek(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("speek", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_speek); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __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_5vedis_5Vedis_143speek)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":621
 * 
 *     cpdef basestring speek(self, basestring key):
 *         return self.execute('SPEEK %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring stop(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __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_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SPEEK_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":620
 *         return self.execute('SPOP %s', (key,))
 * 
 *     cpdef basestring speek(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SPEEK %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.speek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_143speek(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_143speek(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("speek (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_142speek(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_142speek(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("speek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_speek(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.speek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":623
 *         return self.execute('SPEEK %s', (key,))
 * 
 *     cpdef basestring stop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('STOP %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_145stop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_stop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __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_5vedis_5Vedis_145stop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":624
 * 
 *     cpdef basestring stop(self, basestring key):
 *         return self.execute('STOP %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef bint srem(self, basestring key, basestring value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __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_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_STOP_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":623
 *         return self.execute('SPEEK %s', (key,))
 * 
 *     cpdef basestring stop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('STOP %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_145stop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_145stop(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("stop (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_144stop(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_144stop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_stop(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":626
 *         return self.execute('STOP %s', (key,))
 * 
 *     cpdef bint srem(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SREM %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_147srem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_srem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("srem", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_srem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __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_5vedis_5Vedis_147srem)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":627
 * 
 *     cpdef bint srem(self, basestring key, basestring value):
 *         return self.execute('SREM %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int smrem(self, basestring key, list values):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SREM_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":626
 *         return self.execute('STOP %s', (key,))
 * 
 *     cpdef bint srem(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('SREM %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.srem", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_147srem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_147srem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("srem (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("srem", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "srem") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("srem", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.srem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_146srem(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_146srem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("srem", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_5vedis_5Vedis_srem(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.srem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":629
 *         return self.execute('SREM %s %s', (key, value))
 * 
 *     cpdef int smrem(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'SREM %%s %s' % self._flatten_list(values),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_149smrem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_smrem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smrem", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_smrem); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __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_5vedis_5Vedis_149smrem)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":631
 *     cpdef int smrem(self, basestring key, list values):
 *         return self.execute(
 *             'SREM %%s %s' % self._flatten_list(values),             # <<<<<<<<<<<<<<
 *             (key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SREM_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":632
 *         return self.execute(
 *             'SREM %%s %s' % self._flatten_list(values),
 *             (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef set smembers(self, basestring key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __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);

  /* "vedis.pyx":630
 * 
 *     cpdef int smrem(self, basestring key, list values):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'SREM %%s %s' % self._flatten_list(values),
 *             (key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":629
 *         return self.execute('SREM %s %s', (key, value))
 * 
 *     cpdef int smrem(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'SREM %%s %s' % self._flatten_list(values),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.smrem", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_149smrem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_149smrem(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("smrem (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("smrem", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "smrem") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("smrem", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.smrem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_148smrem(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_148smrem(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smrem", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_smrem(__pyx_v_self, __pyx_v_key, __pyx_v_values, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.smrem", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":634
 *             (key,))
 * 
 *     cpdef set smembers(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SMEMBERS %s', (key,))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_151smembers(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_smembers(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smembers", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_smembers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __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_5vedis_5Vedis_151smembers)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PySet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":636
 *     cpdef set smembers(self, basestring key):
 *         cdef list results
 *         results = self.execute('SMEMBERS %s', (key,))             # <<<<<<<<<<<<<<
 *         return set(results)
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __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_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SMEMBERS_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":637
 *         cdef list results
 *         results = self.execute('SMEMBERS %s', (key,))
 *         return set(results)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set sdiff(self, basestring k1, basestring k2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PySet_New(__pyx_v_results); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":634
 *             (key,))
 * 
 *     cpdef set smembers(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SMEMBERS %s', (key,))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.smembers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_151smembers(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_151smembers(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("smembers (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_150smembers(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_150smembers(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smembers", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_smembers(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.smembers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":639
 *         return set(results)
 * 
 *     cpdef set sdiff(self, basestring k1, basestring k2):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SDIFF %s %s', (k1, k2))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_153sdiff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_sdiff(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sdiff", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sdiff); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __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_5vedis_5Vedis_153sdiff)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_k1);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_k1);
      __Pyx_GIVEREF(__pyx_v_k1);
      __Pyx_INCREF(__pyx_v_k2);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_k2);
      __Pyx_GIVEREF(__pyx_v_k2);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PySet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":641
 *     cpdef set sdiff(self, basestring k1, basestring k2):
 *         cdef list results
 *         results = self.execute('SDIFF %s %s', (k1, k2))             # <<<<<<<<<<<<<<
 *         return set(results)
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_k1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_k1);
  __Pyx_GIVEREF(__pyx_v_k1);
  __Pyx_INCREF(__pyx_v_k2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_k2);
  __Pyx_GIVEREF(__pyx_v_k2);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SDIFF_s_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":642
 *         cdef list results
 *         results = self.execute('SDIFF %s %s', (k1, k2))
 *         return set(results)             # <<<<<<<<<<<<<<
 * 
 *     cpdef set sinter(self, basestring k1, basestring k2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PySet_New(__pyx_v_results); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":639
 *         return set(results)
 * 
 *     cpdef set sdiff(self, basestring k1, basestring k2):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SDIFF %s %s', (k1, k2))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.sdiff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_153sdiff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_153sdiff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_k1 = 0;
  PyObject *__pyx_v_k2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sdiff (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k1,&__pyx_n_s_k2,0};
    PyObject* values[2] = {0,0};
    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_k1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sdiff", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sdiff") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_k1 = ((PyObject*)values[0]);
    __pyx_v_k2 = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sdiff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.sdiff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_k1), (&PyBaseString_Type), 1, "k1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_k2), (&PyBaseString_Type), 1, "k2", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_152sdiff(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_k1, __pyx_v_k2);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_152sdiff(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sdiff", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_sdiff(__pyx_v_self, __pyx_v_k1, __pyx_v_k2, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.sdiff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":644
 *         return set(results)
 * 
 *     cpdef set sinter(self, basestring k1, basestring k2):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SINTER %s %s', (k1, k2))
 */

static PyObject *__pyx_pw_5vedis_5Vedis_155sinter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_sinter(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_results = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sinter", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sinter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __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_5vedis_5Vedis_155sinter)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_k1);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_k1);
      __Pyx_GIVEREF(__pyx_v_k1);
      __Pyx_INCREF(__pyx_v_k2);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_k2);
      __Pyx_GIVEREF(__pyx_v_k2);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(PySet_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":646
 *     cpdef set sinter(self, basestring k1, basestring k2):
 *         cdef list results
 *         results = self.execute('SINTER %s %s', (k1, k2))             # <<<<<<<<<<<<<<
 *         return set(results)
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_k1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_k1);
  __Pyx_GIVEREF(__pyx_v_k1);
  __Pyx_INCREF(__pyx_v_k2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_k2);
  __Pyx_GIVEREF(__pyx_v_k2);
  __pyx_t_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SINTER_s_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_results = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":647
 *         cdef list results
 *         results = self.execute('SINTER %s %s', (k1, k2))
 *         return set(results)             # <<<<<<<<<<<<<<
 * 
 *     cpdef int slen(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PySet_New(__pyx_v_results); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":644
 *         return set(results)
 * 
 *     cpdef set sinter(self, basestring k1, basestring k2):             # <<<<<<<<<<<<<<
 *         cdef list results
 *         results = self.execute('SINTER %s %s', (k1, k2))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.Vedis.sinter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_results);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_155sinter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_155sinter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_k1 = 0;
  PyObject *__pyx_v_k2 = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sinter (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_k1,&__pyx_n_s_k2,0};
    PyObject* values[2] = {0,0};
    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_k1)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sinter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sinter") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_k1 = ((PyObject*)values[0]);
    __pyx_v_k2 = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sinter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.sinter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_k1), (&PyBaseString_Type), 1, "k1", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_k2), (&PyBaseString_Type), 1, "k2", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_154sinter(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_k1, __pyx_v_k2);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_154sinter(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_k1, PyObject *__pyx_v_k2) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sinter", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_sinter(__pyx_v_self, __pyx_v_k1, __pyx_v_k2, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.sinter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":649
 *         return set(results)
 * 
 *     cpdef int slen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SLEN %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_157slen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_slen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_slen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __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_5vedis_5Vedis_157slen)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":650
 * 
 *     cpdef int slen(self, basestring key):
 *         return self.execute('SLEN %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     # List methods.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_SLEN_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":649
 *         return set(results)
 * 
 *     cpdef int slen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('SLEN %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.slen", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_157slen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_157slen(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("slen (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_156slen(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_156slen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("slen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_slen(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.slen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":653
 * 
 *     # List methods.
 *     cpdef basestring lindex(self, basestring key, int index):             # <<<<<<<<<<<<<<
 *         return self.execute('LINDEX %%s %s' % index, (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_159lindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_lindex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_index, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lindex", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __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_5vedis_5Vedis_159lindex)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":654
 *     # List methods.
 *     cpdef basestring lindex(self, basestring key, int index):
 *         return self.execute('LINDEX %%s %s' % index, (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int llen(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_LINDEX_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __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_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_4 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":653
 * 
 *     # List methods.
 *     cpdef basestring lindex(self, basestring key, int index):             # <<<<<<<<<<<<<<
 *         return self.execute('LINDEX %%s %s' % index, (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vedis.Vedis.lindex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_159lindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_159lindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  int __pyx_v_index;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lindex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_index,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_index = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.lindex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_158lindex(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_index);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_158lindex(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lindex", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_lindex(__pyx_v_self, __pyx_v_key, __pyx_v_index, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lindex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":656
 *         return self.execute('LINDEX %%s %s' % index, (key,))
 * 
 *     cpdef int llen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('LLEN %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_161llen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_f_5vedis_5Vedis_llen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("llen", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_llen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __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_5vedis_5Vedis_161llen)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":657
 * 
 *     cpdef int llen(self, basestring key):
 *         return self.execute('LLEN %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef basestring lpop(self, basestring key):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __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_7.__pyx_n = 1;
  __pyx_t_7.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_LLEN_s), 0, &__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "vedis.pyx":656
 *         return self.execute('LINDEX %%s %s' % index, (key,))
 * 
 *     cpdef int llen(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('LLEN %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("vedis.Vedis.llen", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_161llen(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_161llen(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("llen (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_160llen(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_160llen(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("llen", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_llen(__pyx_v_self, __pyx_v_key, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.llen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":659
 *         return self.execute('LLEN %s', (key,))
 * 
 *     cpdef basestring lpop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('LPOP %s', (key,))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_163lpop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_lpop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lpop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __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_5vedis_5Vedis_163lpop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_r = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":660
 * 
 *     cpdef basestring lpop(self, basestring key):
 *         return self.execute('LPOP %s', (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int lpush(self, basestring key, basestring value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __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_6.__pyx_n = 1;
  __pyx_t_6.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_LPOP_s), 0, &__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":659
 *         return self.execute('LLEN %s', (key,))
 * 
 *     cpdef basestring lpop(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.execute('LPOP %s', (key,))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.lpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_163lpop(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_163lpop(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lpop (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_162lpop(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_162lpop(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_lpop(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":662
 *         return self.execute('LPOP %s', (key,))
 * 
 *     cpdef int lpush(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('LPUSH %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_165lpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_lpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpush", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lpush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __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_5vedis_5Vedis_165lpush)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":663
 * 
 *     cpdef int lpush(self, basestring key, basestring value):
 *         return self.execute('LPUSH %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int lmpush(self, basestring key, list values):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_LPUSH_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":662
 *         return self.execute('LPOP %s', (key,))
 * 
 *     cpdef int lpush(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('LPUSH %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.lpush", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_165lpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_165lpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lpush (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lpush", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lpush") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lpush", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.lpush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_164lpush(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_164lpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpush", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_lpush(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lpush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":665
 *         return self.execute('LPUSH %s %s', (key, value))
 * 
 *     cpdef int lmpush(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'LPUSH %%s %s' % self._flatten_list(values),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_167lmpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_lmpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lmpush", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lmpush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __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_5vedis_5Vedis_167lmpush)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":667
 *     cpdef int lmpush(self, basestring key, list values):
 *         return self.execute(
 *             'LPUSH %%s %s' % self._flatten_list(values),             # <<<<<<<<<<<<<<
 *             (key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_LPUSH_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":668
 *         return self.execute(
 *             'LPUSH %%s %s' % self._flatten_list(values),
 *             (key,))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int lpushx(self, basestring key, basestring value):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __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);

  /* "vedis.pyx":666
 * 
 *     cpdef int lmpush(self, basestring key, list values):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'LPUSH %%s %s' % self._flatten_list(values),
 *             (key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":665
 *         return self.execute('LPUSH %s %s', (key, value))
 * 
 *     cpdef int lmpush(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'LPUSH %%s %s' % self._flatten_list(values),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.lmpush", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_167lmpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_167lmpush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lmpush (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lmpush", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lmpush") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lmpush", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.lmpush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_166lmpush(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_166lmpush(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lmpush", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_lmpush(__pyx_v_self, __pyx_v_key, __pyx_v_values, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lmpush", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":670
 *             (key,))
 * 
 *     cpdef int lpushx(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('LPUSHX %s %s', (key, value))
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_169lpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_lpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpushx", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lpushx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __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_5vedis_5Vedis_169lpushx)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":671
 * 
 *     cpdef int lpushx(self, basestring key, basestring value):
 *         return self.execute('LPUSHX %s %s', (key, value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef int lmpushx(self, basestring key, list values):
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __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_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_kp_s_LPUSHX_s_s), 0, &__pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":670
 *             (key,))
 * 
 *     cpdef int lpushx(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.execute('LPUSHX %s %s', (key, value))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.lpushx", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_169lpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_169lpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lpushx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lpushx", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lpushx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lpushx", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.lpushx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_168lpushx(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_168lpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lpushx", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_lpushx(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lpushx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":673
 *         return self.execute('LPUSHX %s %s', (key, value))
 * 
 *     cpdef int lmpushx(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'LPUSHX %%s %s' % self._flatten_list(values),
 */

static PyObject *__pyx_pw_5vedis_5Vedis_171lmpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_5vedis_5Vedis_lmpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lmpushx", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lmpushx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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_5vedis_5Vedis_171lmpushx)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_7;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":675
 *     cpdef int lmpushx(self, basestring key, list values):
 *         return self.execute(
 *             'LPUSHX %%s %s' % self._flatten_list(values),             # <<<<<<<<<<<<<<
 *             (key,))
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_v_self, __pyx_v_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_LPUSHX_s_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":676
 *         return self.execute(
 *             'LPUSHX %%s %s' % self._flatten_list(values),
 *             (key,))             # <<<<<<<<<<<<<<
 * 
 *     # Internal helpers.
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __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);

  /* "vedis.pyx":674
 * 
 *     cpdef int lmpushx(self, basestring key, list values):
 *         return self.execute(             # <<<<<<<<<<<<<<
 *             'LPUSHX %%s %s' % self._flatten_list(values),
 *             (key,))
 */
  __pyx_t_8.__pyx_n = 1;
  __pyx_t_8.params = ((PyObject*)__pyx_t_1);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->execute(__pyx_v_self, ((PyObject*)__pyx_t_2), 0, &__pyx_t_8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "vedis.pyx":673
 *         return self.execute('LPUSHX %s %s', (key, value))
 * 
 *     cpdef int lmpushx(self, basestring key, list values):             # <<<<<<<<<<<<<<
 *         return self.execute(
 *             'LPUSHX %%s %s' % self._flatten_list(values),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("vedis.Vedis.lmpushx", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_171lmpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_171lmpushx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lmpushx (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lmpushx", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lmpushx") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lmpushx", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Vedis.lmpushx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_170lmpushx(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), __pyx_v_key, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_170lmpushx(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lmpushx", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5vedis_5Vedis_lmpushx(__pyx_v_self, __pyx_v_key, __pyx_v_values, 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lmpushx", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vedis_5Vedis_13_flatten_list_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vedis.pyx":681
 *     cdef basestring _flatten_list(self, list args):
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)             # <<<<<<<<<<<<<<
 * 
 *     cdef basestring _flatten(self, dict kwargs):
 */

static PyObject *__pyx_pf_5vedis_5Vedis_13_flatten_list_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5vedis___pyx_scope_struct_2_genexpr(__pyx_ptype_5vedis___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vedis_5Vedis_13_flatten_list_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_Vedis__flatten_list_locals_genex); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("vedis.Vedis._flatten_list.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vedis_5Vedis_13_flatten_list_2generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_cur_scope->__pyx_v_key))||((__pyx_cur_scope->__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_cur_scope->__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_vtab)->_escape(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, ((PyObject*)__pyx_cur_scope->__pyx_v_key)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vedis.pyx":679
 * 
 *     # Internal helpers.
 *     cdef basestring _flatten_list(self, list args):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)
 */

static PyObject *__pyx_f_5vedis_5Vedis__flatten_list(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flatten_list", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)__pyx_tp_new_5vedis___pyx_scope_struct_1__flatten_list(__pyx_ptype_5vedis___pyx_scope_struct_1__flatten_list, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return 0;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);

  /* "vedis.pyx":681
 *     cdef basestring _flatten_list(self, list args):
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)             # <<<<<<<<<<<<<<
 * 
 *     cdef basestring _flatten(self, dict kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_pf_5vedis_5Vedis_13_flatten_list_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":679
 * 
 *     # Internal helpers.
 *     cdef basestring _flatten_list(self, list args):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(self._escape(key) for key in args)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis._flatten_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vedis_5Vedis_8_flatten_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vedis.pyx":686
 *         cdef basestring key
 *         return ' '.join(
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))             # <<<<<<<<<<<<<<
 *             for key in kwargs)
 * 
 */

static PyObject *__pyx_pf_5vedis_5Vedis_8_flatten_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)__pyx_tp_new_5vedis___pyx_scope_struct_4_genexpr(__pyx_ptype_5vedis___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *) __pyx_self;
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vedis_5Vedis_8_flatten_2generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_Vedis__flatten_locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("vedis.Vedis._flatten.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vedis_5Vedis_8_flatten_2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":687
 *         return ' '.join(
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))
 *             for key in kwargs)             # <<<<<<<<<<<<<<
 * 
 *     cdef basestring _escape(self, basestring s):
 */
  __pyx_t_2 = 0;
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs)) { __Pyx_RaiseClosureNameError("kwargs"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs, 1, ((PyObject *)NULL), (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, NULL, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_6 == 0)) break;
    if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;

    /* "vedis.pyx":686
 *         cdef basestring key
 *         return ' '.join(
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))             # <<<<<<<<<<<<<<
 *             for key in kwargs)
 * 
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_cur_scope->__pyx_v_key))||((__pyx_cur_scope->__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_cur_scope->__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_vtab)->_escape(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, ((PyObject*)__pyx_cur_scope->__pyx_v_key)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs)) { __Pyx_RaiseClosureNameError("kwargs"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kwargs, __pyx_cur_scope->__pyx_v_key); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->__pyx_vtab)->_escape(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, ((PyObject*)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_8);
    __pyx_t_5 = 0;
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __pyx_cur_scope->__pyx_t_3 = __pyx_t_4;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    __pyx_t_4 = __pyx_cur_scope->__pyx_t_3;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vedis.pyx":683
 *         return ' '.join(self._escape(key) for key in args)
 * 
 *     cdef basestring _flatten(self, dict kwargs):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(
 */

static PyObject *__pyx_f_5vedis_5Vedis__flatten(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_flatten", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)__pyx_tp_new_5vedis___pyx_scope_struct_3__flatten(__pyx_ptype_5vedis___pyx_scope_struct_3__flatten, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return 0;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_kwargs = __pyx_v_kwargs;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_kwargs);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_kwargs);

  /* "vedis.pyx":685
 *     cdef basestring _flatten(self, dict kwargs):
 *         cdef basestring key
 *         return ' '.join(             # <<<<<<<<<<<<<<
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))
 *             for key in kwargs)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "vedis.pyx":686
 *         cdef basestring key
 *         return ' '.join(
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))             # <<<<<<<<<<<<<<
 *             for key in kwargs)
 * 
 */
  __pyx_t_1 = __pyx_pf_5vedis_5Vedis_8_flatten_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "vedis.pyx":685
 *     cdef basestring _flatten(self, dict kwargs):
 *         cdef basestring key
 *         return ' '.join(             # <<<<<<<<<<<<<<
 *             '%s %s' % (self._escape(key), self._escape(kwargs[key]))
 *             for key in kwargs)
 */
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":683
 *         return ' '.join(self._escape(key) for key in args)
 * 
 *     cdef basestring _flatten(self, dict kwargs):             # <<<<<<<<<<<<<<
 *         cdef basestring key
 *         return ' '.join(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis._flatten", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":689
 *             for key in kwargs)
 * 
 *     cdef basestring _escape(self, basestring s):             # <<<<<<<<<<<<<<
 *         return '"%s"' % str(s).replace('"', '\\"')
 * 
 */

static PyObject *__pyx_f_5vedis_5Vedis__escape(CYTHON_UNUSED struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_escape", 0);

  /* "vedis.pyx":690
 * 
 *     cdef basestring _escape(self, basestring s):
 *         return '"%s"' % str(s).replace('"', '\\"')             # <<<<<<<<<<<<<<
 * 
 *     def lib_version(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_s);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":689
 *             for key in kwargs)
 * 
 *     cdef basestring _escape(self, basestring s):             # <<<<<<<<<<<<<<
 *         return '"%s"' % str(s).replace('"', '\\"')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis._escape", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":692
 *         return '"%s"' % str(s).replace('"', '\\"')
 * 
 *     def lib_version(self):             # <<<<<<<<<<<<<<
 *         return vedis_lib_version()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_173lib_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_173lib_version(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lib_version (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_172lib_version(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_172lib_version(CYTHON_UNUSED struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lib_version", 0);

  /* "vedis.pyx":693
 * 
 *     def lib_version(self):
 *         return vedis_lib_version()             # <<<<<<<<<<<<<<
 * 
 *     cpdef Hash(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(vedis_lib_version()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":692
 *         return '"%s"' % str(s).replace('"', '\\"')
 * 
 *     def lib_version(self):             # <<<<<<<<<<<<<<
 *         return vedis_lib_version()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.lib_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":695
 *         return vedis_lib_version()
 * 
 *     cpdef Hash(self, basestring key):             # <<<<<<<<<<<<<<
 *         return Hash(self, key)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_175Hash(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_Hash(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Hash", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Hash); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __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_5vedis_5Vedis_175Hash)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":696
 * 
 *     cpdef Hash(self, basestring key):
 *         return Hash(self, key)             # <<<<<<<<<<<<<<
 * 
 *     cpdef Set(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5vedis_Hash)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":695
 *         return vedis_lib_version()
 * 
 *     cpdef Hash(self, basestring key):             # <<<<<<<<<<<<<<
 *         return Hash(self, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.Hash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_175Hash(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_175Hash(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Hash (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_174Hash(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_174Hash(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Hash", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_Hash(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.Hash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":698
 *         return Hash(self, key)
 * 
 *     cpdef Set(self, basestring key):             # <<<<<<<<<<<<<<
 *         return Set(self, key)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_177Set(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_Set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Set", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __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_5vedis_5Vedis_177Set)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":699
 * 
 *     cpdef Set(self, basestring key):
 *         return Set(self, key)             # <<<<<<<<<<<<<<
 * 
 *     cpdef List(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5vedis_Set)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":698
 *         return Hash(self, key)
 * 
 *     cpdef Set(self, basestring key):             # <<<<<<<<<<<<<<
 *         return Set(self, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.Set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_177Set(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_177Set(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("Set (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_176Set(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_176Set(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Set", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_Set(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.Set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":701
 *         return Set(self, key)
 * 
 *     cpdef List(self, basestring key):             # <<<<<<<<<<<<<<
 *         return List(self, key)
 * 
 */

static PyObject *__pyx_pw_5vedis_5Vedis_179List(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_5Vedis_List(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("List", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_List); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __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_5vedis_5Vedis_179List)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":702
 * 
 *     cpdef List(self, basestring key):
 *         return List(self, key)             # <<<<<<<<<<<<<<
 * 
 *     def register(self, command_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_key);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5vedis_List)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":701
 *         return Set(self, key)
 * 
 *     cpdef List(self, basestring key):             # <<<<<<<<<<<<<<
 *         return List(self, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.Vedis.List", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_179List(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_179List(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("List (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_5Vedis_178List(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_178List(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("List", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_5Vedis_List(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.List", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":704
 *         return List(self, key)
 * 
 *     def register(self, command_name):             # <<<<<<<<<<<<<<
 *         def decorator(fn):
 *             cdef vedis_command command_callback
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_181register(PyObject *__pyx_v_self, PyObject *__pyx_v_command_name); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_181register(PyObject *__pyx_v_self, PyObject *__pyx_v_command_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("register (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_180register(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject *)__pyx_v_command_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":705
 * 
 *     def register(self, command_name):
 *         def decorator(fn):             # <<<<<<<<<<<<<<
 *             cdef vedis_command command_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_8register_1decorator(PyObject *__pyx_self, PyObject *__pyx_v_fn); /*proto*/
static PyMethodDef __pyx_mdef_5vedis_5Vedis_8register_1decorator = {"decorator", (PyCFunction)__pyx_pw_5vedis_5Vedis_8register_1decorator, METH_O, 0};
static PyObject *__pyx_pw_5vedis_5Vedis_8register_1decorator(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("decorator (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_8register_decorator(__pyx_self, ((PyObject *)__pyx_v_fn));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":716
 *                 <void *>command_name))
 * 
 *             def wrapper(*args):             # <<<<<<<<<<<<<<
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_8register_9decorator_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5vedis_5Vedis_8register_9decorator_1wrapper = {"wrapper", (PyCFunction)__pyx_pw_5vedis_5Vedis_8register_9decorator_1wrapper, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5vedis_5Vedis_8register_9decorator_1wrapper(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("wrapper (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "wrapper", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_5vedis_5Vedis_8register_9decorator_wrapper(__pyx_self, __pyx_v_args);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_8register_9decorator_wrapper(PyObject *__pyx_self, PyObject *__pyx_v_args) {
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_cur_scope;
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_outer_scope;
  PyObject *__pyx_v_direct_params = NULL;
  PyObject *__pyx_v_params = NULL;
  PyObject *__pyx_v_command_string = NULL;
  PyObject *__pyx_v_arg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  struct __pyx_opt_args_5vedis_5Vedis_execute __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapper", 0);
  __pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "vedis.pyx":717
 * 
 *             def wrapper(*args):
 *                 direct_params, params = [], []             # <<<<<<<<<<<<<<
 *                 command_string = [command_name]
 *                 for arg in args:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_direct_params = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_params = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":718
 *             def wrapper(*args):
 *                 direct_params, params = [], []
 *                 command_string = [command_name]             # <<<<<<<<<<<<<<
 *                 for arg in args:
 *                     if isinstance(arg, (list, tuple)):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_command_name)) { __Pyx_RaiseClosureNameError("command_name"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_command_name);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_command_name);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_command_name);
  __pyx_v_command_string = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "vedis.pyx":719
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 *                 for arg in args:             # <<<<<<<<<<<<<<
 *                     if isinstance(arg, (list, tuple)):
 *                         direct_params.append(self._flatten_list(arg))
 */
  __pyx_t_2 = __pyx_v_args; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "vedis.pyx":720
 *                 command_string = [command_name]
 *                 for arg in args:
 *                     if isinstance(arg, (list, tuple)):             # <<<<<<<<<<<<<<
 *                         direct_params.append(self._flatten_list(arg))
 *                         command_string.append('%s')
 */
    __pyx_t_5 = PyList_Check(__pyx_v_arg); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_4 = __pyx_t_6;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_6 = PyTuple_Check(__pyx_v_arg); 
    __pyx_t_5 = (__pyx_t_6 != 0);
    __pyx_t_4 = __pyx_t_5;
    __pyx_L6_bool_binop_done:;
    __pyx_t_5 = (__pyx_t_4 != 0);
    if (__pyx_t_5) {

      /* "vedis.pyx":721
 *                 for arg in args:
 *                     if isinstance(arg, (list, tuple)):
 *                         direct_params.append(self._flatten_list(arg))             # <<<<<<<<<<<<<<
 *                         command_string.append('%s')
 *                     elif isinstance(arg, dict):
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      if (!(likely(PyList_CheckExact(__pyx_v_arg))||((__pyx_v_arg) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_arg)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_flatten_list(__pyx_cur_scope->__pyx_v_self, ((PyObject*)__pyx_v_arg)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_direct_params, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "vedis.pyx":722
 *                     if isinstance(arg, (list, tuple)):
 *                         direct_params.append(self._flatten_list(arg))
 *                         command_string.append('%s')             # <<<<<<<<<<<<<<
 *                     elif isinstance(arg, dict):
 *                         direct_params.append(self._flatten(arg))
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_command_string, __pyx_kp_s_s_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }

    /* "vedis.pyx":723
 *                         direct_params.append(self._flatten_list(arg))
 *                         command_string.append('%s')
 *                     elif isinstance(arg, dict):             # <<<<<<<<<<<<<<
 *                         direct_params.append(self._flatten(arg))
 *                         command_string.append('%s')
 */
    __pyx_t_5 = PyDict_Check(__pyx_v_arg); 
    __pyx_t_4 = (__pyx_t_5 != 0);
    if (__pyx_t_4) {

      /* "vedis.pyx":724
 *                         command_string.append('%s')
 *                     elif isinstance(arg, dict):
 *                         direct_params.append(self._flatten(arg))             # <<<<<<<<<<<<<<
 *                         command_string.append('%s')
 *                     else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
      if (!(likely(PyDict_CheckExact(__pyx_v_arg))||((__pyx_v_arg) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_arg)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_flatten(__pyx_cur_scope->__pyx_v_self, ((PyObject*)__pyx_v_arg)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_direct_params, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "vedis.pyx":725
 *                     elif isinstance(arg, dict):
 *                         direct_params.append(self._flatten(arg))
 *                         command_string.append('%s')             # <<<<<<<<<<<<<<
 *                     else:
 *                         params.append(arg)
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_command_string, __pyx_kp_s_s_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "vedis.pyx":727
 *                         command_string.append('%s')
 *                     else:
 *                         params.append(arg)             # <<<<<<<<<<<<<<
 *                         command_string.append('%%s')
 * 
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_params, __pyx_v_arg); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "vedis.pyx":728
 *                     else:
 *                         params.append(arg)
 *                         command_string.append('%%s')             # <<<<<<<<<<<<<<
 * 
 *                 return self.execute(
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_command_string, __pyx_kp_s_s_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "vedis.pyx":719
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 *                 for arg in args:             # <<<<<<<<<<<<<<
 *                     if isinstance(arg, (list, tuple)):
 *                         direct_params.append(self._flatten_list(arg))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":730
 *                         command_string.append('%%s')
 * 
 *                 return self.execute(             # <<<<<<<<<<<<<<
 *                     ' '.join(command_string) % direct_params,
 *                     tuple(params))
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }

  /* "vedis.pyx":731
 * 
 *                 return self.execute(
 *                     ' '.join(command_string) % direct_params,             # <<<<<<<<<<<<<<
 *                     tuple(params))
 * 
 */
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__10, __pyx_v_command_string); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Remainder(__pyx_t_2, __pyx_v_direct_params); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":732
 *                 return self.execute(
 *                     ' '.join(command_string) % direct_params,
 *                     tuple(params))             # <<<<<<<<<<<<<<
 * 
 *             wrapper.wrapped = fn
 */
  __pyx_t_2 = PyList_AsTuple(__pyx_v_params); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "vedis.pyx":730
 *                         command_string.append('%%s')
 * 
 *                 return self.execute(             # <<<<<<<<<<<<<<
 *                     ' '.join(command_string) % direct_params,
 *                     tuple(params))
 */
  __pyx_t_9.__pyx_n = 1;
  __pyx_t_9.params = ((PyObject*)__pyx_t_2);
  __pyx_t_8 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->execute(__pyx_cur_scope->__pyx_v_self, ((PyObject*)__pyx_t_1), 0, &__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":716
 *                 <void *>command_name))
 * 
 *             def wrapper(*args):             # <<<<<<<<<<<<<<
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vedis.Vedis.register.decorator.wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_direct_params);
  __Pyx_XDECREF(__pyx_v_params);
  __Pyx_XDECREF(__pyx_v_command_string);
  __Pyx_XDECREF(__pyx_v_arg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":705
 * 
 *     def register(self, command_name):
 *         def decorator(fn):             # <<<<<<<<<<<<<<
 *             cdef vedis_command command_callback
 * 
 */

static PyObject *__pyx_pf_5vedis_5Vedis_8register_decorator(PyObject *__pyx_self, PyObject *__pyx_v_fn) {
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_cur_scope;
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_outer_scope;
  __pyx_t_5vedis_vedis_command __pyx_v_command_callback;
  PyObject *__pyx_v_wrapper = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("decorator", 0);
  __pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "vedis.pyx":708
 *             cdef vedis_command command_callback
 * 
 *             py_command_registry[command_name] = fn             # <<<<<<<<<<<<<<
 *             command_callback = py_command_wrapper
 *             self.check_call(vedis_register_command(
 */
  if (unlikely(__pyx_v_5vedis_py_command_registry == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (unlikely(!__pyx_cur_scope->__pyx_v_command_name)) { __Pyx_RaiseClosureNameError("command_name"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  if (unlikely(PyDict_SetItem(__pyx_v_5vedis_py_command_registry, __pyx_cur_scope->__pyx_v_command_name, __pyx_v_fn) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":709
 * 
 *             py_command_registry[command_name] = fn
 *             command_callback = py_command_wrapper             # <<<<<<<<<<<<<<
 *             self.check_call(vedis_register_command(
 *                 self.database,
 */
  __pyx_v_command_callback = __pyx_f_5vedis_py_command_wrapper;

  /* "vedis.pyx":710
 *             py_command_registry[command_name] = fn
 *             command_callback = py_command_wrapper
 *             self.check_call(vedis_register_command(             # <<<<<<<<<<<<<<
 *                 self.database,
 *                 <const char *>command_name,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }

  /* "vedis.pyx":711
 *             command_callback = py_command_wrapper
 *             self.check_call(vedis_register_command(
 *                 self.database,             # <<<<<<<<<<<<<<
 *                 <const char *>command_name,
 *                 command_callback,
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }

  /* "vedis.pyx":712
 *             self.check_call(vedis_register_command(
 *                 self.database,
 *                 <const char *>command_name,             # <<<<<<<<<<<<<<
 *                 command_callback,
 *                 <void *>command_name))
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_command_name)) { __Pyx_RaiseClosureNameError("command_name"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_cur_scope->__pyx_v_command_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":714
 *                 <const char *>command_name,
 *                 command_callback,
 *                 <void *>command_name))             # <<<<<<<<<<<<<<
 * 
 *             def wrapper(*args):
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_command_name)) { __Pyx_RaiseClosureNameError("command_name"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }

  /* "vedis.pyx":710
 *             py_command_registry[command_name] = fn
 *             command_callback = py_command_wrapper
 *             self.check_call(vedis_register_command(             # <<<<<<<<<<<<<<
 *                 self.database,
 *                 <const char *>command_name,
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->check_call(__pyx_cur_scope->__pyx_v_self, vedis_register_command(__pyx_cur_scope->__pyx_v_self->database, ((char const *)__pyx_t_1), __pyx_v_command_callback, ((void *)__pyx_cur_scope->__pyx_v_command_name))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":716
 *                 <void *>command_name))
 * 
 *             def wrapper(*args):             # <<<<<<<<<<<<<<
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 */
  __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vedis_5Vedis_8register_9decorator_1wrapper, 0, __pyx_n_s_register_locals_decorator_locals, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vedis, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_wrapper = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "vedis.pyx":734
 *                     tuple(params))
 * 
 *             wrapper.wrapped = fn             # <<<<<<<<<<<<<<
 * 
 *             return wrapper
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_wrapper, __pyx_n_s_wrapped, __pyx_v_fn) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":736
 *             wrapper.wrapped = fn
 * 
 *             return wrapper             # <<<<<<<<<<<<<<
 *         return decorator
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_wrapper);
  __pyx_r = __pyx_v_wrapper;
  goto __pyx_L0;

  /* "vedis.pyx":705
 * 
 *     def register(self, command_name):
 *         def decorator(fn):             # <<<<<<<<<<<<<<
 *             cdef vedis_command command_callback
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis.register.decorator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_wrapper);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":704
 *         return List(self, key)
 * 
 *     def register(self, command_name):             # <<<<<<<<<<<<<<
 *         def decorator(fn):
 *             cdef vedis_command command_callback
 */

static PyObject *__pyx_pf_5vedis_5Vedis_180register(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_command_name) {
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_cur_scope;
  PyObject *__pyx_v_decorator = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("register", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *)__pyx_tp_new_5vedis___pyx_scope_struct_5_register(__pyx_ptype_5vedis___pyx_scope_struct_5_register, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_command_name = __pyx_v_command_name;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_command_name);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_command_name);

  /* "vedis.pyx":705
 * 
 *     def register(self, command_name):
 *         def decorator(fn):             # <<<<<<<<<<<<<<
 *             cdef vedis_command command_callback
 * 
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vedis_5Vedis_8register_1decorator, 0, __pyx_n_s_register_locals_decorator, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vedis, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_decorator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vedis.pyx":737
 * 
 *             return wrapper
 *         return decorator             # <<<<<<<<<<<<<<
 * 
 *     def delete_command(self, command_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_decorator);
  __pyx_r = __pyx_v_decorator;
  goto __pyx_L0;

  /* "vedis.pyx":704
 *         return List(self, key)
 * 
 *     def register(self, command_name):             # <<<<<<<<<<<<<<
 *         def decorator(fn):
 *             cdef vedis_command command_callback
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_decorator);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":739
 *         return decorator
 * 
 *     def delete_command(self, command_name):             # <<<<<<<<<<<<<<
 *         self.check_call(vedis_delete_command(
 *             self.database,
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_183delete_command(PyObject *__pyx_v_self, PyObject *__pyx_v_command_name); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_183delete_command(PyObject *__pyx_v_self, PyObject *__pyx_v_command_name) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete_command (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_182delete_command(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self), ((PyObject *)__pyx_v_command_name));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_182delete_command(struct __pyx_obj_5vedis_Vedis *__pyx_v_self, PyObject *__pyx_v_command_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delete_command", 0);

  /* "vedis.pyx":742
 *         self.check_call(vedis_delete_command(
 *             self.database,
 *             <const char *>command_name))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_command_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":740
 * 
 *     def delete_command(self, command_name):
 *         self.check_call(vedis_delete_command(             # <<<<<<<<<<<<<<
 *             self.database,
 *             <const char *>command_name))
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->__pyx_vtab)->check_call(__pyx_v_self, vedis_delete_command(__pyx_v_self->database, ((char const *)__pyx_t_1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "vedis.pyx":739
 *         return decorator
 * 
 *     def delete_command(self, command_name):             # <<<<<<<<<<<<<<
 *         self.check_call(vedis_delete_command(
 *             self.database,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Vedis.delete_command", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":212
 *     """
 *     cdef vedis *database
 *     cdef readonly bint is_memory             # <<<<<<<<<<<<<<
 *     cdef readonly bint is_open
 *     cdef readonly basestring filename
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_9is_memory_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_9is_memory_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_9is_memory___get__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_9is_memory___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_memory); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.is_memory.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":213
 *     cdef vedis *database
 *     cdef readonly bint is_memory
 *     cdef readonly bint is_open             # <<<<<<<<<<<<<<
 *     cdef readonly basestring filename
 *     cdef bint open_database
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_7is_open_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_7is_open_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_7is_open___get__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_7is_open___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_open); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Vedis.is_open.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":214
 *     cdef readonly bint is_memory
 *     cdef readonly bint is_open
 *     cdef readonly basestring filename             # <<<<<<<<<<<<<<
 *     cdef bint open_database
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_5Vedis_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_5Vedis_8filename_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_5Vedis_8filename___get__(((struct __pyx_obj_5vedis_Vedis *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_5Vedis_8filename___get__(struct __pyx_obj_5vedis_Vedis *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->filename);
  __pyx_r = __pyx_v_self->filename;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":748
 * 
 * 
 * cdef int py_command_wrapper(vedis_context *context, int nargs, vedis_value **values):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef list converted = []
 */

static int __pyx_f_5vedis_py_command_wrapper(vedis_context *__pyx_v_context, int __pyx_v_nargs, vedis_value **__pyx_v_values) {
  int __pyx_v_i;
  PyObject *__pyx_v_converted = 0;
  struct __pyx_obj_5vedis_VedisContext *__pyx_v_context_wrapper = 0;
  PyObject *__pyx_v_command_name = 0;
  PyObject *__pyx_v_ret = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  void *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("py_command_wrapper", 0);

  /* "vedis.pyx":750
 * cdef int py_command_wrapper(vedis_context *context, int nargs, vedis_value **values):
 *     cdef int i
 *     cdef list converted = []             # <<<<<<<<<<<<<<
 *     cdef VedisContext context_wrapper = VedisContext()
 *     cdef basestring command_name = <basestring>vedis_context_user_data(context)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_converted = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":751
 *     cdef int i
 *     cdef list converted = []
 *     cdef VedisContext context_wrapper = VedisContext()             # <<<<<<<<<<<<<<
 *     cdef basestring command_name = <basestring>vedis_context_user_data(context)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5vedis_VedisContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_context_wrapper = ((struct __pyx_obj_5vedis_VedisContext *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":752
 *     cdef list converted = []
 *     cdef VedisContext context_wrapper = VedisContext()
 *     cdef basestring command_name = <basestring>vedis_context_user_data(context)             # <<<<<<<<<<<<<<
 * 
 *     context_wrapper.set_context(context)
 */
  __pyx_t_2 = vedis_context_user_data(__pyx_v_context);
  __pyx_t_1 = ((PyObject *)__pyx_t_2);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_command_name = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":754
 *     cdef basestring command_name = <basestring>vedis_context_user_data(context)
 * 
 *     context_wrapper.set_context(context)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(nargs):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_VedisContext *)__pyx_v_context_wrapper->__pyx_vtab)->set_context(__pyx_v_context_wrapper, __pyx_v_context); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":756
 *     context_wrapper.set_context(context)
 * 
 *     for i in range(nargs):             # <<<<<<<<<<<<<<
 *         converted.append(vedis_value_to_python(values[i]))
 * 
 */
  __pyx_t_3 = __pyx_v_nargs;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "vedis.pyx":757
 * 
 *     for i in range(nargs):
 *         converted.append(vedis_value_to_python(values[i]))             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_1 = __pyx_f_5vedis_vedis_value_to_python((__pyx_v_values[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_converted, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":759
 *         converted.append(vedis_value_to_python(values[i]))
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         ret = py_command_registry[command_name](context_wrapper, *converted)
 *     except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "vedis.pyx":760
 * 
 *     try:
 *         ret = py_command_registry[command_name](context_wrapper, *converted)             # <<<<<<<<<<<<<<
 *     except:
 *         return VEDIS_ABORT
 */
      if (unlikely(__pyx_v_5vedis_py_command_registry == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_5vedis_py_command_registry, __pyx_v_command_name); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(((PyObject *)__pyx_v_context_wrapper));
      PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_context_wrapper));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_context_wrapper));
      __pyx_t_10 = PySequence_Tuple(__pyx_v_converted); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PyNumber_Add(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_v_ret = __pyx_t_10;
      __pyx_t_10 = 0;
    }
    /*else:*/ {

      /* "vedis.pyx":764
 *         return VEDIS_ABORT
 *     else:
 *         push_result(context, ret)             # <<<<<<<<<<<<<<
 *         return VEDIS_OK
 * 
 */
      __pyx_t_10 = __pyx_f_5vedis_push_result(__pyx_v_context, __pyx_v_ret); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "vedis.pyx":765
 *     else:
 *         push_result(context, ret)
 *         return VEDIS_OK             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_r = VEDIS_OK;
      goto __pyx_L8_except_return;
    }
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "vedis.pyx":761
 *     try:
 *         ret = py_command_registry[command_name](context_wrapper, *converted)
 *     except:             # <<<<<<<<<<<<<<
 *         return VEDIS_ABORT
 *     else:
 */
    /*except:*/ {
      __Pyx_AddTraceback("vedis.py_command_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_1);

      /* "vedis.pyx":762
 *         ret = py_command_registry[command_name](context_wrapper, *converted)
 *     except:
 *         return VEDIS_ABORT             # <<<<<<<<<<<<<<
 *     else:
 *         push_result(context, ret)
 */
      __pyx_r = VEDIS_ABORT;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L8_except_return;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
  }

  /* "vedis.pyx":748
 * 
 * 
 * cdef int py_command_wrapper(vedis_context *context, int nargs, vedis_value **values):             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef list converted = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_WriteUnraisable("vedis.py_command_wrapper", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_converted);
  __Pyx_XDECREF((PyObject *)__pyx_v_context_wrapper);
  __Pyx_XDECREF(__pyx_v_command_name);
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":771
 *     cdef vedis_context *context
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.context = NULL
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_12VedisContext_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_12VedisContext_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_5vedis_12VedisContext___cinit__(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_12VedisContext___cinit__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "vedis.pyx":772
 * 
 *     def __cinit__(self):
 *         self.context = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef set_context(self, vedis_context *context):
 */
  __pyx_v_self->context = NULL;

  /* "vedis.pyx":771
 *     cdef vedis_context *context
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.context = NULL
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":774
 *         self.context = NULL
 * 
 *     cdef set_context(self, vedis_context *context):             # <<<<<<<<<<<<<<
 *         self.context = context
 * 
 */

static PyObject *__pyx_f_5vedis_12VedisContext_set_context(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, vedis_context *__pyx_v_context) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_context", 0);

  /* "vedis.pyx":775
 * 
 *     cdef set_context(self, vedis_context *context):
 *         self.context = context             # <<<<<<<<<<<<<<
 * 
 *     cdef vedis_value * create_value(self, value):
 */
  __pyx_v_self->context = __pyx_v_context;

  /* "vedis.pyx":774
 *         self.context = NULL
 * 
 *     cdef set_context(self, vedis_context *context):             # <<<<<<<<<<<<<<
 *         self.context = context
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":777
 *         self.context = context
 * 
 *     cdef vedis_value * create_value(self, value):             # <<<<<<<<<<<<<<
 *         return python_to_vedis_value(self.context, value)
 * 
 */

static vedis_value *__pyx_f_5vedis_12VedisContext_create_value(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_value) {
  vedis_value *__pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_value", 0);

  /* "vedis.pyx":778
 * 
 *     cdef vedis_value * create_value(self, value):
 *         return python_to_vedis_value(self.context, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef release_value(self, vedis_value *ptr):
 */
  __pyx_r = __pyx_f_5vedis_python_to_vedis_value(__pyx_v_self->context, __pyx_v_value);
  goto __pyx_L0;

  /* "vedis.pyx":777
 *         self.context = context
 * 
 *     cdef vedis_value * create_value(self, value):             # <<<<<<<<<<<<<<
 *         return python_to_vedis_value(self.context, value)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":780
 *         return python_to_vedis_value(self.context, value)
 * 
 *     cdef release_value(self, vedis_value *ptr):             # <<<<<<<<<<<<<<
 *         vedis_context_release_value(self.context, ptr)
 * 
 */

static PyObject *__pyx_f_5vedis_12VedisContext_release_value(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, vedis_value *__pyx_v_ptr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("release_value", 0);

  /* "vedis.pyx":781
 * 
 *     cdef release_value(self, vedis_value *ptr):
 *         vedis_context_release_value(self.context, ptr)             # <<<<<<<<<<<<<<
 * 
 *     cpdef store(self, basestring key, basestring value):
 */
  vedis_context_release_value(__pyx_v_self->context, __pyx_v_ptr);

  /* "vedis.pyx":780
 *         return python_to_vedis_value(self.context, value)
 * 
 *     cdef release_value(self, vedis_value *ptr):             # <<<<<<<<<<<<<<
 *         vedis_context_release_value(self.context, ptr)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":783
 *         vedis_context_release_value(self.context, ptr)
 * 
 *     cpdef store(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Store key/value."""
 *         vedis_context_kv_store(
 */

static PyObject *__pyx_pw_5vedis_12VedisContext_3store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_store(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("store", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_store); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __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_5vedis_12VedisContext_3store)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":787
 *         vedis_context_kv_store(
 *             self.context,
 *             <const char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <const char *>value,
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":789
 *             <const char *>key,
 *             -1,
 *             <const char *>value,             # <<<<<<<<<<<<<<
 *             len(value))
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":790
 *             -1,
 *             <const char *>value,
 *             len(value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef fetch(self, basestring key):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":785
 *     cpdef store(self, basestring key, basestring value):
 *         """Store key/value."""
 *         vedis_context_kv_store(             # <<<<<<<<<<<<<<
 *             self.context,
 *             <const char *>key,
 */
  vedis_context_kv_store(__pyx_v_self->context, ((char const *)__pyx_t_7), -1, ((char const *)__pyx_t_8), __pyx_t_5);

  /* "vedis.pyx":783
 *         vedis_context_release_value(self.context, ptr)
 * 
 *     cpdef store(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Store key/value."""
 *         vedis_context_kv_store(
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.VedisContext.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_3store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vedis_12VedisContext_2store[] = "Store key/value.";
static PyObject *__pyx_pw_5vedis_12VedisContext_3store(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("store (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("store", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "store") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("store", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.VedisContext.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_12VedisContext_2store(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_2store(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("store", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_12VedisContext_store(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.store", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":792
 *             len(value))
 * 
 *     cpdef fetch(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 */

static PyObject *__pyx_pw_5vedis_12VedisContext_5fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_fetch(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  char *__pyx_v_buf;
  vedis_int64 __pyx_v_buf_size;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  char const *__pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __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_5vedis_12VedisContext_5fetch)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":794
 *     cpdef fetch(self, basestring key):
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0             # <<<<<<<<<<<<<<
 *         cdef vedis_int64 buf_size = 0
 * 
 */
  __pyx_v_buf = ((char *)0);

  /* "vedis.pyx":795
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0             # <<<<<<<<<<<<<<
 * 
 *         vedis_context_kv_fetch(
 */
  __pyx_v_buf_size = 0;

  /* "vedis.pyx":799
 *         vedis_context_kv_fetch(
 *             self.context,
 *             <char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <void *>0,
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":797
 *         cdef vedis_int64 buf_size = 0
 * 
 *         vedis_context_kv_fetch(             # <<<<<<<<<<<<<<
 *             self.context,
 *             <char *>key,
 */
  vedis_context_kv_fetch(__pyx_v_self->context, ((char *)__pyx_t_6), -1, ((void *)0), (&__pyx_v_buf_size));

  /* "vedis.pyx":804
 *             &buf_size)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             buf = <char *>malloc(buf_size)
 *             vedis_context_kv_fetch(
 */
  /*try:*/ {

    /* "vedis.pyx":805
 * 
 *         try:
 *             buf = <char *>malloc(buf_size)             # <<<<<<<<<<<<<<
 *             vedis_context_kv_fetch(
 *                 self.context,
 */
    __pyx_v_buf = ((char *)malloc(__pyx_v_buf_size));

    /* "vedis.pyx":808
 *             vedis_context_kv_fetch(
 *                 self.context,
 *                 <char *>key,             # <<<<<<<<<<<<<<
 *                 -1,
 *                 <void *>buf,
 */
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L4_error;}

    /* "vedis.pyx":806
 *         try:
 *             buf = <char *>malloc(buf_size)
 *             vedis_context_kv_fetch(             # <<<<<<<<<<<<<<
 *                 self.context,
 *                 <char *>key,
 */
    vedis_context_kv_fetch(__pyx_v_self->context, ((char *)__pyx_t_6), -1, ((void *)__pyx_v_buf), (&__pyx_v_buf_size));

    /* "vedis.pyx":813
 *                 &buf_size)
 * 
 *             return buf[:buf_size]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(buf)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buf + 0, __pyx_v_buf_size - 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3_return;
  }

  /* "vedis.pyx":815
 *             return buf[:buf_size]
 *         finally:
 *             free(buf)             # <<<<<<<<<<<<<<
 * 
 *     cpdef delete(self, basestring key):
 */
  /*finally:*/ {
    /*exception exit:*/{
      __pyx_L4_error:;
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
      {
        free(__pyx_v_buf);
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
      goto __pyx_L1_error;
    }
    __pyx_L3_return: {
      __pyx_t_15 = __pyx_r;
      __pyx_r = 0;
      free(__pyx_v_buf);
      __pyx_r = __pyx_t_15;
      __pyx_t_15 = 0;
      goto __pyx_L0;
    }
  }

  /* "vedis.pyx":792
 *             len(value))
 * 
 *     cpdef fetch(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Retrieve value at given key. Raises `KeyError` if key not found."""
 *         cdef char *buf = <char *>0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.VedisContext.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_5fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_5vedis_12VedisContext_4fetch[] = "Retrieve value at given key. Raises `KeyError` if key not found.";
static PyObject *__pyx_pw_5vedis_12VedisContext_5fetch(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_12VedisContext_4fetch(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_4fetch(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fetch", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_12VedisContext_fetch(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":817
 *             free(buf)
 * 
 *     cpdef delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Delete the value stored at the given key."""
 *         vedis_context_kv_delete(
 */

static PyObject *__pyx_pw_5vedis_12VedisContext_7delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_delete(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delete", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_delete); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __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_5vedis_12VedisContext_7delete)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":821
 *         vedis_context_kv_delete(
 *             self.context,
 *             <char *>key,             # <<<<<<<<<<<<<<
 *             -1)
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":819
 *     cpdef delete(self, basestring key):
 *         """Delete the value stored at the given key."""
 *         vedis_context_kv_delete(             # <<<<<<<<<<<<<<
 *             self.context,
 *             <char *>key,
 */
  vedis_context_kv_delete(__pyx_v_self->context, ((char *)__pyx_t_6), -1);

  /* "vedis.pyx":817
 *             free(buf)
 * 
 *     cpdef delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         """Delete the value stored at the given key."""
 *         vedis_context_kv_delete(
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.VedisContext.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_7delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static char __pyx_doc_5vedis_12VedisContext_6delete[] = "Delete the value stored at the given key.";
static PyObject *__pyx_pw_5vedis_12VedisContext_7delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_12VedisContext_6delete(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_6delete(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("delete", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_12VedisContext_delete(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.delete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":824
 *             -1)
 * 
 *     cpdef append(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Append to the value stored in the given key."""
 *         vedis_context_kv_append(
 */

static PyObject *__pyx_pw_5vedis_12VedisContext_9append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_append(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  char const *__pyx_t_7;
  char const *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __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_5vedis_12VedisContext_9append)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      __Pyx_INCREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":828
 *         vedis_context_kv_append(
 *             self.context,
 *             <const char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <const char *>value,
 */
  __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":830
 *             <const char *>key,
 *             -1,
 *             <const char *>value,             # <<<<<<<<<<<<<<
 *             len(value))
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_value); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":831
 *             -1,
 *             <const char *>value,
 *             len(value))             # <<<<<<<<<<<<<<
 * 
 *     cpdef exists(self, basestring key):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":826
 *     cpdef append(self, basestring key, basestring value):
 *         """Append to the value stored in the given key."""
 *         vedis_context_kv_append(             # <<<<<<<<<<<<<<
 *             self.context,
 *             <const char *>key,
 */
  vedis_context_kv_append(__pyx_v_self->context, ((char const *)__pyx_t_7), -1, ((char const *)__pyx_t_8), __pyx_t_5);

  /* "vedis.pyx":824
 *             -1)
 * 
 *     cpdef append(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         """Append to the value stored in the given key."""
 *         vedis_context_kv_append(
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("vedis.VedisContext.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_9append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5vedis_12VedisContext_8append[] = "Append to the value stored in the given key.";
static PyObject *__pyx_pw_5vedis_12VedisContext_9append(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "append") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("append", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.VedisContext.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_12VedisContext_8append(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_8append(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_12VedisContext_append(__pyx_v_self, __pyx_v_key, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":833
 *             len(value))
 * 
 *     cpdef exists(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0
 */

static PyObject *__pyx_pw_5vedis_12VedisContext_11exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_5vedis_12VedisContext_exists(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  CYTHON_UNUSED char *__pyx_v_buf;
  vedis_int64 __pyx_v_buf_size;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  char *__pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exists", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_exists); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __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_5vedis_12VedisContext_11exists)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "vedis.pyx":834
 * 
 *     cpdef exists(self, basestring key):
 *         cdef char *buf = <char *>0             # <<<<<<<<<<<<<<
 *         cdef vedis_int64 buf_size = 0
 *         cdef int ret
 */
  __pyx_v_buf = ((char *)0);

  /* "vedis.pyx":835
 *     cpdef exists(self, basestring key):
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0             # <<<<<<<<<<<<<<
 *         cdef int ret
 * 
 */
  __pyx_v_buf_size = 0;

  /* "vedis.pyx":840
 *         ret = vedis_context_kv_fetch(
 *             self.context,
 *             <char *>key,             # <<<<<<<<<<<<<<
 *             -1,
 *             <void *>0,
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_key); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":838
 *         cdef int ret
 * 
 *         ret = vedis_context_kv_fetch(             # <<<<<<<<<<<<<<
 *             self.context,
 *             <char *>key,
 */
  __pyx_v_ret = vedis_context_kv_fetch(__pyx_v_self->context, ((char *)__pyx_t_6), -1, ((void *)0), (&__pyx_v_buf_size));

  /* "vedis.pyx":844
 *             <void *>0,
 *             &buf_size)
 *         if ret == VEDIS_NOTFOUND:             # <<<<<<<<<<<<<<
 *             return False
 *         elif ret == VEDIS_OK:
 */
  __pyx_t_7 = ((__pyx_v_ret == VEDIS_NOTFOUND) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":845
 *             &buf_size)
 *         if ret == VEDIS_NOTFOUND:
 *             return False             # <<<<<<<<<<<<<<
 *         elif ret == VEDIS_OK:
 *             return True
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "vedis.pyx":846
 *         if ret == VEDIS_NOTFOUND:
 *             return False
 *         elif ret == VEDIS_OK:             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  __pyx_t_7 = ((__pyx_v_ret == VEDIS_OK) != 0);
  if (__pyx_t_7) {

    /* "vedis.pyx":847
 *             return False
 *         elif ret == VEDIS_OK:
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         raise Exception()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }

  /* "vedis.pyx":849
 *             return True
 * 
 *         raise Exception()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, key, value):
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_Exception); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":833
 *             len(value))
 * 
 *     cpdef exists(self, basestring key):             # <<<<<<<<<<<<<<
 *         cdef char *buf = <char *>0
 *         cdef vedis_int64 buf_size = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("vedis.VedisContext.exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_11exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_12VedisContext_11exists(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("exists (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_12VedisContext_10exists(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_10exists(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("exists", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5vedis_12VedisContext_exists(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":851
 *         raise Exception()
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         self.store(key, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_12VedisContext_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5vedis_12VedisContext_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_12VedisContext_12__setitem__(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_12VedisContext_12__setitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "vedis.pyx":852
 * 
 *     def __setitem__(self, key, value):
 *         self.store(key, value)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_VedisContext *)__pyx_v_self->__pyx_vtab)->store(__pyx_v_self, ((PyObject*)__pyx_v_key), ((PyObject*)__pyx_v_value), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":851
 *         raise Exception()
 * 
 *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
 *         self.store(key, value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":854
 *         self.store(key, value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return self.fetch(key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_12VedisContext_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_12VedisContext_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_12VedisContext_14__getitem__(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_12VedisContext_14__getitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "vedis.pyx":855
 * 
 *     def __getitem__(self, key):
 *         return self.fetch(key)             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_VedisContext *)__pyx_v_self->__pyx_vtab)->fetch(__pyx_v_self, ((PyObject*)__pyx_v_key), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":854
 *         self.store(key, value)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         return self.fetch(key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":857
 *         return self.fetch(key)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         self.delete(key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_12VedisContext_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_12VedisContext_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_12VedisContext_16__delitem__(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_12VedisContext_16__delitem__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "vedis.pyx":858
 * 
 *     def __delitem__(self, key):
 *         self.delete(key)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, key):
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_VedisContext *)__pyx_v_self->__pyx_vtab)->delete(__pyx_v_self, ((PyObject*)__pyx_v_key), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":857
 *         return self.fetch(key)
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         self.delete(key)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":860
 *         self.delete(key)
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return self.exists(key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_12VedisContext_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_12VedisContext_19__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_12VedisContext_18__contains__(((struct __pyx_obj_5vedis_VedisContext *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_12VedisContext_18__contains__(struct __pyx_obj_5vedis_VedisContext *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "vedis.pyx":861
 * 
 *     def __contains__(self, key):
 *         return self.exists(key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_key))||((__pyx_v_key) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_key)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_VedisContext *)__pyx_v_self->__pyx_vtab)->exists(__pyx_v_self, ((PyObject*)__pyx_v_key), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "vedis.pyx":860
 *         self.delete(key)
 * 
 *     def __contains__(self, key):             # <<<<<<<<<<<<<<
 *         return self.exists(key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.VedisContext.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":864
 * 
 * 
 * cdef vedis_value_to_python(vedis_value *ptr):             # <<<<<<<<<<<<<<
 *     cdef int nbytes
 *     cdef list accum
 */

static PyObject *__pyx_f_5vedis_vedis_value_to_python(vedis_value *__pyx_v_ptr) {
  int __pyx_v_nbytes;
  PyObject *__pyx_v_accum = 0;
  vedis_value *__pyx_v_item;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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_RefNannySetupContext("vedis_value_to_python", 0);

  /* "vedis.pyx":867
 *     cdef int nbytes
 *     cdef list accum
 *     cdef vedis_value *item = <vedis_value *>0             # <<<<<<<<<<<<<<
 * 
 *     if vedis_value_is_string(ptr):
 */
  __pyx_v_item = ((vedis_value *)0);

  /* "vedis.pyx":869
 *     cdef vedis_value *item = <vedis_value *>0
 * 
 *     if vedis_value_is_string(ptr):             # <<<<<<<<<<<<<<
 *         return str(vedis_value_to_string(ptr, &nbytes))[:nbytes].replace('\\"', '"')
 *     elif vedis_value_is_array(ptr):
 */
  __pyx_t_1 = (vedis_value_is_string(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":870
 * 
 *     if vedis_value_is_string(ptr):
 *         return str(vedis_value_to_string(ptr, &nbytes))[:nbytes].replace('\\"', '"')             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_array(ptr):
 *         accum = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBytes_FromString(vedis_value_to_string(__pyx_v_ptr, (&__pyx_v_nbytes))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, __pyx_v_nbytes, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":871
 *     if vedis_value_is_string(ptr):
 *         return str(vedis_value_to_string(ptr, &nbytes))[:nbytes].replace('\\"', '"')
 *     elif vedis_value_is_array(ptr):             # <<<<<<<<<<<<<<
 *         accum = []
 *         while True:
 */
  __pyx_t_1 = (vedis_value_is_array(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":872
 *         return str(vedis_value_to_string(ptr, &nbytes))[:nbytes].replace('\\"', '"')
 *     elif vedis_value_is_array(ptr):
 *         accum = []             # <<<<<<<<<<<<<<
 *         while True:
 *             item = vedis_array_next_elem(ptr)
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_accum = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "vedis.pyx":873
 *     elif vedis_value_is_array(ptr):
 *         accum = []
 *         while True:             # <<<<<<<<<<<<<<
 *             item = vedis_array_next_elem(ptr)
 *             if not item:
 */
    while (1) {

      /* "vedis.pyx":874
 *         accum = []
 *         while True:
 *             item = vedis_array_next_elem(ptr)             # <<<<<<<<<<<<<<
 *             if not item:
 *                 break
 */
      __pyx_v_item = vedis_array_next_elem(__pyx_v_ptr);

      /* "vedis.pyx":875
 *         while True:
 *             item = vedis_array_next_elem(ptr)
 *             if not item:             # <<<<<<<<<<<<<<
 *                 break
 *             accum.append(vedis_value_to_python(item))
 */
      __pyx_t_1 = ((!(__pyx_v_item != 0)) != 0);
      if (__pyx_t_1) {

        /* "vedis.pyx":876
 *             item = vedis_array_next_elem(ptr)
 *             if not item:
 *                 break             # <<<<<<<<<<<<<<
 *             accum.append(vedis_value_to_python(item))
 *         return accum
 */
        goto __pyx_L5_break;
      }

      /* "vedis.pyx":877
 *             if not item:
 *                 break
 *             accum.append(vedis_value_to_python(item))             # <<<<<<<<<<<<<<
 *         return accum
 *     elif vedis_value_is_int(ptr):
 */
      __pyx_t_3 = __pyx_f_5vedis_vedis_value_to_python(__pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_accum, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L5_break:;

    /* "vedis.pyx":878
 *                 break
 *             accum.append(vedis_value_to_python(item))
 *         return accum             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_int(ptr):
 *         return vedis_value_to_int(ptr)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_accum);
    __pyx_r = __pyx_v_accum;
    goto __pyx_L0;
  }

  /* "vedis.pyx":879
 *             accum.append(vedis_value_to_python(item))
 *         return accum
 *     elif vedis_value_is_int(ptr):             # <<<<<<<<<<<<<<
 *         return vedis_value_to_int(ptr)
 *     elif vedis_value_is_float(ptr):
 */
  __pyx_t_1 = (vedis_value_is_int(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":880
 *         return accum
 *     elif vedis_value_is_int(ptr):
 *         return vedis_value_to_int(ptr)             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_float(ptr):
 *         return vedis_value_to_double(ptr)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_int(vedis_value_to_int(__pyx_v_ptr)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":881
 *     elif vedis_value_is_int(ptr):
 *         return vedis_value_to_int(ptr)
 *     elif vedis_value_is_float(ptr):             # <<<<<<<<<<<<<<
 *         return vedis_value_to_double(ptr)
 *     elif vedis_value_is_bool(ptr):
 */
  __pyx_t_1 = (vedis_value_is_float(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":882
 *         return vedis_value_to_int(ptr)
 *     elif vedis_value_is_float(ptr):
 *         return vedis_value_to_double(ptr)             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_bool(ptr):
 *         return bool(vedis_value_to_bool(ptr))
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(vedis_value_to_double(__pyx_v_ptr)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":883
 *     elif vedis_value_is_float(ptr):
 *         return vedis_value_to_double(ptr)
 *     elif vedis_value_is_bool(ptr):             # <<<<<<<<<<<<<<
 *         return bool(vedis_value_to_bool(ptr))
 *     elif vedis_value_is_null(ptr):
 */
  __pyx_t_1 = (vedis_value_is_bool(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":884
 *         return vedis_value_to_double(ptr)
 *     elif vedis_value_is_bool(ptr):
 *         return bool(vedis_value_to_bool(ptr))             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_null(ptr):
 *         return None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_int(vedis_value_to_bool(__pyx_v_ptr)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "vedis.pyx":885
 *     elif vedis_value_is_bool(ptr):
 *         return bool(vedis_value_to_bool(ptr))
 *     elif vedis_value_is_null(ptr):             # <<<<<<<<<<<<<<
 *         return None
 *     raise TypeError('Unrecognized type.')
 */
  __pyx_t_1 = (vedis_value_is_null(__pyx_v_ptr) != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":886
 *         return bool(vedis_value_to_bool(ptr))
 *     elif vedis_value_is_null(ptr):
 *         return None             # <<<<<<<<<<<<<<
 *     raise TypeError('Unrecognized type.')
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }

  /* "vedis.pyx":887
 *     elif vedis_value_is_null(ptr):
 *         return None
 *     raise TypeError('Unrecognized type.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":864
 * 
 * 
 * cdef vedis_value_to_python(vedis_value *ptr):             # <<<<<<<<<<<<<<
 *     cdef int nbytes
 *     cdef list accum
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.vedis_value_to_python", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_accum);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":890
 * 
 * 
 * cdef vedis_value* python_to_vedis_value(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     if isinstance(python_value, (list, tuple)):
 *         return create_vedis_array(context, python_value)
 */

static vedis_value *__pyx_f_5vedis_python_to_vedis_value(vedis_context *__pyx_v_context, PyObject *__pyx_v_python_value) {
  vedis_value *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("python_to_vedis_value", 0);

  /* "vedis.pyx":891
 * 
 * cdef vedis_value* python_to_vedis_value(vedis_context *context, python_value):
 *     if isinstance(python_value, (list, tuple)):             # <<<<<<<<<<<<<<
 *         return create_vedis_array(context, python_value)
 *     else:
 */
  __pyx_t_2 = PyList_Check(__pyx_v_python_value); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyTuple_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":892
 * cdef vedis_value* python_to_vedis_value(vedis_context *context, python_value):
 *     if isinstance(python_value, (list, tuple)):
 *         return create_vedis_array(context, python_value)             # <<<<<<<<<<<<<<
 *     else:
 *         return create_vedis_scalar(context, python_value)
 */
    if (!(likely(PyList_CheckExact(__pyx_v_python_value))||((__pyx_v_python_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_python_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_r = __pyx_f_5vedis_create_vedis_array(__pyx_v_context, ((PyObject*)__pyx_v_python_value));
    goto __pyx_L0;
  }
  /*else*/ {

    /* "vedis.pyx":894
 *         return create_vedis_array(context, python_value)
 *     else:
 *         return create_vedis_scalar(context, python_value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_r = __pyx_f_5vedis_create_vedis_scalar(__pyx_v_context, __pyx_v_python_value);
    goto __pyx_L0;
  }

  /* "vedis.pyx":890
 * 
 * 
 * cdef vedis_value* python_to_vedis_value(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     if isinstance(python_value, (list, tuple)):
 *         return create_vedis_array(context, python_value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("vedis.python_to_vedis_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":897
 * 
 * 
 * cdef vedis_value* create_vedis_scalar(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     cdef vedis_value *ptr = <vedis_value *>0
 *     ptr = vedis_context_new_scalar(context)
 */

static vedis_value *__pyx_f_5vedis_create_vedis_scalar(vedis_context *__pyx_v_context, PyObject *__pyx_v_python_value) {
  vedis_value *__pyx_v_ptr;
  vedis_value *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_vedis_scalar", 0);

  /* "vedis.pyx":898
 * 
 * cdef vedis_value* create_vedis_scalar(vedis_context *context, python_value):
 *     cdef vedis_value *ptr = <vedis_value *>0             # <<<<<<<<<<<<<<
 *     ptr = vedis_context_new_scalar(context)
 *     if isinstance(python_value, unicode):
 */
  __pyx_v_ptr = ((vedis_value *)0);

  /* "vedis.pyx":899
 * cdef vedis_value* create_vedis_scalar(vedis_context *context, python_value):
 *     cdef vedis_value *ptr = <vedis_value *>0
 *     ptr = vedis_context_new_scalar(context)             # <<<<<<<<<<<<<<
 *     if isinstance(python_value, unicode):
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)
 */
  __pyx_v_ptr = vedis_context_new_scalar(__pyx_v_context);

  /* "vedis.pyx":900
 *     cdef vedis_value *ptr = <vedis_value *>0
 *     ptr = vedis_context_new_scalar(context)
 *     if isinstance(python_value, unicode):             # <<<<<<<<<<<<<<
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":901
 *     ptr = vedis_context_new_scalar(context)
 *     if isinstance(python_value, unicode):
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, basestring):
 *         vedis_value_string(ptr, python_value, -1)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_python_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_value_string(__pyx_v_ptr, __pyx_t_5, -1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }

  /* "vedis.pyx":902
 *     if isinstance(python_value, unicode):
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):             # <<<<<<<<<<<<<<
 *         vedis_value_string(ptr, python_value, -1)
 *     elif isinstance(python_value, (int, long)):
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_python_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":903
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):
 *         vedis_value_string(ptr, python_value, -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, (int, long)):
 *         vedis_value_int(ptr, python_value)
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_python_value); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_value_string(__pyx_v_ptr, __pyx_t_5, -1);
    goto __pyx_L3;
  }

  /* "vedis.pyx":904
 *     elif isinstance(python_value, basestring):
 *         vedis_value_string(ptr, python_value, -1)
 *     elif isinstance(python_value, (int, long)):             # <<<<<<<<<<<<<<
 *         vedis_value_int(ptr, python_value)
 *     elif isinstance(python_value, bool):
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_python_value); 
  __pyx_t_6 = (__pyx_t_2 != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = PyLong_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_6 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":905
 *         vedis_value_string(ptr, python_value, -1)
 *     elif isinstance(python_value, (int, long)):
 *         vedis_value_int(ptr, python_value)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, bool):
 *         vedis_value_bool(ptr, python_value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_python_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_value_int(__pyx_v_ptr, __pyx_t_7);
    goto __pyx_L3;
  }

  /* "vedis.pyx":906
 *     elif isinstance(python_value, (int, long)):
 *         vedis_value_int(ptr, python_value)
 *     elif isinstance(python_value, bool):             # <<<<<<<<<<<<<<
 *         vedis_value_bool(ptr, python_value)
 *     elif isinstance(python_value, float):
 */
  __pyx_t_4 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_python_value, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":907
 *         vedis_value_int(ptr, python_value)
 *     elif isinstance(python_value, bool):
 *         vedis_value_bool(ptr, python_value)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, float):
 *         vedis_value_double(ptr, python_value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_python_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_value_bool(__pyx_v_ptr, __pyx_t_7);
    goto __pyx_L3;
  }

  /* "vedis.pyx":908
 *     elif isinstance(python_value, bool):
 *         vedis_value_bool(ptr, python_value)
 *     elif isinstance(python_value, float):             # <<<<<<<<<<<<<<
 *         vedis_value_double(ptr, python_value)
 *     elif python_value is None:
 */
  __pyx_t_1 = PyFloat_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":909
 *         vedis_value_bool(ptr, python_value)
 *     elif isinstance(python_value, float):
 *         vedis_value_double(ptr, python_value)             # <<<<<<<<<<<<<<
 *     elif python_value is None:
 *         vedis_value_null(ptr)
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_python_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_value_double(__pyx_v_ptr, __pyx_t_8);
    goto __pyx_L3;
  }

  /* "vedis.pyx":910
 *     elif isinstance(python_value, float):
 *         vedis_value_double(ptr, python_value)
 *     elif python_value is None:             # <<<<<<<<<<<<<<
 *         vedis_value_null(ptr)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_python_value == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":911
 *         vedis_value_double(ptr, python_value)
 *     elif python_value is None:
 *         vedis_value_null(ptr)             # <<<<<<<<<<<<<<
 *     else:
 *         raise TypeError('Unsupported type: %s.' % type(python_value))
 */
    vedis_value_null(__pyx_v_ptr);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vedis.pyx":913
 *         vedis_value_null(ptr)
 *     else:
 *         raise TypeError('Unsupported type: %s.' % type(python_value))             # <<<<<<<<<<<<<<
 *     return ptr
 * 
 */
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unsupported_type_s, ((PyObject *)Py_TYPE(__pyx_v_python_value))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "vedis.pyx":914
 *     else:
 *         raise TypeError('Unsupported type: %s.' % type(python_value))
 *     return ptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_ptr;
  goto __pyx_L0;

  /* "vedis.pyx":897
 * 
 * 
 * cdef vedis_value* create_vedis_scalar(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     cdef vedis_value *ptr = <vedis_value *>0
 *     ptr = vedis_context_new_scalar(context)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("vedis.create_vedis_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":917
 * 
 * 
 * cdef vedis_value* create_vedis_array(vedis_context *context, list items):             # <<<<<<<<<<<<<<
 *     cdef vedis_value *ptr
 *     cdef vedis_value *list_item = <vedis_value *>0
 */

static vedis_value *__pyx_f_5vedis_create_vedis_array(vedis_context *__pyx_v_context, PyObject *__pyx_v_items) {
  vedis_value *__pyx_v_ptr;
  vedis_value *__pyx_v_list_item;
  PyObject *__pyx_v_item = NULL;
  vedis_value *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_vedis_array", 0);

  /* "vedis.pyx":919
 * cdef vedis_value* create_vedis_array(vedis_context *context, list items):
 *     cdef vedis_value *ptr
 *     cdef vedis_value *list_item = <vedis_value *>0             # <<<<<<<<<<<<<<
 *     ptr = vedis_context_new_array(context)
 *     for item in items:
 */
  __pyx_v_list_item = ((vedis_value *)0);

  /* "vedis.pyx":920
 *     cdef vedis_value *ptr
 *     cdef vedis_value *list_item = <vedis_value *>0
 *     ptr = vedis_context_new_array(context)             # <<<<<<<<<<<<<<
 *     for item in items:
 *         list_item = python_to_vedis_value(context, item)
 */
  __pyx_v_ptr = vedis_context_new_array(__pyx_v_context);

  /* "vedis.pyx":921
 *     cdef vedis_value *list_item = <vedis_value *>0
 *     ptr = vedis_context_new_array(context)
 *     for item in items:             # <<<<<<<<<<<<<<
 *         list_item = python_to_vedis_value(context, item)
 *         vedis_array_insert(ptr, list_item)
 */
  if (unlikely(__pyx_v_items == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __pyx_v_items; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "vedis.pyx":922
 *     ptr = vedis_context_new_array(context)
 *     for item in items:
 *         list_item = python_to_vedis_value(context, item)             # <<<<<<<<<<<<<<
 *         vedis_array_insert(ptr, list_item)
 *         vedis_context_release_value(context, list_item)
 */
    __pyx_v_list_item = __pyx_f_5vedis_python_to_vedis_value(__pyx_v_context, __pyx_v_item);

    /* "vedis.pyx":923
 *     for item in items:
 *         list_item = python_to_vedis_value(context, item)
 *         vedis_array_insert(ptr, list_item)             # <<<<<<<<<<<<<<
 *         vedis_context_release_value(context, list_item)
 *     return ptr
 */
    vedis_array_insert(__pyx_v_ptr, __pyx_v_list_item);

    /* "vedis.pyx":924
 *         list_item = python_to_vedis_value(context, item)
 *         vedis_array_insert(ptr, list_item)
 *         vedis_context_release_value(context, list_item)             # <<<<<<<<<<<<<<
 *     return ptr
 * 
 */
    vedis_context_release_value(__pyx_v_context, __pyx_v_list_item);

    /* "vedis.pyx":921
 *     cdef vedis_value *list_item = <vedis_value *>0
 *     ptr = vedis_context_new_array(context)
 *     for item in items:             # <<<<<<<<<<<<<<
 *         list_item = python_to_vedis_value(context, item)
 *         vedis_array_insert(ptr, list_item)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":925
 *         vedis_array_insert(ptr, list_item)
 *         vedis_context_release_value(context, list_item)
 *     return ptr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_ptr;
  goto __pyx_L0;

  /* "vedis.pyx":917
 * 
 * 
 * cdef vedis_value* create_vedis_array(vedis_context *context, list items):             # <<<<<<<<<<<<<<
 *     cdef vedis_value *ptr
 *     cdef vedis_value *list_item = <vedis_value *>0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("vedis.create_vedis_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":928
 * 
 * 
 * cdef push_result(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     if isinstance(python_value, unicode):
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)
 */

static PyObject *__pyx_f_5vedis_push_result(vedis_context *__pyx_v_context, PyObject *__pyx_v_python_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  double __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("push_result", 0);

  /* "vedis.pyx":929
 * 
 * cdef push_result(vedis_context *context, python_value):
 *     if isinstance(python_value, unicode):             # <<<<<<<<<<<<<<
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":930
 * cdef push_result(vedis_context *context, python_value):
 *     if isinstance(python_value, unicode):
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, basestring):
 *         vedis_result_string(context, python_value, -1)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_python_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_string(__pyx_v_context, __pyx_t_5, -1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L3;
  }

  /* "vedis.pyx":931
 *     if isinstance(python_value, unicode):
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):             # <<<<<<<<<<<<<<
 *         vedis_result_string(context, python_value, -1)
 *     elif isinstance(python_value, (list, tuple)):
 */
  __pyx_t_2 = __Pyx_PyBaseString_Check(__pyx_v_python_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":932
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)
 *     elif isinstance(python_value, basestring):
 *         vedis_result_string(context, python_value, -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, (list, tuple)):
 *         vedis_result_value(context, create_vedis_array(context, python_value))
 */
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_python_value); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_string(__pyx_v_context, __pyx_t_5, -1);
    goto __pyx_L3;
  }

  /* "vedis.pyx":933
 *     elif isinstance(python_value, basestring):
 *         vedis_result_string(context, python_value, -1)
 *     elif isinstance(python_value, (list, tuple)):             # <<<<<<<<<<<<<<
 *         vedis_result_value(context, create_vedis_array(context, python_value))
 *     elif isinstance(python_value, (int, long)):
 */
  __pyx_t_2 = PyList_Check(__pyx_v_python_value); 
  __pyx_t_6 = (__pyx_t_2 != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = PyTuple_Check(__pyx_v_python_value); 
  __pyx_t_2 = (__pyx_t_6 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":934
 *         vedis_result_string(context, python_value, -1)
 *     elif isinstance(python_value, (list, tuple)):
 *         vedis_result_value(context, create_vedis_array(context, python_value))             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, (int, long)):
 *         vedis_result_int(context, python_value)
 */
    if (!(likely(PyList_CheckExact(__pyx_v_python_value))||((__pyx_v_python_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_python_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_value(__pyx_v_context, __pyx_f_5vedis_create_vedis_array(__pyx_v_context, ((PyObject*)__pyx_v_python_value)));
    goto __pyx_L3;
  }

  /* "vedis.pyx":935
 *     elif isinstance(python_value, (list, tuple)):
 *         vedis_result_value(context, create_vedis_array(context, python_value))
 *     elif isinstance(python_value, (int, long)):             # <<<<<<<<<<<<<<
 *         vedis_result_int(context, python_value)
 *     elif isinstance(python_value, bool):
 */
  __pyx_t_1 = PyInt_Check(__pyx_v_python_value); 
  __pyx_t_6 = (__pyx_t_1 != 0);
  if (!__pyx_t_6) {
  } else {
    __pyx_t_2 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = PyLong_Check(__pyx_v_python_value); 
  __pyx_t_1 = (__pyx_t_6 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L6_bool_binop_done:;
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":936
 *         vedis_result_value(context, create_vedis_array(context, python_value))
 *     elif isinstance(python_value, (int, long)):
 *         vedis_result_int(context, python_value)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, bool):
 *         vedis_result_bool(context, python_value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_python_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_int(__pyx_v_context, __pyx_t_7);
    goto __pyx_L3;
  }

  /* "vedis.pyx":937
 *     elif isinstance(python_value, (int, long)):
 *         vedis_result_int(context, python_value)
 *     elif isinstance(python_value, bool):             # <<<<<<<<<<<<<<
 *         vedis_result_bool(context, python_value)
 *     elif isinstance(python_value, float):
 */
  __pyx_t_4 = ((PyObject*)&PyBool_Type);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_python_value, __pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "vedis.pyx":938
 *         vedis_result_int(context, python_value)
 *     elif isinstance(python_value, bool):
 *         vedis_result_bool(context, python_value)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, float):
 *         vedis_result_double(context, python_value)
 */
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_python_value); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_bool(__pyx_v_context, __pyx_t_7);
    goto __pyx_L3;
  }

  /* "vedis.pyx":939
 *     elif isinstance(python_value, bool):
 *         vedis_result_bool(context, python_value)
 *     elif isinstance(python_value, float):             # <<<<<<<<<<<<<<
 *         vedis_result_double(context, python_value)
 *     else:
 */
  __pyx_t_2 = PyFloat_Check(__pyx_v_python_value); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "vedis.pyx":940
 *         vedis_result_bool(context, python_value)
 *     elif isinstance(python_value, float):
 *         vedis_result_double(context, python_value)             # <<<<<<<<<<<<<<
 *     else:
 *         vedis_result_null(context)
 */
    __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_python_value); if (unlikely((__pyx_t_8 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    vedis_result_double(__pyx_v_context, __pyx_t_8);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vedis.pyx":942
 *         vedis_result_double(context, python_value)
 *     else:
 *         vedis_result_null(context)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    vedis_result_null(__pyx_v_context);
  }
  __pyx_L3:;

  /* "vedis.pyx":928
 * 
 * 
 * cdef push_result(vedis_context *context, python_value):             # <<<<<<<<<<<<<<
 *     if isinstance(python_value, unicode):
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.push_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":949
 *     cdef Vedis vedis
 * 
 *     def __init__(self, vedis):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_11Transaction_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_11Transaction_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vedis = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vedis,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        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_vedis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      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 = 949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_vedis = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Transaction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_11Transaction___init__(((struct __pyx_obj_5vedis_Transaction *)__pyx_v_self), __pyx_v_vedis);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_11Transaction___init__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self, PyObject *__pyx_v_vedis) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vedis.pyx":950
 * 
 *     def __init__(self, vedis):
 *         self.vedis = vedis             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  if (!(likely(((__pyx_v_vedis) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_vedis, __pyx_ptype_5vedis_Vedis))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_vedis;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->vedis);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vedis));
  __pyx_v_self->vedis = ((struct __pyx_obj_5vedis_Vedis *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":949
 *     cdef Vedis vedis
 * 
 *     def __init__(self, vedis):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Transaction.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":952
 *         self.vedis = vedis
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         self.vedis.begin()
 *         return self
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_11Transaction_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_11Transaction_3__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_11Transaction_2__enter__(((struct __pyx_obj_5vedis_Transaction *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_11Transaction_2__enter__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__enter__", 0);

  /* "vedis.pyx":953
 * 
 *     def __enter__(self):
 *         self.vedis.begin()             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->begin(__pyx_v_self->vedis, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":954
 *     def __enter__(self):
 *         self.vedis.begin()
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "vedis.pyx":952
 *         self.vedis = vedis
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         self.vedis.begin()
 *         return self
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Transaction.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":956
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         if exc_type:
 *             self.vedis.rollback()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_11Transaction_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_11Transaction_5__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_exc_type = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_val,&__pyx_n_s_exc_tb,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_exc_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_val)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_tb)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_exc_type = values[0];
    __pyx_v_exc_val = values[1];
    __pyx_v_exc_tb = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Transaction.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5vedis_11Transaction_4__exit__(((struct __pyx_obj_5vedis_Transaction *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_11Transaction_4__exit__(struct __pyx_obj_5vedis_Transaction *__pyx_v_self, PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__exit__", 0);

  /* "vedis.pyx":957
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         if exc_type:             # <<<<<<<<<<<<<<
 *             self.vedis.rollback()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_exc_type); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "vedis.pyx":958
 *     def __exit__(self, exc_type, exc_val, exc_tb):
 *         if exc_type:
 *             self.vedis.rollback()             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->rollback(__pyx_v_self->vedis, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "vedis.pyx":960
 *             self.vedis.rollback()
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.vedis.commit()
 *             except:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "vedis.pyx":961
 *         else:
 *             try:
 *                 self.vedis.commit()             # <<<<<<<<<<<<<<
 *             except:
 *                 self.vedis.rollback()
 */
        __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->commit(__pyx_v_self->vedis, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "vedis.pyx":962
 *             try:
 *                 self.vedis.commit()
 *             except:             # <<<<<<<<<<<<<<
 *                 self.vedis.rollback()
 *                 raise
 */
      /*except:*/ {
        __Pyx_AddTraceback("vedis.Transaction.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_7);

        /* "vedis.pyx":963
 *                 self.vedis.commit()
 *             except:
 *                 self.vedis.rollback()             # <<<<<<<<<<<<<<
 *                 raise
 * 
 */
        __pyx_t_8 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->rollback(__pyx_v_self->vedis, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "vedis.pyx":964
 *             except:
 *                 self.vedis.rollback()
 *                 raise             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_ErrRestore(__pyx_t_2, __pyx_t_6, __pyx_t_7);
        __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L11_try_end:;
    }
  }
  __pyx_L3:;

  /* "vedis.pyx":956
 *         return self
 * 
 *     def __exit__(self, exc_type, exc_val, exc_tb):             # <<<<<<<<<<<<<<
 *         if exc_type:
 *             self.vedis.rollback()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("vedis.Transaction.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":971
 *     cdef basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

/* Python wrapper */
static int __pyx_pw_5vedis_4Hash_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_4Hash_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vedis,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_vedis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      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 = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vedis = ((struct __pyx_obj_5vedis_Vedis *)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Hash.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vedis), __pyx_ptype_5vedis_Vedis, 1, "vedis", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash___init__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), __pyx_v_vedis, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_4Hash___init__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vedis.pyx":972
 * 
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis             # <<<<<<<<<<<<<<
 *         self.key = key
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GOTREF(__pyx_v_self->vedis);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vedis));
  __pyx_v_self->vedis = __pyx_v_vedis;

  /* "vedis.pyx":973
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis
 *         self.key = key             # <<<<<<<<<<<<<<
 * 
 *     def get(self, basestring key):
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "vedis.pyx":971
 *     cdef basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":975
 *         self.key = key
 * 
 *     def get(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hget(self.key, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_3get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_3get(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_2get(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_2get(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);

  /* "vedis.pyx":976
 * 
 *     def get(self, basestring key):
 *         return self.vedis.hget(self.key, key)             # <<<<<<<<<<<<<<
 * 
 *     def mget(self, *keys):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hget(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":975
 *         self.key = key
 * 
 *     def get(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hget(self.key, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":978
 *         return self.vedis.hget(self.key, key)
 * 
 *     def mget(self, *keys):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmget(self.key, list(keys))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_5mget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_5mget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_keys = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mget (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "mget", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_keys = __pyx_args;
  __pyx_r = __pyx_pf_5vedis_4Hash_4mget(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), __pyx_v_keys);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_keys);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_4mget(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_keys) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mget", 0);

  /* "vedis.pyx":979
 * 
 *     def mget(self, *keys):
 *         return self.vedis.hmget(self.key, list(keys))             # <<<<<<<<<<<<<<
 * 
 *     def set(self, basestring key, basestring value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(__pyx_v_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hmget(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_2), 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":978
 *         return self.vedis.hget(self.key, key)
 * 
 *     def mget(self, *keys):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmget(self.key, list(keys))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.Hash.mget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":981
 *         return self.vedis.hmget(self.key, list(keys))
 * 
 *     def set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.vedis.hset(self.key, key, value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_7set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_7set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = ((PyObject*)values[0]);
    __pyx_v_value = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Hash.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_6set(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), __pyx_v_key, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_6set(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set", 0);

  /* "vedis.pyx":982
 * 
 *     def set(self, basestring key, basestring value):
 *         return self.vedis.hset(self.key, key, value)             # <<<<<<<<<<<<<<
 * 
 *     def delete(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hset(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, __pyx_v_value, 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":981
 *         return self.vedis.hmget(self.key, list(keys))
 * 
 *     def set(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         return self.vedis.hset(self.key, key, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":984
 *         return self.vedis.hset(self.key, key, value)
 * 
 *     def delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis.hdel(self.key, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_9delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_9delete(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("delete (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_8delete(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_8delete(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("delete", 0);

  /* "vedis.pyx":985
 * 
 *     def delete(self, basestring key):
 *         self.vedis.hdel(self.key, key)             # <<<<<<<<<<<<<<
 * 
 *     def mdelete(self, list keys):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hdel(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":984
 *         return self.vedis.hset(self.key, key, value)
 * 
 *     def delete(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis.hdel(self.key, key)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":987
 *         self.vedis.hdel(self.key, key)
 * 
 *     def mdelete(self, list keys):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmdel(self.key, keys)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_11mdelete(PyObject *__pyx_v_self, PyObject *__pyx_v_keys); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_11mdelete(PyObject *__pyx_v_self, PyObject *__pyx_v_keys) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mdelete (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), (&PyList_Type), 1, "keys", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_10mdelete(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_keys));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_10mdelete(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_keys) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mdelete", 0);

  /* "vedis.pyx":988
 * 
 *     def mdelete(self, list keys):
 *         return self.vedis.hmdel(self.key, keys)             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hmdel(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_keys, 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":987
 *         self.vedis.hdel(self.key, key)
 * 
 *     def mdelete(self, list keys):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmdel(self.key, keys)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.mdelete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":990
 *         return self.vedis.hmdel(self.key, keys)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hkeys(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_13keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_13keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_12keys(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_12keys(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("keys", 0);

  /* "vedis.pyx":991
 * 
 *     def keys(self):
 *         return self.vedis.hkeys(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def values(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hkeys(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":990
 *         return self.vedis.hmdel(self.key, keys)
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hkeys(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":993
 *         return self.vedis.hkeys(self.key)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hvals(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_15values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_15values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("values (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_14values(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_14values(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("values", 0);

  /* "vedis.pyx":994
 * 
 *     def values(self):
 *         return self.vedis.hvals(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hvals(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":993
 *         return self.vedis.hkeys(self.key)
 * 
 *     def values(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hvals(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":996
 *         return self.vedis.hvals(self.key)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hitems(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_17items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_17items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("items (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_16items(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_16items(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("items", 0);

  /* "vedis.pyx":997
 * 
 *     def items(self):
 *         return self.vedis.hitems(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def update(self, **kwargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hitems(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":996
 *         return self.vedis.hvals(self.key)
 * 
 *     def items(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hitems(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":999
 *         return self.vedis.hitems(self.key)
 * 
 *     def update(self, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmset(self.key, kwargs)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_19update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_19update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("update", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "update", 1))) return NULL;
  __pyx_v_kwargs = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
  if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  __pyx_r = __pyx_pf_5vedis_4Hash_18update(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_18update(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("update", 0);

  /* "vedis.pyx":1000
 * 
 *     def update(self, **kwargs):
 *         return self.vedis.hmset(self.key, kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def to_dict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hmset(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_kwargs, 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":999
 *         return self.vedis.hitems(self.key)
 * 
 *     def update(self, **kwargs):             # <<<<<<<<<<<<<<
 *         return self.vedis.hmset(self.key, kwargs)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1002
 *         return self.vedis.hmset(self.key, kwargs)
 * 
 *     def to_dict(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hgetall(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_21to_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_21to_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_20to_dict(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_20to_dict(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_dict", 0);

  /* "vedis.pyx":1003
 * 
 *     def to_dict(self):
 *         return self.vedis.hgetall(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hgetall(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1002
 *         return self.vedis.hmset(self.key, kwargs)
 * 
 *     def to_dict(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hgetall(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1005
 *         return self.vedis.hgetall(self.key)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hlen(self.key)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5vedis_4Hash_23__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5vedis_4Hash_23__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_22__len__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_5vedis_4Hash_22__len__(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "vedis.pyx":1006
 * 
 *     def __len__(self):
 *         return self.vedis.hlen(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, basestring key):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hlen(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1005
 *         return self.vedis.hgetall(self.key)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.hlen(self.key)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1008
 *         return self.vedis.hlen(self.key)
 * 
 *     def __contains__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hexists(self.key, key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_4Hash_25__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_4Hash_25__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_24__contains__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_4Hash_24__contains__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "vedis.pyx":1009
 * 
 *     def __contains__(self, basestring key):
 *         return self.vedis.hexists(self.key, key)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, basestring key, basestring value):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hexists(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1008
 *         return self.vedis.hlen(self.key)
 * 
 *     def __contains__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hexists(self.key, key)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1011
 *         return self.vedis.hexists(self.key, key)
 * 
 *     def __setitem__(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         self.vedis.hset(self.key, key, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_4Hash_27__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5vedis_4Hash_27__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyBaseString_Type), 1, "value", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_26__setitem__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key), ((PyObject*)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_4Hash_26__setitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "vedis.pyx":1012
 * 
 *     def __setitem__(self, basestring key, basestring value):
 *         self.vedis.hset(self.key, key, value)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, basestring key):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hset(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, __pyx_v_value, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":1011
 *         return self.vedis.hexists(self.key, key)
 * 
 *     def __setitem__(self, basestring key, basestring value):             # <<<<<<<<<<<<<<
 *         self.vedis.hset(self.key, key, value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1014
 *         self.vedis.hset(self.key, key, value)
 * 
 *     def __getitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hget(self.key, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_29__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_29__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_28__getitem__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_28__getitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "vedis.pyx":1015
 * 
 *     def __getitem__(self, basestring key):
 *         return self.vedis.hget(self.key, key)             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, basestring key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hget(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1014
 *         self.vedis.hset(self.key, key, value)
 * 
 *     def __getitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         return self.vedis.hget(self.key, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1017
 *         return self.vedis.hget(self.key, key)
 * 
 *     def __delitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis.hdel(self.key, key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_4Hash_31__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_4Hash_31__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4Hash_30__delitem__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_4Hash_30__delitem__(struct __pyx_obj_5vedis_Hash *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "vedis.pyx":1018
 * 
 *     def __delitem__(self, basestring key):
 *         self.vedis.hdel(self.key, key)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hdel(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_v_key, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":1017
 *         return self.vedis.hget(self.key, key)
 * 
 *     def __delitem__(self, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis.hdel(self.key, key)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1020
 *         self.vedis.hdel(self.key, key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.vedis.hkeys(self.key))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_33__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_33__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_32__iter__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_32__iter__(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "vedis.pyx":1021
 * 
 *     def __iter__(self):
 *         return iter(self.vedis.hkeys(self.key))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->hkeys(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1020
 *         self.vedis.hdel(self.key, key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.vedis.hkeys(self.key))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Hash.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1023
 *         return iter(self.vedis.hkeys(self.key))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<Hash: %s>' % self.key
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4Hash_35__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_4Hash_35__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4Hash_34__repr__(((struct __pyx_obj_5vedis_Hash *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4Hash_34__repr__(struct __pyx_obj_5vedis_Hash *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "vedis.pyx":1024
 * 
 *     def __repr__(self):
 *         return '<Hash: %s>' % self.key             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Hash_s, __pyx_v_self->key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1023
 *         return iter(self.vedis.hkeys(self.key))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<Hash: %s>' % self.key
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Hash.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1031
 *     cdef readonly basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

/* Python wrapper */
static int __pyx_pw_5vedis_3Set_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_3Set_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vedis,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_vedis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      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 = 1031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vedis = ((struct __pyx_obj_5vedis_Vedis *)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.Set.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vedis), __pyx_ptype_5vedis_Vedis, 1, "vedis", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_3Set___init__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self), __pyx_v_vedis, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_3Set___init__(struct __pyx_obj_5vedis_Set *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vedis.pyx":1032
 * 
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis             # <<<<<<<<<<<<<<
 *         self.key = key
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GOTREF(__pyx_v_self->vedis);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vedis));
  __pyx_v_self->vedis = __pyx_v_vedis;

  /* "vedis.pyx":1033
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis
 *         self.key = key             # <<<<<<<<<<<<<<
 * 
 *     def add(self, *values):
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "vedis.pyx":1031
 *     cdef readonly basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1035
 *         self.key = key
 * 
 *     def add(self, *values):             # <<<<<<<<<<<<<<
 *         return self.vedis.smadd(self.key, list(values))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_3add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_3add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_values = __pyx_args;
  __pyx_r = __pyx_pf_5vedis_3Set_2add(((struct __pyx_obj_5vedis_Set *)__pyx_v_self), __pyx_v_values);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_2add(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);

  /* "vedis.pyx":1036
 * 
 *     def add(self, *values):
 *         return self.vedis.smadd(self.key, list(values))             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(__pyx_v_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->smadd(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_2), 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1035
 *         self.key = key
 * 
 *     def add(self, *values):             # <<<<<<<<<<<<<<
 *         return self.vedis.smadd(self.key, list(values))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.Set.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1038
 *         return self.vedis.smadd(self.key, list(values))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.scard(self.key)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5vedis_3Set_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5vedis_3Set_5__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_4__len__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_5vedis_3Set_4__len__(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "vedis.pyx":1039
 * 
 *     def __len__(self):
 *         return self.vedis.scard(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, value):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->scard(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1038
 *         return self.vedis.smadd(self.key, list(values))
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.scard(self.key)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1041
 *         return self.vedis.scard(self.key)
 * 
 *     def __contains__(self, value):             # <<<<<<<<<<<<<<
 *         return self.vedis.sismember(self.key, value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_3Set_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5vedis_3Set_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_6__contains__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_3Set_6__contains__(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "vedis.pyx":1042
 * 
 *     def __contains__(self, value):
 *         return self.vedis.sismember(self.key, value)             # <<<<<<<<<<<<<<
 * 
 *     def pop(self):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->sismember(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_v_value), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1041
 *         return self.vedis.scard(self.key)
 * 
 *     def __contains__(self, value):             # <<<<<<<<<<<<<<
 *         return self.vedis.sismember(self.key, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("vedis.Set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1044
 *         return self.vedis.sismember(self.key, value)
 * 
 *     def pop(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.spop(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_9pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_9pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_8pop(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_8pop(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);

  /* "vedis.pyx":1045
 * 
 *     def pop(self):
 *         return self.vedis.spop(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def peek(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->spop(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1044
 *         return self.vedis.sismember(self.key, value)
 * 
 *     def pop(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.spop(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Set.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1047
 *         return self.vedis.spop(self.key)
 * 
 *     def peek(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.speek(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_11peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_11peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("peek (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_10peek(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_10peek(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek", 0);

  /* "vedis.pyx":1048
 * 
 *     def peek(self):
 *         return self.vedis.speek(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def top(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->speek(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1047
 *         return self.vedis.spop(self.key)
 * 
 *     def peek(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.speek(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Set.peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1050
 *         return self.vedis.speek(self.key)
 * 
 *     def top(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.stop(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_13top(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_13top(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("top (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_12top(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_12top(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("top", 0);

  /* "vedis.pyx":1051
 * 
 *     def top(self):
 *         return self.vedis.stop(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def remove(self, *values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->stop(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1050
 *         return self.vedis.speek(self.key)
 * 
 *     def top(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.stop(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Set.top", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1053
 *         return self.vedis.stop(self.key)
 * 
 *     def remove(self, *values):             # <<<<<<<<<<<<<<
 *         return self.vedis.smrem(self.key, list(values))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_15remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_15remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "remove", 0))) return NULL;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_values = __pyx_args;
  __pyx_r = __pyx_pf_5vedis_3Set_14remove(((struct __pyx_obj_5vedis_Set *)__pyx_v_self), __pyx_v_values);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_14remove(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);

  /* "vedis.pyx":1054
 * 
 *     def remove(self, *values):
 *         return self.vedis.smrem(self.key, list(values))             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, key):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(__pyx_v_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->smrem(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_2), 0)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1053
 *         return self.vedis.stop(self.key)
 * 
 *     def remove(self, *values):             # <<<<<<<<<<<<<<
 *         return self.vedis.smrem(self.key, list(values))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.Set.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1056
 *         return self.vedis.smrem(self.key, list(values))
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         self.remove(key)
 * 
 */

/* Python wrapper */
static int __pyx_pw_5vedis_3Set_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static int __pyx_pw_5vedis_3Set_17__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_16__delitem__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_3Set_16__delitem__(struct __pyx_obj_5vedis_Set *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "vedis.pyx":1057
 * 
 *     def __delitem__(self, key):
 *         self.remove(key)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL;
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "vedis.pyx":1056
 *         return self.vedis.smrem(self.key, list(values))
 * 
 *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
 *         self.remove(key)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("vedis.Set.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1059
 *         self.remove(key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.vedis.smembers(self.key))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_19__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_19__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_18__iter__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_18__iter__(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "vedis.pyx":1060
 * 
 *     def __iter__(self):
 *         return iter(self.vedis.smembers(self.key))             # <<<<<<<<<<<<<<
 * 
 *     def to_set(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->smembers(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1059
 *         self.remove(key)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(self.vedis.smembers(self.key))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1062
 *         return iter(self.vedis.smembers(self.key))
 * 
 *     def to_set(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.smembers(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_21to_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_21to_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_set (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_20to_set(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_20to_set(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_set", 0);

  /* "vedis.pyx":1063
 * 
 *     def to_set(self):
 *         return self.vedis.smembers(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, rhs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->smembers(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1062
 *         return iter(self.vedis.smembers(self.key))
 * 
 *     def to_set(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.smembers(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.Set.to_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1065
 *         return self.vedis.smembers(self.key)
 * 
 *     def __sub__(self, rhs):             # <<<<<<<<<<<<<<
 *         return self.vedis.sdiff(self.key, rhs.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_23__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_23__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_22__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_22__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "vedis.pyx":1066
 * 
 *     def __sub__(self, rhs):
 *         return self.vedis.sdiff(self.key, rhs.key)             # <<<<<<<<<<<<<<
 * 
 *     def __and__(self, rhs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vedis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sdiff); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_key); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1065
 *         return self.vedis.smembers(self.key)
 * 
 *     def __sub__(self, rhs):             # <<<<<<<<<<<<<<
 *         return self.vedis.sdiff(self.key, rhs.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vedis.Set.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1068
 *         return self.vedis.sdiff(self.key, rhs.key)
 * 
 *     def __and__(self, rhs):             # <<<<<<<<<<<<<<
 *         return self.vedis.sinter(self.key, rhs.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_25__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_25__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_24__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_24__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__and__", 0);

  /* "vedis.pyx":1069
 * 
 *     def __and__(self, rhs):
 *         return self.vedis.sinter(self.key, rhs.key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_vedis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sinter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_key); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (__pyx_t_5) {
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL;
  }
  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1068
 *         return self.vedis.sdiff(self.key, rhs.key)
 * 
 *     def __and__(self, rhs):             # <<<<<<<<<<<<<<
 *         return self.vedis.sinter(self.key, rhs.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("vedis.Set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1028
 * 
 * cdef class Set(object):
 *     cdef readonly Vedis vedis             # <<<<<<<<<<<<<<
 *     cdef readonly basestring key
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_5vedis_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_5vedis_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_5vedis___get__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_5vedis___get__(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->vedis));
  __pyx_r = ((PyObject *)__pyx_v_self->vedis);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1029
 * cdef class Set(object):
 *     cdef readonly Vedis vedis
 *     cdef readonly basestring key             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, Vedis vedis, basestring key):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_3Set_3key_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_3Set_3key_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_3Set_3key___get__(((struct __pyx_obj_5vedis_Set *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_3Set_3key___get__(struct __pyx_obj_5vedis_Set *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->key);
  __pyx_r = __pyx_v_self->key;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1076
 *     cdef basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

/* Python wrapper */
static int __pyx_pw_5vedis_4List_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5vedis_4List_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis = 0;
  PyObject *__pyx_v_key = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vedis,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    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_vedis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      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 = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vedis = ((struct __pyx_obj_5vedis_Vedis *)values[0]);
    __pyx_v_key = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("vedis.List.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vedis), __pyx_ptype_5vedis_Vedis, 1, "vedis", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyBaseString_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_5vedis_4List___init__(((struct __pyx_obj_5vedis_List *)__pyx_v_self), __pyx_v_vedis, __pyx_v_key);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_5vedis_4List___init__(struct __pyx_obj_5vedis_List *__pyx_v_self, struct __pyx_obj_5vedis_Vedis *__pyx_v_vedis, PyObject *__pyx_v_key) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "vedis.pyx":1077
 * 
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis             # <<<<<<<<<<<<<<
 *         self.key = key
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vedis));
  __Pyx_GOTREF(__pyx_v_self->vedis);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->vedis));
  __pyx_v_self->vedis = __pyx_v_vedis;

  /* "vedis.pyx":1078
 *     def __init__(self, Vedis vedis, basestring key):
 *         self.vedis = vedis
 *         self.key = key             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index):
 */
  __Pyx_INCREF(__pyx_v_key);
  __Pyx_GIVEREF(__pyx_v_key);
  __Pyx_GOTREF(__pyx_v_self->key);
  __Pyx_DECREF(__pyx_v_self->key);
  __pyx_v_self->key = __pyx_v_key;

  /* "vedis.pyx":1076
 *     cdef basestring key
 * 
 *     def __init__(self, Vedis vedis, basestring key):             # <<<<<<<<<<<<<<
 *         self.vedis = vedis
 *         self.key = key
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1080
 *         self.key = key
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         return self.vedis.lindex(self.key, index)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_5vedis_4List_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_2__getitem__(((struct __pyx_obj_5vedis_List *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4List_2__getitem__(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "vedis.pyx":1081
 * 
 *     def __getitem__(self, index):
 *         return self.vedis.lindex(self.key, index)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->lindex(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1080
 *         self.key = key
 * 
 *     def __getitem__(self, index):             # <<<<<<<<<<<<<<
 *         return self.vedis.lindex(self.key, index)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("vedis.List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1083
 *         return self.vedis.lindex(self.key, index)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.llen(self.key)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_5vedis_4List_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_5vedis_4List_5__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_4__len__(((struct __pyx_obj_5vedis_List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_5vedis_4List_4__len__(struct __pyx_obj_5vedis_List *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "vedis.pyx":1084
 * 
 *     def __len__(self):
 *         return self.vedis.llen(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def pop(self):
 */
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->llen(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1083
 *         return self.vedis.lindex(self.key, index)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.llen(self.key)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1086
 *         return self.vedis.llen(self.key)
 * 
 *     def pop(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.lpop(self.key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_7pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5vedis_4List_7pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_6pop(((struct __pyx_obj_5vedis_List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4List_6pop(struct __pyx_obj_5vedis_List *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);

  /* "vedis.pyx":1087
 * 
 *     def pop(self):
 *         return self.vedis.lpop(self.key)             # <<<<<<<<<<<<<<
 * 
 *     def append(self, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->lpop(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1086
 *         return self.vedis.llen(self.key)
 * 
 *     def pop(self):             # <<<<<<<<<<<<<<
 *         return self.vedis.lpop(self.key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1089
 *         return self.vedis.lpop(self.key)
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         return self.vedis.lpush(self.key, value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_9append(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static PyObject *__pyx_pw_5vedis_4List_9append(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_8append(((struct __pyx_obj_5vedis_List *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4List_8append(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "vedis.pyx":1090
 * 
 *     def append(self, value):
 *         return self.vedis.lpush(self.key, value)             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->lpush(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_v_value), 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1089
 *         return self.vedis.lpop(self.key)
 * 
 *     def append(self, value):             # <<<<<<<<<<<<<<
 *         return self.vedis.lpush(self.key, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1092
 *         return self.vedis.lpush(self.key, value)
 * 
 *     def extend(self, values):             # <<<<<<<<<<<<<<
 *         return self.vedis.lmpush(self.key, values)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_11extend(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_5vedis_4List_11extend(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_10extend(((struct __pyx_obj_5vedis_List *)__pyx_v_self), ((PyObject *)__pyx_v_values));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4List_10extend(struct __pyx_obj_5vedis_List *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "vedis.pyx":1093
 * 
 *     def extend(self, values):
 *         return self.vedis.lmpush(self.key, values)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->key;
  __Pyx_INCREF(__pyx_t_1);
  if (!(likely(PyList_CheckExact(__pyx_v_values))||((__pyx_v_values) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_values)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_5vedis_Vedis *)__pyx_v_self->vedis->__pyx_vtab)->lmpush(__pyx_v_self->vedis, ((PyObject*)__pyx_t_1), ((PyObject*)__pyx_v_values), 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1092
 *         return self.vedis.lpush(self.key, value)
 * 
 *     def extend(self, values):             # <<<<<<<<<<<<<<
 *         return self.vedis.lmpush(self.key, values)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "vedis.pyx":1095
 *         return self.vedis.lmpush(self.key, values)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         def gen():
 *             l = len(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_13__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5vedis_4List_13__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_12__iter__(((struct __pyx_obj_5vedis_List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_5vedis_4List_8__iter___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "vedis.pyx":1096
 * 
 *     def __iter__(self):
 *         def gen():             # <<<<<<<<<<<<<<
 *             l = len(self)
 *             for i in range(l):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5vedis_4List_8__iter___1gen(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_5vedis_4List_8__iter___1gen = {"gen", (PyCFunction)__pyx_pw_5vedis_4List_8__iter___1gen, METH_NOARGS, 0};
static PyObject *__pyx_pw_5vedis_4List_8__iter___1gen(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gen (wrapper)", 0);
  __pyx_r = __pyx_pf_5vedis_4List_8__iter___gen(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_5vedis_4List_8__iter___gen(PyObject *__pyx_self) {
  struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gen", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)__pyx_tp_new_5vedis___pyx_scope_struct_7_gen(__pyx_ptype_5vedis___pyx_scope_struct_7_gen, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5vedis_4List_8__iter___2generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_gen, __pyx_n_s_iter___locals_gen); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("vedis.List.__iter__.gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_5vedis_4List_8__iter___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *__pyx_cur_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":1097
 *     def __iter__(self):
 *         def gen():
 *             l = len(self)             # <<<<<<<<<<<<<<
 *             for i in range(l):
 *                 yield self[i]
 */
  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_cur_scope->__pyx_v_l = __pyx_t_2;

  /* "vedis.pyx":1098
 *         def gen():
 *             l = len(self)
 *             for i in range(l):             # <<<<<<<<<<<<<<
 *                 yield self[i]
 *         return iter(gen())
 */
  __pyx_t_2 = __pyx_cur_scope->__pyx_v_l;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_3;

    /* "vedis.pyx":1099
 *             l = len(self)
 *             for i in range(l):
 *                 yield self[i]             # <<<<<<<<<<<<<<
 *         return iter(gen())
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "vedis.pyx":1096
 * 
 *     def __iter__(self):
 *         def gen():             # <<<<<<<<<<<<<<
 *             l = len(self)
 *             for i in range(l):
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_generator->resume_label = -1;
  __Pyx_Generator_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return NULL;
}

/* "vedis.pyx":1095
 *         return self.vedis.lmpush(self.key, values)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         def gen():
 *             l = len(self)
 */

static PyObject *__pyx_pf_5vedis_4List_12__iter__(struct __pyx_obj_5vedis_List *__pyx_v_self) {
  struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *__pyx_cur_scope;
  PyObject *__pyx_v_gen = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)__pyx_tp_new_5vedis___pyx_scope_struct_6___iter__(__pyx_ptype_5vedis___pyx_scope_struct_6___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "vedis.pyx":1096
 * 
 *     def __iter__(self):
 *         def gen():             # <<<<<<<<<<<<<<
 *             l = len(self)
 *             for i in range(l):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5vedis_4List_8__iter___1gen, 0, __pyx_n_s_iter___locals_gen, ((PyObject*)__pyx_cur_scope), __pyx_n_s_vedis, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_gen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "vedis.pyx":1100
 *             for i in range(l):
 *                 yield self[i]
 *         return iter(gen())             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_pf_5vedis_4List_8__iter___gen(__pyx_v_gen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "vedis.pyx":1095
 *         return self.vedis.lmpush(self.key, values)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         def gen():
 *             l = len(self)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("vedis.List.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gen);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_5vedis_Vedis __pyx_vtable_5vedis_Vedis;

static PyObject *__pyx_tp_new_5vedis_Vedis(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_Vedis *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_Vedis *)o);
  p->__pyx_vtab = __pyx_vtabptr_5vedis_Vedis;
  p->filename = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_5vedis_5Vedis_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis_Vedis(PyObject *o) {
  struct __pyx_obj_5vedis_Vedis *p = (struct __pyx_obj_5vedis_Vedis *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_5vedis_5Vedis_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->filename);
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_5vedis_Vedis(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);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_5vedis_Vedis(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_5vedis_5Vedis_29__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_5vedis_5Vedis_33__delitem__(o, i);
  }
}

static PyObject *__pyx_getprop_5vedis_5Vedis_is_memory(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5vedis_5Vedis_9is_memory_1__get__(o);
}

static PyObject *__pyx_getprop_5vedis_5Vedis_is_open(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5vedis_5Vedis_7is_open_1__get__(o);
}

static PyObject *__pyx_getprop_5vedis_5Vedis_filename(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5vedis_5Vedis_8filename_1__get__(o);
}

static PyMethodDef __pyx_methods_5vedis_Vedis[] = {
  {"open", (PyCFunction)__pyx_pw_5vedis_5Vedis_7open, METH_NOARGS, __pyx_doc_5vedis_5Vedis_6open},
  {"close", (PyCFunction)__pyx_pw_5vedis_5Vedis_9close, METH_NOARGS, __pyx_doc_5vedis_5Vedis_8close},
  {"__enter__", (PyCFunction)__pyx_pw_5vedis_5Vedis_11__enter__, METH_NOARGS, __pyx_doc_5vedis_5Vedis_10__enter__},
  {"__exit__", (PyCFunction)__pyx_pw_5vedis_5Vedis_13__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"disable_autocommit", (PyCFunction)__pyx_pw_5vedis_5Vedis_15disable_autocommit, METH_NOARGS, 0},
  {"store", (PyCFunction)__pyx_pw_5vedis_5Vedis_17store, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5vedis_5Vedis_16store},
  {"fetch", (PyCFunction)__pyx_pw_5vedis_5Vedis_19fetch, METH_O, __pyx_doc_5vedis_5Vedis_18fetch},
  {"delete", (PyCFunction)__pyx_pw_5vedis_5Vedis_21delete, METH_O, __pyx_doc_5vedis_5Vedis_20delete},
  {"append", (PyCFunction)__pyx_pw_5vedis_5Vedis_23append, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5vedis_5Vedis_22append},
  {"exists", (PyCFunction)__pyx_pw_5vedis_5Vedis_25exists, METH_O, 0},
  {"update", (PyCFunction)__pyx_pw_5vedis_5Vedis_27update, METH_O, 0},
  {"execute", (PyCFunction)__pyx_pw_5vedis_5Vedis_37execute, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_result", (PyCFunction)__pyx_pw_5vedis_5Vedis_39get_result, METH_NOARGS, 0},
  {"begin", (PyCFunction)__pyx_pw_5vedis_5Vedis_41begin, METH_NOARGS, __pyx_doc_5vedis_5Vedis_40begin},
  {"commit", (PyCFunction)__pyx_pw_5vedis_5Vedis_43commit, METH_NOARGS, __pyx_doc_5vedis_5Vedis_42commit},
  {"rollback", (PyCFunction)__pyx_pw_5vedis_5Vedis_45rollback, METH_NOARGS, __pyx_doc_5vedis_5Vedis_44rollback},
  {"transaction", (PyCFunction)__pyx_pw_5vedis_5Vedis_47transaction, METH_NOARGS, __pyx_doc_5vedis_5Vedis_46transaction},
  {"commit_on_success", (PyCFunction)__pyx_pw_5vedis_5Vedis_49commit_on_success, METH_O, 0},
  {"random_string", (PyCFunction)__pyx_pw_5vedis_5Vedis_51random_string, METH_O, __pyx_doc_5vedis_5Vedis_50random_string},
  {"random_int", (PyCFunction)__pyx_pw_5vedis_5Vedis_53random_int, METH_NOARGS, __pyx_doc_5vedis_5Vedis_52random_int},
  {"copy", (PyCFunction)__pyx_pw_5vedis_5Vedis_55copy, METH_VARARGS|METH_KEYWORDS, 0},
  {"move", (PyCFunction)__pyx_pw_5vedis_5Vedis_57move, METH_VARARGS|METH_KEYWORDS, 0},
  {"rand", (PyCFunction)__pyx_pw_5vedis_5Vedis_59rand, METH_VARARGS|METH_KEYWORDS, 0},
  {"randstr", (PyCFunction)__pyx_pw_5vedis_5Vedis_61randstr, METH_O, 0},
  {"time", (PyCFunction)__pyx_pw_5vedis_5Vedis_63time, METH_NOARGS, 0},
  {"date", (PyCFunction)__pyx_pw_5vedis_5Vedis_65date, METH_NOARGS, 0},
  {"operating_system", (PyCFunction)__pyx_pw_5vedis_5Vedis_67operating_system, METH_NOARGS, 0},
  {"strip_tags", (PyCFunction)__pyx_pw_5vedis_5Vedis_69strip_tags, METH_O, 0},
  {"str_split", (PyCFunction)__pyx_pw_5vedis_5Vedis_71str_split, METH_VARARGS|METH_KEYWORDS, 0},
  {"size_format", (PyCFunction)__pyx_pw_5vedis_5Vedis_73size_format, METH_O, 0},
  {"soundex", (PyCFunction)__pyx_pw_5vedis_5Vedis_75soundex, METH_O, 0},
  {"base64", (PyCFunction)__pyx_pw_5vedis_5Vedis_77base64, METH_O, 0},
  {"base64_decode", (PyCFunction)__pyx_pw_5vedis_5Vedis_79base64_decode, METH_O, 0},
  {"table_list", (PyCFunction)__pyx_pw_5vedis_5Vedis_81table_list, METH_NOARGS, 0},
  {"get", (PyCFunction)__pyx_pw_5vedis_5Vedis_83get, METH_O, 0},
  {"set", (PyCFunction)__pyx_pw_5vedis_5Vedis_85set, METH_VARARGS|METH_KEYWORDS, 0},
  {"mget", (PyCFunction)__pyx_pw_5vedis_5Vedis_87mget, METH_O, 0},
  {"mset", (PyCFunction)__pyx_pw_5vedis_5Vedis_89mset, METH_O, 0},
  {"setnx", (PyCFunction)__pyx_pw_5vedis_5Vedis_91setnx, METH_VARARGS|METH_KEYWORDS, 0},
  {"msetnx", (PyCFunction)__pyx_pw_5vedis_5Vedis_93msetnx, METH_O, 0},
  {"get_set", (PyCFunction)__pyx_pw_5vedis_5Vedis_95get_set, METH_VARARGS|METH_KEYWORDS, 0},
  {"strlen", (PyCFunction)__pyx_pw_5vedis_5Vedis_97strlen, METH_O, 0},
  {"incr", (PyCFunction)__pyx_pw_5vedis_5Vedis_99incr, METH_O, 0},
  {"decr", (PyCFunction)__pyx_pw_5vedis_5Vedis_101decr, METH_O, 0},
  {"incr_by", (PyCFunction)__pyx_pw_5vedis_5Vedis_103incr_by, METH_VARARGS|METH_KEYWORDS, 0},
  {"decr_by", (PyCFunction)__pyx_pw_5vedis_5Vedis_105decr_by, METH_VARARGS|METH_KEYWORDS, 0},
  {"hset", (PyCFunction)__pyx_pw_5vedis_5Vedis_107hset, METH_VARARGS|METH_KEYWORDS, 0},
  {"hsetnx", (PyCFunction)__pyx_pw_5vedis_5Vedis_109hsetnx, METH_VARARGS|METH_KEYWORDS, 0},
  {"hget", (PyCFunction)__pyx_pw_5vedis_5Vedis_111hget, METH_VARARGS|METH_KEYWORDS, 0},
  {"hdel", (PyCFunction)__pyx_pw_5vedis_5Vedis_113hdel, METH_VARARGS|METH_KEYWORDS, 0},
  {"hmdel", (PyCFunction)__pyx_pw_5vedis_5Vedis_115hmdel, METH_VARARGS|METH_KEYWORDS, 0},
  {"hkeys", (PyCFunction)__pyx_pw_5vedis_5Vedis_117hkeys, METH_O, 0},
  {"hvals", (PyCFunction)__pyx_pw_5vedis_5Vedis_119hvals, METH_O, 0},
  {"hgetall", (PyCFunction)__pyx_pw_5vedis_5Vedis_121hgetall, METH_O, 0},
  {"hitems", (PyCFunction)__pyx_pw_5vedis_5Vedis_123hitems, METH_O, 0},
  {"hlen", (PyCFunction)__pyx_pw_5vedis_5Vedis_125hlen, METH_O, 0},
  {"hexists", (PyCFunction)__pyx_pw_5vedis_5Vedis_127hexists, METH_VARARGS|METH_KEYWORDS, 0},
  {"hmset", (PyCFunction)__pyx_pw_5vedis_5Vedis_129hmset, METH_VARARGS|METH_KEYWORDS, 0},
  {"hmget", (PyCFunction)__pyx_pw_5vedis_5Vedis_131hmget, METH_VARARGS|METH_KEYWORDS, 0},
  {"sadd", (PyCFunction)__pyx_pw_5vedis_5Vedis_133sadd, METH_VARARGS|METH_KEYWORDS, 0},
  {"smadd", (PyCFunction)__pyx_pw_5vedis_5Vedis_135smadd, METH_VARARGS|METH_KEYWORDS, 0},
  {"scard", (PyCFunction)__pyx_pw_5vedis_5Vedis_137scard, METH_O, 0},
  {"sismember", (PyCFunction)__pyx_pw_5vedis_5Vedis_139sismember, METH_VARARGS|METH_KEYWORDS, 0},
  {"spop", (PyCFunction)__pyx_pw_5vedis_5Vedis_141spop, METH_O, 0},
  {"speek", (PyCFunction)__pyx_pw_5vedis_5Vedis_143speek, METH_O, 0},
  {"stop", (PyCFunction)__pyx_pw_5vedis_5Vedis_145stop, METH_O, 0},
  {"srem", (PyCFunction)__pyx_pw_5vedis_5Vedis_147srem, METH_VARARGS|METH_KEYWORDS, 0},
  {"smrem", (PyCFunction)__pyx_pw_5vedis_5Vedis_149smrem, METH_VARARGS|METH_KEYWORDS, 0},
  {"smembers", (PyCFunction)__pyx_pw_5vedis_5Vedis_151smembers, METH_O, 0},
  {"sdiff", (PyCFunction)__pyx_pw_5vedis_5Vedis_153sdiff, METH_VARARGS|METH_KEYWORDS, 0},
  {"sinter", (PyCFunction)__pyx_pw_5vedis_5Vedis_155sinter, METH_VARARGS|METH_KEYWORDS, 0},
  {"slen", (PyCFunction)__pyx_pw_5vedis_5Vedis_157slen, METH_O, 0},
  {"lindex", (PyCFunction)__pyx_pw_5vedis_5Vedis_159lindex, METH_VARARGS|METH_KEYWORDS, 0},
  {"llen", (PyCFunction)__pyx_pw_5vedis_5Vedis_161llen, METH_O, 0},
  {"lpop", (PyCFunction)__pyx_pw_5vedis_5Vedis_163lpop, METH_O, 0},
  {"lpush", (PyCFunction)__pyx_pw_5vedis_5Vedis_165lpush, METH_VARARGS|METH_KEYWORDS, 0},
  {"lmpush", (PyCFunction)__pyx_pw_5vedis_5Vedis_167lmpush, METH_VARARGS|METH_KEYWORDS, 0},
  {"lpushx", (PyCFunction)__pyx_pw_5vedis_5Vedis_169lpushx, METH_VARARGS|METH_KEYWORDS, 0},
  {"lmpushx", (PyCFunction)__pyx_pw_5vedis_5Vedis_171lmpushx, METH_VARARGS|METH_KEYWORDS, 0},
  {"lib_version", (PyCFunction)__pyx_pw_5vedis_5Vedis_173lib_version, METH_NOARGS, 0},
  {"Hash", (PyCFunction)__pyx_pw_5vedis_5Vedis_175Hash, METH_O, 0},
  {"Set", (PyCFunction)__pyx_pw_5vedis_5Vedis_177Set, METH_O, 0},
  {"List", (PyCFunction)__pyx_pw_5vedis_5Vedis_179List, METH_O, 0},
  {"register", (PyCFunction)__pyx_pw_5vedis_5Vedis_181register, METH_O, 0},
  {"delete_command", (PyCFunction)__pyx_pw_5vedis_5Vedis_183delete_command, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5vedis_Vedis[] = {
  {(char *)"is_memory", __pyx_getprop_5vedis_5Vedis_is_memory, 0, 0, 0},
  {(char *)"is_open", __pyx_getprop_5vedis_5Vedis_is_open, 0, 0, 0},
  {(char *)"filename", __pyx_getprop_5vedis_5Vedis_filename, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Vedis = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5vedis_Vedis, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_5vedis_5Vedis_35__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Vedis = {
  0, /*mp_length*/
  __pyx_pw_5vedis_5Vedis_31__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_5vedis_Vedis, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5vedis_Vedis = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.Vedis", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_Vedis), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_Vedis, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Vedis, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Vedis, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  "\n    Vedis database wrapper.\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_Vedis, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5vedis_Vedis, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5vedis_5Vedis_5__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_Vedis, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_5vedis_VedisContext __pyx_vtable_5vedis_VedisContext;

static PyObject *__pyx_tp_new_5vedis_VedisContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_VedisContext *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_VedisContext *)o);
  p->__pyx_vtab = __pyx_vtabptr_5vedis_VedisContext;
  if (unlikely(__pyx_pw_5vedis_12VedisContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis_VedisContext(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_5vedis_VedisContext(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);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_5vedis_VedisContext(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_5vedis_12VedisContext_13__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_5vedis_12VedisContext_17__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_5vedis_VedisContext[] = {
  {"store", (PyCFunction)__pyx_pw_5vedis_12VedisContext_3store, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5vedis_12VedisContext_2store},
  {"fetch", (PyCFunction)__pyx_pw_5vedis_12VedisContext_5fetch, METH_O, __pyx_doc_5vedis_12VedisContext_4fetch},
  {"delete", (PyCFunction)__pyx_pw_5vedis_12VedisContext_7delete, METH_O, __pyx_doc_5vedis_12VedisContext_6delete},
  {"append", (PyCFunction)__pyx_pw_5vedis_12VedisContext_9append, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5vedis_12VedisContext_8append},
  {"exists", (PyCFunction)__pyx_pw_5vedis_12VedisContext_11exists, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_VedisContext = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5vedis_VedisContext, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_5vedis_12VedisContext_19__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_VedisContext = {
  0, /*mp_length*/
  __pyx_pw_5vedis_12VedisContext_15__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_5vedis_VedisContext, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5vedis_VedisContext = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.VedisContext", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_VedisContext), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_VedisContext, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_VedisContext, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_VedisContext, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_VedisContext, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_VedisContext, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5vedis_Transaction(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_Transaction *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_Transaction *)o);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5vedis_Transaction(PyObject *o) {
  struct __pyx_obj_5vedis_Transaction *p = (struct __pyx_obj_5vedis_Transaction *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vedis);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5vedis_Transaction(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis_Transaction *p = (struct __pyx_obj_5vedis_Transaction *)o;
  if (p->vedis) {
    e = (*v)(((PyObject*)p->vedis), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis_Transaction(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis_Transaction *p = (struct __pyx_obj_5vedis_Transaction *)o;
  tmp = ((PyObject*)p->vedis);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_5vedis_Transaction[] = {
  {"__enter__", (PyCFunction)__pyx_pw_5vedis_11Transaction_3__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)__pyx_pw_5vedis_11Transaction_5__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5vedis_Transaction = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.Transaction", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_Transaction), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_Transaction, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Expose transaction as a context manager.", /*tp_doc*/
  __pyx_tp_traverse_5vedis_Transaction, /*tp_traverse*/
  __pyx_tp_clear_5vedis_Transaction, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_Transaction, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5vedis_11Transaction_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_Transaction, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5vedis_Hash(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_Hash *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_Hash *)o);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  p->key = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5vedis_Hash(PyObject *o) {
  struct __pyx_obj_5vedis_Hash *p = (struct __pyx_obj_5vedis_Hash *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vedis);
  Py_CLEAR(p->key);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5vedis_Hash(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis_Hash *p = (struct __pyx_obj_5vedis_Hash *)o;
  if (p->vedis) {
    e = (*v)(((PyObject*)p->vedis), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis_Hash(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis_Hash *p = (struct __pyx_obj_5vedis_Hash *)o;
  tmp = ((PyObject*)p->vedis);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5vedis_Hash(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);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_5vedis_Hash(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_5vedis_4Hash_27__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_5vedis_4Hash_31__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_5vedis_Hash[] = {
  {"get", (PyCFunction)__pyx_pw_5vedis_4Hash_3get, METH_O, 0},
  {"mget", (PyCFunction)__pyx_pw_5vedis_4Hash_5mget, METH_VARARGS|METH_KEYWORDS, 0},
  {"set", (PyCFunction)__pyx_pw_5vedis_4Hash_7set, METH_VARARGS|METH_KEYWORDS, 0},
  {"delete", (PyCFunction)__pyx_pw_5vedis_4Hash_9delete, METH_O, 0},
  {"mdelete", (PyCFunction)__pyx_pw_5vedis_4Hash_11mdelete, METH_O, 0},
  {"keys", (PyCFunction)__pyx_pw_5vedis_4Hash_13keys, METH_NOARGS, 0},
  {"values", (PyCFunction)__pyx_pw_5vedis_4Hash_15values, METH_NOARGS, 0},
  {"items", (PyCFunction)__pyx_pw_5vedis_4Hash_17items, METH_NOARGS, 0},
  {"update", (PyCFunction)__pyx_pw_5vedis_4Hash_19update, METH_VARARGS|METH_KEYWORDS, 0},
  {"to_dict", (PyCFunction)__pyx_pw_5vedis_4Hash_21to_dict, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Hash = {
  __pyx_pw_5vedis_4Hash_23__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5vedis_Hash, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_5vedis_4Hash_25__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Hash = {
  __pyx_pw_5vedis_4Hash_23__len__, /*mp_length*/
  __pyx_pw_5vedis_4Hash_29__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_5vedis_Hash, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5vedis_Hash = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.Hash", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_Hash), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_Hash, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pw_5vedis_4Hash_35__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Hash, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Hash, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis_Hash, /*tp_traverse*/
  __pyx_tp_clear_5vedis_Hash, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5vedis_4Hash_33__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_Hash, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5vedis_4Hash_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_Hash, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5vedis_Set(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_Set *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_Set *)o);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  p->key = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5vedis_Set(PyObject *o) {
  struct __pyx_obj_5vedis_Set *p = (struct __pyx_obj_5vedis_Set *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vedis);
  Py_CLEAR(p->key);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5vedis_Set(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis_Set *p = (struct __pyx_obj_5vedis_Set *)o;
  if (p->vedis) {
    e = (*v)(((PyObject*)p->vedis), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis_Set(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis_Set *p = (struct __pyx_obj_5vedis_Set *)o;
  tmp = ((PyObject*)p->vedis);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static int __pyx_mp_ass_subscript_5vedis_Set(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript assignment not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
  else {
    return __pyx_pw_5vedis_3Set_17__delitem__(o, i);
  }
}

static PyObject *__pyx_getprop_5vedis_3Set_vedis(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5vedis_3Set_5vedis_1__get__(o);
}

static PyObject *__pyx_getprop_5vedis_3Set_key(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5vedis_3Set_3key_1__get__(o);
}

static PyMethodDef __pyx_methods_5vedis_Set[] = {
  {"add", (PyCFunction)__pyx_pw_5vedis_3Set_3add, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_5vedis_3Set_9pop, METH_NOARGS, 0},
  {"peek", (PyCFunction)__pyx_pw_5vedis_3Set_11peek, METH_NOARGS, 0},
  {"top", (PyCFunction)__pyx_pw_5vedis_3Set_13top, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_5vedis_3Set_15remove, METH_VARARGS|METH_KEYWORDS, 0},
  {"to_set", (PyCFunction)__pyx_pw_5vedis_3Set_21to_set, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5vedis_Set[] = {
  {(char *)"vedis", __pyx_getprop_5vedis_3Set_vedis, 0, 0, 0},
  {(char *)"key", __pyx_getprop_5vedis_3Set_key, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Set = {
  0, /*nb_add*/
  __pyx_pw_5vedis_3Set_23__sub__, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  __pyx_pw_5vedis_3Set_25__and__, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Set = {
  __pyx_pw_5vedis_3Set_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_5vedis_3Set_7__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Set = {
  __pyx_pw_5vedis_3Set_5__len__, /*mp_length*/
  0, /*mp_subscript*/
  __pyx_mp_ass_subscript_5vedis_Set, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5vedis_Set = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.Set", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_Set), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_Set, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Set, /*tp_as_number*/
  &__pyx_tp_as_sequence_Set, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Set, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis_Set, /*tp_traverse*/
  __pyx_tp_clear_5vedis_Set, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5vedis_3Set_19__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_Set, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5vedis_Set, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5vedis_3Set_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_Set, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_5vedis_List(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5vedis_List *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_5vedis_List *)o);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  p->key = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5vedis_List(PyObject *o) {
  struct __pyx_obj_5vedis_List *p = (struct __pyx_obj_5vedis_List *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->vedis);
  Py_CLEAR(p->key);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5vedis_List(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis_List *p = (struct __pyx_obj_5vedis_List *)o;
  if (p->vedis) {
    e = (*v)(((PyObject*)p->vedis), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis_List(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis_List *p = (struct __pyx_obj_5vedis_List *)o;
  tmp = ((PyObject*)p->vedis);
  p->vedis = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_5vedis_List(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);
  Py_DECREF(x);
  return r;
}

static PyMethodDef __pyx_methods_5vedis_List[] = {
  {"pop", (PyCFunction)__pyx_pw_5vedis_4List_7pop, METH_NOARGS, 0},
  {"append", (PyCFunction)__pyx_pw_5vedis_4List_9append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_5vedis_4List_11extend, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_List = {
  __pyx_pw_5vedis_4List_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_5vedis_List, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_List = {
  __pyx_pw_5vedis_4List_5__len__, /*mp_length*/
  __pyx_pw_5vedis_4List_3__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_5vedis_List = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.List", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis_List), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis_List, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_List, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_List, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis_List, /*tp_traverse*/
  __pyx_tp_clear_5vedis_List, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_5vedis_4List_13__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5vedis_List, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5vedis_4List_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis_List, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *__pyx_freelist_5vedis___pyx_scope_struct__commit_on_success[8];
static int __pyx_freecount_5vedis___pyx_scope_struct__commit_on_success = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct__commit_on_success(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct__commit_on_success > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct__commit_on_success[--__pyx_freecount_5vedis___pyx_scope_struct__commit_on_success];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct__commit_on_success(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *p = (struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_fn);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct__commit_on_success < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success)))) {
    __pyx_freelist_5vedis___pyx_scope_struct__commit_on_success[__pyx_freecount_5vedis___pyx_scope_struct__commit_on_success++] = ((struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct__commit_on_success(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *p = (struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *)o;
  if (p->__pyx_v_fn) {
    e = (*v)(p->__pyx_v_fn, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct__commit_on_success(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *p = (struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success *)o;
  tmp = ((PyObject*)p->__pyx_v_fn);
  p->__pyx_v_fn = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct__commit_on_success = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct__commit_on_success", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct__commit_on_success), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct__commit_on_success, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct__commit_on_success, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct__commit_on_success, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct__commit_on_success, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *__pyx_freelist_5vedis___pyx_scope_struct_1__flatten_list[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_1__flatten_list = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_1__flatten_list(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_1__flatten_list > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_1__flatten_list[--__pyx_freecount_5vedis___pyx_scope_struct_1__flatten_list];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_1__flatten_list(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *p = (struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_args);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_1__flatten_list < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_1__flatten_list[__pyx_freecount_5vedis___pyx_scope_struct_1__flatten_list++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_1__flatten_list(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *p = (struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)o;
  if (p->__pyx_v_args) {
    e = (*v)(p->__pyx_v_args, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_1__flatten_list(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *p = (struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)o;
  tmp = ((PyObject*)p->__pyx_v_args);
  p->__pyx_v_args = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_1__flatten_list = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_1__flatten_list", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_1__flatten_list, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_1__flatten_list, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_1__flatten_list, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_1__flatten_list, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *__pyx_freelist_5vedis___pyx_scope_struct_2_genexpr[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_2_genexpr = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_2_genexpr[--__pyx_freecount_5vedis___pyx_scope_struct_2_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_2_genexpr(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_2_genexpr[__pyx_freecount_5vedis___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_2_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_1__flatten_list *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_2_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_2_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_2_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_2_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_2_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *__pyx_freelist_5vedis___pyx_scope_struct_3__flatten[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_3__flatten = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_3__flatten(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_3__flatten > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_3__flatten[--__pyx_freecount_5vedis___pyx_scope_struct_3__flatten];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_3__flatten(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *p = (struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_kwargs);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_3__flatten < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_3__flatten[__pyx_freecount_5vedis___pyx_scope_struct_3__flatten++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_3__flatten(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *p = (struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)o;
  if (p->__pyx_v_kwargs) {
    e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_3__flatten(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *p = (struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)o;
  tmp = ((PyObject*)p->__pyx_v_kwargs);
  p->__pyx_v_kwargs = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_3__flatten = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_3__flatten", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_3__flatten, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_3__flatten, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_3__flatten, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_3__flatten, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *__pyx_freelist_5vedis___pyx_scope_struct_4_genexpr[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_4_genexpr = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_4_genexpr[--__pyx_freecount_5vedis___pyx_scope_struct_4_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_4_genexpr(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_v_key);
  Py_CLEAR(p->__pyx_t_0);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_4_genexpr[__pyx_freecount_5vedis___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_v_key) {
    e = (*v)(p->__pyx_v_key, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_4_genexpr(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_3__flatten *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_key);
  p->__pyx_v_key = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_t_0);
  p->__pyx_t_0 = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_4_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_4_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_4_genexpr, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_4_genexpr, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_4_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_5_register *__pyx_freelist_5vedis___pyx_scope_struct_5_register[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_5_register = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_5_register(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_5_register > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_5_register)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_5_register[--__pyx_freecount_5vedis___pyx_scope_struct_5_register];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_5_register));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_5_register(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *p = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_command_name);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_5_register < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_5_register)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_5_register[__pyx_freecount_5vedis___pyx_scope_struct_5_register++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_5_register *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_5_register(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *p = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *)o;
  if (p->__pyx_v_command_name) {
    e = (*v)(p->__pyx_v_command_name, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_5_register(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_5_register *p = (struct __pyx_obj_5vedis___pyx_scope_struct_5_register *)o;
  tmp = ((PyObject*)p->__pyx_v_command_name);
  p->__pyx_v_command_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5vedis_Vedis *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_5_register = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_5_register", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_5_register), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_5_register, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_5_register, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_5_register, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_5_register, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *__pyx_freelist_5vedis___pyx_scope_struct_6___iter__[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_6___iter__ = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_6___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_6___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_6___iter__[--__pyx_freecount_5vedis___pyx_scope_struct_6___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_6___iter__(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_6___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_6___iter__[__pyx_freecount_5vedis___pyx_scope_struct_6___iter__++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_6___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_6___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_5vedis_List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_6___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_6___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_6___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_6___iter__, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_6___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_6___iter__, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *__pyx_freelist_5vedis___pyx_scope_struct_7_gen[8];
static int __pyx_freecount_5vedis___pyx_scope_struct_7_gen = 0;

static PyObject *__pyx_tp_new_5vedis___pyx_scope_struct_7_gen(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5vedis___pyx_scope_struct_7_gen > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_7_gen)))) {
    o = (PyObject*)__pyx_freelist_5vedis___pyx_scope_struct_7_gen[--__pyx_freecount_5vedis___pyx_scope_struct_7_gen];
    memset(o, 0, sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_7_gen));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_5vedis___pyx_scope_struct_7_gen(PyObject *o) {
  struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *p = (struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5vedis___pyx_scope_struct_7_gen < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_7_gen)))) {
    __pyx_freelist_5vedis___pyx_scope_struct_7_gen[__pyx_freecount_5vedis___pyx_scope_struct_7_gen++] = ((struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_5vedis___pyx_scope_struct_7_gen(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *p = (struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5vedis___pyx_scope_struct_7_gen(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *p = (struct __pyx_obj_5vedis___pyx_scope_struct_7_gen *)o;
  tmp = ((PyObject*)p->__pyx_outer_scope);
  p->__pyx_outer_scope = ((struct __pyx_obj_5vedis___pyx_scope_struct_6___iter__ *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_5vedis___pyx_scope_struct_7_gen = {
  PyVarObject_HEAD_INIT(0, 0)
  "vedis.__pyx_scope_struct_7_gen", /*tp_name*/
  sizeof(struct __pyx_obj_5vedis___pyx_scope_struct_7_gen), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5vedis___pyx_scope_struct_7_gen, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5vedis___pyx_scope_struct_7_gen, /*tp_traverse*/
  __pyx_tp_clear_5vedis___pyx_scope_struct_7_gen, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5vedis___pyx_scope_struct_7_gen, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "vedis",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_BASE64_DEC_s, __pyx_k_BASE64_DEC_s, sizeof(__pyx_k_BASE64_DEC_s), 0, 0, 1, 0},
  {&__pyx_kp_s_BASE64_s, __pyx_k_BASE64_s, sizeof(__pyx_k_BASE64_s), 0, 0, 1, 0},
  {&__pyx_kp_s_COPY_s_s, __pyx_k_COPY_s_s, sizeof(__pyx_k_COPY_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_DATE, __pyx_k_DATE, sizeof(__pyx_k_DATE), 0, 0, 1, 1},
  {&__pyx_kp_s_DECRBY_s_s, __pyx_k_DECRBY_s_s, sizeof(__pyx_k_DECRBY_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_DECR_s, __pyx_k_DECR_s, sizeof(__pyx_k_DECR_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Error_disabling_autocommit_for_i, __pyx_k_Error_disabling_autocommit_for_i, sizeof(__pyx_k_Error_disabling_autocommit_for_i), 0, 0, 1, 0},
  {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
  {&__pyx_kp_s_GETSET_s_s, __pyx_k_GETSET_s_s, sizeof(__pyx_k_GETSET_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HDEL_s_s, __pyx_k_HDEL_s_s, sizeof(__pyx_k_HDEL_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HDEL_s_s_2, __pyx_k_HDEL_s_s_2, sizeof(__pyx_k_HDEL_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_HEXISTS_s_s, __pyx_k_HEXISTS_s_s, sizeof(__pyx_k_HEXISTS_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HGETALL_s, __pyx_k_HGETALL_s, sizeof(__pyx_k_HGETALL_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HGET_s_s, __pyx_k_HGET_s_s, sizeof(__pyx_k_HGET_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HKEYS_s, __pyx_k_HKEYS_s, sizeof(__pyx_k_HKEYS_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HLEN_s, __pyx_k_HLEN_s, sizeof(__pyx_k_HLEN_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HMGET_s_s, __pyx_k_HMGET_s_s, sizeof(__pyx_k_HMGET_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HMSET_s_s, __pyx_k_HMSET_s_s, sizeof(__pyx_k_HMSET_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HSETNX_s_s_s, __pyx_k_HSETNX_s_s_s, sizeof(__pyx_k_HSETNX_s_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HSET_s_s_s, __pyx_k_HSET_s_s_s, sizeof(__pyx_k_HSET_s_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_HVALS_s, __pyx_k_HVALS_s, sizeof(__pyx_k_HVALS_s), 0, 0, 1, 0},
  {&__pyx_n_s_Hash, __pyx_k_Hash, sizeof(__pyx_k_Hash), 0, 0, 1, 1},
  {&__pyx_kp_s_Hash_s, __pyx_k_Hash_s, sizeof(__pyx_k_Hash_s), 0, 0, 1, 0},
  {&__pyx_kp_s_INCRBY_s_s, __pyx_k_INCRBY_s_s, sizeof(__pyx_k_INCRBY_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_INCR_s, __pyx_k_INCR_s, sizeof(__pyx_k_INCR_s), 0, 0, 1, 0},
  {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_s_LINDEX_s_s, __pyx_k_LINDEX_s_s, sizeof(__pyx_k_LINDEX_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_LLEN_s, __pyx_k_LLEN_s, sizeof(__pyx_k_LLEN_s), 0, 0, 1, 0},
  {&__pyx_kp_s_LPOP_s, __pyx_k_LPOP_s, sizeof(__pyx_k_LPOP_s), 0, 0, 1, 0},
  {&__pyx_kp_s_LPUSHX_s_s, __pyx_k_LPUSHX_s_s, sizeof(__pyx_k_LPUSHX_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_LPUSHX_s_s_2, __pyx_k_LPUSHX_s_s_2, sizeof(__pyx_k_LPUSHX_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_LPUSH_s_s, __pyx_k_LPUSH_s_s, sizeof(__pyx_k_LPUSH_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_LPUSH_s_s_2, __pyx_k_LPUSH_s_s_2, sizeof(__pyx_k_LPUSH_s_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_List, __pyx_k_List, sizeof(__pyx_k_List), 0, 0, 1, 1},
  {&__pyx_kp_s_MGET_s, __pyx_k_MGET_s, sizeof(__pyx_k_MGET_s), 0, 0, 1, 0},
  {&__pyx_kp_s_MOVE_s_s, __pyx_k_MOVE_s_s, sizeof(__pyx_k_MOVE_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_MSETNX_s, __pyx_k_MSETNX_s, sizeof(__pyx_k_MSETNX_s), 0, 0, 1, 0},
  {&__pyx_kp_s_MSET_s, __pyx_k_MSET_s, sizeof(__pyx_k_MSET_s), 0, 0, 1, 0},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
  {&__pyx_n_s_OS, __pyx_k_OS, sizeof(__pyx_k_OS), 0, 0, 1, 1},
  {&__pyx_kp_s_RANDSTR_s, __pyx_k_RANDSTR_s, sizeof(__pyx_k_RANDSTR_s), 0, 0, 1, 0},
  {&__pyx_kp_s_RAND_s_s, __pyx_k_RAND_s_s, sizeof(__pyx_k_RAND_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SADD_s_s, __pyx_k_SADD_s_s, sizeof(__pyx_k_SADD_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SADD_s_s_2, __pyx_k_SADD_s_s_2, sizeof(__pyx_k_SADD_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_SCARD_s, __pyx_k_SCARD_s, sizeof(__pyx_k_SCARD_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SDIFF_s_s, __pyx_k_SDIFF_s_s, sizeof(__pyx_k_SDIFF_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SETNX_s_s, __pyx_k_SETNX_s_s, sizeof(__pyx_k_SETNX_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SINTER_s_s, __pyx_k_SINTER_s_s, sizeof(__pyx_k_SINTER_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SISMEMBER_s_s, __pyx_k_SISMEMBER_s_s, sizeof(__pyx_k_SISMEMBER_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SIZE_FMT_s, __pyx_k_SIZE_FMT_s, sizeof(__pyx_k_SIZE_FMT_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SLEN_s, __pyx_k_SLEN_s, sizeof(__pyx_k_SLEN_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SMEMBERS_s, __pyx_k_SMEMBERS_s, sizeof(__pyx_k_SMEMBERS_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SOUNDEX_s, __pyx_k_SOUNDEX_s, sizeof(__pyx_k_SOUNDEX_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SPEEK_s, __pyx_k_SPEEK_s, sizeof(__pyx_k_SPEEK_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SPOP_s, __pyx_k_SPOP_s, sizeof(__pyx_k_SPOP_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SREM_s_s, __pyx_k_SREM_s_s, sizeof(__pyx_k_SREM_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_SREM_s_s_2, __pyx_k_SREM_s_s_2, sizeof(__pyx_k_SREM_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_STOP_s, __pyx_k_STOP_s, sizeof(__pyx_k_STOP_s), 0, 0, 1, 0},
  {&__pyx_kp_s_STRIP_TAG_s, __pyx_k_STRIP_TAG_s, sizeof(__pyx_k_STRIP_TAG_s), 0, 0, 1, 0},
  {&__pyx_kp_s_STRLEN_s, __pyx_k_STRLEN_s, sizeof(__pyx_k_STRLEN_s), 0, 0, 1, 0},
  {&__pyx_kp_s_STR_SPLIT_s_s, __pyx_k_STR_SPLIT_s_s, sizeof(__pyx_k_STR_SPLIT_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_Set, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 0, 1, 1},
  {&__pyx_n_s_TABLE_LIST, __pyx_k_TABLE_LIST, sizeof(__pyx_k_TABLE_LIST), 0, 0, 1, 1},
  {&__pyx_n_s_TIME, __pyx_k_TIME, sizeof(__pyx_k_TIME), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unrecognized_type, __pyx_k_Unrecognized_type, sizeof(__pyx_k_Unrecognized_type), 0, 0, 1, 0},
  {&__pyx_kp_s_Unsupported_type_s, __pyx_k_Unsupported_type_s, sizeof(__pyx_k_Unsupported_type_s), 0, 0, 1, 0},
  {&__pyx_n_s_Vedis__flatten_list_locals_genex, __pyx_k_Vedis__flatten_list_locals_genex, sizeof(__pyx_k_Vedis__flatten_list_locals_genex), 0, 0, 1, 1},
  {&__pyx_n_s_Vedis__flatten_locals_genexpr, __pyx_k_Vedis__flatten_locals_genexpr, sizeof(__pyx_k_Vedis__flatten_locals_genexpr), 0, 0, 1, 1},
  {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
  {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0},
  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
  {&__pyx_n_s_amount, __pyx_k_amount, sizeof(__pyx_k_amount), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_base64, __pyx_k_base64, sizeof(__pyx_k_base64), 0, 0, 1, 1},
  {&__pyx_n_s_base64_decode, __pyx_k_base64_decode, sizeof(__pyx_k_base64_decode), 0, 0, 1, 1},
  {&__pyx_n_s_begin, __pyx_k_begin, sizeof(__pyx_k_begin), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cmd, __pyx_k_cmd, sizeof(__pyx_k_cmd), 0, 0, 1, 1},
  {&__pyx_n_s_command_callback, __pyx_k_command_callback, sizeof(__pyx_k_command_callback), 0, 0, 1, 1},
  {&__pyx_n_s_command_string, __pyx_k_command_string, sizeof(__pyx_k_command_string), 0, 0, 1, 1},
  {&__pyx_n_s_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 0, 1, 1},
  {&__pyx_n_s_commit_on_success_locals_wrapper, __pyx_k_commit_on_success_locals_wrapper, sizeof(__pyx_k_commit_on_success_locals_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_decorator, __pyx_k_decorator, sizeof(__pyx_k_decorator), 0, 0, 1, 1},
  {&__pyx_n_s_decr, __pyx_k_decr, sizeof(__pyx_k_decr), 0, 0, 1, 1},
  {&__pyx_n_s_decr_by, __pyx_k_decr_by, sizeof(__pyx_k_decr_by), 0, 0, 1, 1},
  {&__pyx_n_s_delete, __pyx_k_delete, sizeof(__pyx_k_delete), 0, 0, 1, 1},
  {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1},
  {&__pyx_n_s_direct_params, __pyx_k_direct_params, sizeof(__pyx_k_direct_params), 0, 0, 1, 1},
  {&__pyx_n_s_disable_autocommit, __pyx_k_disable_autocommit, sizeof(__pyx_k_disable_autocommit), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
  {&__pyx_n_s_exc_tb, __pyx_k_exc_tb, sizeof(__pyx_k_exc_tb), 0, 0, 1, 1},
  {&__pyx_n_s_exc_type, __pyx_k_exc_type, sizeof(__pyx_k_exc_type), 0, 0, 1, 1},
  {&__pyx_n_s_exc_val, __pyx_k_exc_val, sizeof(__pyx_k_exc_val), 0, 0, 1, 1},
  {&__pyx_n_s_execute, __pyx_k_execute, sizeof(__pyx_k_execute), 0, 0, 1, 1},
  {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
  {&__pyx_n_s_gen, __pyx_k_gen, sizeof(__pyx_k_gen), 0, 0, 1, 1},
  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_result, __pyx_k_get_result, sizeof(__pyx_k_get_result), 0, 0, 1, 1},
  {&__pyx_n_s_get_set, __pyx_k_get_set, sizeof(__pyx_k_get_set), 0, 0, 1, 1},
  {&__pyx_n_s_hash_key, __pyx_k_hash_key, sizeof(__pyx_k_hash_key), 0, 0, 1, 1},
  {&__pyx_n_s_hdel, __pyx_k_hdel, sizeof(__pyx_k_hdel), 0, 0, 1, 1},
  {&__pyx_n_s_hexists, __pyx_k_hexists, sizeof(__pyx_k_hexists), 0, 0, 1, 1},
  {&__pyx_n_s_hget, __pyx_k_hget, sizeof(__pyx_k_hget), 0, 0, 1, 1},
  {&__pyx_n_s_hgetall, __pyx_k_hgetall, sizeof(__pyx_k_hgetall), 0, 0, 1, 1},
  {&__pyx_n_s_hitems, __pyx_k_hitems, sizeof(__pyx_k_hitems), 0, 0, 1, 1},
  {&__pyx_n_s_hkeys, __pyx_k_hkeys, sizeof(__pyx_k_hkeys), 0, 0, 1, 1},
  {&__pyx_n_s_hlen, __pyx_k_hlen, sizeof(__pyx_k_hlen), 0, 0, 1, 1},
  {&__pyx_n_s_hmdel, __pyx_k_hmdel, sizeof(__pyx_k_hmdel), 0, 0, 1, 1},
  {&__pyx_n_s_hmget, __pyx_k_hmget, sizeof(__pyx_k_hmget), 0, 0, 1, 1},
  {&__pyx_n_s_hmset, __pyx_k_hmset, sizeof(__pyx_k_hmset), 0, 0, 1, 1},
  {&__pyx_kp_s_home_charles_Dropbox_code_vedis, __pyx_k_home_charles_Dropbox_code_vedis, sizeof(__pyx_k_home_charles_Dropbox_code_vedis), 0, 0, 1, 0},
  {&__pyx_n_s_hset, __pyx_k_hset, sizeof(__pyx_k_hset), 0, 0, 1, 1},
  {&__pyx_n_s_hsetnx, __pyx_k_hsetnx, sizeof(__pyx_k_hsetnx), 0, 0, 1, 1},
  {&__pyx_n_s_hvals, __pyx_k_hvals, sizeof(__pyx_k_hvals), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_incr, __pyx_k_incr, sizeof(__pyx_k_incr), 0, 0, 1, 1},
  {&__pyx_n_s_incr_by, __pyx_k_incr_by, sizeof(__pyx_k_incr_by), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_iter___locals_gen, __pyx_k_iter___locals_gen, sizeof(__pyx_k_iter___locals_gen), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_k1, __pyx_k_k1, sizeof(__pyx_k_k1), 0, 0, 1, 1},
  {&__pyx_n_s_k2, __pyx_k_k2, sizeof(__pyx_k_k2), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
  {&__pyx_n_s_lindex, __pyx_k_lindex, sizeof(__pyx_k_lindex), 0, 0, 1, 1},
  {&__pyx_n_s_llen, __pyx_k_llen, sizeof(__pyx_k_llen), 0, 0, 1, 1},
  {&__pyx_n_s_lmpush, __pyx_k_lmpush, sizeof(__pyx_k_lmpush), 0, 0, 1, 1},
  {&__pyx_n_s_lmpushx, __pyx_k_lmpushx, sizeof(__pyx_k_lmpushx), 0, 0, 1, 1},
  {&__pyx_n_s_lpop, __pyx_k_lpop, sizeof(__pyx_k_lpop), 0, 0, 1, 1},
  {&__pyx_n_s_lpush, __pyx_k_lpush, sizeof(__pyx_k_lpush), 0, 0, 1, 1},
  {&__pyx_n_s_lpushx, __pyx_k_lpushx, sizeof(__pyx_k_lpushx), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maximum, __pyx_k_maximum, sizeof(__pyx_k_maximum), 0, 0, 1, 1},
  {&__pyx_kp_s_mem, __pyx_k_mem, sizeof(__pyx_k_mem), 0, 0, 1, 0},
  {&__pyx_n_s_mget, __pyx_k_mget, sizeof(__pyx_k_mget), 0, 0, 1, 1},
  {&__pyx_n_s_minimum, __pyx_k_minimum, sizeof(__pyx_k_minimum), 0, 0, 1, 1},
  {&__pyx_n_s_move, __pyx_k_move, sizeof(__pyx_k_move), 0, 0, 1, 1},
  {&__pyx_n_s_mset, __pyx_k_mset, sizeof(__pyx_k_mset), 0, 0, 1, 1},
  {&__pyx_n_s_msetnx, __pyx_k_msetnx, sizeof(__pyx_k_msetnx), 0, 0, 1, 1},
  {&__pyx_n_s_nchars, __pyx_k_nchars, sizeof(__pyx_k_nchars), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_open_database, __pyx_k_open_database, sizeof(__pyx_k_open_database), 0, 0, 1, 1},
  {&__pyx_n_s_operating_system, __pyx_k_operating_system, sizeof(__pyx_k_operating_system), 0, 0, 1, 1},
  {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_rand, __pyx_k_rand, sizeof(__pyx_k_rand), 0, 0, 1, 1},
  {&__pyx_n_s_random_int, __pyx_k_random_int, sizeof(__pyx_k_random_int), 0, 0, 1, 1},
  {&__pyx_n_s_random_string, __pyx_k_random_string, sizeof(__pyx_k_random_string), 0, 0, 1, 1},
  {&__pyx_n_s_randstr, __pyx_k_randstr, sizeof(__pyx_k_randstr), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_register_locals_decorator, __pyx_k_register_locals_decorator, sizeof(__pyx_k_register_locals_decorator), 0, 0, 1, 1},
  {&__pyx_n_s_register_locals_decorator_locals, __pyx_k_register_locals_decorator_locals, sizeof(__pyx_k_register_locals_decorator_locals), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_rollback, __pyx_k_rollback, sizeof(__pyx_k_rollback), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_kp_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 0},
  {&__pyx_kp_s_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_sadd, __pyx_k_sadd, sizeof(__pyx_k_sadd), 0, 0, 1, 1},
  {&__pyx_n_s_scard, __pyx_k_scard, sizeof(__pyx_k_scard), 0, 0, 1, 1},
  {&__pyx_n_s_sdiff, __pyx_k_sdiff, sizeof(__pyx_k_sdiff), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_setnx, __pyx_k_setnx, sizeof(__pyx_k_setnx), 0, 0, 1, 1},
  {&__pyx_n_s_sinter, __pyx_k_sinter, sizeof(__pyx_k_sinter), 0, 0, 1, 1},
  {&__pyx_n_s_sismember, __pyx_k_sismember, sizeof(__pyx_k_sismember), 0, 0, 1, 1},
  {&__pyx_n_s_size_format, __pyx_k_size_format, sizeof(__pyx_k_size_format), 0, 0, 1, 1},
  {&__pyx_n_s_slen, __pyx_k_slen, sizeof(__pyx_k_slen), 0, 0, 1, 1},
  {&__pyx_n_s_smadd, __pyx_k_smadd, sizeof(__pyx_k_smadd), 0, 0, 1, 1},
  {&__pyx_n_s_smembers, __pyx_k_smembers, sizeof(__pyx_k_smembers), 0, 0, 1, 1},
  {&__pyx_n_s_smrem, __pyx_k_smrem, sizeof(__pyx_k_smrem), 0, 0, 1, 1},
  {&__pyx_n_s_soundex, __pyx_k_soundex, sizeof(__pyx_k_soundex), 0, 0, 1, 1},
  {&__pyx_n_s_speek, __pyx_k_speek, sizeof(__pyx_k_speek), 0, 0, 1, 1},
  {&__pyx_n_s_spop, __pyx_k_spop, sizeof(__pyx_k_spop), 0, 0, 1, 1},
  {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
  {&__pyx_n_s_srem, __pyx_k_srem, sizeof(__pyx_k_srem), 0, 0, 1, 1},
  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
  {&__pyx_n_s_store, __pyx_k_store, sizeof(__pyx_k_store), 0, 0, 1, 1},
  {&__pyx_n_s_str_split, __pyx_k_str_split, sizeof(__pyx_k_str_split), 0, 0, 1, 1},
  {&__pyx_n_s_strip_tags, __pyx_k_strip_tags, sizeof(__pyx_k_strip_tags), 0, 0, 1, 1},
  {&__pyx_n_s_strlen, __pyx_k_strlen, sizeof(__pyx_k_strlen), 0, 0, 1, 1},
  {&__pyx_n_s_table_list, __pyx_k_table_list, sizeof(__pyx_k_table_list), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
  {&__pyx_n_s_transaction, __pyx_k_transaction, sizeof(__pyx_k_transaction), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_vedis, __pyx_k_vedis, sizeof(__pyx_k_vedis), 0, 0, 1, 1},
  {&__pyx_n_s_wrapped, __pyx_k_wrapped, sizeof(__pyx_k_wrapped), 0, 0, 1, 1},
  {&__pyx_n_s_wrapper, __pyx_k_wrapper, sizeof(__pyx_k_wrapper), 0, 0, 1, 1},
  {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "vedis.pyx":269
 *                 VEDIS_CONFIG_DISABLE_AUTO_COMMIT)
 *             if ret != VEDIS_OK:
 *                 raise NotImplementedError('Error disabling autocommit for '             # <<<<<<<<<<<<<<
 *                                           'in-memory database.')
 * 
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Error_disabling_autocommit_for_i); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "vedis.pyx":447
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):
 *             with self.transaction():             # <<<<<<<<<<<<<<
 *                 return fn(*args, **kwargs)
 *         return wrapper
 */
  __pyx_tuple__2 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_tuple__3 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "vedis.pyx":446
 * 
 *     def commit_on_success(self, fn):
 *         def wrapper(*args, **kwargs):             # <<<<<<<<<<<<<<
 *             with self.transaction():
 *                 return fn(*args, **kwargs)
 */
  __pyx_tuple__4 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_charles_Dropbox_code_vedis, __pyx_n_s_wrapper, 446, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":574
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:
 *             return dict(zip(results[::2], results[1::2]))             # <<<<<<<<<<<<<<
 *         else:
 *             return {}
 */
  __pyx_slice__6 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__6);
  __Pyx_GIVEREF(__pyx_slice__6);
  __pyx_slice__7 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__7);
  __Pyx_GIVEREF(__pyx_slice__7);

  /* "vedis.pyx":582
 *         results = self.execute('HGETALL %s', (hash_key,))
 *         if results:
 *             return zip(results[::2], results[1::2])             # <<<<<<<<<<<<<<
 *         else:
 *             return []
 */
  __pyx_slice__8 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__8);
  __Pyx_GIVEREF(__pyx_slice__8);
  __pyx_slice__9 = PySlice_New(__pyx_int_1, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__9);
  __Pyx_GIVEREF(__pyx_slice__9);

  /* "vedis.pyx":690
 * 
 *     cdef basestring _escape(self, basestring s):
 *         return '"%s"' % str(s).replace('"', '\\"')             # <<<<<<<<<<<<<<
 * 
 *     def lib_version(self):
 */
  __pyx_tuple__13 = PyTuple_Pack(2, __pyx_kp_s__11, __pyx_kp_s__12); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "vedis.pyx":716
 *                 <void *>command_name))
 * 
 *             def wrapper(*args):             # <<<<<<<<<<<<<<
 *                 direct_params, params = [], []
 *                 command_string = [command_name]
 */
  __pyx_tuple__14 = PyTuple_Pack(5, __pyx_n_s_args, __pyx_n_s_direct_params, __pyx_n_s_params, __pyx_n_s_command_string, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_charles_Dropbox_code_vedis, __pyx_n_s_wrapper, 716, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":705
 * 
 *     def register(self, command_name):
 *         def decorator(fn):             # <<<<<<<<<<<<<<
 *             cdef vedis_command command_callback
 * 
 */
  __pyx_tuple__16 = PyTuple_Pack(4, __pyx_n_s_fn, __pyx_n_s_command_callback, __pyx_n_s_wrapper, __pyx_n_s_wrapper); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_charles_Dropbox_code_vedis, __pyx_n_s_decorator, 705, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "vedis.pyx":870
 * 
 *     if vedis_value_is_string(ptr):
 *         return str(vedis_value_to_string(ptr, &nbytes))[:nbytes].replace('\\"', '"')             # <<<<<<<<<<<<<<
 *     elif vedis_value_is_array(ptr):
 *         accum = []
 */
  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_s__12, __pyx_kp_s__11); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "vedis.pyx":887
 *     elif vedis_value_is_null(ptr):
 *         return None
 *     raise TypeError('Unrecognized type.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_Unrecognized_type); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "vedis.pyx":901
 *     ptr = vedis_context_new_scalar(context)
 *     if isinstance(python_value, unicode):
 *         vedis_value_string(ptr, python_value.encode('utf-8'), -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, basestring):
 *         vedis_value_string(ptr, python_value, -1)
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "vedis.pyx":930
 * cdef push_result(vedis_context *context, python_value):
 *     if isinstance(python_value, unicode):
 *         vedis_result_string(context, python_value.encode('utf-8'), -1)             # <<<<<<<<<<<<<<
 *     elif isinstance(python_value, basestring):
 *         vedis_result_string(context, python_value, -1)
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "vedis.pyx":1096
 * 
 *     def __iter__(self):
 *         def gen():             # <<<<<<<<<<<<<<
 *             l = len(self)
 *             for i in range(l):
 */
  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_l, __pyx_n_s_i); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_charles_Dropbox_code_vedis, __pyx_n_s_gen, 1096, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initvedis(void); /*proto*/
PyMODINIT_FUNC initvedis(void)
#else
PyMODINIT_FUNC PyInit_vedis(void); /*proto*/
PyMODINIT_FUNC PyInit_vedis(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_vedis(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("vedis", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_vedis) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "vedis")) {
      if (unlikely(PyDict_SetItemString(modules, "vedis", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  __pyx_v_5vedis_py_command_registry = ((PyObject*)Py_None); Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_vtabptr_5vedis_Vedis = &__pyx_vtable_5vedis_Vedis;
  __pyx_vtable_5vedis_Vedis.open = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_open;
  __pyx_vtable_5vedis_Vedis.close = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_close;
  __pyx_vtable_5vedis_Vedis.disable_autocommit = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_disable_autocommit;
  __pyx_vtable_5vedis_Vedis.store = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_store;
  __pyx_vtable_5vedis_Vedis.fetch = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_fetch;
  __pyx_vtable_5vedis_Vedis.delete = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_delete;
  __pyx_vtable_5vedis_Vedis.append = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_append;
  __pyx_vtable_5vedis_Vedis.exists = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_exists;
  __pyx_vtable_5vedis_Vedis.update = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_update;
  __pyx_vtable_5vedis_Vedis.execute = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_execute *__pyx_optional_args))__pyx_f_5vedis_5Vedis_execute;
  __pyx_vtable_5vedis_Vedis.get_result = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_get_result;
  __pyx_vtable_5vedis_Vedis.check_call = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int))__pyx_f_5vedis_5Vedis_check_call;
  __pyx_vtable_5vedis_Vedis._build_exception_for_error = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int))__pyx_f_5vedis_5Vedis__build_exception_for_error;
  __pyx_vtable_5vedis_Vedis._get_last_error = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *))__pyx_f_5vedis_5Vedis__get_last_error;
  __pyx_vtable_5vedis_Vedis.begin = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_begin;
  __pyx_vtable_5vedis_Vedis.commit = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_commit;
  __pyx_vtable_5vedis_Vedis.rollback = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_rollback;
  __pyx_vtable_5vedis_Vedis.random_string = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_random_string;
  __pyx_vtable_5vedis_Vedis.random_int = (int (*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_random_int;
  __pyx_vtable_5vedis_Vedis.copy = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_copy;
  __pyx_vtable_5vedis_Vedis.move = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_move;
  __pyx_vtable_5vedis_Vedis.rand = (int (*)(struct __pyx_obj_5vedis_Vedis *, int, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_rand;
  __pyx_vtable_5vedis_Vedis.randstr = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_randstr;
  __pyx_vtable_5vedis_Vedis.time = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_time;
  __pyx_vtable_5vedis_Vedis.date = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_date;
  __pyx_vtable_5vedis_Vedis.operating_system = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_operating_system;
  __pyx_vtable_5vedis_Vedis.strip_tags = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_strip_tags;
  __pyx_vtable_5vedis_Vedis.str_split = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5vedis_5Vedis_str_split *__pyx_optional_args))__pyx_f_5vedis_5Vedis_str_split;
  __pyx_vtable_5vedis_Vedis.size_format = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_size_format;
  __pyx_vtable_5vedis_Vedis.soundex = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_soundex;
  __pyx_vtable_5vedis_Vedis.base64 = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_base64;
  __pyx_vtable_5vedis_Vedis.base64_decode = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_base64_decode;
  __pyx_vtable_5vedis_Vedis.table_list = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_table_list;
  __pyx_vtable_5vedis_Vedis.get = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_get;
  __pyx_vtable_5vedis_Vedis.set = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_set;
  __pyx_vtable_5vedis_Vedis.mget = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_mget;
  __pyx_vtable_5vedis_Vedis.mset = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_mset;
  __pyx_vtable_5vedis_Vedis.setnx = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_setnx;
  __pyx_vtable_5vedis_Vedis.msetnx = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_msetnx;
  __pyx_vtable_5vedis_Vedis.get_set = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_get_set;
  __pyx_vtable_5vedis_Vedis.strlen = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_strlen;
  __pyx_vtable_5vedis_Vedis.incr = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_incr;
  __pyx_vtable_5vedis_Vedis.decr = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_decr;
  __pyx_vtable_5vedis_Vedis.incr_by = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_incr_by;
  __pyx_vtable_5vedis_Vedis.decr_by = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_decr_by;
  __pyx_vtable_5vedis_Vedis.hset = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hset;
  __pyx_vtable_5vedis_Vedis.hsetnx = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hsetnx;
  __pyx_vtable_5vedis_Vedis.hget = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hget;
  __pyx_vtable_5vedis_Vedis.hdel = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hdel;
  __pyx_vtable_5vedis_Vedis.hmdel = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hmdel;
  __pyx_vtable_5vedis_Vedis.hkeys = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hkeys;
  __pyx_vtable_5vedis_Vedis.hvals = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hvals;
  __pyx_vtable_5vedis_Vedis.hgetall = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hgetall;
  __pyx_vtable_5vedis_Vedis.hitems = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hitems;
  __pyx_vtable_5vedis_Vedis.hlen = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hlen;
  __pyx_vtable_5vedis_Vedis.hexists = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hexists;
  __pyx_vtable_5vedis_Vedis.hmset = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hmset;
  __pyx_vtable_5vedis_Vedis.hmget = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_hmget;
  __pyx_vtable_5vedis_Vedis.sadd = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_sadd;
  __pyx_vtable_5vedis_Vedis.smadd = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_smadd;
  __pyx_vtable_5vedis_Vedis.scard = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_scard;
  __pyx_vtable_5vedis_Vedis.sismember = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_sismember;
  __pyx_vtable_5vedis_Vedis.spop = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_spop;
  __pyx_vtable_5vedis_Vedis.speek = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_speek;
  __pyx_vtable_5vedis_Vedis.stop = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_stop;
  __pyx_vtable_5vedis_Vedis.srem = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_srem;
  __pyx_vtable_5vedis_Vedis.smrem = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_smrem;
  __pyx_vtable_5vedis_Vedis.smembers = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_smembers;
  __pyx_vtable_5vedis_Vedis.sdiff = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_sdiff;
  __pyx_vtable_5vedis_Vedis.sinter = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_sinter;
  __pyx_vtable_5vedis_Vedis.slen = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_slen;
  __pyx_vtable_5vedis_Vedis.lindex = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lindex;
  __pyx_vtable_5vedis_Vedis.llen = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_llen;
  __pyx_vtable_5vedis_Vedis.lpop = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lpop;
  __pyx_vtable_5vedis_Vedis.lpush = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lpush;
  __pyx_vtable_5vedis_Vedis.lmpush = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lmpush;
  __pyx_vtable_5vedis_Vedis.lpushx = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lpushx;
  __pyx_vtable_5vedis_Vedis.lmpushx = (int (*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_lmpushx;
  __pyx_vtable_5vedis_Vedis._flatten_list = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *))__pyx_f_5vedis_5Vedis__flatten_list;
  __pyx_vtable_5vedis_Vedis._flatten = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *))__pyx_f_5vedis_5Vedis__flatten;
  __pyx_vtable_5vedis_Vedis._escape = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *))__pyx_f_5vedis_5Vedis__escape;
  __pyx_vtable_5vedis_Vedis.Hash = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_Hash;
  __pyx_vtable_5vedis_Vedis.Set = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_Set;
  __pyx_vtable_5vedis_Vedis.List = (PyObject *(*)(struct __pyx_obj_5vedis_Vedis *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_5Vedis_List;
  if (PyType_Ready(&__pyx_type_5vedis_Vedis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_Vedis.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_5vedis_Vedis.tp_dict, __pyx_vtabptr_5vedis_Vedis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Vedis", (PyObject *)&__pyx_type_5vedis_Vedis) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_Vedis = &__pyx_type_5vedis_Vedis;
  __pyx_vtabptr_5vedis_VedisContext = &__pyx_vtable_5vedis_VedisContext;
  __pyx_vtable_5vedis_VedisContext.set_context = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, vedis_context *))__pyx_f_5vedis_12VedisContext_set_context;
  __pyx_vtable_5vedis_VedisContext.create_value = (vedis_value *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *))__pyx_f_5vedis_12VedisContext_create_value;
  __pyx_vtable_5vedis_VedisContext.release_value = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, vedis_value *))__pyx_f_5vedis_12VedisContext_release_value;
  __pyx_vtable_5vedis_VedisContext.store = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_12VedisContext_store;
  __pyx_vtable_5vedis_VedisContext.fetch = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_12VedisContext_fetch;
  __pyx_vtable_5vedis_VedisContext.delete = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_12VedisContext_delete;
  __pyx_vtable_5vedis_VedisContext.append = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_12VedisContext_append;
  __pyx_vtable_5vedis_VedisContext.exists = (PyObject *(*)(struct __pyx_obj_5vedis_VedisContext *, PyObject *, int __pyx_skip_dispatch))__pyx_f_5vedis_12VedisContext_exists;
  if (PyType_Ready(&__pyx_type_5vedis_VedisContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_VedisContext.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_5vedis_VedisContext.tp_dict, __pyx_vtabptr_5vedis_VedisContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "VedisContext", (PyObject *)&__pyx_type_5vedis_VedisContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_VedisContext = &__pyx_type_5vedis_VedisContext;
  if (PyType_Ready(&__pyx_type_5vedis_Transaction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_Transaction.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Transaction", (PyObject *)&__pyx_type_5vedis_Transaction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_Transaction = &__pyx_type_5vedis_Transaction;
  if (PyType_Ready(&__pyx_type_5vedis_Hash) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_Hash.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Hash", (PyObject *)&__pyx_type_5vedis_Hash) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_Hash = &__pyx_type_5vedis_Hash;
  if (PyType_Ready(&__pyx_type_5vedis_Set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_Set.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Set", (PyObject *)&__pyx_type_5vedis_Set) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_Set = &__pyx_type_5vedis_Set;
  if (PyType_Ready(&__pyx_type_5vedis_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis_List.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "List", (PyObject *)&__pyx_type_5vedis_List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5vedis_List = &__pyx_type_5vedis_List;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct__commit_on_success) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct__commit_on_success.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct__commit_on_success = &__pyx_type_5vedis___pyx_scope_struct__commit_on_success;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_1__flatten_list) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_1__flatten_list.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_1__flatten_list = &__pyx_type_5vedis___pyx_scope_struct_1__flatten_list;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_2_genexpr.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_2_genexpr = &__pyx_type_5vedis___pyx_scope_struct_2_genexpr;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_3__flatten) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_3__flatten.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_3__flatten = &__pyx_type_5vedis___pyx_scope_struct_3__flatten;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_4_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_4_genexpr.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_4_genexpr = &__pyx_type_5vedis___pyx_scope_struct_4_genexpr;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_5_register) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_5_register.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_5_register = &__pyx_type_5vedis___pyx_scope_struct_5_register;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_6___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_6___iter__.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_6___iter__ = &__pyx_type_5vedis___pyx_scope_struct_6___iter__;
  if (PyType_Ready(&__pyx_type_5vedis___pyx_scope_struct_7_gen) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_5vedis___pyx_scope_struct_7_gen.tp_print = 0;
  __pyx_ptype_5vedis___pyx_scope_struct_7_gen = &__pyx_type_5vedis___pyx_scope_struct_7_gen;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "vedis.pyx":745
 * 
 * 
 * cdef dict py_command_registry = {}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XGOTREF(__pyx_v_5vedis_py_command_registry);
  __Pyx_DECREF_SET(__pyx_v_5vedis_py_command_registry, ((PyObject*)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "vedis.pyx":1
 * # Python library for working with Vedis databases.             # <<<<<<<<<<<<<<
 * #        _
 * #       /.\
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init vedis", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init vedis");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject* args = PyTuple_Pack(1, arg);
    return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(tmp_type, tmp_value, tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *function = PyMethod_GET_FUNCTION(method);
            result = __Pyx_PyObject_CallOneArg(function, self);
            Py_DECREF(method);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_Call,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)       \
    {                                                                     \
        func_type value = func_value;                                     \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                if (is_unsigned && unlikely(value < zero))                \
                    goto raise_neg_overflow;                              \
                else                                                      \
                    goto raise_overflow;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            switch (Py_SIZE(x)) {
                case  0: return 0;
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +(((PyLongObject*)x)->ob_digit[0]));
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) ((PyLongObject*)x)->ob_digit[0]);
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

static PyObject *__Pyx_Generator_Next(PyObject *self);
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Generator_Close(PyObject *self);
static PyObject *__Pyx_Generator_Throw(PyObject *gen, PyObject *args);
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (unlikely(et != PyExc_StopIteration) &&
            unlikely(!PyErr_GivenExceptionMatches(et, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    if (likely(et == PyExc_StopIteration)) {
        if (likely(!ev) || !PyObject_IsInstance(ev, PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_IsInstance(ev, PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PyObject_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Generator_ExceptionClear(__pyx_GeneratorObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Generator_CheckRunning(__pyx_GeneratorObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_SendEx(__pyx_GeneratorObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Generator_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Generator_FinishDelegation(__pyx_GeneratorObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Generator_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Generator_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Send(yf, value);
        } else {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Generator_FinishDelegation(gen);
    }
    return __Pyx_Generator_SendEx(gen, value);
}
static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Generator_Close(yf);
        if (!retval)
            return -1;
    } else {
        PyObject *meth;
        gen->is_running = 1;
        meth = PyObject_GetAttr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Close(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Generator_CloseIter(gen, yf);
        __Pyx_Generator_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Generator_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Generator_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Generator_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Generator_Undelegate(gen);
            if (err < 0)
                return __Pyx_Generator_SendEx(gen, NULL);
            goto throw_here;
        }
        gen->is_running = 1;
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Generator_Throw(yf, args);
        } else {
            PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Generator_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Generator_FinishDelegation(gen);
        }
        return ret;
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Generator_SendEx(gen, NULL);
}
static int __Pyx_Generator_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Generator_clear(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Generator_dealloc(PyObject *self) {
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Generator_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Generator_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self;
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Generator_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Generator_get_name(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Generator_set_name(__pyx_GeneratorObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Generator_get_qualname(__pyx_GeneratorObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Generator_set_qualname(__pyx_GeneratorObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Generator_get_name, (setter)__Pyx_Generator_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Generator_get_qualname, (setter)__Pyx_Generator_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_GeneratorObject, is_running), READONLY, NULL},
    {0, 0, 0, 0, 0}
};
static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Generator_Send, METH_O, 0},
    {"throw", (PyCFunction) __Pyx_Generator_Throw, METH_VARARGS, 0},
    {"close", (PyCFunction) __Pyx_Generator_Close, METH_NOARGS, 0},
    {0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_GeneratorObject),
    0,
    (destructor) __Pyx_Generator_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Generator_traverse,
    0,
    0,
    offsetof(__pyx_GeneratorObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Generator_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Generator_del,
#endif
};
static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body,
                                                  PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_GeneratorObject *gen =
        PyObject_GC_New(__pyx_GeneratorObject, &__pyx_GeneratorType_type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (__pyx_GeneratorType == NULL) {
        return -1;
    }
    return 0;
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if !CYTHON_COMPILING_IN_PYPY
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
