You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/Naked/toolshed/c/types.c

24614 lines
1.2 MiB

/* Generated by Cython 0.20.1 on Sun Mar 16 22:58:16 2014 */
#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 < 0x02040000
#error Cython requires Python 2.4+.
#else
#define CYTHON_ABI "0_20_1"
#include <stddef.h> /* For offsetof */
#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
#define Py_OptimizeFlag 0
#endif
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#define PY_FORMAT_SIZE_T ""
#define CYTHON_FORMAT_SSIZE_T ""
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
#define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o)
#define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
(PyErr_Format(PyExc_TypeError, \
"expected index value, got %.200s", Py_TYPE(o)->tp_name), \
(PyObject*)0))
#define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
!PyComplex_Check(o))
#define PyIndex_Check __Pyx_PyIndex_Check
#define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#define __PYX_BUILD_PY_SSIZE_T "i"
#else
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
#define PyVarObject_HEAD_INIT(type, size) \
PyObject_HEAD_INIT(type) size,
#define PyType_Modified(t)
typedef struct {
void *buf;
PyObject *obj;
Py_ssize_t len;
Py_ssize_t itemsize;
int readonly;
int ndim;
char *format;
Py_ssize_t *shape;
Py_ssize_t *strides;
Py_ssize_t *suboffsets;
void *internal;
} Py_buffer;
#define PyBUF_SIMPLE 0
#define PyBUF_WRITABLE 0x0001
#define PyBUF_FORMAT 0x0004
#define PyBUF_ND 0x0008
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#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_VERSION_HEX < 0x02060000
#define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_CHECKTYPES 0
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x02060000
#define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
#define Py_TPFLAGS_IS_ABSTRACT 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)
#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))
#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_VERSION_HEX < 0x02060000
#define PyBytesObject PyStringObject
#define PyBytes_Type PyString_Type
#define PyBytes_Check PyString_Check
#define PyBytes_CheckExact PyString_CheckExact
#define PyBytes_FromString PyString_FromString
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
#define PyBytes_FromFormat PyString_FromFormat
#define PyBytes_DecodeEscape PyString_DecodeEscape
#define PyBytes_AsString PyString_AsString
#define PyBytes_AsStringAndSize PyString_AsStringAndSize
#define PyBytes_Size PyString_Size
#define PyBytes_AS_STRING PyString_AS_STRING
#define PyBytes_GET_SIZE PyString_GET_SIZE
#define PyBytes_Repr PyString_Repr
#define PyBytes_Concat PyString_Concat
#define PyBytes_ConcatAndDel PyString_ConcatAndDel
#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_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
PyString_Check(obj) || PyUnicode_Check(obj))
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if PY_VERSION_HEX < 0x02060000
#define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type)
#define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#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_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) || (PY_VERSION_HEX >= 0x03010300)
#define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
#define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
#define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
#define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
#define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
#define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
(PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
(likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
(PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
#define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
#else
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
#define __Pyx_NAMESTR(n) ((char *)(n))
#define __Pyx_DOCSTR(n) ((char *)(n))
#else
#define __Pyx_NAMESTR(n) (n)
#define __Pyx_DOCSTR(n) (n)
#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
#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__lib__Naked__toolshed__c__types
#define __PYX_HAVE_API__lib__Naked__toolshed__c__types
#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; /*proto*/
#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(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_FromUString(s) __Pyx_PyObject_FromString((char*)s)
#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s)
#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s)
#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((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 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 = NULL;
PyObject* default_encoding = NULL;
PyObject* ascii_chars_u = NULL;
PyObject* ascii_chars_b = NULL;
sys = PyImport_ImportModule("sys");
if (sys == NULL) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
if (default_encoding == NULL) goto bad;
if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
__Pyx_sys_getdefaultencoding_not_ascii = 0;
} else {
const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
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 == NULL) goto bad;
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
if (ascii_chars_b == NULL || strncmp(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_XDECREF(sys);
Py_XDECREF(default_encoding);
Py_XDECREF(ascii_chars_u);
Py_XDECREF(ascii_chars_b);
return 0;
bad:
Py_XDECREF(sys);
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 = NULL;
PyObject* default_encoding = NULL;
char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (sys == NULL) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
if (default_encoding == NULL) goto bad;
default_encoding_c = PyBytes_AS_STRING(default_encoding);
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(sys);
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(sys);
Py_XDECREF(default_encoding);
return -1;
}
#endif
#endif
#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* __GNUC__ > 2 ... */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
#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[] = {
"types.pyx",
};
/*--- Type declarations ---*/
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults3;
typedef struct __pyx_defaults3 __pyx_defaults3;
struct __pyx_defaults4;
typedef struct __pyx_defaults4 __pyx_defaults4;
struct __pyx_defaults5;
typedef struct __pyx_defaults5 __pyx_defaults5;
struct __pyx_defaults6;
typedef struct __pyx_defaults6 __pyx_defaults6;
struct __pyx_defaults7;
typedef struct __pyx_defaults7 __pyx_defaults7;
struct __pyx_defaults8;
typedef struct __pyx_defaults8 __pyx_defaults8;
struct __pyx_defaults9;
typedef struct __pyx_defaults9 __pyx_defaults9;
struct __pyx_defaults10;
typedef struct __pyx_defaults10 __pyx_defaults10;
struct __pyx_defaults11;
typedef struct __pyx_defaults11 __pyx_defaults11;
struct __pyx_defaults12;
typedef struct __pyx_defaults12 __pyx_defaults12;
struct __pyx_defaults {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults1 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults2 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults3 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults4 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults5 {
PyObject *__pyx_arg_initial_iterable;
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults6 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults7 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults8 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults9 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults10 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults11 {
PyObject *__pyx_arg_attributes;
};
struct __pyx_defaults12 {
PyObject *__pyx_arg_attributes;
};
#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); /*proto*/
#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 /* CYTHON_REFNANNY */
#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); /*proto*/
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
const char* function_name); /*proto*/
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); /*proto*/
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/
#include <string.h>
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif
static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/
static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) {
int result = PySequence_Contains(seq, item);
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
#define PyAnySet_CheckExact(ob) \
((ob)->ob_type == &PySet_Type || \
(ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
#define PySet_Size(anyset) \
PyObject_Size((anyset))
#define PySet_Contains(anyset, key) \
PySequence_Contains((anyset), (key))
#define PySet_Pop(set) \
PyObject_CallMethod((set), (char*)"pop", NULL)
static CYTHON_INLINE int PySet_Clear(PyObject *set) {
PyObject *ret = PyObject_CallMethod(set, (char*)"clear", NULL);
if (!ret) return -1;
Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Discard(PyObject *set, PyObject *key) {
PyObject *ret = PyObject_CallMethod(set, (char*)"discard", (char*)"(O)", key);
if (!ret) return -1;
Py_DECREF(ret); return 0;
}
static CYTHON_INLINE int PySet_Add(PyObject *set, PyObject *key) {
PyObject *ret = PyObject_CallMethod(set, (char*)"add", (char*)"(O)", key);
if (!ret) return -1;
Py_DECREF(ret); return 0;
}
#endif /* PyAnySet_CheckExact (<= Py2.4) */
#endif /* < Py2.5 */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/
#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);
#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
#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); /*proto*/
#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
#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
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 PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
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;
PyObject *func_dict;
PyObject *func_weakreflist;
PyObject *func_name;
PyObject *func_qualname;
PyObject *func_doc;
PyObject *func_globals;
PyObject *func_code;
PyObject *func_closure;
PyObject *func_classobj; /* No-args super() class cell */
void *defaults;
int defaults_pyobjects;
int flags;
PyObject *defaults_tuple; /* Const defaults tuple */
PyObject *defaults_kwdict; /* Const kwonly defaults dict */
PyObject *(*defaults_getter)(PyObject *);
PyObject *func_annotations; /* function annotations dict */
} __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 PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
static int __Pyx_check_binary_version(void);
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); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
/* Module declarations from 'lib.Naked.toolshed.c.types' */
#define __Pyx_MODULE_NAME "lib.Naked.toolshed.c.types"
int __pyx_module_is_main_lib__Naked__toolshed__c__types = 0;
/* Implementation of 'lib.Naked.toolshed.c.types' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_min;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_16__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_4_equal_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_6_equal_attributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_8__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_10__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_12equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_14type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_40__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dict_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_2__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_dict); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_dict); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_8__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_10equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_12conditional_map_to_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conditional_function, PyObject *__pyx_v_mapped_function); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_14map_to_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mapped_function); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_16val_xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_18max_val(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_20min_val(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_22sum_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_24val_count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_name); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_26val_count_ci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_name); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_28difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_dict); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_30intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_dict); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_32key_xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_34random(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_36random_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_number_of_items); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_38xitems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_56__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_list_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_2__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_lists); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_8__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_10equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_12join(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_separator); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_14postfix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_after); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_16prefix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_before); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_18surround(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_20max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_22min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_24sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_26count_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_28remove_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_30difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_32intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_34map_to_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mapped_function); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_36conditional_map_to_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conditional_function, PyObject *__pyx_v_mapped_function); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_38count_ci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_test_string); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_40random(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_42random_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_number_of_items); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_44shuffle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_46wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcard); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_48multi_wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcards); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_50xset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_52xfset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_54xtuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_4push(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_6pop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_8pushpop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_10length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_4push(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_6pop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_8pushpop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_10length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_initial_iterable, PyObject *__pyx_v_attributes, PyObject *__pyx_v_max_length, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_set_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_2__lshift__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_set); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_set); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_6xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_8xfset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_10__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_set, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_4xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_6xset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_8type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_22__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_4type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_6concat(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_strings); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_8contains(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_substring); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_10xsplit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_split_delimiter); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_12xsplit_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_split_delimiter); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_14begins(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_begin_string); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_16ends(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_end_string); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_18wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcard); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_20unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_14__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_2__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_string_text, PyObject *__pyx_v_attributes, CYTHON_UNUSED PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_6__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_attribute); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__cmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_string); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_10_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_12type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_tuple, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_4type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static char __pyx_k_e[] = "e";
static char __pyx_k_x[] = "x";
static char __pyx_k__5[] = "";
static char __pyx_k__6[] = "|";
static char __pyx_k__8[] = "[";
static char __pyx_k__9[] = "]";
static char __pyx_k_eq[] = "__eq__";
static char __pyx_k_ne[] = "__ne__";
static char __pyx_k_re[] = "re";
static char __pyx_k_wc[] = "wc";
static char __pyx_k_add[] = "__add__";
static char __pyx_k_cls[] = "cls";
static char __pyx_k_cmp[] = "__cmp__";
static char __pyx_k_doc[] = "__doc__";
static char __pyx_k_key[] = "key";
static char __pyx_k_len[] = "__len__";
static char __pyx_k_max[] = "max";
static char __pyx_k_min[] = "min";
static char __pyx_k_new[] = "__new__";
static char __pyx_k_obj[] = "obj";
static char __pyx_k_pop[] = "pop";
static char __pyx_k_str[] = "__str__";
static char __pyx_k_sum[] = "sum";
static char __pyx_k_sys[] = "sys";
static char __pyx_k_zip[] = "zip";
static char __pyx_k_NFKD[] = "NFKD";
static char __pyx_k_XSet[] = "XSet";
static char __pyx_k_dict[] = "__dict__";
static char __pyx_k_ends[] = "ends";
static char __pyx_k_iadd[] = "__iadd__";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_item[] = "item";
static char __pyx_k_join[] = "join";
static char __pyx_k_keys[] = "keys";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_name[] = "__name__";
static char __pyx_k_push[] = "push";
static char __pyx_k_repr[] = "__repr__";
static char __pyx_k_self[] = "self";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_type[] = "type";
static char __pyx_k_xset[] = "xset";
static char __pyx_k_UTF_8[] = "UTF-8";
static char __pyx_k_XDict[] = "XDict";
static char __pyx_k_XFSet[] = "XFSet";
static char __pyx_k_XList[] = "XList";
static char __pyx_k_after[] = "after";
static char __pyx_k_count[] = "count";
static char __pyx_k_debug[] = "debug";
static char __pyx_k_deque[] = "deque";
static char __pyx_k_heapq[] = "heapq";
static char __pyx_k_index[] = "_index";
static char __pyx_k_items[] = "items";
static char __pyx_k_lower[] = "lower";
static char __pyx_k_queue[] = "_queue";
static char __pyx_k_split[] = "split";
static char __pyx_k_utf_8[] = "utf-8";
static char __pyx_k_value[] = "value";
static char __pyx_k_write[] = "write";
static char __pyx_k_xfset[] = "xfset";
static char __pyx_k_xlist[] = "xlist";
static char __pyx_k_XQueue[] = "XQueue";
static char __pyx_k_XTuple[] = "XTuple";
static char __pyx_k_before[] = "before";
static char __pyx_k_begins[] = "begins";
static char __pyx_k_choice[] = "choice";
static char __pyx_k_concat[] = "concat";
static char __pyx_k_decode[] = "decode";
static char __pyx_k_delim2[] = "delim2";
static char __pyx_k_encode[] = "encode";
static char __pyx_k_equals[] = "equals";
static char __pyx_k_extend[] = "extend";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_length[] = "length";
static char __pyx_k_lshift[] = "__lshift__";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_object[] = "object";
static char __pyx_k_prefix[] = "prefix";
static char __pyx_k_random[] = "random";
static char __pyx_k_result[] = "result";
static char __pyx_k_sample[] = "sample";
static char __pyx_k_stderr[] = "stderr";
static char __pyx_k_update[] = "update";
static char __pyx_k_values[] = "values";
static char __pyx_k_xitems[] = "xitems";
static char __pyx_k_xsplit[] = "xsplit";
static char __pyx_k_xtuple[] = "xtuple";
static char __pyx_k_XString[] = "XString";
static char __pyx_k_fnmatch[] = "fnmatch";
static char __pyx_k_getattr[] = "__getattr__";
static char __pyx_k_heappop[] = "heappop";
static char __pyx_k_index_2[] = "index";
static char __pyx_k_max_val[] = "max_val";
static char __pyx_k_min_val[] = "min_val";
static char __pyx_k_postfix[] = "postfix";
static char __pyx_k_prepare[] = "__prepare__";
static char __pyx_k_pushpop[] = "pushpop";
static char __pyx_k_set_obj[] = "set_obj";
static char __pyx_k_shuffle[] = "shuffle";
static char __pyx_k_str_obj[] = "str_obj";
static char __pyx_k_strings[] = "strings";
static char __pyx_k_subitem[] = "subitem";
static char __pyx_k_the_key[] = "the_key";
static char __pyx_k_the_set[] = "the_set";
static char __pyx_k_tup_obj[] = "tup_obj";
static char __pyx_k_unicode[] = "unicode";
static char __pyx_k_wc_list[] = "wc_list";
static char __pyx_k_XMaxHeap[] = "XMaxHeap";
static char __pyx_k_XMinHeap[] = "XMinHeap";
static char __pyx_k_XUnicode[] = "XUnicode";
static char __pyx_k_contains[] = "contains";
static char __pyx_k_count_ci[] = "count_ci";
static char __pyx_k_dict_obj[] = "dict_obj";
static char __pyx_k_heappush[] = "heappush";
static char __pyx_k_list_obj[] = "list_obj";
static char __pyx_k_new_dict[] = "new_dict";
static char __pyx_k_priority[] = "priority";
static char __pyx_k_qualname[] = "__qualname__";
static char __pyx_k_str_list[] = "str_list";
static char __pyx_k_sum_vals[] = "sum_vals";
static char __pyx_k_surround[] = "surround";
static char __pyx_k_the_list[] = "the_list";
static char __pyx_k_wildcard[] = "wildcard";
static char __pyx_k_Exception[] = "Exception";
static char __pyx_k_XList_max[] = "XList.max";
static char __pyx_k_XList_min[] = "XList.min";
static char __pyx_k_XList_sum[] = "XList.sum";
static char __pyx_k_XUnicode2[] = "XUnicode2";
static char __pyx_k_XUnicode3[] = "XUnicode3";
static char __pyx_k_attr_dict[] = "attr_dict";
static char __pyx_k_enumerate[] = "enumerate";
static char __pyx_k_iteritems[] = "iteritems";
static char __pyx_k_key_xlist[] = "key_xlist";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_norm_text[] = "norm_text";
static char __pyx_k_normalize[] = "normalize";
static char __pyx_k_other_obj[] = "other_obj";
static char __pyx_k_separator[] = "separator";
static char __pyx_k_substring[] = "substring";
static char __pyx_k_temp_list[] = "temp_list";
static char __pyx_k_the_tuple[] = "the_tuple";
static char __pyx_k_val_count[] = "val_count";
static char __pyx_k_val_xlist[] = "val_xlist";
static char __pyx_k_wildcards[] = "wildcards";
static char __pyx_k_DEBUG_FLAG[] = "DEBUG_FLAG";
static char __pyx_k_XDict___eq[] = "XDict.__eq__";
static char __pyx_k_XDict___ne[] = "XDict.__ne__";
static char __pyx_k_XFSet_type[] = "XFSet.type";
static char __pyx_k_XFSet_xset[] = "XFSet.xset";
static char __pyx_k_XList___eq[] = "XList.__eq__";
static char __pyx_k_XList___ne[] = "XList.__ne__";
static char __pyx_k_XList_join[] = "XList.join";
static char __pyx_k_XList_xset[] = "XList.xset";
static char __pyx_k_XSet_xfset[] = "XSet.xfset";
static char __pyx_k_XSet_xlist[] = "XSet.xlist";
static char __pyx_k_XUnicode_2[] = "XUnicode_2";
static char __pyx_k_XUnicode_3[] = "XUnicode_3";
static char __pyx_k_attributes[] = "attributes";
static char __pyx_k_difference[] = "difference";
static char __pyx_k_end_string[] = "end_string";
static char __pyx_k_equal_type[] = "_equal_type";
static char __pyx_k_first_list[] = "first_list";
static char __pyx_k_max_length[] = "max_length";
static char __pyx_k_naked_type[] = "naked_type";
static char __pyx_k_other_dict[] = "other_dict";
static char __pyx_k_test_value[] = "test_value";
static char __pyx_k_the_object[] = "the_object";
static char __pyx_k_value_name[] = "value_name";
static char __pyx_k_xsplit_set[] = "xsplit_set";
static char __pyx_k_NakedObject[] = "NakedObject";
static char __pyx_k_XDict___add[] = "XDict.__add__";
static char __pyx_k_XFSet___new[] = "XFSet.__new__";
static char __pyx_k_XFSet_xlist[] = "XFSet.xlist";
static char __pyx_k_XList___add[] = "XList.__add__";
static char __pyx_k_XList_xfset[] = "XList.xfset";
static char __pyx_k_XSet___iadd[] = "XSet.__iadd__";
static char __pyx_k_XSet___init[] = "XSet.__init__";
static char __pyx_k_XTuple_type[] = "XTuple.type";
static char __pyx_k_another_set[] = "another_set";
static char __pyx_k_collections[] = "collections";
static char __pyx_k_fnmatchcase[] = "fnmatchcase";
static char __pyx_k_map_to_vals[] = "map_to_vals";
static char __pyx_k_other_lists[] = "other_lists";
static char __pyx_k_result_list[] = "result_list";
static char __pyx_k_return_list[] = "return_list";
static char __pyx_k_string_text[] = "string_text";
static char __pyx_k_test_string[] = "test_string";
static char __pyx_k_unicodedata[] = "unicodedata";
static char __pyx_k_XDict___iadd[] = "XDict.__iadd__";
static char __pyx_k_XDict___init[] = "XDict.__init__";
static char __pyx_k_XDict_equals[] = "XDict.equals";
static char __pyx_k_XDict_random[] = "XDict.random";
static char __pyx_k_XDict_xitems[] = "XDict.xitems";
static char __pyx_k_XList___iadd[] = "XList.__iadd__";
static char __pyx_k_XList___init[] = "XList.__init__";
static char __pyx_k_XList_equals[] = "XList.equals";
static char __pyx_k_XList_prefix[] = "XList.prefix";
static char __pyx_k_XList_random[] = "XList.random";
static char __pyx_k_XList_xtuple[] = "XList.xtuple";
static char __pyx_k_XMaxHeap_pop[] = "XMaxHeap.pop";
static char __pyx_k_XMinHeap_pop[] = "XMinHeap.pop";
static char __pyx_k_XString_ends[] = "XString.ends";
static char __pyx_k_XString_type[] = "XString.type";
static char __pyx_k_XTuple___new[] = "XTuple.__new__";
static char __pyx_k_another_dict[] = "another_dict";
static char __pyx_k_another_list[] = "another_list";
static char __pyx_k_begin_string[] = "begin_string";
static char __pyx_k_intersection[] = "intersection";
static char __pyx_k_map_to_items[] = "map_to_items";
static char __pyx_k_naked_type_2[] = "_naked_type_";
static char __pyx_k_norm_unicode[] = "norm_unicode";
static char __pyx_k_other_string[] = "other_string";
static char __pyx_k_val_count_ci[] = "val_count_ci";
static char __pyx_k_version_info[] = "version_info";
static char __pyx_k_XDict_max_val[] = "XDict.max_val";
static char __pyx_k_XDict_min_val[] = "XDict.min_val";
static char __pyx_k_XList_postfix[] = "XList.postfix";
static char __pyx_k_XList_shuffle[] = "XList.shuffle";
static char __pyx_k_XMaxHeap_push[] = "XMaxHeap.push";
static char __pyx_k_XMinHeap_push[] = "XMinHeap.push";
static char __pyx_k_XQueue___init[] = "XQueue.__init__";
static char __pyx_k_XSet___lshift[] = "XSet.__lshift__";
static char __pyx_k_XString___new[] = "XString.__new__";
static char __pyx_k_XUnicode_type[] = "XUnicode.type";
static char __pyx_k_random_sample[] = "random_sample";
static char __pyx_k_the_attribute[] = "the_attribute";
static char __pyx_k_AttributeError[] = "AttributeError";
static char __pyx_k_Naked_settings[] = "Naked.settings";
static char __pyx_k_XDict_sum_vals[] = "XDict.sum_vals";
static char __pyx_k_XList_count_ci[] = "XList.count_ci";
static char __pyx_k_XList_surround[] = "XList.surround";
static char __pyx_k_XMaxHeap___len[] = "XMaxHeap.__len__";
static char __pyx_k_XMinHeap___len[] = "XMinHeap.__len__";
static char __pyx_k_XString_begins[] = "XString.begins";
static char __pyx_k_XString_concat[] = "XString.concat";
static char __pyx_k_XString_xsplit[] = "XString.xsplit";
static char __pyx_k_XUnicode___cmp[] = "XUnicode.__cmp__";
static char __pyx_k_XUnicode___str[] = "XUnicode.__str__";
static char __pyx_k_naked_u_string[] = "naked_u_string";
static char __pyx_k_wildcard_match[] = "wildcard_match";
static char __pyx_k_XDict_key_xlist[] = "XDict.key_xlist";
static char __pyx_k_XDict_val_count[] = "XDict.val_count";
static char __pyx_k_XDict_val_xlist[] = "XDict.val_xlist";
static char __pyx_k_XMaxHeap___init[] = "XMaxHeap.__init__";
static char __pyx_k_XMaxHeap_length[] = "XMaxHeap.length";
static char __pyx_k_XMinHeap___init[] = "XMinHeap.__init__";
static char __pyx_k_XMinHeap_length[] = "XMinHeap.length";
static char __pyx_k_XString_unicode[] = "XString.unicode";
static char __pyx_k_XUnicode___init[] = "XUnicode.__init__";
static char __pyx_k_XUnicode___repr[] = "XUnicode.__repr__";
static char __pyx_k_mapped_function[] = "mapped_function";
static char __pyx_k_nkd_fnmatchcase[] = "nkd_fnmatchcase";
static char __pyx_k_number_of_items[] = "number_of_items";
static char __pyx_k_random_key_list[] = "random_key_list";
static char __pyx_k_split_delimiter[] = "split_delimiter";
static char __pyx_k_the_string_text[] = "the_string_text";
static char __pyx_k_NakedObject___eq[] = "NakedObject.__eq__";
static char __pyx_k_NakedObject___ne[] = "NakedObject.__ne__";
static char __pyx_k_NakedObject_type[] = "NakedObject.type";
static char __pyx_k_XDict_difference[] = "XDict.difference";
static char __pyx_k_XList_difference[] = "XList.difference";
static char __pyx_k_XMaxHeap_pushpop[] = "XMaxHeap.pushpop";
static char __pyx_k_XMinHeap_pushpop[] = "XMinHeap.pushpop";
static char __pyx_k_XString_contains[] = "XString.contains";
static char __pyx_k_count_duplicates[] = "count_duplicates";
static char __pyx_k_equal_attributes[] = "_equal_attributes";
static char __pyx_k_getAttributeDict[] = "_getAttributeDict";
static char __pyx_k_initial_iterable[] = "initial_iterable";
static char __pyx_k_py_major_version[] = "py_major_version";
static char __pyx_k_XDict_map_to_vals[] = "XDict.map_to_vals";
static char __pyx_k_remove_duplicates[] = "remove_duplicates";
static char __pyx_k_NakedObject___init[] = "NakedObject.__init__";
static char __pyx_k_NakedObject_equals[] = "NakedObject.equals";
static char __pyx_k_XDict_intersection[] = "XDict.intersection";
static char __pyx_k_XDict_val_count_ci[] = "XDict.val_count_ci";
static char __pyx_k_XList_intersection[] = "XList.intersection";
static char __pyx_k_XList_map_to_items[] = "XList.map_to_items";
static char __pyx_k_XString_xsplit_set[] = "XString.xsplit_set";
static char __pyx_k_XUnicode___getattr[] = "XUnicode.__getattr__";
static char __pyx_k_XDict_random_sample[] = "XDict.random_sample";
static char __pyx_k_XList_random_sample[] = "XList.random_sample";
static char __pyx_k_XList_wildcard_match[] = "XList.wildcard_match";
static char __pyx_k_conditional_function[] = "conditional_function";
static char __pyx_k_multi_wildcard_match[] = "multi_wildcard_match";
static char __pyx_k_Naked_toolshed_python[] = "Naked.toolshed.python";
static char __pyx_k_XList_count_duplicates[] = "XList.count_duplicates";
static char __pyx_k_XString_wildcard_match[] = "XString.wildcard_match";
static char __pyx_k_NakedObject__equal_type[] = "NakedObject._equal_type";
static char __pyx_k_XFSet__getAttributeDict[] = "XFSet._getAttributeDict";
static char __pyx_k_XList_remove_duplicates[] = "XList.remove_duplicates";
static char __pyx_k_conditional_map_to_vals[] = "conditional_map_to_vals";
static char __pyx_k_XTuple__getAttributeDict[] = "XTuple._getAttributeDict";
static char __pyx_k_conditional_map_to_items[] = "conditional_map_to_items";
static char __pyx_k_XString__getAttributeDict[] = "XString._getAttributeDict";
static char __pyx_k_XList_multi_wildcard_match[] = "XList.multi_wildcard_match";
static char __pyx_k_XUnicode__getAttributeDict[] = "XUnicode._getAttributeDict";
static char __pyx_k_lib_Naked_toolshed_c_types[] = "lib.Naked.toolshed.c.types";
static char __pyx_k_NakedObject__equal_attributes[] = "NakedObject._equal_attributes";
static char __pyx_k_NakedObject__getAttributeDict[] = "NakedObject._getAttributeDict";
static char __pyx_k_XDict_conditional_map_to_vals[] = "XDict.conditional_map_to_vals";
static char __pyx_k_XList_conditional_map_to_items[] = "XList.conditional_map_to_items";
static char __pyx_k_Naked_Framework_Error_unable_to[] = "Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)";
static char __pyx_k_Users_ces_Desktop_code_naked_li[] = "/Users/ces/Desktop/code/naked/lib/Naked/toolshed/c/types.pyx";
static char __pyx_k_XUnicode___init___locals_XUnicod[] = "XUnicode.__init__.<locals>.XUnicode_2";
static char __pyx_k_Naked_Framework_Error_unable_to_2[] = "Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)";
static char __pyx_k_XUnicode___init___locals_XUnicod_2[] = "XUnicode.__init__.<locals>.XUnicode_2.__new__";
static char __pyx_k_XUnicode___init___locals_XUnicod_3[] = "XUnicode.__init__.<locals>.XUnicode_3";
static char __pyx_k_XUnicode___init___locals_XUnicod_4[] = "XUnicode.__init__.<locals>.XUnicode_3.__new__";
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_DEBUG_FLAG;
static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_n_s_NFKD;
static PyObject *__pyx_n_s_NakedObject;
static PyObject *__pyx_n_s_NakedObject___eq;
static PyObject *__pyx_n_s_NakedObject___init;
static PyObject *__pyx_n_s_NakedObject___ne;
static PyObject *__pyx_n_s_NakedObject__equal_attributes;
static PyObject *__pyx_n_s_NakedObject__equal_type;
static PyObject *__pyx_n_s_NakedObject__getAttributeDict;
static PyObject *__pyx_n_s_NakedObject_equals;
static PyObject *__pyx_n_s_NakedObject_type;
static PyObject *__pyx_kp_s_Naked_Framework_Error_unable_to;
static PyObject *__pyx_kp_s_Naked_Framework_Error_unable_to_2;
static PyObject *__pyx_n_s_Naked_settings;
static PyObject *__pyx_n_s_Naked_toolshed_python;
static PyObject *__pyx_kp_s_UTF_8;
static PyObject *__pyx_kp_s_Users_ces_Desktop_code_naked_li;
static PyObject *__pyx_n_s_XDict;
static PyObject *__pyx_n_s_XDict___add;
static PyObject *__pyx_n_s_XDict___eq;
static PyObject *__pyx_n_s_XDict___iadd;
static PyObject *__pyx_n_s_XDict___init;
static PyObject *__pyx_n_s_XDict___ne;
static PyObject *__pyx_n_s_XDict_conditional_map_to_vals;
static PyObject *__pyx_n_s_XDict_difference;
static PyObject *__pyx_n_s_XDict_equals;
static PyObject *__pyx_n_s_XDict_intersection;
static PyObject *__pyx_n_s_XDict_key_xlist;
static PyObject *__pyx_n_s_XDict_map_to_vals;
static PyObject *__pyx_n_s_XDict_max_val;
static PyObject *__pyx_n_s_XDict_min_val;
static PyObject *__pyx_n_s_XDict_random;
static PyObject *__pyx_n_s_XDict_random_sample;
static PyObject *__pyx_n_s_XDict_sum_vals;
static PyObject *__pyx_n_s_XDict_val_count;
static PyObject *__pyx_n_s_XDict_val_count_ci;
static PyObject *__pyx_n_s_XDict_val_xlist;
static PyObject *__pyx_n_s_XDict_xitems;
static PyObject *__pyx_n_s_XFSet;
static PyObject *__pyx_n_s_XFSet___new;
static PyObject *__pyx_n_s_XFSet__getAttributeDict;
static PyObject *__pyx_n_s_XFSet_type;
static PyObject *__pyx_n_s_XFSet_xlist;
static PyObject *__pyx_n_s_XFSet_xset;
static PyObject *__pyx_n_s_XList;
static PyObject *__pyx_n_s_XList___add;
static PyObject *__pyx_n_s_XList___eq;
static PyObject *__pyx_n_s_XList___iadd;
static PyObject *__pyx_n_s_XList___init;
static PyObject *__pyx_n_s_XList___ne;
static PyObject *__pyx_n_s_XList_conditional_map_to_items;
static PyObject *__pyx_n_s_XList_count_ci;
static PyObject *__pyx_n_s_XList_count_duplicates;
static PyObject *__pyx_n_s_XList_difference;
static PyObject *__pyx_n_s_XList_equals;
static PyObject *__pyx_n_s_XList_intersection;
static PyObject *__pyx_n_s_XList_join;
static PyObject *__pyx_n_s_XList_map_to_items;
static PyObject *__pyx_n_s_XList_max;
static PyObject *__pyx_n_s_XList_min;
static PyObject *__pyx_n_s_XList_multi_wildcard_match;
static PyObject *__pyx_n_s_XList_postfix;
static PyObject *__pyx_n_s_XList_prefix;
static PyObject *__pyx_n_s_XList_random;
static PyObject *__pyx_n_s_XList_random_sample;
static PyObject *__pyx_n_s_XList_remove_duplicates;
static PyObject *__pyx_n_s_XList_shuffle;
static PyObject *__pyx_n_s_XList_sum;
static PyObject *__pyx_n_s_XList_surround;
static PyObject *__pyx_n_s_XList_wildcard_match;
static PyObject *__pyx_n_s_XList_xfset;
static PyObject *__pyx_n_s_XList_xset;
static PyObject *__pyx_n_s_XList_xtuple;
static PyObject *__pyx_n_s_XMaxHeap;
static PyObject *__pyx_n_s_XMaxHeap___init;
static PyObject *__pyx_n_s_XMaxHeap___len;
static PyObject *__pyx_n_s_XMaxHeap_length;
static PyObject *__pyx_n_s_XMaxHeap_pop;
static PyObject *__pyx_n_s_XMaxHeap_push;
static PyObject *__pyx_n_s_XMaxHeap_pushpop;
static PyObject *__pyx_n_s_XMinHeap;
static PyObject *__pyx_n_s_XMinHeap___init;
static PyObject *__pyx_n_s_XMinHeap___len;
static PyObject *__pyx_n_s_XMinHeap_length;
static PyObject *__pyx_n_s_XMinHeap_pop;
static PyObject *__pyx_n_s_XMinHeap_push;
static PyObject *__pyx_n_s_XMinHeap_pushpop;
static PyObject *__pyx_n_s_XQueue;
static PyObject *__pyx_n_s_XQueue___init;
static PyObject *__pyx_n_s_XSet;
static PyObject *__pyx_n_s_XSet___iadd;
static PyObject *__pyx_n_s_XSet___init;
static PyObject *__pyx_n_s_XSet___lshift;
static PyObject *__pyx_n_s_XSet_xfset;
static PyObject *__pyx_n_s_XSet_xlist;
static PyObject *__pyx_n_s_XString;
static PyObject *__pyx_n_s_XString___new;
static PyObject *__pyx_n_s_XString__getAttributeDict;
static PyObject *__pyx_n_s_XString_begins;
static PyObject *__pyx_n_s_XString_concat;
static PyObject *__pyx_n_s_XString_contains;
static PyObject *__pyx_n_s_XString_ends;
static PyObject *__pyx_n_s_XString_type;
static PyObject *__pyx_n_s_XString_unicode;
static PyObject *__pyx_n_s_XString_wildcard_match;
static PyObject *__pyx_n_s_XString_xsplit;
static PyObject *__pyx_n_s_XString_xsplit_set;
static PyObject *__pyx_n_s_XTuple;
static PyObject *__pyx_n_s_XTuple___new;
static PyObject *__pyx_n_s_XTuple__getAttributeDict;
static PyObject *__pyx_n_s_XTuple_type;
static PyObject *__pyx_n_s_XUnicode;
static PyObject *__pyx_n_s_XUnicode2;
static PyObject *__pyx_n_s_XUnicode3;
static PyObject *__pyx_n_s_XUnicode_2;
static PyObject *__pyx_n_s_XUnicode_3;
static PyObject *__pyx_n_s_XUnicode___cmp;
static PyObject *__pyx_n_s_XUnicode___getattr;
static PyObject *__pyx_n_s_XUnicode___init;
static PyObject *__pyx_n_s_XUnicode___init___locals_XUnicod;
static PyObject *__pyx_n_s_XUnicode___init___locals_XUnicod_2;
static PyObject *__pyx_n_s_XUnicode___init___locals_XUnicod_3;
static PyObject *__pyx_n_s_XUnicode___init___locals_XUnicod_4;
static PyObject *__pyx_n_s_XUnicode___repr;
static PyObject *__pyx_n_s_XUnicode___str;
static PyObject *__pyx_n_s_XUnicode__getAttributeDict;
static PyObject *__pyx_n_s_XUnicode_type;
static PyObject *__pyx_kp_s__5;
static PyObject *__pyx_kp_s__6;
static PyObject *__pyx_kp_s__8;
static PyObject *__pyx_kp_s__9;
static PyObject *__pyx_n_s_add;
static PyObject *__pyx_n_s_after;
static PyObject *__pyx_n_s_another_dict;
static PyObject *__pyx_n_s_another_list;
static PyObject *__pyx_n_s_another_set;
static PyObject *__pyx_n_s_attr_dict;
static PyObject *__pyx_n_s_attributes;
static PyObject *__pyx_n_s_before;
static PyObject *__pyx_n_s_begin_string;
static PyObject *__pyx_n_s_begins;
static PyObject *__pyx_n_s_choice;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_cmp;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_concat;
static PyObject *__pyx_n_s_conditional_function;
static PyObject *__pyx_n_s_conditional_map_to_items;
static PyObject *__pyx_n_s_conditional_map_to_vals;
static PyObject *__pyx_n_s_contains;
static PyObject *__pyx_n_s_count;
static PyObject *__pyx_n_s_count_ci;
static PyObject *__pyx_n_s_count_duplicates;
static PyObject *__pyx_n_s_debug;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_delim2;
static PyObject *__pyx_n_s_deque;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_dict_obj;
static PyObject *__pyx_n_s_difference;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_e;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end_string;
static PyObject *__pyx_n_s_ends;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_eq;
static PyObject *__pyx_n_s_equal_attributes;
static PyObject *__pyx_n_s_equal_type;
static PyObject *__pyx_n_s_equals;
static PyObject *__pyx_n_s_extend;
static PyObject *__pyx_n_s_first_list;
static PyObject *__pyx_n_s_fnmatch;
static PyObject *__pyx_n_s_fnmatchcase;
static PyObject *__pyx_n_s_getAttributeDict;
static PyObject *__pyx_n_s_getattr;
static PyObject *__pyx_n_s_heappop;
static PyObject *__pyx_n_s_heappush;
static PyObject *__pyx_n_s_heapq;
static PyObject *__pyx_n_s_iadd;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_index_2;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_initial_iterable;
static PyObject *__pyx_n_s_intersection;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_iteritems;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_key;
static PyObject *__pyx_n_s_key_xlist;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_len;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_lib_Naked_toolshed_c_types;
static PyObject *__pyx_n_s_list_obj;
static PyObject *__pyx_n_s_lower;
static PyObject *__pyx_n_s_lshift;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_map_to_items;
static PyObject *__pyx_n_s_map_to_vals;
static PyObject *__pyx_n_s_mapped_function;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_max_length;
static PyObject *__pyx_n_s_max_val;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_min;
static PyObject *__pyx_n_s_min_val;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_multi_wildcard_match;
static PyObject *__pyx_n_s_naked_type;
static PyObject *__pyx_n_s_naked_type_2;
static PyObject *__pyx_n_s_naked_u_string;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_ne;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_s_new_dict;
static PyObject *__pyx_n_s_nkd_fnmatchcase;
static PyObject *__pyx_n_s_norm_text;
static PyObject *__pyx_n_s_norm_unicode;
static PyObject *__pyx_n_s_normalize;
static PyObject *__pyx_n_s_number_of_items;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_other_dict;
static PyObject *__pyx_n_s_other_lists;
static PyObject *__pyx_n_s_other_obj;
static PyObject *__pyx_n_s_other_string;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_postfix;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_priority;
static PyObject *__pyx_n_s_push;
static PyObject *__pyx_n_s_pushpop;
static PyObject *__pyx_n_s_py_major_version;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_queue;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_random_key_list;
static PyObject *__pyx_n_s_random_sample;
static PyObject *__pyx_n_s_re;
static PyObject *__pyx_n_s_remove_duplicates;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_result_list;
static PyObject *__pyx_n_s_return_list;
static PyObject *__pyx_n_s_sample;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_separator;
static PyObject *__pyx_n_s_set_obj;
static PyObject *__pyx_n_s_shuffle;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_split_delimiter;
static PyObject *__pyx_n_s_stderr;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_n_s_str_list;
static PyObject *__pyx_n_s_str_obj;
static PyObject *__pyx_n_s_string_text;
static PyObject *__pyx_n_s_strings;
static PyObject *__pyx_n_s_subitem;
static PyObject *__pyx_n_s_substring;
static PyObject *__pyx_n_s_sum;
static PyObject *__pyx_n_s_sum_vals;
static PyObject *__pyx_n_s_surround;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_temp_list;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_test_string;
static PyObject *__pyx_n_s_test_value;
static PyObject *__pyx_n_s_the_attribute;
static PyObject *__pyx_n_s_the_key;
static PyObject *__pyx_n_s_the_list;
static PyObject *__pyx_n_s_the_object;
static PyObject *__pyx_n_s_the_set;
static PyObject *__pyx_n_s_the_string_text;
static PyObject *__pyx_n_s_the_tuple;
static PyObject *__pyx_n_s_tup_obj;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_unicode;
static PyObject *__pyx_n_s_unicodedata;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_val_count;
static PyObject *__pyx_n_s_val_count_ci;
static PyObject *__pyx_n_s_val_xlist;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_value_name;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_wc;
static PyObject *__pyx_n_s_wc_list;
static PyObject *__pyx_n_s_wildcard;
static PyObject *__pyx_n_s_wildcard_match;
static PyObject *__pyx_n_s_wildcards;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_xfset;
static PyObject *__pyx_n_s_xitems;
static PyObject *__pyx_n_s_xlist;
static PyObject *__pyx_n_s_xset;
static PyObject *__pyx_n_s_xsplit;
static PyObject *__pyx_n_s_xsplit_set;
static PyObject *__pyx_n_s_xtuple;
static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_10;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__123;
static PyObject *__pyx_tuple__125;
static PyObject *__pyx_tuple__127;
static PyObject *__pyx_tuple__129;
static PyObject *__pyx_tuple__131;
static PyObject *__pyx_tuple__133;
static PyObject *__pyx_tuple__135;
static PyObject *__pyx_tuple__137;
static PyObject *__pyx_tuple__139;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__179;
static PyObject *__pyx_tuple__181;
static PyObject *__pyx_tuple__183;
static PyObject *__pyx_tuple__185;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__14;
static PyObject *__pyx_codeobj__18;
static PyObject *__pyx_codeobj__20;
static PyObject *__pyx_codeobj__22;
static PyObject *__pyx_codeobj__24;
static PyObject *__pyx_codeobj__26;
static PyObject *__pyx_codeobj__28;
static PyObject *__pyx_codeobj__30;
static PyObject *__pyx_codeobj__32;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;
static PyObject *__pyx_codeobj__42;
static PyObject *__pyx_codeobj__44;
static PyObject *__pyx_codeobj__46;
static PyObject *__pyx_codeobj__48;
static PyObject *__pyx_codeobj__50;
static PyObject *__pyx_codeobj__52;
static PyObject *__pyx_codeobj__54;
static PyObject *__pyx_codeobj__56;
static PyObject *__pyx_codeobj__58;
static PyObject *__pyx_codeobj__60;
static PyObject *__pyx_codeobj__62;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__74;
static PyObject *__pyx_codeobj__76;
static PyObject *__pyx_codeobj__78;
static PyObject *__pyx_codeobj__80;
static PyObject *__pyx_codeobj__82;
static PyObject *__pyx_codeobj__84;
static PyObject *__pyx_codeobj__86;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__96;
static PyObject *__pyx_codeobj__98;
static PyObject *__pyx_codeobj__100;
static PyObject *__pyx_codeobj__102;
static PyObject *__pyx_codeobj__104;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__122;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__126;
static PyObject *__pyx_codeobj__128;
static PyObject *__pyx_codeobj__130;
static PyObject *__pyx_codeobj__132;
static PyObject *__pyx_codeobj__134;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__138;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__180;
static PyObject *__pyx_codeobj__182;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
/* "lib/Naked/toolshed/c/types.pyx":17
* class NakedObject(object):
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'): # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_16__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_NakedObject));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_NakedObject));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_NakedObject));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[3] = {0,0,0};
__pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
values[1] = __pyx_dynamic_args->__pyx_arg_attributes;
values[2] = ((PyObject *)((PyObject*)__pyx_n_s_NakedObject));
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[1] = value; kw_args--; }
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[2] = 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 = 17; __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_self = values[0];
__pyx_v_attributes = values[1];
__pyx_v_naked_type = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject___init__(__pyx_self, __pyx_v_self, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
PyObject *(*__pyx_t_4)(PyObject *);
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":18
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'):
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(self, key, attributes[key])
*/
__pyx_t_1 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((__pyx_t_1 > 0) != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":19
* def __init__(self, attributes={}, naked_type='NakedObject'):
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(self, key, attributes[key])
* setattr(self, '_naked_type_', naked_type) # maintain an attribute to keep track of the extension type
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_3);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":20
* if len(attributes) > 0:
* for key in attributes:
* setattr(self, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(self, '_naked_type_', naked_type) # maintain an attribute to keep track of the extension type
*
*/
__pyx_t_5 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":21
* for key in attributes:
* setattr(self, key, attributes[key])
* setattr(self, '_naked_type_', naked_type) # maintain an attribute to keep track of the extension type # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__pyx_t_6 = PyObject_SetAttr(__pyx_v_self, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":17
* class NakedObject(object):
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'): # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
/* 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_5);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":27
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_3_getAttributeDict = {__Pyx_NAMESTR("_getAttributeDict"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_3_getAttributeDict, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_getAttributeDict (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_2_getAttributeDict(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("_getAttributeDict", 0);
/* "lib/Naked/toolshed/c/types.pyx":28
* #------------------------------------------------------------------------------
* def _getAttributeDict(self):
* return self.__dict__ # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":27
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject._getAttributeDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":34
* # returns boolean for type of instance == type of test parameter instance
* #------------------------------------------------------------------------------
* def _equal_type(self, other_obj): # <<<<<<<<<<<<<<
* return type(self) == type(other_obj)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_5_equal_type(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_5_equal_type = {__Pyx_NAMESTR("_equal_type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_5_equal_type, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_5_equal_type(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_equal_type (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_equal_type", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_equal_type") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_equal_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject._equal_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_4_equal_type(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_4_equal_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
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("_equal_type", 0);
/* "lib/Naked/toolshed/c/types.pyx":35
* #------------------------------------------------------------------------------
* def _equal_type(self, other_obj):
* return type(self) == type(other_obj) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_self)), ((PyObject *)Py_TYPE(__pyx_v_other_obj)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":34
* # returns boolean for type of instance == type of test parameter instance
* #------------------------------------------------------------------------------
* def _equal_type(self, other_obj): # <<<<<<<<<<<<<<
* return type(self) == type(other_obj)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject._equal_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":41
* # returns boolean for instance.__dict__ == test parameter .__dict__ (attribute comparison)
* #------------------------------------------------------------------------------
* def _equal_attributes(self, other_obj): # <<<<<<<<<<<<<<
* return self.__dict__ == other_obj.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_7_equal_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_7_equal_attributes = {__Pyx_NAMESTR("_equal_attributes"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_7_equal_attributes, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_7_equal_attributes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_equal_attributes (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("_equal_attributes", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_equal_attributes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_equal_attributes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject._equal_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_6_equal_attributes(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_6_equal_attributes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
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("_equal_attributes", 0);
/* "lib/Naked/toolshed/c/types.pyx":42
* #------------------------------------------------------------------------------
* def _equal_attributes(self, other_obj):
* return self.__dict__ == other_obj.__dict__ # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other_obj, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__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;
/* "lib/Naked/toolshed/c/types.pyx":41
* # returns boolean for instance.__dict__ == test parameter .__dict__ (attribute comparison)
* #------------------------------------------------------------------------------
* def _equal_attributes(self, other_obj): # <<<<<<<<<<<<<<
* return self.__dict__ == other_obj.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject._equal_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":47
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_9__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_9__eq__ = {__Pyx_NAMESTR("__eq__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_9__eq__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_9__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_8__eq__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_8__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
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("__eq__", 0);
/* "lib/Naked/toolshed/c/types.pyx":48
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj):
* return self.equals(other_obj) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __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;
/* "lib/Naked/toolshed/c/types.pyx":47
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":53
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_11__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_11__ne__ = {__Pyx_NAMESTR("__ne__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_11__ne__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_11__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ne__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_10__ne__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_10__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__ne__", 0);
/* "lib/Naked/toolshed/c/types.pyx":54
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj):
* result = self.equals(other_obj) # <<<<<<<<<<<<<<
* if result:
* return False # reverse result of the equals method
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __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_v_result = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":55
* def __ne__(self, other_obj):
* result = self.equals(other_obj)
* if result: # <<<<<<<<<<<<<<
* return False # reverse result of the equals method
* else:
*/
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
/* "lib/Naked/toolshed/c/types.pyx":56
* result = self.equals(other_obj)
* if result:
* return False # reverse result of the equals method # <<<<<<<<<<<<<<
* else:
* return True
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":58
* return False # reverse result of the equals method
* else:
* return True # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_True);
__pyx_r = Py_True;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":53
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":65
* # **NEED TO OVERRIDE IN CLASSES THAT INHERIT
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* return self._equal_type(other_obj) and self._equal_attributes(other_obj)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_13equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_13equals = {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_13equals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_13equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("equals (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_12equals(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_12equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("equals", 0);
/* "lib/Naked/toolshed/c/types.pyx":66
* #------------------------------------------------------------------------------
* def equals(self, other_obj):
* return self._equal_type(other_obj) and self._equal_attributes(other_obj) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_attributes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
} else {
__pyx_t_1 = __pyx_t_3;
__pyx_t_3 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":65
* # **NEED TO OVERRIDE IN CLASSES THAT INHERIT
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* return self._equal_type(other_obj) and self._equal_attributes(other_obj)
*
*/
/* 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_5);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":72
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_15type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_15type = {__Pyx_NAMESTR("type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_15type, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_11NakedObject_15type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("type (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_14type(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_14type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("type", 0);
/* "lib/Naked/toolshed/c/types.pyx":73
* #------------------------------------------------------------------------------
* def type(self):
* if hasattr(self, '_naked_type_'): # <<<<<<<<<<<<<<
* return self._naked_type_
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":74
* def type(self):
* if hasattr(self, '_naked_type_'):
* return self._naked_type_ # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":76
* return self._naked_type_
* else:
* return None # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":72
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.NakedObject.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":83
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject):
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'): # <<<<<<<<<<<<<<
* dict.__init__(self, dict_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_40__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XDict));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XDict));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XDict));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_dict_obj = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dict_obj,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XDict));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dict_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = 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 = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_self = values[0];
__pyx_v_dict_obj = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict___init__(__pyx_self, __pyx_v_self, __pyx_v_dict_obj, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dict_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":84
* class XDict(dict, NakedObject):
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'):
* dict.__init__(self, dict_obj) # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_dict_obj);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dict_obj);
__Pyx_GIVEREF(__pyx_v_dict_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":85
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'):
* dict.__init__(self, dict_obj)
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__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;
/* "lib/Naked/toolshed/c/types.pyx":83
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject):
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'): # <<<<<<<<<<<<<<
* dict.__init__(self, dict_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XDict.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":96
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __add__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_3__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_3__add__ = {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_3__add__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_3__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_dict = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_dict,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_dict)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__add__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __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_self = values[0];
__pyx_v_other_dict = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_2__add__(__pyx_self, __pyx_v_self, __pyx_v_other_dict);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_2__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_dict) {
PyObject *__pyx_v_attr_dict = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_e = 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;
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
Py_ssize_t __pyx_t_10;
PyObject *(*__pyx_t_11)(PyObject *);
int __pyx_t_12;
int __pyx_t_13;
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("__add__", 0);
/* "lib/Naked/toolshed/c/types.pyx":97
* #------------------------------------------------------------------------------
* def __add__(self, other_dict):
* try: # <<<<<<<<<<<<<<
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
*/
{
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":98
* def __add__(self, other_dict):
* try:
* self.update(other_dict) # <<<<<<<<<<<<<<
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_other_dict);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_other_dict);
__Pyx_GIVEREF(__pyx_v_other_dict);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":99
* try:
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'): # <<<<<<<<<<<<<<
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0:
*/
__pyx_t_7 = PyObject_HasAttr(__pyx_v_other_dict, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (__pyx_t_7) {
__pyx_t_6 = __Pyx_GetAttr(__pyx_v_other_dict, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_XDict, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_9 = __pyx_t_8;
} else {
__pyx_t_9 = __pyx_t_7;
}
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":100
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict # <<<<<<<<<<<<<<
* if len(attr_dict) > 0:
* for key in attr_dict:
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_other_dict, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_attr_dict = __pyx_t_5;
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":101
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0: # <<<<<<<<<<<<<<
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
*/
__pyx_t_10 = PyObject_Length(__pyx_v_attr_dict); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_t_9 = ((__pyx_t_10 > 0) != 0);
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":102
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0:
* for key in attr_dict: # <<<<<<<<<<<<<<
* setattr(self, key, attr_dict[key])
* return self
*/
if (PyList_CheckExact(__pyx_v_attr_dict) || PyTuple_CheckExact(__pyx_v_attr_dict)) {
__pyx_t_5 = __pyx_v_attr_dict; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
} else {
__pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_attr_dict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
for (;;) {
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_11(__pyx_t_5);
if (unlikely(!__pyx_t_6)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_6);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":103
* if len(attr_dict) > 0:
* for key in attr_dict:
* setattr(self, key, attr_dict[key]) # <<<<<<<<<<<<<<
* return self
* except Exception as e:
*/
__pyx_t_6 = PyObject_GetItem(__pyx_v_attr_dict, __pyx_v_key); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_12 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_t_6); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L12;
}
__pyx_L12:;
goto __pyx_L11;
}
__pyx_L11:;
/* "lib/Naked/toolshed/c/types.pyx":104
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
* return self # <<<<<<<<<<<<<<
* except Exception as e:
* if DEBUG_FLAG:
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L7_try_return;
}
__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;
goto __pyx_L10_try_end;
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":105
* setattr(self, key, attr_dict[key])
* return self
* except Exception as e: # <<<<<<<<<<<<<<
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
*/
__pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
if (__pyx_t_13) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_6);
__pyx_v_e = __pyx_t_6;
/* "lib/Naked/toolshed/c/types.pyx":106
* return self
* except Exception as e:
* if DEBUG_FLAG: # <<<<<<<<<<<<<<
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
* raise e
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_FLAG); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":107
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_stderr); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_write); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L17;
}
__pyx_L17:;
/* "lib/Naked/toolshed/c/types.pyx":108
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
* raise e # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_v_e, 0, 0, 0);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L4_exception_handled;
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L7_try_return:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L0;
__pyx_L4_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
__pyx_L10_try_end:;
}
/* "lib/Naked/toolshed/c/types.pyx":96
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __add__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_15);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_e);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":115
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __iadd__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_5__iadd__ = {__Pyx_NAMESTR("__iadd__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_5__iadd__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_dict = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_dict,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_dict)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__iadd__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __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_self = values[0];
__pyx_v_other_dict = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_4__iadd__(__pyx_self, __pyx_v_self, __pyx_v_other_dict);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_dict) {
PyObject *__pyx_v_attr_dict = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_e = 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;
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
Py_ssize_t __pyx_t_10;
PyObject *(*__pyx_t_11)(PyObject *);
int __pyx_t_12;
int __pyx_t_13;
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("__iadd__", 0);
/* "lib/Naked/toolshed/c/types.pyx":116
* #------------------------------------------------------------------------------
* def __iadd__(self, other_dict):
* try: # <<<<<<<<<<<<<<
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
*/
{
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":117
* def __iadd__(self, other_dict):
* try:
* self.update(other_dict) # <<<<<<<<<<<<<<
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_other_dict);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_other_dict);
__Pyx_GIVEREF(__pyx_v_other_dict);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":118
* try:
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'): # <<<<<<<<<<<<<<
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0:
*/
__pyx_t_7 = PyObject_HasAttr(__pyx_v_other_dict, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (__pyx_t_7) {
__pyx_t_6 = __Pyx_GetAttr(__pyx_v_other_dict, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_XDict, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_9 = __pyx_t_8;
} else {
__pyx_t_9 = __pyx_t_7;
}
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":119
* self.update(other_dict)
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict # <<<<<<<<<<<<<<
* if len(attr_dict) > 0:
* for key in attr_dict:
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_other_dict, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_attr_dict = __pyx_t_5;
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":120
* if hasattr(other_dict, '_naked_type_') and (getattr(other_dict, '_naked_type_') == 'XDict'):
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0: # <<<<<<<<<<<<<<
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
*/
__pyx_t_10 = PyObject_Length(__pyx_v_attr_dict); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_t_9 = ((__pyx_t_10 > 0) != 0);
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":121
* attr_dict = other_dict._getAttributeDict() # get the attributes from the parameter XDict and add to new XDict
* if len(attr_dict) > 0:
* for key in attr_dict: # <<<<<<<<<<<<<<
* setattr(self, key, attr_dict[key])
* return self
*/
if (PyList_CheckExact(__pyx_v_attr_dict) || PyTuple_CheckExact(__pyx_v_attr_dict)) {
__pyx_t_5 = __pyx_v_attr_dict; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
__pyx_t_11 = NULL;
} else {
__pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_attr_dict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
for (;;) {
if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_11(__pyx_t_5);
if (unlikely(!__pyx_t_6)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_6);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":122
* if len(attr_dict) > 0:
* for key in attr_dict:
* setattr(self, key, attr_dict[key]) # <<<<<<<<<<<<<<
* return self
* except Exception as e:
*/
__pyx_t_6 = PyObject_GetItem(__pyx_v_attr_dict, __pyx_v_key); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_12 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_t_6); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L12;
}
__pyx_L12:;
goto __pyx_L11;
}
__pyx_L11:;
/* "lib/Naked/toolshed/c/types.pyx":123
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
* return self # <<<<<<<<<<<<<<
* except Exception as e:
* if DEBUG_FLAG:
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L7_try_return;
}
__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;
goto __pyx_L10_try_end;
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":124
* setattr(self, key, attr_dict[key])
* return self
* except Exception as e: # <<<<<<<<<<<<<<
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
*/
__pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
if (__pyx_t_13) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_t_6);
__pyx_v_e = __pyx_t_6;
/* "lib/Naked/toolshed/c/types.pyx":125
* return self
* except Exception as e:
* if DEBUG_FLAG: # <<<<<<<<<<<<<<
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
* raise e
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_FLAG); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":126
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_stderr); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_write); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L17;
}
__pyx_L17:;
/* "lib/Naked/toolshed/c/types.pyx":127
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)")
* raise e # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_v_e, 0, 0, 0);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L4_exception_handled;
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L7_try_return:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L0;
__pyx_L4_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
__pyx_L10_try_end:;
}
/* "lib/Naked/toolshed/c/types.pyx":115
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __iadd__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_15);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_e);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":132
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_7__eq__ = {__Pyx_NAMESTR("__eq__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_7__eq__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_6__eq__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
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("__eq__", 0);
/* "lib/Naked/toolshed/c/types.pyx":133
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj):
* return self.equals(other_obj) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __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;
/* "lib/Naked/toolshed/c/types.pyx":132
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":138
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_9__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_9__ne__ = {__Pyx_NAMESTR("__ne__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_9__ne__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_9__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ne__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_8__ne__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_8__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__ne__", 0);
/* "lib/Naked/toolshed/c/types.pyx":139
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj):
* result = self.equals(other_obj) # <<<<<<<<<<<<<<
* if result:
* return False # reverse result of the equals method
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_result = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":140
* def __ne__(self, other_obj):
* result = self.equals(other_obj)
* if result: # <<<<<<<<<<<<<<
* return False # reverse result of the equals method
* else:
*/
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
/* "lib/Naked/toolshed/c/types.pyx":141
* result = self.equals(other_obj)
* if result:
* return False # reverse result of the equals method # <<<<<<<<<<<<<<
* else:
* return True
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":143
* return False # reverse result of the equals method
* else:
* return True # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_True);
__pyx_r = Py_True;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":138
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":149
* # tests for equality of the XDict (type, attributes, dictionary equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj):
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_11equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_11equals = {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_11equals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_11equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("equals (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_10equals(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_10equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("equals", 0);
/* "lib/Naked/toolshed/c/types.pyx":150
* #------------------------------------------------------------------------------
* def equals(self, other_obj):
* if self._equal_type(other_obj) and self._equal_attributes(other_obj): # <<<<<<<<<<<<<<
* if dict(self) == dict(other_obj):
* return True
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_4) {
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
__pyx_t_6 = __pyx_t_4;
}
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":151
* def equals(self, other_obj):
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj): # <<<<<<<<<<<<<<
* return True
* else:
*/
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __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 = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":152
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj):
* return True # <<<<<<<<<<<<<<
* else:
* return False
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_True);
__pyx_r = Py_True;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":154
* return True
* else:
* return False # <<<<<<<<<<<<<<
* else:
* return False
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":156
* return False
* else:
* return False # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":149
* # tests for equality of the XDict (type, attributes, dictionary equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":167
* # Test: test_xdict_conditional_map
* #------------------------------------------------------------------------------
* def conditional_map_to_vals(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for key, value in self.xitems():
* if conditional_function(key):
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_13conditional_map_to_vals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_13conditional_map_to_vals = {__Pyx_NAMESTR("conditional_map_to_vals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_13conditional_map_to_vals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_13conditional_map_to_vals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_conditional_function = 0;
PyObject *__pyx_v_mapped_function = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("conditional_map_to_vals (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conditional_function,&__pyx_n_s_mapped_function,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conditional_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("conditional_map_to_vals", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapped_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("conditional_map_to_vals", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conditional_map_to_vals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __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_self = values[0];
__pyx_v_conditional_function = values[1];
__pyx_v_mapped_function = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("conditional_map_to_vals", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.conditional_map_to_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_12conditional_map_to_vals(__pyx_self, __pyx_v_self, __pyx_v_conditional_function, __pyx_v_mapped_function);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_12conditional_map_to_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conditional_function, PyObject *__pyx_v_mapped_function) {
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_value = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *(*__pyx_t_8)(PyObject *);
int __pyx_t_9;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("conditional_map_to_vals", 0);
/* "lib/Naked/toolshed/c/types.pyx":168
* #------------------------------------------------------------------------------
* def conditional_map_to_vals(self, conditional_function, mapped_function):
* for key, value in self.xitems(): # <<<<<<<<<<<<<<
* if conditional_function(key):
* self[key] = mapped_function(value)
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_xitems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
#endif
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
} else {
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
__pyx_t_6 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
#else
__pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
Py_ssize_t index = -1;
__pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_5);
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
__pyx_L5_unpacking_failed:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
__pyx_t_5 = 0;
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":169
* def conditional_map_to_vals(self, conditional_function, mapped_function):
* for key, value in self.xitems():
* if conditional_function(key): # <<<<<<<<<<<<<<
* self[key] = mapped_function(value)
* return self
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_key);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
__Pyx_GIVEREF(__pyx_v_key);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_conditional_function, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":170
* for key, value in self.xitems():
* if conditional_function(key):
* self[key] = mapped_function(value) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_mapped_function, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_key, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L7;
}
__pyx_L7:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":171
* if conditional_function(key):
* self[key] = mapped_function(value)
* return self # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":167
* # Test: test_xdict_conditional_map
* #------------------------------------------------------------------------------
* def conditional_map_to_vals(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for key, value in self.xitems():
* if conditional_function(key):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.conditional_map_to_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_value);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":178
* # Test: test_xdict_map_to_vals
* #------------------------------------------------------------------------------
* def map_to_vals(self, mapped_function): # <<<<<<<<<<<<<<
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems():
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_15map_to_vals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_15map_to_vals = {__Pyx_NAMESTR("map_to_vals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_15map_to_vals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_15map_to_vals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_mapped_function = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("map_to_vals (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mapped_function,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapped_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("map_to_vals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_to_vals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __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_self = values[0];
__pyx_v_mapped_function = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("map_to_vals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.map_to_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_14map_to_vals(__pyx_self, __pyx_v_self, __pyx_v_mapped_function);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_14map_to_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mapped_function) {
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_value = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
PyObject *(*__pyx_t_8)(PyObject *);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("map_to_vals", 0);
/* "lib/Naked/toolshed/c/types.pyx":180
* def map_to_vals(self, mapped_function):
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems(): # <<<<<<<<<<<<<<
* self[key] = mapped_function(value)
* return self
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_xitems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
PyObject* sequence = __pyx_t_2;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
#endif
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
} else {
__pyx_t_5 = PyList_GET_ITEM(sequence, 0);
__pyx_t_6 = PyList_GET_ITEM(sequence, 1);
}
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(__pyx_t_6);
#else
__pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
#endif
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
} else {
Py_ssize_t index = -1;
__pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_5);
index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_6);
if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = NULL;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L6_unpacking_done;
__pyx_L5_unpacking_failed:;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
__pyx_t_5 = 0;
__Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":181
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems():
* self[key] = mapped_function(value) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_mapped_function, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_key, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":182
* for key, value in self.xitems():
* self[key] = mapped_function(value)
* return self # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":178
* # Test: test_xdict_map_to_vals
* #------------------------------------------------------------------------------
* def map_to_vals(self, mapped_function): # <<<<<<<<<<<<<<
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems():
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.map_to_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_value);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":189
* # Test: test_xdict_val_xlist
* #------------------------------------------------------------------------------
* def val_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.values(), self._getAttributeDict())
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_17val_xlist(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_17val_xlist = {__Pyx_NAMESTR("val_xlist"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_17val_xlist, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_17val_xlist(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("val_xlist (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_16val_xlist(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_16val_xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("val_xlist", 0);
/* "lib/Naked/toolshed/c/types.pyx":190
* #------------------------------------------------------------------------------
* def val_xlist(self):
* return XList(self.values(), self._getAttributeDict()) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XList); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __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_getAttributeDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":189
* # Test: test_xdict_val_xlist
* #------------------------------------------------------------------------------
* def val_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.values(), self._getAttributeDict())
*
*/
/* 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("lib.Naked.toolshed.c.types.XDict.val_xlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":196
* # Test: test_xdict_max_val, test_xdict_max_val_strings (strings are alphabetic if not numerals)
* #------------------------------------------------------------------------------
* def max_val(self): # <<<<<<<<<<<<<<
* return max(zip(self.values(), self.keys()))
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_19max_val(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_19max_val = {__Pyx_NAMESTR("max_val"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_19max_val, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_19max_val(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("max_val (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_18max_val(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_18max_val(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("max_val", 0);
/* "lib/Naked/toolshed/c/types.pyx":197
* #------------------------------------------------------------------------------
* def max_val(self):
* return max(zip(self.values(), self.keys())) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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;
/* "lib/Naked/toolshed/c/types.pyx":196
* # Test: test_xdict_max_val, test_xdict_max_val_strings (strings are alphabetic if not numerals)
* #------------------------------------------------------------------------------
* def max_val(self): # <<<<<<<<<<<<<<
* return max(zip(self.values(), self.keys()))
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.max_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":202
* # [ min_val method ] (tuple of minimum value and associated key)
* #------------------------------------------------------------------------------
* def min_val(self): # <<<<<<<<<<<<<<
* return min(zip(self.values(), self.keys()))
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_21min_val(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_21min_val = {__Pyx_NAMESTR("min_val"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_21min_val, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_21min_val(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("min_val (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_20min_val(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_20min_val(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("min_val", 0);
/* "lib/Naked/toolshed/c/types.pyx":203
* #------------------------------------------------------------------------------
* def min_val(self):
* return min(zip(self.values(), self.keys())) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__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 = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __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;
/* "lib/Naked/toolshed/c/types.pyx":202
* # [ min_val method ] (tuple of minimum value and associated key)
* #------------------------------------------------------------------------------
* def min_val(self): # <<<<<<<<<<<<<<
* return min(zip(self.values(), self.keys()))
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.min_val", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":209
* # returns sum of all values in the dictionary
* #------------------------------------------------------------------------------
* def sum_vals(self): # <<<<<<<<<<<<<<
* return sum(self.values())
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_23sum_vals(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_23sum_vals = {__Pyx_NAMESTR("sum_vals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_23sum_vals, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_23sum_vals(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sum_vals (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_22sum_vals(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_22sum_vals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("sum_vals", 0);
/* "lib/Naked/toolshed/c/types.pyx":210
* #------------------------------------------------------------------------------
* def sum_vals(self):
* return sum(self.values()) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __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 = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __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;
/* "lib/Naked/toolshed/c/types.pyx":209
* # returns sum of all values in the dictionary
* #------------------------------------------------------------------------------
* def sum_vals(self): # <<<<<<<<<<<<<<
* return sum(self.values())
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.sum_vals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":218
* # Tests: test_xdict_val_count_string, test_xdict_val_count_integer
* #------------------------------------------------------------------------------
* def val_count(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_25val_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_25val_count = {__Pyx_NAMESTR("val_count"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_25val_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_25val_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_value_name = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("val_count (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value_name,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_name)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("val_count", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "val_count") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __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_self = values[0];
__pyx_v_value_name = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("val_count", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.val_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_24val_count(__pyx_self, __pyx_v_self, __pyx_v_value_name);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_24val_count(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_name) {
PyObject *__pyx_v_count = NULL;
PyObject *__pyx_v_test_value = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
int __pyx_t_5;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("val_count", 0);
/* "lib/Naked/toolshed/c/types.pyx":219
* #------------------------------------------------------------------------------
* def val_count(self, value_name):
* count = 0 # <<<<<<<<<<<<<<
* for test_value in self.values():
* if value_name == test_value:
*/
__Pyx_INCREF(__pyx_int_0);
__pyx_v_count = __pyx_int_0;
/* "lib/Naked/toolshed/c/types.pyx":220
* def val_count(self, value_name):
* count = 0
* for test_value in self.values(): # <<<<<<<<<<<<<<
* if value_name == test_value:
* count += 1
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_test_value, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":221
* count = 0
* for test_value in self.values():
* if value_name == test_value: # <<<<<<<<<<<<<<
* count += 1
* return count
*/
__pyx_t_2 = PyObject_RichCompare(__pyx_v_value_name, __pyx_v_test_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":222
* for test_value in self.values():
* if value_name == test_value:
* count += 1 # <<<<<<<<<<<<<<
* return count
*
*/
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_count, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF_SET(__pyx_v_count, __pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L5;
}
__pyx_L5:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":223
* if value_name == test_value:
* count += 1
* return count # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_count);
__pyx_r = __pyx_v_count;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":218
* # Tests: test_xdict_val_count_string, test_xdict_val_count_integer
* #------------------------------------------------------------------------------
* def val_count(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.val_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_count);
__Pyx_XDECREF(__pyx_v_test_value);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":231
* # Test: test_xdict_val_count_ci
* #------------------------------------------------------------------------------
* def val_count_ci(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_27val_count_ci(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_27val_count_ci = {__Pyx_NAMESTR("val_count_ci"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_27val_count_ci, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_27val_count_ci(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_value_name = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("val_count_ci (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value_name,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value_name)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("val_count_ci", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "val_count_ci") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __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_self = values[0];
__pyx_v_value_name = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("val_count_ci", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.val_count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_26val_count_ci(__pyx_self, __pyx_v_self, __pyx_v_value_name);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_26val_count_ci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value_name) {
PyObject *__pyx_v_count = NULL;
PyObject *__pyx_v_test_value = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
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_t_12;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("val_count_ci", 0);
/* "lib/Naked/toolshed/c/types.pyx":232
* #------------------------------------------------------------------------------
* def val_count_ci(self, value_name):
* count = 0 # <<<<<<<<<<<<<<
* for test_value in self.values():
* try:
*/
__Pyx_INCREF(__pyx_int_0);
__pyx_v_count = __pyx_int_0;
/* "lib/Naked/toolshed/c/types.pyx":233
* def val_count_ci(self, value_name):
* count = 0
* for test_value in self.values(): # <<<<<<<<<<<<<<
* try:
* if value_name.lower() in test_value.lower():
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_values); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); 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_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_4(__pyx_t_1);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_test_value, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":234
* count = 0
* for test_value in self.values():
* try: # <<<<<<<<<<<<<<
* if value_name.lower() in test_value.lower():
* count += 1
*/
{
__Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
__Pyx_XGOTREF(__pyx_t_5);
__Pyx_XGOTREF(__pyx_t_6);
__Pyx_XGOTREF(__pyx_t_7);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":235
* for test_value in self.values():
* try:
* if value_name.lower() in test_value.lower(): # <<<<<<<<<<<<<<
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_value_name, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_test_value, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_11 = (__pyx_t_10 != 0);
if (__pyx_t_11) {
/* "lib/Naked/toolshed/c/types.pyx":236
* try:
* if value_name.lower() in test_value.lower():
* count += 1 # <<<<<<<<<<<<<<
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue
*/
__pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_count, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF_SET(__pyx_v_count, __pyx_t_9);
__pyx_t_9 = 0;
goto __pyx_L13;
}
__pyx_L13:;
}
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L12_try_end;
__pyx_L5_error:;
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
/* "lib/Naked/toolshed/c/types.pyx":237
* if value_name.lower() in test_value.lower():
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt # <<<<<<<<<<<<<<
* continue
* return count
*/
__pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
if (__pyx_t_12) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.val_count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_2);
/* "lib/Naked/toolshed/c/types.pyx":238
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue # <<<<<<<<<<<<<<
* return count
*
*/
goto __pyx_L15_except_continue;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L6_exception_handled;
__pyx_L15_except_continue:;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L11_try_continue;
}
goto __pyx_L7_except_error;
__pyx_L7_except_error:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L1_error;
__pyx_L11_try_continue:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L3_continue;
__pyx_L6_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
__pyx_L12_try_end:;
}
__pyx_L3_continue:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":239
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue
* return count # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_count);
__pyx_r = __pyx_v_count;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":231
* # Test: test_xdict_val_count_ci
* #------------------------------------------------------------------------------
* def val_count_ci(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.val_count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_count);
__Pyx_XDECREF(__pyx_v_test_value);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":250
* # Tests: test_xdict_key_difference, test_xdict_key_difference_when_none_present
* #------------------------------------------------------------------------------
* def difference(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) - set(another_dict.keys())
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_29difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_29difference = {__Pyx_NAMESTR("difference"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_29difference, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_29difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_dict = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("difference (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_dict,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_dict)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("difference", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "difference") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __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_self = values[0];
__pyx_v_another_dict = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("difference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.difference", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_28difference(__pyx_self, __pyx_v_self, __pyx_v_another_dict);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_28difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_dict) {
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("difference", 0);
/* "lib/Naked/toolshed/c/types.pyx":251
* #------------------------------------------------------------------------------
* def difference(self, another_dict):
* return set(self.keys()) - set(another_dict.keys()) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __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_v_another_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__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 = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":250
* # Tests: test_xdict_key_difference, test_xdict_key_difference_when_none_present
* #------------------------------------------------------------------------------
* def difference(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) - set(another_dict.keys())
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.difference", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":258
* # Tests: test_xdict_key_intersection, test_xdict_key_intersection_when_none_present
* #------------------------------------------------------------------------------
* def intersection(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) & set(another_dict.keys())
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_31intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_31intersection = {__Pyx_NAMESTR("intersection"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_31intersection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_31intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_dict = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("intersection (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_dict,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_dict)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("intersection", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __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_self = values[0];
__pyx_v_another_dict = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("intersection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_30intersection(__pyx_self, __pyx_v_self, __pyx_v_another_dict);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_30intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_dict) {
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("intersection", 0);
/* "lib/Naked/toolshed/c/types.pyx":259
* #------------------------------------------------------------------------------
* def intersection(self, another_dict):
* return set(self.keys()) & set(another_dict.keys()) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __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 = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __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_v_another_dict, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__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 = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":258
* # Tests: test_xdict_key_intersection, test_xdict_key_intersection_when_none_present
* #------------------------------------------------------------------------------
* def intersection(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) & set(another_dict.keys())
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":266
* # Test: test_xdict_key_xlist
* #------------------------------------------------------------------------------
* def key_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.keys(), self._getAttributeDict())
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_33key_xlist(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_33key_xlist = {__Pyx_NAMESTR("key_xlist"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_33key_xlist, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_33key_xlist(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("key_xlist (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_32key_xlist(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_32key_xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("key_xlist", 0);
/* "lib/Naked/toolshed/c/types.pyx":267
* #------------------------------------------------------------------------------
* def key_xlist(self):
* return XList(self.keys(), self._getAttributeDict()) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XList); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __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_getAttributeDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":266
* # Test: test_xdict_key_xlist
* #------------------------------------------------------------------------------
* def key_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.keys(), self._getAttributeDict())
*
*/
/* 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("lib.Naked.toolshed.c.types.XDict.key_xlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":274
* # Test: test_xdict_key_random
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* from Naked.toolshed.python import py_major_version
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_35random(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_35random = {__Pyx_NAMESTR("random"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_35random, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_35random(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("random (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_34random(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_34random(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_random = NULL;
CYTHON_UNUSED PyObject *__pyx_v_py_major_version = NULL;
PyObject *__pyx_v_random_key_list = NULL;
PyObject *__pyx_v_the_key = NULL;
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("random", 0);
/* "lib/Naked/toolshed/c/types.pyx":275
* #------------------------------------------------------------------------------
* def random(self):
* import random # <<<<<<<<<<<<<<
* from Naked.toolshed.python import py_major_version
* random_key_list = random.sample(self.keys(), 1)
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_random = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":276
* def random(self):
* import random
* from Naked.toolshed.python import py_major_version # <<<<<<<<<<<<<<
* random_key_list = random.sample(self.keys(), 1)
* the_key = random_key_list[0]
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_py_major_version);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_py_major_version);
__Pyx_GIVEREF(__pyx_n_s_py_major_version);
__pyx_t_2 = __Pyx_Import(__pyx_n_s_Naked_toolshed_python, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __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_ImportFrom(__pyx_t_2, __pyx_n_s_py_major_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_py_major_version = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":277
* import random
* from Naked.toolshed.python import py_major_version
* random_key_list = random.sample(self.keys(), 1) # <<<<<<<<<<<<<<
* the_key = random_key_list[0]
* return {the_key: self[the_key]}
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_random, __pyx_n_s_sample); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_int_1);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
__Pyx_GIVEREF(__pyx_int_1);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __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_v_random_key_list = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":278
* from Naked.toolshed.python import py_major_version
* random_key_list = random.sample(self.keys(), 1)
* the_key = random_key_list[0] # <<<<<<<<<<<<<<
* return {the_key: self[the_key]}
*
*/
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_random_key_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_the_key = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":279
* random_key_list = random.sample(self.keys(), 1)
* the_key = random_key_list[0]
* return {the_key: self[the_key]} # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = PyObject_GetItem(__pyx_v_self, __pyx_v_the_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_t_3, __pyx_v_the_key, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":274
* # Test: test_xdict_key_random
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* from Naked.toolshed.python import py_major_version
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_random);
__Pyx_XDECREF(__pyx_v_py_major_version);
__Pyx_XDECREF(__pyx_v_random_key_list);
__Pyx_XDECREF(__pyx_v_the_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":286
* # Test: test_xdict_key_random_sample
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* random_key_list = random.sample(self.keys(), number_of_items)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_37random_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_37random_sample = {__Pyx_NAMESTR("random_sample"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_37random_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_37random_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_number_of_items = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("random_sample (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_number_of_items,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_number_of_items)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("random_sample", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __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_self = values[0];
__pyx_v_number_of_items = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("random_sample", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_36random_sample(__pyx_self, __pyx_v_self, __pyx_v_number_of_items);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_36random_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_number_of_items) {
PyObject *__pyx_v_random = NULL;
PyObject *__pyx_v_random_key_list = NULL;
PyObject *__pyx_v_new_dict = NULL;
PyObject *__pyx_v_item = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
PyObject *(*__pyx_t_5)(PyObject *);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("random_sample", 0);
/* "lib/Naked/toolshed/c/types.pyx":287
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items):
* import random # <<<<<<<<<<<<<<
* random_key_list = random.sample(self.keys(), number_of_items)
* new_dict = {}
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_random = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":288
* def random_sample(self, number_of_items):
* import random
* random_key_list = random.sample(self.keys(), number_of_items) # <<<<<<<<<<<<<<
* new_dict = {}
* for item in random_key_list:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_random, __pyx_n_s_sample); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_number_of_items);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_number_of_items);
__Pyx_GIVEREF(__pyx_v_number_of_items);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __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_v_random_key_list = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":289
* import random
* random_key_list = random.sample(self.keys(), number_of_items)
* new_dict = {} # <<<<<<<<<<<<<<
* for item in random_key_list:
* new_dict[item] = self[item]
*/
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_new_dict = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":290
* random_key_list = random.sample(self.keys(), number_of_items)
* new_dict = {}
* for item in random_key_list: # <<<<<<<<<<<<<<
* new_dict[item] = self[item]
* return new_dict
*/
if (PyList_CheckExact(__pyx_v_random_key_list) || PyTuple_CheckExact(__pyx_v_random_key_list)) {
__pyx_t_3 = __pyx_v_random_key_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_random_key_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":291
* new_dict = {}
* for item in random_key_list:
* new_dict[item] = self[item] # <<<<<<<<<<<<<<
* return new_dict
*
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_self, __pyx_v_item); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
if (unlikely(PyDict_SetItem(__pyx_v_new_dict, __pyx_v_item, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":292
* for item in random_key_list:
* new_dict[item] = self[item]
* return new_dict # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_new_dict);
__pyx_r = __pyx_v_new_dict;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":286
* # Test: test_xdict_key_random_sample
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* random_key_list = random.sample(self.keys(), number_of_items)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_random);
__Pyx_XDECREF(__pyx_v_random_key_list);
__Pyx_XDECREF(__pyx_v_new_dict);
__Pyx_XDECREF(__pyx_v_item);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":300
* # Test: test_xdict_xitems
* #------------------------------------------------------------------------------
* def xitems(self): # <<<<<<<<<<<<<<
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_39xitems(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_39xitems = {__Pyx_NAMESTR("xitems"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_39xitems, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XDict_39xitems(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xitems (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_38xitems(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_38xitems(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_py_major_version = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("xitems", 0);
/* "lib/Naked/toolshed/c/types.pyx":301
* #------------------------------------------------------------------------------
* def xitems(self):
* from Naked.toolshed.python import py_major_version # <<<<<<<<<<<<<<
* if py_major_version() > 2:
* return self.items()
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_py_major_version);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_py_major_version);
__Pyx_GIVEREF(__pyx_n_s_py_major_version);
__pyx_t_2 = __Pyx_Import(__pyx_n_s_Naked_toolshed_python, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __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_ImportFrom(__pyx_t_2, __pyx_n_s_py_major_version); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_py_major_version = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":302
* def xitems(self):
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2: # <<<<<<<<<<<<<<
* return self.items()
* else:
*/
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_py_major_version, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_3) {
/* "lib/Naked/toolshed/c/types.pyx":303
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2:
* return self.items() # <<<<<<<<<<<<<<
* else:
* return self.iteritems()
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __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;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":305
* return self.items()
* else:
* return self.iteritems() # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __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;
}
/* "lib/Naked/toolshed/c/types.pyx":300
* # Test: test_xdict_xitems
* #------------------------------------------------------------------------------
* def xitems(self): # <<<<<<<<<<<<<<
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XDict.xitems", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_py_major_version);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":312
* #------------------------------------------------------------------------------
* class XList(list, NakedObject):
* def __init__(self, list_obj, attributes={}, naked_type='XList'): # <<<<<<<<<<<<<<
* list.__init__(self, list_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_56__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); 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_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XList));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XList));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XList));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_list_obj = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_list_obj,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XList));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = 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 = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_self = values[0];
__pyx_v_list_obj = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList___init__(__pyx_self, __pyx_v_self, __pyx_v_list_obj, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_list_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":313
* class XList(list, NakedObject):
* def __init__(self, list_obj, attributes={}, naked_type='XList'):
* list.__init__(self, list_obj) # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_list_obj);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_list_obj);
__Pyx_GIVEREF(__pyx_v_list_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":314
* def __init__(self, list_obj, attributes={}, naked_type='XList'):
* list.__init__(self, list_obj)
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__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;
/* "lib/Naked/toolshed/c/types.pyx":312
* #------------------------------------------------------------------------------
* class XList(list, NakedObject):
* def __init__(self, list_obj, attributes={}, naked_type='XList'): # <<<<<<<<<<<<<<
* list.__init__(self, list_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":324
* # extends XList with one or more other lists (`*other_lists`)
* #------------------------------------------------------------------------------
* def __add__(self, *other_lists): # <<<<<<<<<<<<<<
* try:
* for the_list in other_lists:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_3__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_3__add__ = {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_3__add__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_3__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_lists = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
__pyx_v_other_lists = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
if (unlikely(!__pyx_v_other_lists)) {
__Pyx_RefNannyFinishContext();
return NULL;
}
__Pyx_GOTREF(__pyx_v_other_lists);
} else {
__pyx_v_other_lists = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
}
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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) {
default:
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
case 0: break;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__add__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __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_self = values[0];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__add__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_other_lists); __pyx_v_other_lists = 0;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_2__add__(__pyx_self, __pyx_v_self, __pyx_v_other_lists);
/* function exit code */
__Pyx_XDECREF(__pyx_v_other_lists);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_2__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_lists) {
PyObject *__pyx_v_the_list = NULL;
PyObject *__pyx_v_attr_dict = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_e = 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;
Py_ssize_t __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
PyObject *__pyx_t_10 = NULL;
Py_ssize_t __pyx_t_11;
PyObject *(*__pyx_t_12)(PyObject *);
int __pyx_t_13;
PyObject *__pyx_t_14 = NULL;
int __pyx_t_15;
PyObject *__pyx_t_16 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__add__", 0);
/* "lib/Naked/toolshed/c/types.pyx":325
* #------------------------------------------------------------------------------
* def __add__(self, *other_lists):
* try: # <<<<<<<<<<<<<<
* for the_list in other_lists:
* # add attributes if it is an XList
*/
{
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":326
* def __add__(self, *other_lists):
* try:
* for the_list in other_lists: # <<<<<<<<<<<<<<
* # add attributes if it is an XList
* if hasattr(the_list, '_naked_type_') and (getattr(the_list, '_naked_type_') == 'XList'):
*/
__pyx_t_4 = __pyx_v_other_lists; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
for (;;) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_6); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
__Pyx_XDECREF_SET(__pyx_v_the_list, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":328
* for the_list in other_lists:
* # add attributes if it is an XList
* if hasattr(the_list, '_naked_type_') and (getattr(the_list, '_naked_type_') == 'XList'): # <<<<<<<<<<<<<<
* attr_dict = the_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0:
*/
__pyx_t_7 = PyObject_HasAttr(__pyx_v_the_list, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (__pyx_t_7) {
__pyx_t_6 = __Pyx_GetAttr(__pyx_v_the_list, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_XList, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_9 = __pyx_t_8;
} else {
__pyx_t_9 = __pyx_t_7;
}
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":329
* # add attributes if it is an XList
* if hasattr(the_list, '_naked_type_') and (getattr(the_list, '_naked_type_') == 'XList'):
* attr_dict = the_list._getAttributeDict() # get XList attribute dictionary # <<<<<<<<<<<<<<
* if len(attr_dict) > 0:
* for key in attr_dict:
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_the_list, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF_SET(__pyx_v_attr_dict, __pyx_t_10);
__pyx_t_10 = 0;
/* "lib/Naked/toolshed/c/types.pyx":330
* if hasattr(the_list, '_naked_type_') and (getattr(the_list, '_naked_type_') == 'XList'):
* attr_dict = the_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0: # <<<<<<<<<<<<<<
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
*/
__pyx_t_11 = PyObject_Length(__pyx_v_attr_dict); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_t_9 = ((__pyx_t_11 > 0) != 0);
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":331
* attr_dict = the_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0:
* for key in attr_dict: # <<<<<<<<<<<<<<
* setattr(self, key, attr_dict[key])
* # extend the XList items
*/
if (PyList_CheckExact(__pyx_v_attr_dict) || PyTuple_CheckExact(__pyx_v_attr_dict)) {
__pyx_t_10 = __pyx_v_attr_dict; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0;
__pyx_t_12 = NULL;
} else {
__pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_attr_dict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_12 = Py_TYPE(__pyx_t_10)->tp_iternext;
}
for (;;) {
if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_10)) {
if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_10)) {
if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_12(__pyx_t_10);
if (unlikely(!__pyx_t_6)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_6);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
__pyx_t_6 = 0;
/* "lib/Naked/toolshed/c/types.pyx":332
* if len(attr_dict) > 0:
* for key in attr_dict:
* setattr(self, key, attr_dict[key]) # <<<<<<<<<<<<<<
* # extend the XList items
* self.extend(the_list)
*/
__pyx_t_6 = PyObject_GetItem(__pyx_v_attr_dict, __pyx_v_key); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_13 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L14;
}
__pyx_L14:;
goto __pyx_L13;
}
__pyx_L13:;
/* "lib/Naked/toolshed/c/types.pyx":334
* setattr(self, key, attr_dict[key])
* # extend the XList items
* self.extend(the_list) # <<<<<<<<<<<<<<
* return self
* except Exception as e:
*/
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extend); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_the_list);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_the_list);
__Pyx_GIVEREF(__pyx_v_the_list);
__pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":335
* # extend the XList items
* self.extend(the_list)
* return self # <<<<<<<<<<<<<<
* except Exception as e:
* if DEBUG_FLAG:
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L7_try_return;
}
__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;
goto __pyx_L10_try_end;
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":336
* self.extend(the_list)
* return self
* except Exception as e: # <<<<<<<<<<<<<<
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
*/
__pyx_t_15 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
if (__pyx_t_15) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_14, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_t_14);
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_14);
__pyx_v_e = __pyx_t_14;
/* "lib/Naked/toolshed/c/types.pyx":337
* return self
* except Exception as e:
* if DEBUG_FLAG: # <<<<<<<<<<<<<<
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
* raise e
*/
__pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_FLAG); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (__pyx_t_9) {
/* "lib/Naked/toolshed/c/types.pyx":338
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_stderr); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_write); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
goto __pyx_L19;
}
__pyx_L19:;
/* "lib/Naked/toolshed/c/types.pyx":339
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
* raise e # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_v_e, 0, 0, 0);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L4_exception_handled;
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L7_try_return:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L0;
__pyx_L4_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
__pyx_L10_try_end:;
}
/* "lib/Naked/toolshed/c/types.pyx":324
* # extends XList with one or more other lists (`*other_lists`)
* #------------------------------------------------------------------------------
* def __add__(self, *other_lists): # <<<<<<<<<<<<<<
* try:
* for the_list in other_lists:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_the_list);
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_e);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":345
* # extends XList with one other list (`another_list`)
* #------------------------------------------------------------------------------
* def __iadd__(self, another_list): # <<<<<<<<<<<<<<
* try:
* #add attributes if it is an XList
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_5__iadd__ = {__Pyx_NAMESTR("__iadd__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_5__iadd__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_list = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_list,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_list)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__iadd__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __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_self = values[0];
__pyx_v_another_list = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_4__iadd__(__pyx_self, __pyx_v_self, __pyx_v_another_list);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list) {
PyObject *__pyx_v_attr_dict = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_v_e = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
int __pyx_t_7;
PyObject *__pyx_t_8 = NULL;
Py_ssize_t __pyx_t_9;
PyObject *(*__pyx_t_10)(PyObject *);
int __pyx_t_11;
PyObject *__pyx_t_12 = NULL;
int __pyx_t_13;
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("__iadd__", 0);
/* "lib/Naked/toolshed/c/types.pyx":346
* #------------------------------------------------------------------------------
* def __iadd__(self, another_list):
* try: # <<<<<<<<<<<<<<
* #add attributes if it is an XList
* if hasattr(another_list, '_naked_type_') and (getattr(another_list, '_naked_type_') == 'XList'):
*/
{
__Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
__Pyx_XGOTREF(__pyx_t_1);
__Pyx_XGOTREF(__pyx_t_2);
__Pyx_XGOTREF(__pyx_t_3);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":348
* try:
* #add attributes if it is an XList
* if hasattr(another_list, '_naked_type_') and (getattr(another_list, '_naked_type_') == 'XList'): # <<<<<<<<<<<<<<
* attr_dict = another_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0:
*/
__pyx_t_4 = PyObject_HasAttr(__pyx_v_another_list, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (__pyx_t_4) {
__pyx_t_5 = __Pyx_GetAttr(__pyx_v_another_list, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_XList, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_7 = __pyx_t_6;
} else {
__pyx_t_7 = __pyx_t_4;
}
if (__pyx_t_7) {
/* "lib/Naked/toolshed/c/types.pyx":349
* #add attributes if it is an XList
* if hasattr(another_list, '_naked_type_') and (getattr(another_list, '_naked_type_') == 'XList'):
* attr_dict = another_list._getAttributeDict() # get XList attribute dictionary # <<<<<<<<<<<<<<
* if len(attr_dict) > 0:
* for key in attr_dict:
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_another_list, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_attr_dict = __pyx_t_8;
__pyx_t_8 = 0;
/* "lib/Naked/toolshed/c/types.pyx":350
* if hasattr(another_list, '_naked_type_') and (getattr(another_list, '_naked_type_') == 'XList'):
* attr_dict = another_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0: # <<<<<<<<<<<<<<
* for key in attr_dict:
* setattr(self, key, attr_dict[key])
*/
__pyx_t_9 = PyObject_Length(__pyx_v_attr_dict); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_t_7 = ((__pyx_t_9 > 0) != 0);
if (__pyx_t_7) {
/* "lib/Naked/toolshed/c/types.pyx":351
* attr_dict = another_list._getAttributeDict() # get XList attribute dictionary
* if len(attr_dict) > 0:
* for key in attr_dict: # <<<<<<<<<<<<<<
* setattr(self, key, attr_dict[key])
* # extend the XList items
*/
if (PyList_CheckExact(__pyx_v_attr_dict) || PyTuple_CheckExact(__pyx_v_attr_dict)) {
__pyx_t_8 = __pyx_v_attr_dict; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
__pyx_t_10 = NULL;
} else {
__pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_attr_dict); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
}
for (;;) {
if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_8)) {
if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_8)) {
if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_10(__pyx_t_8);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":352
* if len(attr_dict) > 0:
* for key in attr_dict:
* setattr(self, key, attr_dict[key]) # <<<<<<<<<<<<<<
* # extend the XList items
* self.extend(another_list)
*/
__pyx_t_5 = PyObject_GetItem(__pyx_v_attr_dict, __pyx_v_key); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_11 = PyObject_SetAttr(__pyx_v_self, __pyx_v_key, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L12;
}
__pyx_L12:;
goto __pyx_L11;
}
__pyx_L11:;
/* "lib/Naked/toolshed/c/types.pyx":354
* setattr(self, key, attr_dict[key])
* # extend the XList items
* self.extend(another_list) # <<<<<<<<<<<<<<
* return self
* except Exception as e:
*/
__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extend); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_another_list);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_another_list);
__Pyx_GIVEREF(__pyx_v_another_list);
__pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
/* "lib/Naked/toolshed/c/types.pyx":355
* # extend the XList items
* self.extend(another_list)
* return self # <<<<<<<<<<<<<<
* except Exception as e:
* if DEBUG_FLAG:
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L7_try_return;
}
__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;
goto __pyx_L10_try_end;
__pyx_L3_error:;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
/* "lib/Naked/toolshed/c/types.pyx":356
* self.extend(another_list)
* return self
* except Exception as e: # <<<<<<<<<<<<<<
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
*/
__pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
if (__pyx_t_13) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_INCREF(__pyx_t_5);
__pyx_v_e = __pyx_t_5;
/* "lib/Naked/toolshed/c/types.pyx":357
* return self
* except Exception as e:
* if DEBUG_FLAG: # <<<<<<<<<<<<<<
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
* raise e
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_FLAG); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (__pyx_t_7) {
/* "lib/Naked/toolshed/c/types.pyx":358
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_stderr); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_write); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
goto __pyx_L17;
}
__pyx_L17:;
/* "lib/Naked/toolshed/c/types.pyx":359
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)")
* raise e # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_Raise(__pyx_v_e, 0, 0, 0);
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
goto __pyx_L4_exception_handled;
}
goto __pyx_L5_except_error;
__pyx_L5_except_error:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L1_error;
__pyx_L7_try_return:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
goto __pyx_L0;
__pyx_L4_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_1);
__Pyx_XGIVEREF(__pyx_t_2);
__Pyx_XGIVEREF(__pyx_t_3);
__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
__pyx_L10_try_end:;
}
/* "lib/Naked/toolshed/c/types.pyx":345
* # extends XList with one other list (`another_list`)
* #------------------------------------------------------------------------------
* def __iadd__(self, another_list): # <<<<<<<<<<<<<<
* try:
* #add attributes if it is an XList
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_14);
__Pyx_XDECREF(__pyx_t_15);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_e);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":364
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_7__eq__ = {__Pyx_NAMESTR("__eq__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_7__eq__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_7__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_6__eq__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_6__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
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("__eq__", 0);
/* "lib/Naked/toolshed/c/types.pyx":365
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj):
* return self.equals(other_obj) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __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;
/* "lib/Naked/toolshed/c/types.pyx":364
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":370
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_9__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_9__ne__ = {__Pyx_NAMESTR("__ne__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_9__ne__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_9__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ne__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_8__ne__(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_8__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__ne__", 0);
/* "lib/Naked/toolshed/c/types.pyx":371
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj):
* result = self.equals(other_obj) # <<<<<<<<<<<<<<
* if result:
* return False # reverse result of the equals method
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __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_v_result = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":372
* def __ne__(self, other_obj):
* result = self.equals(other_obj)
* if result: # <<<<<<<<<<<<<<
* return False # reverse result of the equals method
* else:
*/
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_4) {
/* "lib/Naked/toolshed/c/types.pyx":373
* result = self.equals(other_obj)
* if result:
* return False # reverse result of the equals method # <<<<<<<<<<<<<<
* else:
* return True
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":375
* return False # reverse result of the equals method
* else:
* return True # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_True);
__pyx_r = Py_True;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":370
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_result);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":381
* # tests for equality of the XList (type, attributes, list equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj):
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_11equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_11equals = {__Pyx_NAMESTR("equals"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_11equals, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_11equals(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_obj = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("equals (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_obj,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "equals") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __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_self = values[0];
__pyx_v_other_obj = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("equals", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_10equals(__pyx_self, __pyx_v_self, __pyx_v_other_obj);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_10equals(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_obj) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("equals", 0);
/* "lib/Naked/toolshed/c/types.pyx":382
* #------------------------------------------------------------------------------
* def equals(self, other_obj):
* if self._equal_type(other_obj) and self._equal_attributes(other_obj): # <<<<<<<<<<<<<<
* if list(self) == list(other_obj):
* return True
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_type); 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);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_4) {
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_equal_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); 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);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_6 = __pyx_t_5;
} else {
__pyx_t_6 = __pyx_t_4;
}
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":383
* def equals(self, other_obj):
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj): # <<<<<<<<<<<<<<
* return True
* else:
*/
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); 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);
__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 = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_other_obj);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other_obj);
__Pyx_GIVEREF(__pyx_v_other_obj);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":384
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj):
* return True # <<<<<<<<<<<<<<
* else:
* return False
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_True);
__pyx_r = Py_True;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":386
* return True
* else:
* return False # <<<<<<<<<<<<<<
* else:
* return False
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":388
* return False
* else:
* return False # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_False);
__pyx_r = Py_False;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":381
* # tests for equality of the XList (type, attributes, list equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.equals", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":402
* # Pass separator character(s) as an argument to the method
* #------------------------------------------------------------------------------
* def join(self, separator=""): # <<<<<<<<<<<<<<
* return separator.join(self)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_13join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_13join = {__Pyx_NAMESTR("join"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_13join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_13join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_separator = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("join (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_separator,0};
PyObject* values[2] = {0,0};
values[1] = ((PyObject *)((PyObject*)__pyx_kp_s__5));
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_separator);
if (value) { values[1] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __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_self = values[0];
__pyx_v_separator = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("join", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_12join(__pyx_self, __pyx_v_self, __pyx_v_separator);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_12join(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_separator) {
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("join", 0);
/* "lib/Naked/toolshed/c/types.pyx":403
* #------------------------------------------------------------------------------
* def join(self, separator=""):
* return separator.join(self) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_separator, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __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;
/* "lib/Naked/toolshed/c/types.pyx":402
* # Pass separator character(s) as an argument to the method
* #------------------------------------------------------------------------------
* def join(self, separator=""): # <<<<<<<<<<<<<<
* return separator.join(self)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":409
* # Append a string to each list item string
* #------------------------------------------------------------------------------
* def postfix(self, after): # <<<<<<<<<<<<<<
* return [ "".join([x, after]) for x in self ]
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_15postfix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_15postfix = {__Pyx_NAMESTR("postfix"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_15postfix, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_15postfix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_after = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("postfix (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_after,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_after)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("postfix", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "postfix") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __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_self = values[0];
__pyx_v_after = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("postfix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.postfix", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_14postfix(__pyx_self, __pyx_v_self, __pyx_v_after);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_14postfix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_after) {
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
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("postfix", 0);
/* "lib/Naked/toolshed/c/types.pyx":410
* #------------------------------------------------------------------------------
* def postfix(self, after):
* return [ "".join([x, after]) for x in self ] # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_x);
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
__Pyx_INCREF(__pyx_v_after);
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_v_after);
__Pyx_GIVEREF(__pyx_v_after);
__pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":409
* # Append a string to each list item string
* #------------------------------------------------------------------------------
* def postfix(self, after): # <<<<<<<<<<<<<<
* return [ "".join([x, after]) for x in self ]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.postfix", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":416
* # Prepend a string to each list item string
* #------------------------------------------------------------------------------
* def prefix(self, before): # <<<<<<<<<<<<<<
* return [ "".join([before, x]) for x in self ]
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_17prefix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_17prefix = {__Pyx_NAMESTR("prefix"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_17prefix, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_17prefix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_before = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("prefix (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_before,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_before)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("prefix", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "prefix") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __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_self = values[0];
__pyx_v_before = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("prefix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.prefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_16prefix(__pyx_self, __pyx_v_self, __pyx_v_before);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_16prefix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_before) {
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
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("prefix", 0);
/* "lib/Naked/toolshed/c/types.pyx":417
* #------------------------------------------------------------------------------
* def prefix(self, before):
* return [ "".join([before, x]) for x in self ] # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_before);
PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_before);
__Pyx_GIVEREF(__pyx_v_before);
__Pyx_INCREF(__pyx_v_x);
PyList_SET_ITEM(__pyx_t_5, 1, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
__pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":416
* # Prepend a string to each list item string
* #------------------------------------------------------------------------------
* def prefix(self, before): # <<<<<<<<<<<<<<
* return [ "".join([before, x]) for x in self ]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.prefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":423
* # Surround each list item string with a before and after string argument passed to the method
* #------------------------------------------------------------------------------
* def surround(self, before, after=""): # <<<<<<<<<<<<<<
* if after == "":
* after = before
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_19surround(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_19surround = {__Pyx_NAMESTR("surround"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_19surround, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_19surround(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_before = 0;
PyObject *__pyx_v_after = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("surround (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_before,&__pyx_n_s_after,0};
PyObject* values[3] = {0,0,0};
values[2] = ((PyObject *)((PyObject*)__pyx_kp_s__5));
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_before)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("surround", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_after);
if (value) { values[2] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "surround") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __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);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_self = values[0];
__pyx_v_before = values[1];
__pyx_v_after = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("surround", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.surround", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_18surround(__pyx_self, __pyx_v_self, __pyx_v_before, __pyx_v_after);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_18surround(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after) {
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
PyObject *(*__pyx_t_5)(PyObject *);
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("surround", 0);
__Pyx_INCREF(__pyx_v_after);
/* "lib/Naked/toolshed/c/types.pyx":424
* #------------------------------------------------------------------------------
* def surround(self, before, after=""):
* if after == "": # <<<<<<<<<<<<<<
* after = before
* return [ "".join([before, x, after]) for x in self ]
*/
__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_after, __pyx_kp_s__5, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
/* "lib/Naked/toolshed/c/types.pyx":425
* def surround(self, before, after=""):
* if after == "":
* after = before # <<<<<<<<<<<<<<
* return [ "".join([before, x, after]) for x in self ]
*
*/
__Pyx_INCREF(__pyx_v_before);
__Pyx_DECREF_SET(__pyx_v_after, __pyx_v_before);
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":426
* if after == "":
* after = before
* return [ "".join([before, x, after]) for x in self ] # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_5 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_5(__pyx_t_3);
if (unlikely(!__pyx_t_6)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_6);
}
__Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
__pyx_t_6 = 0;
__pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_before);
PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_before);
__Pyx_GIVEREF(__pyx_v_before);
__Pyx_INCREF(__pyx_v_x);
PyList_SET_ITEM(__pyx_t_6, 1, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
__Pyx_INCREF(__pyx_v_after);
PyList_SET_ITEM(__pyx_t_6, 2, __pyx_v_after);
__Pyx_GIVEREF(__pyx_v_after);
__pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":423
* # Surround each list item string with a before and after string argument passed to the method
* #------------------------------------------------------------------------------
* def surround(self, before, after=""): # <<<<<<<<<<<<<<
* if after == "":
* after = before
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.surround", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XDECREF(__pyx_v_after);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":434
* # return maximum value from the list items
* #------------------------------------------------------------------------------
* def max(self): # <<<<<<<<<<<<<<
* return max(self)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_21max(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_21max = {__Pyx_NAMESTR("max"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_21max, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_21max(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("max (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_20max(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_20max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("max", 0);
/* "lib/Naked/toolshed/c/types.pyx":435
* #------------------------------------------------------------------------------
* def max(self):
* return max(self) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __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;
/* "lib/Naked/toolshed/c/types.pyx":434
* # return maximum value from the list items
* #------------------------------------------------------------------------------
* def max(self): # <<<<<<<<<<<<<<
* return max(self)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":441
* # return minimum value from the list items
* #------------------------------------------------------------------------------
* def min(self): # <<<<<<<<<<<<<<
* return min(self)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_23min(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_23min = {__Pyx_NAMESTR("min"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_23min, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_23min(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("min (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_22min(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_22min(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("min", 0);
/* "lib/Naked/toolshed/c/types.pyx":442
* #------------------------------------------------------------------------------
* def min(self):
* return min(self) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_min, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __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;
/* "lib/Naked/toolshed/c/types.pyx":441
* # return minimum value from the list items
* #------------------------------------------------------------------------------
* def min(self): # <<<<<<<<<<<<<<
* return min(self)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":448
* # return the sum of all list items
* #------------------------------------------------------------------------------
* def sum(self): # <<<<<<<<<<<<<<
* return sum(self)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_25sum(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_25sum = {__Pyx_NAMESTR("sum"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_25sum, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_25sum(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("sum (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_24sum(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_24sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("sum", 0);
/* "lib/Naked/toolshed/c/types.pyx":449
* #------------------------------------------------------------------------------
* def sum(self):
* return sum(self) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __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;
/* "lib/Naked/toolshed/c/types.pyx":448
* # return the sum of all list items
* #------------------------------------------------------------------------------
* def sum(self): # <<<<<<<<<<<<<<
* return sum(self)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":458
* # returns an integer count of number of duplicate values
* #------------------------------------------------------------------------------
* def count_duplicates(self): # <<<<<<<<<<<<<<
* return len(self) - len(set(self))
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_27count_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_27count_duplicates = {__Pyx_NAMESTR("count_duplicates"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_27count_duplicates, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_27count_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("count_duplicates (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_26count_duplicates(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_26count_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("count_duplicates", 0);
/* "lib/Naked/toolshed/c/types.pyx":459
* #------------------------------------------------------------------------------
* def count_duplicates(self):
* return len(self) - len(set(self)) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_4 = PySet_Size(__pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyInt_FromSsize_t((__pyx_t_1 - __pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":458
* # returns an integer count of number of duplicate values
* #------------------------------------------------------------------------------
* def count_duplicates(self): # <<<<<<<<<<<<<<
* return len(self) - len(set(self))
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.count_duplicates", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":465
* # returns a new XList with duplicates removed
* #------------------------------------------------------------------------------
* def remove_duplicates(self): # <<<<<<<<<<<<<<
* return XList( set(self), self._getAttributeDict() )
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_29remove_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_29remove_duplicates = {__Pyx_NAMESTR("remove_duplicates"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_29remove_duplicates, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_29remove_duplicates(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("remove_duplicates (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_28remove_duplicates(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_28remove_duplicates(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("remove_duplicates", 0);
/* "lib/Naked/toolshed/c/types.pyx":466
* #------------------------------------------------------------------------------
* def remove_duplicates(self):
* return XList( set(self), self._getAttributeDict() ) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XList); 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_t_2 = PyTuple_New(1); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __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_getAttributeDict); 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_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); 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);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":465
* # returns a new XList with duplicates removed
* #------------------------------------------------------------------------------
* def remove_duplicates(self): # <<<<<<<<<<<<<<
* return XList( set(self), self._getAttributeDict() )
*
*/
/* 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("lib.Naked.toolshed.c.types.XList.remove_duplicates", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":472
* # returns a set containing items in XList that are not contained in `another_list`
* #------------------------------------------------------------------------------
* def difference(self, another_list): # <<<<<<<<<<<<<<
* return set(self) - set(another_list)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_31difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_31difference = {__Pyx_NAMESTR("difference"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_31difference, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_31difference(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_list = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("difference (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_list,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_list)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("difference", 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, "difference") < 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_self = values[0];
__pyx_v_another_list = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("difference", 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("lib.Naked.toolshed.c.types.XList.difference", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_30difference(__pyx_self, __pyx_v_self, __pyx_v_another_list);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_30difference(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list) {
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("difference", 0);
/* "lib/Naked/toolshed/c/types.pyx":473
* #------------------------------------------------------------------------------
* def difference(self, another_list):
* return set(self) - set(another_list) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); 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_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_another_list);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_another_list);
__Pyx_GIVEREF(__pyx_v_another_list);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":472
* # returns a set containing items in XList that are not contained in `another_list`
* #------------------------------------------------------------------------------
* def difference(self, another_list): # <<<<<<<<<<<<<<
* return set(self) - set(another_list)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.difference", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":479
* # returns a set containing items that are in both XList and `another_list`
* #------------------------------------------------------------------------------
* def intersection(self, another_list): # <<<<<<<<<<<<<<
* return set(self) & set(another_list)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_33intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_33intersection = {__Pyx_NAMESTR("intersection"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_33intersection, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_33intersection(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_list = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("intersection (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_list,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_list)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("intersection", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "intersection") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __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_self = values[0];
__pyx_v_another_list = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("intersection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_32intersection(__pyx_self, __pyx_v_self, __pyx_v_another_list);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_32intersection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_list) {
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("intersection", 0);
/* "lib/Naked/toolshed/c/types.pyx":480
* #------------------------------------------------------------------------------
* def intersection(self, another_list):
* return set(self) & set(another_list) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __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 = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_another_list);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_another_list);
__Pyx_GIVEREF(__pyx_v_another_list);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":479
* # returns a set containing items that are in both XList and `another_list`
* #------------------------------------------------------------------------------
* def intersection(self, another_list): # <<<<<<<<<<<<<<
* return set(self) & set(another_list)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.intersection", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":489
* # returns original XList with modification of each item based upon `mapped_function`
* #------------------------------------------------------------------------------
* def map_to_items(self, mapped_function): # <<<<<<<<<<<<<<
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self):
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_35map_to_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_35map_to_items = {__Pyx_NAMESTR("map_to_items"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_35map_to_items, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_35map_to_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_mapped_function = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("map_to_items (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mapped_function,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapped_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("map_to_items", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_to_items") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __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_self = values[0];
__pyx_v_mapped_function = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("map_to_items", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.map_to_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_34map_to_items(__pyx_self, __pyx_v_self, __pyx_v_mapped_function);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_34map_to_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mapped_function) {
PyObject *__pyx_v_index = NULL;
PyObject *__pyx_v_item = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
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("map_to_items", 0);
/* "lib/Naked/toolshed/c/types.pyx":491
* def map_to_items(self, mapped_function):
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self): # <<<<<<<<<<<<<<
* self[index] = mapped_function(item)
* return self
*/
__Pyx_INCREF(__pyx_int_0);
__pyx_t_1 = __pyx_int_0;
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self); 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_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
__pyx_t_5 = 0;
__Pyx_INCREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
__pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":492
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self):
* self[index] = mapped_function(item) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_item);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
__Pyx_GIVEREF(__pyx_v_item);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_mapped_function, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_index, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":493
* for index, item in enumerate(self):
* self[index] = mapped_function(item)
* return self # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":489
* # returns original XList with modification of each item based upon `mapped_function`
* #------------------------------------------------------------------------------
* def map_to_items(self, mapped_function): # <<<<<<<<<<<<<<
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.map_to_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_index);
__Pyx_XDECREF(__pyx_v_item);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":500
* # `conditional_function` with change performed as defined in `mapped_function`
* #------------------------------------------------------------------------------
* def conditional_map_to_items(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for index, item in enumerate(self):
* if conditional_function(item):
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_37conditional_map_to_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_37conditional_map_to_items = {__Pyx_NAMESTR("conditional_map_to_items"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_37conditional_map_to_items, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_37conditional_map_to_items(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_conditional_function = 0;
PyObject *__pyx_v_mapped_function = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("conditional_map_to_items (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_conditional_function,&__pyx_n_s_mapped_function,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conditional_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("conditional_map_to_items", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mapped_function)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("conditional_map_to_items", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "conditional_map_to_items") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __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_self = values[0];
__pyx_v_conditional_function = values[1];
__pyx_v_mapped_function = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("conditional_map_to_items", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.conditional_map_to_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_36conditional_map_to_items(__pyx_self, __pyx_v_self, __pyx_v_conditional_function, __pyx_v_mapped_function);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_36conditional_map_to_items(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conditional_function, PyObject *__pyx_v_mapped_function) {
PyObject *__pyx_v_index = NULL;
PyObject *__pyx_v_item = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
Py_ssize_t __pyx_t_3;
PyObject *(*__pyx_t_4)(PyObject *);
PyObject *__pyx_t_5 = NULL;
PyObject *__pyx_t_6 = NULL;
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("conditional_map_to_items", 0);
/* "lib/Naked/toolshed/c/types.pyx":501
* #------------------------------------------------------------------------------
* def conditional_map_to_items(self, conditional_function, mapped_function):
* for index, item in enumerate(self): # <<<<<<<<<<<<<<
* if conditional_function(item):
* self[index] = mapped_function(item)
*/
__Pyx_INCREF(__pyx_int_0);
__pyx_t_1 = __pyx_int_0;
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
__pyx_t_4 = NULL;
} else {
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
}
for (;;) {
if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
if (unlikely(!__pyx_t_5)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_5);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
__pyx_t_5 = 0;
__Pyx_INCREF(__pyx_t_1);
__Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
__pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1);
__pyx_t_1 = __pyx_t_5;
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":502
* def conditional_map_to_items(self, conditional_function, mapped_function):
* for index, item in enumerate(self):
* if conditional_function(item): # <<<<<<<<<<<<<<
* self[index] = mapped_function(item)
* return self
*/
__pyx_t_5 = PyTuple_New(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);
__Pyx_INCREF(__pyx_v_item);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
__Pyx_GIVEREF(__pyx_v_item);
__pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_conditional_function, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (__pyx_t_7) {
/* "lib/Naked/toolshed/c/types.pyx":503
* for index, item in enumerate(self):
* if conditional_function(item):
* self[index] = mapped_function(item) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_item);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_item);
__Pyx_GIVEREF(__pyx_v_item);
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_mapped_function, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_index, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L5;
}
__pyx_L5:;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":504
* if conditional_function(item):
* self[index] = mapped_function(item)
* return self # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":500
* # `conditional_function` with change performed as defined in `mapped_function`
* #------------------------------------------------------------------------------
* def conditional_map_to_items(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for index, item in enumerate(self):
* if conditional_function(item):
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.conditional_map_to_items", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_index);
__Pyx_XDECREF(__pyx_v_item);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":513
* # returns an integer count of the number of case-insensitive items that match `test_string`
* #------------------------------------------------------------------------------
* def count_ci(self, test_string): # <<<<<<<<<<<<<<
* count = 0
* for item in self:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_39count_ci(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_39count_ci = {__Pyx_NAMESTR("count_ci"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_39count_ci, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_39count_ci(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_test_string = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("count_ci (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_test_string,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_test_string)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("count_ci", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_ci") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __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_self = values[0];
__pyx_v_test_string = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("count_ci", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_38count_ci(__pyx_self, __pyx_v_self, __pyx_v_test_string);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_38count_ci(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_test_string) {
PyObject *__pyx_v_count = NULL;
PyObject *__pyx_v_item = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *(*__pyx_t_3)(PyObject *);
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_t_12;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("count_ci", 0);
/* "lib/Naked/toolshed/c/types.pyx":514
* #------------------------------------------------------------------------------
* def count_ci(self, test_string):
* count = 0 # <<<<<<<<<<<<<<
* for item in self:
* try:
*/
__Pyx_INCREF(__pyx_int_0);
__pyx_v_count = __pyx_int_0;
/* "lib/Naked/toolshed/c/types.pyx":515
* def count_ci(self, test_string):
* count = 0
* for item in self: # <<<<<<<<<<<<<<
* try:
* if test_string.lower() in item.lower():
*/
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
__pyx_t_3 = NULL;
} else {
__pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self); 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_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
for (;;) {
if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_3(__pyx_t_1);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":516
* count = 0
* for item in self:
* try: # <<<<<<<<<<<<<<
* if test_string.lower() in item.lower():
* count += 1
*/
{
__Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
__Pyx_XGOTREF(__pyx_t_5);
__Pyx_XGOTREF(__pyx_t_6);
__Pyx_XGOTREF(__pyx_t_7);
/*try:*/ {
/* "lib/Naked/toolshed/c/types.pyx":517
* for item in self:
* try:
* if test_string.lower() in item.lower(): # <<<<<<<<<<<<<<
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_test_string, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_10 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_11 = (__pyx_t_10 != 0);
if (__pyx_t_11) {
/* "lib/Naked/toolshed/c/types.pyx":518
* try:
* if test_string.lower() in item.lower():
* count += 1 # <<<<<<<<<<<<<<
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue
*/
__pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_count, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF_SET(__pyx_v_count, __pyx_t_9);
__pyx_t_9 = 0;
goto __pyx_L13;
}
__pyx_L13:;
}
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
goto __pyx_L12_try_end;
__pyx_L5_error:;
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
/* "lib/Naked/toolshed/c/types.pyx":519
* if test_string.lower() in item.lower():
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt # <<<<<<<<<<<<<<
* continue
* return count
*/
__pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
if (__pyx_t_12) {
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_4);
/* "lib/Naked/toolshed/c/types.pyx":520
* count += 1
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue # <<<<<<<<<<<<<<
* return count
*
*/
goto __pyx_L15_except_continue;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L6_exception_handled;
__pyx_L15_except_continue:;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L11_try_continue;
}
goto __pyx_L7_except_error;
__pyx_L7_except_error:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L1_error;
__pyx_L11_try_continue:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
goto __pyx_L3_continue;
__pyx_L6_exception_handled:;
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_XGIVEREF(__pyx_t_7);
__Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
__pyx_L12_try_end:;
}
__pyx_L3_continue:;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":521
* except AttributeError: # the test_value was not a string, catch exception and continue count attempt
* continue
* return count # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_count);
__pyx_r = __pyx_v_count;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":513
* # returns an integer count of the number of case-insensitive items that match `test_string`
* #------------------------------------------------------------------------------
* def count_ci(self, test_string): # <<<<<<<<<<<<<<
* count = 0
* for item in self:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.count_ci", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_count);
__Pyx_XDECREF(__pyx_v_item);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":527
* # returns a single item list with a random element from the original XList
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* return random.choice(self)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_41random(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_41random = {__Pyx_NAMESTR("random"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_41random, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_41random(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("random (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_40random(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_40random(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_random = NULL;
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("random", 0);
/* "lib/Naked/toolshed/c/types.pyx":528
* #------------------------------------------------------------------------------
* def random(self):
* import random # <<<<<<<<<<<<<<
* return random.choice(self)
*
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); 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_v_random = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":529
* def random(self):
* import random
* return random.choice(self) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_random, __pyx_n_s_choice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __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;
/* "lib/Naked/toolshed/c/types.pyx":527
* # returns a single item list with a random element from the original XList
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* return random.choice(self)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.random", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_random);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":536
* # number of items determined by the `number_of_items` argument
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* return random.sample(self, number_of_items)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_43random_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_43random_sample = {__Pyx_NAMESTR("random_sample"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_43random_sample, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_43random_sample(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_number_of_items = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("random_sample (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_number_of_items,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_number_of_items)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("random_sample", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_sample") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __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_self = values[0];
__pyx_v_number_of_items = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("random_sample", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_42random_sample(__pyx_self, __pyx_v_self, __pyx_v_number_of_items);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_42random_sample(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_number_of_items) {
PyObject *__pyx_v_random = NULL;
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("random_sample", 0);
/* "lib/Naked/toolshed/c/types.pyx":537
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items):
* import random # <<<<<<<<<<<<<<
* return random.sample(self, number_of_items)
*
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -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_v_random = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":538
* def random_sample(self, number_of_items):
* import random
* return random.sample(self, number_of_items) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_random, __pyx_n_s_sample); 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_t_2 = PyTuple_New(2); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_number_of_items);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_number_of_items);
__Pyx_GIVEREF(__pyx_v_number_of_items);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __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;
/* "lib/Naked/toolshed/c/types.pyx":536
* # number of items determined by the `number_of_items` argument
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* return random.sample(self, number_of_items)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.random_sample", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_random);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":544
* # randomly shuffle the contents of the list
* #------------------------------------------------------------------------------
* def shuffle(self): # <<<<<<<<<<<<<<
* import random
* random.shuffle(self)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_45shuffle(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_45shuffle = {__Pyx_NAMESTR("shuffle"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_45shuffle, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_45shuffle(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("shuffle (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_44shuffle(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_44shuffle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_random = NULL;
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("shuffle", 0);
/* "lib/Naked/toolshed/c/types.pyx":545
* #------------------------------------------------------------------------------
* def shuffle(self):
* import random # <<<<<<<<<<<<<<
* random.shuffle(self)
* return self
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_random = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":546
* def shuffle(self):
* import random
* random.shuffle(self) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_random, __pyx_n_s_shuffle); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":547
* import random
* random.shuffle(self)
* return self # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":544
* # randomly shuffle the contents of the list
* #------------------------------------------------------------------------------
* def shuffle(self): # <<<<<<<<<<<<<<
* import random
* random.shuffle(self)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.shuffle", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_random);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":556
* # returns a list of items that match the `wildcard` argument
* #------------------------------------------------------------------------------
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_47wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_47wildcard_match = {__Pyx_NAMESTR("wildcard_match"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_47wildcard_match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_47wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_wildcard = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("wildcard_match (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_wildcard,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("wildcard_match", 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, "wildcard_match") < 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_self = values[0];
__pyx_v_wildcard = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("wildcard_match", 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("lib.Naked.toolshed.c.types.XList.wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_46wildcard_match(__pyx_self, __pyx_v_self, __pyx_v_wildcard);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_46wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcard) {
PyObject *__pyx_v_fnmatchcase = NULL;
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
Py_ssize_t __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
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("wildcard_match", 0);
/* "lib/Naked/toolshed/c/types.pyx":557
* #------------------------------------------------------------------------------
* def wildcard_match(self, wildcard):
* if hasattr(self, 'nkd_fnmatchcase'): # <<<<<<<<<<<<<<
* fnmatchcase = self.nkd_fnmatchcase
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":558
* def wildcard_match(self, wildcard):
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase # <<<<<<<<<<<<<<
* else:
* from fnmatch import fnmatchcase
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_fnmatchcase = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L3;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":560
* fnmatchcase = self.nkd_fnmatchcase
* else:
* from fnmatch import fnmatchcase # <<<<<<<<<<<<<<
* self.nkd_fnmatchcase = fnmatchcase
* return [ x for x in self if fnmatchcase(x, wildcard) ]
*/
__pyx_t_3 = PyList_New(1); 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_INCREF(__pyx_n_s_fnmatchcase);
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_fnmatchcase);
__Pyx_GIVEREF(__pyx_n_s_fnmatchcase);
__pyx_t_4 = __Pyx_Import(__pyx_n_s_fnmatch, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_fnmatchcase); 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_INCREF(__pyx_t_3);
__pyx_v_fnmatchcase = __pyx_t_3;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":561
* else:
* from fnmatch import fnmatchcase
* self.nkd_fnmatchcase = fnmatchcase # <<<<<<<<<<<<<<
* return [ x for x in self if fnmatchcase(x, wildcard) ]
*
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase, __pyx_v_fnmatchcase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":562
* from fnmatch import fnmatchcase
* self.nkd_fnmatchcase = fnmatchcase
* return [ x for x in self if fnmatchcase(x, wildcard) ] # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_7 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_7 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_7);
}
__Pyx_XDECREF_SET(__pyx_v_x, __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 = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
__Pyx_INCREF(__pyx_v_wildcard);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_wildcard);
__Pyx_GIVEREF(__pyx_v_wildcard);
__pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_fnmatchcase, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
if (__pyx_t_2) {
if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_x))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":556
* # returns a list of items that match the `wildcard` argument
* #------------------------------------------------------------------------------
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_fnmatchcase);
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":568
* # returns a list of items that match one or more | separated wildcards passed as string
* #------------------------------------------------------------------------------
* def multi_wildcard_match(self, wildcards): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_49multi_wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_49multi_wildcard_match = {__Pyx_NAMESTR("multi_wildcard_match"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_49multi_wildcard_match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_49multi_wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_wildcards = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("multi_wildcard_match (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_wildcards,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcards)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("multi_wildcard_match", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multi_wildcard_match") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __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_self = values[0];
__pyx_v_wildcards = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("multi_wildcard_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.multi_wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_48multi_wildcard_match(__pyx_self, __pyx_v_self, __pyx_v_wildcards);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_48multi_wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcards) {
PyObject *__pyx_v_fnmatchcase = NULL;
PyObject *__pyx_v_wc_list = NULL;
PyObject *__pyx_v_return_list = NULL;
PyObject *__pyx_v_wc = NULL;
PyObject *__pyx_v_temp_list = NULL;
PyObject *__pyx_v_result = NULL;
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
Py_ssize_t __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
PyObject *__pyx_t_7 = NULL;
Py_ssize_t __pyx_t_8;
PyObject *(*__pyx_t_9)(PyObject *);
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
int __pyx_t_12;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("multi_wildcard_match", 0);
/* "lib/Naked/toolshed/c/types.pyx":569
* #------------------------------------------------------------------------------
* def multi_wildcard_match(self, wildcards):
* if hasattr(self, 'nkd_fnmatchcase'): # <<<<<<<<<<<<<<
* fnmatchcase = self.nkd_fnmatchcase
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":570
* def multi_wildcard_match(self, wildcards):
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase # <<<<<<<<<<<<<<
* else:
* from fnmatch import fnmatchcase
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_fnmatchcase = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L3;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":572
* fnmatchcase = self.nkd_fnmatchcase
* else:
* from fnmatch import fnmatchcase # <<<<<<<<<<<<<<
* self.nkd_fnmatchcase = fnmatchcase
* wc_list = wildcards.split('|')
*/
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_n_s_fnmatchcase);
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_fnmatchcase);
__Pyx_GIVEREF(__pyx_n_s_fnmatchcase);
__pyx_t_4 = __Pyx_Import(__pyx_n_s_fnmatch, __pyx_t_3, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_fnmatchcase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_3);
__pyx_v_fnmatchcase = __pyx_t_3;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":573
* else:
* from fnmatch import fnmatchcase
* self.nkd_fnmatchcase = fnmatchcase # <<<<<<<<<<<<<<
* wc_list = wildcards.split('|')
* return_list = []
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nkd_fnmatchcase, __pyx_v_fnmatchcase) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":574
* from fnmatch import fnmatchcase
* self.nkd_fnmatchcase = fnmatchcase
* wc_list = wildcards.split('|') # <<<<<<<<<<<<<<
* return_list = []
* for wc in wc_list:
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_wildcards, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__7, NULL); 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);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_wc_list = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":575
* self.nkd_fnmatchcase = fnmatchcase
* wc_list = wildcards.split('|')
* return_list = [] # <<<<<<<<<<<<<<
* for wc in wc_list:
* temp_list = [ x for x in self if fnmatchcase(x, wc) ]
*/
__pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_return_list = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":576
* wc_list = wildcards.split('|')
* return_list = []
* for wc in wc_list: # <<<<<<<<<<<<<<
* temp_list = [ x for x in self if fnmatchcase(x, wc) ]
* for result in temp_list:
*/
if (PyList_CheckExact(__pyx_v_wc_list) || PyTuple_CheckExact(__pyx_v_wc_list)) {
__pyx_t_3 = __pyx_v_wc_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_wc_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_wc, __pyx_t_4);
__pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":577
* return_list = []
* for wc in wc_list:
* temp_list = [ x for x in self if fnmatchcase(x, wc) ] # <<<<<<<<<<<<<<
* for result in temp_list:
* return_list.append(result)
*/
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(__pyx_v_self) || PyTuple_CheckExact(__pyx_v_self)) {
__pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
__pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
}
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_10 = __pyx_t_9(__pyx_t_7);
if (unlikely(!__pyx_t_10)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_10);
}
__Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_10);
__pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_x);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_x);
__Pyx_GIVEREF(__pyx_v_x);
__Pyx_INCREF(__pyx_v_wc);
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_wc);
__Pyx_GIVEREF(__pyx_v_wc);
__pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_fnmatchcase, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
if (__pyx_t_2) {
if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_x))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
__pyx_L8:;
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF_SET(__pyx_v_temp_list, ((PyObject*)__pyx_t_4));
__pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":578
* for wc in wc_list:
* temp_list = [ x for x in self if fnmatchcase(x, wc) ]
* for result in temp_list: # <<<<<<<<<<<<<<
* return_list.append(result)
* return return_list
*/
__pyx_t_4 = __pyx_v_temp_list; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
for (;;) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
__Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_7);
__pyx_t_7 = 0;
/* "lib/Naked/toolshed/c/types.pyx":579
* temp_list = [ x for x in self if fnmatchcase(x, wc) ]
* for result in temp_list:
* return_list.append(result) # <<<<<<<<<<<<<<
* return return_list
*
*/
__pyx_t_12 = __Pyx_PyList_Append(__pyx_v_return_list, __pyx_v_result); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":580
* for result in temp_list:
* return_list.append(result)
* return return_list # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_return_list);
__pyx_r = __pyx_v_return_list;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":568
* # returns a list of items that match one or more | separated wildcards passed as string
* #------------------------------------------------------------------------------
* def multi_wildcard_match(self, wildcards): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.multi_wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_fnmatchcase);
__Pyx_XDECREF(__pyx_v_wc_list);
__Pyx_XDECREF(__pyx_v_return_list);
__Pyx_XDECREF(__pyx_v_wc);
__Pyx_XDECREF(__pyx_v_temp_list);
__Pyx_XDECREF(__pyx_v_result);
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":589
* # return an XSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(set(self), attr_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_51xset(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_51xset = {__Pyx_NAMESTR("xset"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_51xset, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_51xset(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xset (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_50xset(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_50xset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = NULL;
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("xset", 0);
/* "lib/Naked/toolshed/c/types.pyx":590
* #------------------------------------------------------------------------------
* def xset(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XSet(set(self), attr_dict)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); 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_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":591
* def xset(self):
* attr_dict = self._getAttributeDict()
* return XSet(set(self), attr_dict) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XSet); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __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_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":589
* # return an XSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(set(self), attr_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.xset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":597
* # return an XFSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(set(self), attr_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_53xfset(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_53xfset = {__Pyx_NAMESTR("xfset"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_53xfset, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_53xfset(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xfset (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_52xfset(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_52xfset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = NULL;
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("xfset", 0);
/* "lib/Naked/toolshed/c/types.pyx":598
* #------------------------------------------------------------------------------
* def xfset(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XFSet(set(self), attr_dict)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":599
* def xfset(self):
* attr_dict = self._getAttributeDict()
* return XFSet(set(self), attr_dict) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XFSet); 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_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); 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);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __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_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":597
* # return an XFSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(set(self), attr_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.xfset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":605
* # returns an XTuple with XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xtuple(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XTuple(tuple(self), attr_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_55xtuple(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_55xtuple = {__Pyx_NAMESTR("xtuple"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_55xtuple, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XList_55xtuple(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xtuple (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_54xtuple(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_54xtuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = NULL;
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("xtuple", 0);
/* "lib/Naked/toolshed/c/types.pyx":606
* #------------------------------------------------------------------------------
* def xtuple(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XTuple(tuple(self), attr_dict)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); 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_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, 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_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":607
* def xtuple(self):
* attr_dict = self._getAttributeDict()
* return XTuple(tuple(self), attr_dict) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XTuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); 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_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); 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_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":605
* # returns an XTuple with XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xtuple(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XTuple(tuple(self), attr_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XList.xtuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":615
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_12__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__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_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XMaxHeap));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XMaxHeap));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XMaxHeap));
__pyx_t_2 = PyTuple_New(2); 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);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[3] = {0,0,0};
__pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
values[1] = __pyx_dynamic_args->__pyx_arg_attributes;
values[2] = ((PyObject *)((PyObject*)__pyx_n_s_XMaxHeap));
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[1] = value; kw_args--; }
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[2] = 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 = 615; __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_self = values[0];
__pyx_v_attributes = values[1];
__pyx_v_naked_type = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap___init__(__pyx_self, __pyx_v_self, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":616
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'):
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
* self._queue = []
* self._index = 0
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __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(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":617
* def __init__(self, attributes={}, naked_type='XMaxHeap'):
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = [] # <<<<<<<<<<<<<<
* self._index = 0
*
*/
__pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_queue, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":618
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
* self._index = 0 # <<<<<<<<<<<<<<
*
* # length of the queue
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":615
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":621
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_3__len__ = {__Pyx_NAMESTR("__len__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_3__len__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_2__len__(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__len__", 0);
/* "lib/Naked/toolshed/c/types.pyx":622
* # length of the queue
* def __len__(self):
* return len(self._queue) # <<<<<<<<<<<<<<
*
* # O(log n) complexity
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":621
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":625
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_5push(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_5push = {__Pyx_NAMESTR("push"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_5push, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_5push(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_the_object = 0;
PyObject *__pyx_v_priority = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("push (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_the_object,&__pyx_n_s_priority,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_object)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __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_self = values[0];
__pyx_v_the_object = values[1];
__pyx_v_priority = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_4push(__pyx_self, __pyx_v_self, __pyx_v_the_object, __pyx_v_priority);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_4push(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority) {
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("push", 0);
/* "lib/Naked/toolshed/c/types.pyx":626
* # O(log n) complexity
* def push(self, the_object, priority):
* heappush(self._queue, (-priority, self._index, the_object)) # <<<<<<<<<<<<<<
* self._index += 1
*
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappush); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); 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_t_3 = PyNumber_Negative(__pyx_v_priority); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_the_object);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_the_object);
__Pyx_GIVEREF(__pyx_v_the_object);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_2 = 0;
__pyx_t_5 = 0;
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":627
* def push(self, the_object, priority):
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1 # <<<<<<<<<<<<<<
*
* # O(log n) complexity
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":625
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 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("lib.Naked.toolshed.c.types.XMaxHeap.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":630
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_7pop(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_7pop = {__Pyx_NAMESTR("pop"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_7pop, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_7pop(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pop (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_6pop(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_6pop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
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("pop", 0);
/* "lib/Naked/toolshed/c/types.pyx":631
* # O(log n) complexity
* def pop(self):
* if self._queue: # <<<<<<<<<<<<<<
* return heappop(self._queue)[-1]
* else:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); 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_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":632
* def pop(self):
* if self._queue:
* return heappop(self._queue)[-1] # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappop); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __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 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __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_4); __pyx_t_4 = 0;
__pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":634
* return heappop(self._queue)[-1]
* else:
* return None # <<<<<<<<<<<<<<
*
* # push new object and return the highest priority object
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":630
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":637
*
* # push new object and return the highest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_9pushpop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_9pushpop = {__Pyx_NAMESTR("pushpop"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_9pushpop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_9pushpop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_the_object = 0;
PyObject *__pyx_v_priority = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pushpop (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_the_object,&__pyx_n_s_priority,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_object)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pushpop") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __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_self = values[0];
__pyx_v_the_object = values[1];
__pyx_v_priority = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.pushpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_8pushpop(__pyx_self, __pyx_v_self, __pyx_v_the_object, __pyx_v_priority);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_8pushpop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority) {
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_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("pushpop", 0);
/* "lib/Naked/toolshed/c/types.pyx":638
* # push new object and return the highest priority object
* def pushpop(self, the_object, priority):
* heappush(self._queue, (-priority, self._index, the_object)) # <<<<<<<<<<<<<<
* self._index += 1
* if self._queue:
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = PyNumber_Negative(__pyx_v_priority); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_the_object);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_the_object);
__Pyx_GIVEREF(__pyx_v_the_object);
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_2 = 0;
__pyx_t_5 = 0;
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":639
* def pushpop(self, the_object, priority):
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1 # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":640
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
* if self._queue: # <<<<<<<<<<<<<<
* return heappop(self._queue)[-1]
* else:
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":641
* self._index += 1
* if self._queue:
* return heappop(self._queue)[-1] # <<<<<<<<<<<<<<
* else:
* return None # return None if the queue is empty
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappop); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_1 = PyTuple_New(1); 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);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":643
* return heappop(self._queue)[-1]
* else:
* return None # return None if the queue is empty # <<<<<<<<<<<<<<
*
* # the length of the queue
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":637
*
* # push new object and return the highest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
/* 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("lib.Naked.toolshed.c.types.XMaxHeap.pushpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":646
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_11length(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_11length = {__Pyx_NAMESTR("length"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_11length, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_11length(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("length (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_10length(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_10length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("length", 0);
/* "lib/Naked/toolshed/c/types.pyx":647
* # the length of the queue
* def length(self):
* return len(self._queue) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":646
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMaxHeap.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":655
* from heapq import heappush, heappop
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_12__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XMinHeap));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XMinHeap));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XMinHeap));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[3] = {0,0,0};
__pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
values[1] = __pyx_dynamic_args->__pyx_arg_attributes;
values[2] = ((PyObject *)((PyObject*)__pyx_n_s_XMinHeap));
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[1] = value; kw_args--; }
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[2] = 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 = 655; __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_self = values[0];
__pyx_v_attributes = values[1];
__pyx_v_naked_type = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap___init__(__pyx_self, __pyx_v_self, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":656
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'):
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
* self._queue = []
* self._index = 0
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); 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_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(3); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":657
* def __init__(self, attributes={}, naked_type='XMinHeap'):
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = [] # <<<<<<<<<<<<<<
* self._index = 0
*
*/
__pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_queue, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":658
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
* self._index = 0 # <<<<<<<<<<<<<<
*
*
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":655
* from heapq import heappush, heappop
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":662
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_3__len__ = {__Pyx_NAMESTR("__len__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_3__len__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_3__len__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_2__len__(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_2__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__len__", 0);
/* "lib/Naked/toolshed/c/types.pyx":663
* # length of the queue
* def __len__(self):
* return len(self._queue) # <<<<<<<<<<<<<<
*
* # O(log n) complexity
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); 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_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyInt_FromSsize_t(__pyx_t_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_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":662
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":666
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_5push(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_5push = {__Pyx_NAMESTR("push"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_5push, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_5push(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_the_object = 0;
PyObject *__pyx_v_priority = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("push (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_the_object,&__pyx_n_s_priority,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_object)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "push") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __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_self = values[0];
__pyx_v_the_object = values[1];
__pyx_v_priority = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("push", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_4push(__pyx_self, __pyx_v_self, __pyx_v_the_object, __pyx_v_priority);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_4push(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority) {
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("push", 0);
/* "lib/Naked/toolshed/c/types.pyx":667
* # O(log n) complexity
* def push(self, the_object, priority):
* heappush(self._queue, (priority, self._index, the_object)) # <<<<<<<<<<<<<<
* self._index += 1
*
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappush); 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_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_priority);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_priority);
__Pyx_GIVEREF(__pyx_v_priority);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_the_object);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_the_object);
__Pyx_GIVEREF(__pyx_v_the_object);
__pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __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_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":668
* def push(self, the_object, priority):
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1 # <<<<<<<<<<<<<<
*
* # O(log n) complexity
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":666
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 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_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.push", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":671
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_7pop(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_7pop = {__Pyx_NAMESTR("pop"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_7pop, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_7pop(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pop (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_6pop(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_6pop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
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("pop", 0);
/* "lib/Naked/toolshed/c/types.pyx":672
* # O(log n) complexity
* def pop(self):
* if self._queue: # <<<<<<<<<<<<<<
* return heappop(self._queue)[-1]
* else:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":673
* def pop(self):
* if self._queue:
* return heappop(self._queue)[-1] # <<<<<<<<<<<<<<
* else:
* return None # return None if the queue is empty
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappop); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __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_4); __pyx_t_4 = 0;
__pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":675
* return heappop(self._queue)[-1]
* else:
* return None # return None if the queue is empty # <<<<<<<<<<<<<<
*
* # push new object and return the lowest priority object
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":671
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":678
*
* # push new object and return the lowest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_9pushpop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_9pushpop = {__Pyx_NAMESTR("pushpop"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_9pushpop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_9pushpop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_the_object = 0;
PyObject *__pyx_v_priority = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("pushpop (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_the_object,&__pyx_n_s_priority,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_object)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_priority)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pushpop") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __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_self = values[0];
__pyx_v_the_object = values[1];
__pyx_v_priority = values[2];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("pushpop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.pushpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_8pushpop(__pyx_self, __pyx_v_self, __pyx_v_the_object, __pyx_v_priority);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_8pushpop(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_object, PyObject *__pyx_v_priority) {
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("pushpop", 0);
/* "lib/Naked/toolshed/c/types.pyx":679
* # push new object and return the lowest priority object
* def pushpop(self, the_object, priority):
* heappush(self._queue, (priority, self._index, the_object)) # <<<<<<<<<<<<<<
* self._index += 1
* if self._queue:
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappush); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_priority);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_priority);
__Pyx_GIVEREF(__pyx_v_priority);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_the_object);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_the_object);
__Pyx_GIVEREF(__pyx_v_the_object);
__pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __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_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":680
* def pushpop(self, the_object, priority):
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1 # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":681
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
* if self._queue: # <<<<<<<<<<<<<<
* return heappop(self._queue)[-1]
* else:
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); 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_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":682
* self._index += 1
* if self._queue:
* return heappop(self._queue)[-1] # <<<<<<<<<<<<<<
* else:
* return None #return None if the queue is empty
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_heappop); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":684
* return heappop(self._queue)[-1]
* else:
* return None #return None if the queue is empty # <<<<<<<<<<<<<<
*
* # the length of the queue
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":678
*
* # push new object and return the lowest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
/* 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("lib.Naked.toolshed.c.types.XMinHeap.pushpop", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":687
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_11length(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_11length = {__Pyx_NAMESTR("length"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_11length, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_11length(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("length (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_10length(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_10length(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("length", 0);
/* "lib/Naked/toolshed/c/types.pyx":688
* # the length of the queue
* def length(self):
* return len(self._queue) # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_queue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":687
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XMinHeap.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":697
* from collections import deque
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'): # <<<<<<<<<<<<<<
* deque.__init__(self, initial_iterable, max_length)
* NakedObject.__init__(self, attributes, naked_type)
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue_2__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_initial_iterable);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_initial_iterable);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_initial_iterable);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject *)__pyx_int_10));
PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_int_10));
__Pyx_GIVEREF(((PyObject *)__pyx_int_10));
__Pyx_INCREF(((PyObject*)__pyx_n_s_XQueue));
PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject*)__pyx_n_s_XQueue));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XQueue));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XQueue.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XQueue_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XQueue_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XQueue_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XQueue_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_initial_iterable = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_max_length = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_initial_iterable,&__pyx_n_s_attributes,&__pyx_n_s_max_length,&__pyx_n_s_naked_type,0};
PyObject* values[5] = {0,0,0,0,0};
__pyx_defaults5 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_self);
values[1] = __pyx_dynamic_args->__pyx_arg_initial_iterable;
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject *)__pyx_int_10));
values[4] = ((PyObject *)((PyObject*)__pyx_n_s_XQueue));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_initial_iterable);
if (value) { values[1] = value; kw_args--; }
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_length);
if (value) { values[3] = value; kw_args--; }
}
case 4:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[4] = 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 = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self = values[0];
__pyx_v_initial_iterable = values[1];
__pyx_v_attributes = values[2];
__pyx_v_max_length = values[3];
__pyx_v_naked_type = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue___init__(__pyx_self, __pyx_v_self, __pyx_v_initial_iterable, __pyx_v_attributes, __pyx_v_max_length, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_initial_iterable, PyObject *__pyx_v_attributes, PyObject *__pyx_v_max_length, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":698
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'):
* deque.__init__(self, initial_iterable, max_length) # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
*
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_deque); 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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); 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_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(3); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_initial_iterable);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_initial_iterable);
__Pyx_GIVEREF(__pyx_v_initial_iterable);
__Pyx_INCREF(__pyx_v_max_length);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_max_length);
__Pyx_GIVEREF(__pyx_v_max_length);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":699
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'):
* deque.__init__(self, initial_iterable, max_length)
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, 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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":697
* from collections import deque
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'): # <<<<<<<<<<<<<<
* deque.__init__(self, initial_iterable, max_length)
* NakedObject.__init__(self, attributes, naked_type)
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":708
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject):
* def __init__(self, set_obj, attributes={}, naked_type='XSet'): # <<<<<<<<<<<<<<
* set.__init__(self, set_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_10__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XSet));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XSet));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XSet));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_set_obj = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_set_obj,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults6 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XSet));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_set_obj)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = 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 = 708; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_self = values[0];
__pyx_v_set_obj = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet___init__(__pyx_self, __pyx_v_self, __pyx_v_set_obj, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_set_obj, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
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("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":709
* class XSet(set, NakedObject):
* def __init__(self, set_obj, attributes={}, naked_type='XSet'):
* set.__init__(self, set_obj) # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_set_obj);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_set_obj);
__Pyx_GIVEREF(__pyx_v_set_obj);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":710
* def __init__(self, set_obj, attributes={}, naked_type='XSet'):
* set.__init__(self, set_obj)
* NakedObject.__init__(self, attributes, naked_type) # <<<<<<<<<<<<<<
*
* # << operator is overloaded to extend the XSet with a second set
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); 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_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__Pyx_INCREF(__pyx_v_naked_type);
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_naked_type);
__Pyx_GIVEREF(__pyx_v_naked_type);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__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;
/* "lib/Naked/toolshed/c/types.pyx":708
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject):
* def __init__(self, set_obj, attributes={}, naked_type='XSet'): # <<<<<<<<<<<<<<
* set.__init__(self, set_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
/* 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_AddTraceback("lib.Naked.toolshed.c.types.XSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":713
*
* # << operator is overloaded to extend the XSet with a second set
* def __lshift__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_3__lshift__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_3__lshift__ = {__Pyx_NAMESTR("__lshift__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_3__lshift__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_3__lshift__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_set = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__lshift__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_set,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_set)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__lshift__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__lshift__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __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_self = values[0];
__pyx_v_another_set = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__lshift__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__lshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_2__lshift__(__pyx_self, __pyx_v_self, __pyx_v_another_set);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_2__lshift__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_set) {
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("__lshift__", 0);
/* "lib/Naked/toolshed/c/types.pyx":714
* # << operator is overloaded to extend the XSet with a second set
* def __lshift__(self, another_set):
* self.update(another_set) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_another_set);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_another_set);
__Pyx_GIVEREF(__pyx_v_another_set);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":715
* def __lshift__(self, another_set):
* self.update(another_set)
* return self # <<<<<<<<<<<<<<
*
* # += operator overload to extend the XSet with a second set
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":713
*
* # << operator is overloaded to extend the XSet with a second set
* def __lshift__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__lshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":718
*
* # += operator overload to extend the XSet with a second set
* def __iadd__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_5__iadd__ = {__Pyx_NAMESTR("__iadd__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_5__iadd__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_5__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_another_set = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_another_set,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_another_set)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__iadd__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __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_self = values[0];
__pyx_v_another_set = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_4__iadd__(__pyx_self, __pyx_v_self, __pyx_v_another_set);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_4__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_another_set) {
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("__iadd__", 0);
/* "lib/Naked/toolshed/c/types.pyx":719
* # += operator overload to extend the XSet with a second set
* def __iadd__(self, another_set):
* self.update(another_set) # <<<<<<<<<<<<<<
* return self
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_another_set);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_another_set);
__Pyx_GIVEREF(__pyx_v_another_set);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":720
* def __iadd__(self, another_set):
* self.update(another_set)
* return self # <<<<<<<<<<<<<<
*
* def xlist(self):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_self);
__pyx_r = __pyx_v_self;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":718
*
* # += operator overload to extend the XSet with a second set
* def __iadd__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":722
* return self
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_7xlist(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_7xlist = {__Pyx_NAMESTR("xlist"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_7xlist, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_7xlist(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xlist (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_6xlist(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_6xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = NULL;
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("xlist", 0);
/* "lib/Naked/toolshed/c/types.pyx":723
*
* def xlist(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XList(list(self), attr_dict)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":724
* def xlist(self):
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict) # <<<<<<<<<<<<<<
*
* def xfset(self):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XList); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(1); 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_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); 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);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __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_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":722
* return self
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.xlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":726
* return XList(list(self), attr_dict)
*
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(self, attr_dict)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_9xfset(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_9xfset = {__Pyx_NAMESTR("xfset"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_9xfset, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_4XSet_9xfset(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xfset (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_8xfset(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_8xfset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = NULL;
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("xfset", 0);
/* "lib/Naked/toolshed/c/types.pyx":727
*
* def xfset(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XFSet(self, attr_dict)
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":728
* def xfset(self):
* attr_dict = self._getAttributeDict()
* return XFSet(self, attr_dict) # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XFSet); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __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_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":726
* return XList(list(self), attr_dict)
*
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(self, attr_dict)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XSet.xfset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":736
* #------------------------------------------------------------------------------
* class XFSet(frozenset):
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"): # <<<<<<<<<<<<<<
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_10__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XFSet));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XFSet));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XFSet));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XFSet.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_1__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_cls = 0;
PyObject *__pyx_v_the_set = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_the_set,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults7 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XFSet));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_cls)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_set)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_cls = values[0];
__pyx_v_the_set = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XFSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet___new__(__pyx_self, __pyx_v_cls, __pyx_v_the_set, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_set, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_set_obj = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__new__", 0);
/* "lib/Naked/toolshed/c/types.pyx":737
* class XFSet(frozenset):
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"):
* set_obj = frozenset.__new__(cls, the_set) # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyFrozenSet_Type))), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_cls);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
__Pyx_GIVEREF(__pyx_v_cls);
__Pyx_INCREF(__pyx_v_the_set);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_the_set);
__Pyx_GIVEREF(__pyx_v_the_set);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __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_v_set_obj = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":738
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"):
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(set_obj, key, attributes[key])
*/
__pyx_t_4 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = ((__pyx_t_4 > 0) != 0);
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":739
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(set_obj, key, attributes[key])
* setattr(set_obj, '_naked_type_', naked_type) # set the naked extension type as an attribute (NakedObject does this for mutable classes)
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":740
* if len(attributes) > 0:
* for key in attributes:
* setattr(set_obj, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(set_obj, '_naked_type_', naked_type) # set the naked extension type as an attribute (NakedObject does this for mutable classes)
* return set_obj
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = PyObject_SetAttr(__pyx_v_set_obj, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":741
* for key in attributes:
* setattr(set_obj, key, attributes[key])
* setattr(set_obj, '_naked_type_', naked_type) # set the naked extension type as an attribute (NakedObject does this for mutable classes) # <<<<<<<<<<<<<<
* return set_obj
*
*/
__pyx_t_7 = PyObject_SetAttr(__pyx_v_set_obj, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":742
* setattr(set_obj, key, attributes[key])
* setattr(set_obj, '_naked_type_', naked_type) # set the naked extension type as an attribute (NakedObject does this for mutable classes)
* return set_obj # <<<<<<<<<<<<<<
*
* def _getAttributeDict(self):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_set_obj);
__pyx_r = __pyx_v_set_obj;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":736
* #------------------------------------------------------------------------------
* class XFSet(frozenset):
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"): # <<<<<<<<<<<<<<
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XFSet.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_set_obj);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":744
* return set_obj
*
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_3_getAttributeDict = {__Pyx_NAMESTR("_getAttributeDict"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_3_getAttributeDict, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_getAttributeDict (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_2_getAttributeDict(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("_getAttributeDict", 0);
/* "lib/Naked/toolshed/c/types.pyx":745
*
* def _getAttributeDict(self):
* return self.__dict__ # <<<<<<<<<<<<<<
*
* def xlist(self):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); 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_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":744
* return set_obj
*
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XFSet._getAttributeDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":747
* return self.__dict__
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict, naked_type="XList")
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_5xlist(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_5xlist = {__Pyx_NAMESTR("xlist"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_5xlist, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_5xlist(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xlist (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_4xlist(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_4xlist(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = 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;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("xlist", 0);
/* "lib/Naked/toolshed/c/types.pyx":748
*
* def xlist(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XList(list(self), attr_dict, naked_type="XList")
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":749
* def xlist(self):
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict, naked_type="XList") # <<<<<<<<<<<<<<
*
* def xset(self):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XList); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = 0;
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_naked_type, __pyx_n_s_XList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":747
* return self.__dict__
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict, naked_type="XList")
*/
/* 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("lib.Naked.toolshed.c.types.XFSet.xlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":751
* return XList(list(self), attr_dict, naked_type="XList")
*
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(self, attr_dict, naked_type="XSet")
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_7xset(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_7xset = {__Pyx_NAMESTR("xset"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_7xset, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_7xset(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xset (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_6xset(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_6xset(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_attr_dict = 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;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("xset", 0);
/* "lib/Naked/toolshed/c/types.pyx":752
*
* def xset(self):
* attr_dict = self._getAttributeDict() # <<<<<<<<<<<<<<
* return XSet(self, attr_dict, naked_type="XSet")
*
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getAttributeDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_attr_dict = __pyx_t_2;
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":753
* def xset(self):
* attr_dict = self._getAttributeDict()
* return XSet(self, attr_dict, naked_type="XSet") # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_XSet); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_attr_dict);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_attr_dict);
__Pyx_GIVEREF(__pyx_v_attr_dict);
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_naked_type, __pyx_n_s_XSet) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":751
* return XList(list(self), attr_dict, naked_type="XList")
*
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(self, attr_dict, naked_type="XSet")
*/
/* 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("lib.Naked.toolshed.c.types.XFSet.xset", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_attr_dict);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":759
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_9type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_9type = {__Pyx_NAMESTR("type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_9type, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_5XFSet_9type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("type (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_8type(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_8type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("type", 0);
/* "lib/Naked/toolshed/c/types.pyx":760
* #------------------------------------------------------------------------------
* def type(self):
* if hasattr(self, '_naked_type_'): # <<<<<<<<<<<<<<
* return self._naked_type_
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":761
* def type(self):
* if hasattr(self, '_naked_type_'):
* return self._naked_type_ # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":763
* return self._naked_type_
* else:
* return None # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":759
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XFSet.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":774
* #------------------------------------------------------------------------------
* class XString(str):
* def __new__(cls, string_text, attributes={}, naked_type='XString'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_22__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XString));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XString));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XString));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_1__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_cls = 0;
PyObject *__pyx_v_string_text = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_string_text,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults8 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XString));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_cls)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_string_text)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_cls = values[0];
__pyx_v_string_text = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString___new__(__pyx_self, __pyx_v_cls, __pyx_v_string_text, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_str_obj = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__new__", 0);
/* "lib/Naked/toolshed/c/types.pyx":775
* class XString(str):
* def __new__(cls, string_text, attributes={}, naked_type='XString'):
* str_obj = str.__new__(cls, string_text) # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_cls);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
__Pyx_GIVEREF(__pyx_v_cls);
__Pyx_INCREF(__pyx_v_string_text);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_string_text);
__Pyx_GIVEREF(__pyx_v_string_text);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __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_v_str_obj = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":776
* def __new__(cls, string_text, attributes={}, naked_type='XString'):
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(str_obj, key, attributes[key])
*/
__pyx_t_4 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = ((__pyx_t_4 > 0) != 0);
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":777
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type)
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":778
* if len(attributes) > 0:
* for key in attributes:
* setattr(str_obj, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(str_obj, '_naked_type_', naked_type)
* return str_obj
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":779
* for key in attributes:
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # <<<<<<<<<<<<<<
* return str_obj
*
*/
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":780
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type)
* return str_obj # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_str_obj);
__pyx_r = __pyx_v_str_obj;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":774
* #------------------------------------------------------------------------------
* class XString(str):
* def __new__(cls, string_text, attributes={}, naked_type='XString'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_str_obj);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":786
* # returns a dictionary of the XString instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_3_getAttributeDict = {__Pyx_NAMESTR("_getAttributeDict"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_3_getAttributeDict, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_getAttributeDict (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_2_getAttributeDict(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("_getAttributeDict", 0);
/* "lib/Naked/toolshed/c/types.pyx":787
* #------------------------------------------------------------------------------
* def _getAttributeDict(self):
* return self.__dict__ # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":786
* # returns a dictionary of the XString instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString._getAttributeDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":793
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_5type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_5type = {__Pyx_NAMESTR("type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_5type, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_5type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("type (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_4type(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_4type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("type", 0);
/* "lib/Naked/toolshed/c/types.pyx":794
* #------------------------------------------------------------------------------
* def type(self):
* if hasattr(self, '_naked_type_'): # <<<<<<<<<<<<<<
* return self._naked_type_
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":795
* def type(self):
* if hasattr(self, '_naked_type_'):
* return self._naked_type_ # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":797
* return self._naked_type_
* else:
* return None # <<<<<<<<<<<<<<
*
* ## TODO: see where + vs. join breakpoint becomes important
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":793
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":800
*
* ## TODO: see where + vs. join breakpoint becomes important
* def concat(self, *strings): # <<<<<<<<<<<<<<
* str_list = []
* for x in strings:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_7concat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_7concat = {__Pyx_NAMESTR("concat"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_7concat, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_7concat(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
CYTHON_UNUSED PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_strings = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("concat (wrapper)", 0);
if (PyTuple_GET_SIZE(__pyx_args) > 1) {
__pyx_v_strings = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
if (unlikely(!__pyx_v_strings)) {
__Pyx_RefNannyFinishContext();
return NULL;
}
__Pyx_GOTREF(__pyx_v_strings);
} else {
__pyx_v_strings = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
}
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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) {
default:
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
case 0: break;
}
kw_args = PyDict_Size(__pyx_kwds);
switch (pos_args) {
case 0:
if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "concat") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __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_self = values[0];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("concat", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_strings); __pyx_v_strings = 0;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.concat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_6concat(__pyx_self, __pyx_v_self, __pyx_v_strings);
/* function exit code */
__Pyx_XDECREF(__pyx_v_strings);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_6concat(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_strings) {
PyObject *__pyx_v_str_list = NULL;
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
int __pyx_t_4;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("concat", 0);
/* "lib/Naked/toolshed/c/types.pyx":801
* ## TODO: see where + vs. join breakpoint becomes important
* def concat(self, *strings):
* str_list = [] # <<<<<<<<<<<<<<
* for x in strings:
* str_list.append(x)
*/
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_str_list = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":802
* def concat(self, *strings):
* str_list = []
* for x in strings: # <<<<<<<<<<<<<<
* str_list.append(x)
* return "".join(str_list)
*/
__pyx_t_1 = __pyx_v_strings; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
for (;;) {
if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_3 = PyTuple_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 = 802; __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 = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
__Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_3);
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":803
* str_list = []
* for x in strings:
* str_list.append(x) # <<<<<<<<<<<<<<
* return "".join(str_list)
*
*/
__pyx_t_4 = __Pyx_PyList_Append(__pyx_v_str_list, __pyx_v_x); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":804
* for x in strings:
* str_list.append(x)
* return "".join(str_list) # <<<<<<<<<<<<<<
*
* # fastest substring search truth test
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_str_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":800
*
* ## TODO: see where + vs. join breakpoint becomes important
* def concat(self, *strings): # <<<<<<<<<<<<<<
* str_list = []
* for x in strings:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.concat", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_str_list);
__Pyx_XDECREF(__pyx_v_x);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":807
*
* # fastest substring search truth test
* def contains(self, substring): # <<<<<<<<<<<<<<
* return substring in self
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_9contains(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_9contains = {__Pyx_NAMESTR("contains"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_9contains, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_9contains(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_substring = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("contains (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_substring,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_substring)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("contains", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "contains") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __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_self = values[0];
__pyx_v_substring = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("contains", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_8contains(__pyx_self, __pyx_v_self, __pyx_v_substring);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_8contains(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_substring) {
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("contains", 0);
/* "lib/Naked/toolshed/c/types.pyx":808
* # fastest substring search truth test
* def contains(self, substring):
* return substring in self # <<<<<<<<<<<<<<
*
* # split the string on one or more delimiters, return list
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_substring, __pyx_v_self, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":807
*
* # fastest substring search truth test
* def contains(self, substring): # <<<<<<<<<<<<<<
* return substring in self
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.contains", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":812
* # split the string on one or more delimiters, return list
* # if up to two chars, then uses str.split(), if more chars then use re.split
* def xsplit(self, split_delimiter): # <<<<<<<<<<<<<<
* length = len(split_delimiter)
* if length > 2:
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_11xsplit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_11xsplit = {__Pyx_NAMESTR("xsplit"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_11xsplit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_11xsplit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_split_delimiter = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xsplit (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_split_delimiter,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_split_delimiter)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("xsplit", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsplit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __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_self = values[0];
__pyx_v_split_delimiter = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("xsplit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.xsplit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_10xsplit(__pyx_self, __pyx_v_self, __pyx_v_split_delimiter);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_10xsplit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_split_delimiter) {
Py_ssize_t __pyx_v_length;
PyObject *__pyx_v_re = NULL;
PyObject *__pyx_v_delim2 = NULL;
PyObject *__pyx_v_first_list = NULL;
PyObject *__pyx_v_result_list = NULL;
PyObject *__pyx_v_item = NULL;
PyObject *__pyx_v_subitem = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
PyObject *(*__pyx_t_6)(PyObject *);
PyObject *__pyx_t_7 = NULL;
Py_ssize_t __pyx_t_8;
PyObject *(*__pyx_t_9)(PyObject *);
int __pyx_t_10;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("xsplit", 0);
__Pyx_INCREF(__pyx_v_split_delimiter);
/* "lib/Naked/toolshed/c/types.pyx":813
* # if up to two chars, then uses str.split(), if more chars then use re.split
* def xsplit(self, split_delimiter):
* length = len(split_delimiter) # <<<<<<<<<<<<<<
* if length > 2:
* import re
*/
__pyx_t_1 = PyObject_Length(__pyx_v_split_delimiter); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_length = __pyx_t_1;
/* "lib/Naked/toolshed/c/types.pyx":814
* def xsplit(self, split_delimiter):
* length = len(split_delimiter)
* if length > 2: # <<<<<<<<<<<<<<
* import re
* split_delimiter = "".join([ '[', split_delimiter, ']' ])
*/
__pyx_t_2 = ((__pyx_v_length > 2) != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":815
* length = len(split_delimiter)
* if length > 2:
* import re # <<<<<<<<<<<<<<
* split_delimiter = "".join([ '[', split_delimiter, ']' ])
* return re.split(split_delimiter, self)
*/
__pyx_t_3 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_re = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":816
* if length > 2:
* import re
* split_delimiter = "".join([ '[', split_delimiter, ']' ]) # <<<<<<<<<<<<<<
* return re.split(split_delimiter, self)
* elif length > 1:
*/
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_kp_s__8);
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s__8);
__Pyx_GIVEREF(__pyx_kp_s__8);
__Pyx_INCREF(__pyx_v_split_delimiter);
PyList_SET_ITEM(__pyx_t_3, 1, __pyx_v_split_delimiter);
__Pyx_GIVEREF(__pyx_v_split_delimiter);
__Pyx_INCREF(__pyx_kp_s__9);
PyList_SET_ITEM(__pyx_t_3, 2, __pyx_kp_s__9);
__Pyx_GIVEREF(__pyx_kp_s__9);
__pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_split_delimiter, __pyx_t_4);
__pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":817
* import re
* split_delimiter = "".join([ '[', split_delimiter, ']' ])
* return re.split(split_delimiter, self) # <<<<<<<<<<<<<<
* elif length > 1:
* delim2 = split_delimiter[1]
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_re, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_split_delimiter);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_split_delimiter);
__Pyx_GIVEREF(__pyx_v_split_delimiter);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); 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);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":818
* split_delimiter = "".join([ '[', split_delimiter, ']' ])
* return re.split(split_delimiter, self)
* elif length > 1: # <<<<<<<<<<<<<<
* delim2 = split_delimiter[1]
* first_list = self.split(split_delimiter[0])
*/
__pyx_t_2 = ((__pyx_v_length > 1) != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":819
* return re.split(split_delimiter, self)
* elif length > 1:
* delim2 = split_delimiter[1] # <<<<<<<<<<<<<<
* first_list = self.split(split_delimiter[0])
* result_list = []
*/
__pyx_t_5 = __Pyx_GetItemInt(__pyx_v_split_delimiter, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
__pyx_v_delim2 = __pyx_t_5;
__pyx_t_5 = 0;
/* "lib/Naked/toolshed/c/types.pyx":820
* elif length > 1:
* delim2 = split_delimiter[1]
* first_list = self.split(split_delimiter[0]) # <<<<<<<<<<<<<<
* result_list = []
* for item in first_list:
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_split_delimiter, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __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 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_first_list = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":821
* delim2 = split_delimiter[1]
* first_list = self.split(split_delimiter[0])
* result_list = [] # <<<<<<<<<<<<<<
* for item in first_list:
* for subitem in item.split(delim2):
*/
__pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_result_list = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":822
* first_list = self.split(split_delimiter[0])
* result_list = []
* for item in first_list: # <<<<<<<<<<<<<<
* for subitem in item.split(delim2):
* result_list.append(subitem)
*/
if (PyList_CheckExact(__pyx_v_first_list) || PyTuple_CheckExact(__pyx_v_first_list)) {
__pyx_t_3 = __pyx_v_first_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_first_list); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_4 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_4)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
__pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":823
* result_list = []
* for item in first_list:
* for subitem in item.split(delim2): # <<<<<<<<<<<<<<
* result_list.append(subitem)
* return result_list
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_delim2);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_delim2);
__Pyx_GIVEREF(__pyx_v_delim2);
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
__pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
__pyx_t_9 = NULL;
} else {
__pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
for (;;) {
if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_7 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_7 = __pyx_t_9(__pyx_t_5);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_7);
}
__Pyx_XDECREF_SET(__pyx_v_subitem, __pyx_t_7);
__pyx_t_7 = 0;
/* "lib/Naked/toolshed/c/types.pyx":824
* for item in first_list:
* for subitem in item.split(delim2):
* result_list.append(subitem) # <<<<<<<<<<<<<<
* return result_list
* else:
*/
__pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result_list, __pyx_v_subitem); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":825
* for subitem in item.split(delim2):
* result_list.append(subitem)
* return result_list # <<<<<<<<<<<<<<
* else:
* return self.split(split_delimiter)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_result_list);
__pyx_r = __pyx_v_result_list;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":827
* return result_list
* else:
* return self.split(split_delimiter) # <<<<<<<<<<<<<<
*
* # split the string on one or more characters and return items in set
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_split_delimiter);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_split_delimiter);
__Pyx_GIVEREF(__pyx_v_split_delimiter);
__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_7;
__pyx_t_7 = 0;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":812
* # split the string on one or more delimiters, return list
* # if up to two chars, then uses str.split(), if more chars then use re.split
* def xsplit(self, split_delimiter): # <<<<<<<<<<<<<<
* length = len(split_delimiter)
* if length > 2:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.xsplit", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_re);
__Pyx_XDECREF(__pyx_v_delim2);
__Pyx_XDECREF(__pyx_v_first_list);
__Pyx_XDECREF(__pyx_v_result_list);
__Pyx_XDECREF(__pyx_v_item);
__Pyx_XDECREF(__pyx_v_subitem);
__Pyx_XDECREF(__pyx_v_split_delimiter);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":830
*
* # split the string on one or more characters and return items in set
* def xsplit_set(self, split_delimiter): # <<<<<<<<<<<<<<
* return set(self.xsplit(split_delimiter))
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_13xsplit_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_13xsplit_set = {__Pyx_NAMESTR("xsplit_set"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_13xsplit_set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_13xsplit_set(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_split_delimiter = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("xsplit_set (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_split_delimiter,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_split_delimiter)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("xsplit_set", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsplit_set") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __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_self = values[0];
__pyx_v_split_delimiter = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("xsplit_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.xsplit_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_12xsplit_set(__pyx_self, __pyx_v_self, __pyx_v_split_delimiter);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_12xsplit_set(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_split_delimiter) {
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("xsplit_set", 0);
/* "lib/Naked/toolshed/c/types.pyx":831
* # split the string on one or more characters and return items in set
* def xsplit_set(self, split_delimiter):
* return set(self.xsplit(split_delimiter)) # <<<<<<<<<<<<<<
*
* # str begins with substring - faster than str.startswith()
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_xsplit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_split_delimiter);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_split_delimiter);
__Pyx_GIVEREF(__pyx_v_split_delimiter);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 831; __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;
/* "lib/Naked/toolshed/c/types.pyx":830
*
* # split the string on one or more characters and return items in set
* def xsplit_set(self, split_delimiter): # <<<<<<<<<<<<<<
* return set(self.xsplit(split_delimiter))
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.xsplit_set", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":834
*
* # str begins with substring - faster than str.startswith()
* def begins(self, begin_string): # <<<<<<<<<<<<<<
* return begin_string in self[0:len(begin_string)]
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_15begins(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_15begins = {__Pyx_NAMESTR("begins"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_15begins, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_15begins(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_begin_string = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("begins (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_begin_string,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_begin_string)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("begins", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "begins") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __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_self = values[0];
__pyx_v_begin_string = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("begins", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.begins", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_14begins(__pyx_self, __pyx_v_self, __pyx_v_begin_string);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_14begins(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_begin_string) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("begins", 0);
/* "lib/Naked/toolshed/c/types.pyx":835
* # str begins with substring - faster than str.startswith()
* def begins(self, begin_string):
* return begin_string in self[0:len(begin_string)] # <<<<<<<<<<<<<<
*
* # str ends with substring - faster than str.endswith()
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyObject_Length(__pyx_v_begin_string); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_self, 0, __pyx_t_1, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_begin_string, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":834
*
* # str begins with substring - faster than str.startswith()
* def begins(self, begin_string): # <<<<<<<<<<<<<<
* return begin_string in self[0:len(begin_string)]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.begins", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":838
*
* # str ends with substring - faster than str.endswith()
* def ends(self, end_string): # <<<<<<<<<<<<<<
* return end_string in self[-len(end_string):]
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_17ends(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_17ends = {__Pyx_NAMESTR("ends"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_17ends, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_17ends(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_end_string = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("ends (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_end_string,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end_string)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("ends", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ends") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __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_self = values[0];
__pyx_v_end_string = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("ends", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.ends", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_16ends(__pyx_self, __pyx_v_self, __pyx_v_end_string);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_16ends(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_end_string) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("ends", 0);
/* "lib/Naked/toolshed/c/types.pyx":839
* # str ends with substring - faster than str.endswith()
* def ends(self, end_string):
* return end_string in self[-len(end_string):] # <<<<<<<<<<<<<<
*
* # case sensitive wildcard match on the XString (boolean returned)
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyObject_Length(__pyx_v_end_string); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_self, (-__pyx_t_1), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_v_end_string, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":838
*
* # str ends with substring - faster than str.endswith()
* def ends(self, end_string): # <<<<<<<<<<<<<<
* return end_string in self[-len(end_string):]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.ends", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":842
*
* # case sensitive wildcard match on the XString (boolean returned)
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* from fnmatch import fnmatchcase
* return fnmatchcase(self, wildcard)
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_19wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_19wildcard_match = {__Pyx_NAMESTR("wildcard_match"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_19wildcard_match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_19wildcard_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_wildcard = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("wildcard_match (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_wildcard,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("wildcard_match", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wildcard_match") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __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_self = values[0];
__pyx_v_wildcard = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("wildcard_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_18wildcard_match(__pyx_self, __pyx_v_self, __pyx_v_wildcard);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_18wildcard_match(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_wildcard) {
PyObject *__pyx_v_fnmatchcase = NULL;
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("wildcard_match", 0);
/* "lib/Naked/toolshed/c/types.pyx":843
* # case sensitive wildcard match on the XString (boolean returned)
* def wildcard_match(self, wildcard):
* from fnmatch import fnmatchcase # <<<<<<<<<<<<<<
* return fnmatchcase(self, wildcard)
*
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_fnmatchcase);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fnmatchcase);
__Pyx_GIVEREF(__pyx_n_s_fnmatchcase);
__pyx_t_2 = __Pyx_Import(__pyx_n_s_fnmatch, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __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_ImportFrom(__pyx_t_2, __pyx_n_s_fnmatchcase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_fnmatchcase = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":844
* def wildcard_match(self, wildcard):
* from fnmatch import fnmatchcase
* return fnmatchcase(self, wildcard) # <<<<<<<<<<<<<<
*
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__Pyx_INCREF(__pyx_v_wildcard);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_wildcard);
__Pyx_GIVEREF(__pyx_v_wildcard);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_fnmatchcase, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __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;
/* "lib/Naked/toolshed/c/types.pyx":842
*
* # case sensitive wildcard match on the XString (boolean returned)
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* from fnmatch import fnmatchcase
* return fnmatchcase(self, wildcard)
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.wildcard_match", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_fnmatchcase);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":847
*
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
* def unicode(self): # <<<<<<<<<<<<<<
* from sys import version_info
* from unicodedata import normalize
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_21unicode(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_21unicode = {__Pyx_NAMESTR("unicode"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_21unicode, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_7XString_21unicode(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("unicode (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_20unicode(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_20unicode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_v_version_info = NULL;
PyObject *__pyx_v_normalize = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("unicode", 0);
/* "lib/Naked/toolshed/c/types.pyx":848
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
* def unicode(self):
* from sys import version_info # <<<<<<<<<<<<<<
* from unicodedata import normalize
* if version_info[0] == 2:
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_version_info);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_version_info);
__Pyx_GIVEREF(__pyx_n_s_version_info);
__pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __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_ImportFrom(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_t_1);
__pyx_v_version_info = __pyx_t_1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":849
* def unicode(self):
* from sys import version_info
* from unicodedata import normalize # <<<<<<<<<<<<<<
* if version_info[0] == 2:
* return normalize('NFKD', self.decode('UTF-8'))
*/
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_normalize);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_normalize);
__Pyx_GIVEREF(__pyx_n_s_normalize);
__pyx_t_1 = __Pyx_Import(__pyx_n_s_unicodedata, __pyx_t_2, -1); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_normalize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_t_2);
__pyx_v_normalize = __pyx_t_2;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":850
* from sys import version_info
* from unicodedata import normalize
* if version_info[0] == 2: # <<<<<<<<<<<<<<
* return normalize('NFKD', self.decode('UTF-8'))
* else:
*/
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_version_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_3) {
/* "lib/Naked/toolshed/c/types.pyx":851
* from unicodedata import normalize
* if version_info[0] == 2:
* return normalize('NFKD', self.decode('UTF-8')) # <<<<<<<<<<<<<<
* else:
* return normalize('NFKD', self)
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_NFKD);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NFKD);
__Pyx_GIVEREF(__pyx_n_s_NFKD);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_normalize, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __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;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":853
* return normalize('NFKD', self.decode('UTF-8'))
* else:
* return normalize('NFKD', self) # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_NFKD);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NFKD);
__Pyx_GIVEREF(__pyx_n_s_NFKD);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_normalize, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __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;
}
/* "lib/Naked/toolshed/c/types.pyx":847
*
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
* def unicode(self): # <<<<<<<<<<<<<<
* from sys import version_info
* from unicodedata import normalize
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XString.unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_version_info);
__Pyx_XDECREF(__pyx_v_normalize);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":858
* # this version works
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'): # <<<<<<<<<<<<<<
* import sys
* import unicodedata
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_14__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); 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_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XUnicode));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XUnicode));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XUnicode));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_1__init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_string_text = 0;
PyObject *__pyx_v_attributes = 0;
CYTHON_UNUSED PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_string_text,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults9 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults9, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XUnicode));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_string_text)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = 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 = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_self = values[0];
__pyx_v_string_text = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode___init__(__pyx_self, __pyx_v_self, __pyx_v_string_text, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":864
*
* class XUnicode_2(unicode):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'): # <<<<<<<<<<<<<<
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_2__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XUnicode2));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XUnicode2));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XUnicode2));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_2.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_1__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_cls = 0;
PyObject *__pyx_v_the_string_text = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_the_string_text,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults11 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XUnicode2));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_cls)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_string_text)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_cls = values[0];
__pyx_v_the_string_text = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_2.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2___new__(__pyx_self, __pyx_v_cls, __pyx_v_the_string_text, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_str_obj = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__new__", 0);
/* "lib/Naked/toolshed/c/types.pyx":865
* class XUnicode_2(unicode):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'):
* str_obj = unicode.__new__(cls, the_string_text) # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_cls);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
__Pyx_GIVEREF(__pyx_v_cls);
__Pyx_INCREF(__pyx_v_the_string_text);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_the_string_text);
__Pyx_GIVEREF(__pyx_v_the_string_text);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __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_v_str_obj = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":866
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'):
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(str_obj, key, attributes[key])
*/
__pyx_t_4 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = ((__pyx_t_4 > 0) != 0);
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":867
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode2 for Py 2 strings
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":868
* if len(attributes) > 0:
* for key in attributes:
* setattr(str_obj, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode2 for Py 2 strings
* return str_obj
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":869
* for key in attributes:
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode2 for Py 2 strings # <<<<<<<<<<<<<<
* return str_obj
*
*/
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":870
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode2 for Py 2 strings
* return str_obj # <<<<<<<<<<<<<<
*
* class XUnicode_3(str):
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_str_obj);
__pyx_r = __pyx_v_str_obj;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":864
*
* class XUnicode_2(unicode):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'): # <<<<<<<<<<<<<<
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_2.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_str_obj);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":873
*
* class XUnicode_3(str):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_2__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XUnicode3));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XUnicode3));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XUnicode3));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_3.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_1__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_cls = 0;
PyObject *__pyx_v_the_string_text = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_the_string_text,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults12 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XUnicode3));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_cls)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_string_text)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_cls = values[0];
__pyx_v_the_string_text = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_3.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3___new__(__pyx_self, __pyx_v_cls, __pyx_v_the_string_text, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_string_text, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_str_obj = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__new__", 0);
/* "lib/Naked/toolshed/c/types.pyx":874
* class XUnicode_3(str):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'):
* str_obj = str.__new__(cls, the_string_text) # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_cls);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
__Pyx_GIVEREF(__pyx_v_cls);
__Pyx_INCREF(__pyx_v_the_string_text);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_the_string_text);
__Pyx_GIVEREF(__pyx_v_the_string_text);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __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_v_str_obj = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":875
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'):
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(str_obj, key, attributes[key])
*/
__pyx_t_4 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = ((__pyx_t_4 > 0) != 0);
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":876
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode3 for Py 3 strings
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":877
* if len(attributes) > 0:
* for key in attributes:
* setattr(str_obj, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode3 for Py 3 strings
* return str_obj
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":878
* for key in attributes:
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode3 for Py 3 strings # <<<<<<<<<<<<<<
* return str_obj
*
*/
__pyx_t_7 = PyObject_SetAttr(__pyx_v_str_obj, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":879
* setattr(str_obj, key, attributes[key])
* setattr(str_obj, '_naked_type_', naked_type) # set the type to XUnicode3 for Py 3 strings
* return str_obj # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_str_obj);
__pyx_r = __pyx_v_str_obj;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":873
*
* class XUnicode_3(str):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__init__.XUnicode_3.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_str_obj);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":858
* # this version works
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'): # <<<<<<<<<<<<<<
* import sys
* import unicodedata
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_string_text, PyObject *__pyx_v_attributes, CYTHON_UNUSED PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_sys = NULL;
PyObject *__pyx_v_unicodedata = NULL;
PyObject *__pyx_v_norm_text = NULL;
PyObject *__pyx_v_XUnicode_2 = NULL;
PyObject *__pyx_v_XUnicode_3 = 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;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
/* "lib/Naked/toolshed/c/types.pyx":859
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'):
* import sys # <<<<<<<<<<<<<<
* import unicodedata
* norm_text = unicodedata.normalize('NFKD', string_text)
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_sys = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":860
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'):
* import sys
* import unicodedata # <<<<<<<<<<<<<<
* norm_text = unicodedata.normalize('NFKD', string_text)
*
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_unicodedata, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_unicodedata = __pyx_t_1;
__pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":861
* import sys
* import unicodedata
* norm_text = unicodedata.normalize('NFKD', string_text) # <<<<<<<<<<<<<<
*
* class XUnicode_2(unicode):
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_unicodedata, __pyx_n_s_normalize); 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 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_NFKD);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NFKD);
__Pyx_GIVEREF(__pyx_n_s_NFKD);
__Pyx_INCREF(__pyx_v_string_text);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_string_text);
__Pyx_GIVEREF(__pyx_v_string_text);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __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_v_norm_text = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":863
* norm_text = unicodedata.normalize('NFKD', string_text)
*
* class XUnicode_2(unicode): # <<<<<<<<<<<<<<
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'):
* str_obj = unicode.__new__(cls, the_string_text)
*/
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyUnicode_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyUnicode_Type))));
__pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_XUnicode_2, __pyx_n_s_XUnicode___init___locals_XUnicod, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":864
*
* class XUnicode_2(unicode):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'): # <<<<<<<<<<<<<<
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_XUnicode___init___locals_XUnicod_2, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults11), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults11, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_2_2__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":863
* norm_text = unicodedata.normalize('NFKD', string_text)
*
* class XUnicode_2(unicode): # <<<<<<<<<<<<<<
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'):
* str_obj = unicode.__new__(cls, the_string_text)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_XUnicode_2, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_XUnicode_2 = __pyx_t_4;
__pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":872
* return str_obj
*
* class XUnicode_3(str): # <<<<<<<<<<<<<<
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'):
* str_obj = str.__new__(cls, the_string_text)
*/
__pyx_t_3 = PyTuple_New(1); 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_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
__pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_XUnicode_3, __pyx_n_s_XUnicode___init___locals_XUnicod_3, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":873
*
* class XUnicode_3(str):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_XUnicode___init___locals_XUnicod_4, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults12), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__init___10XUnicode_3_2__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":872
* return str_obj
*
* class XUnicode_3(str): # <<<<<<<<<<<<<<
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'):
* str_obj = str.__new__(cls, the_string_text)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_XUnicode_3, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_XUnicode_3 = __pyx_t_4;
__pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":882
*
*
* if sys.version_info[0] == 2: # <<<<<<<<<<<<<<
* self.obj = XUnicode_2(norm_text, attributes)
* self.norm_unicode = norm_text
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_version_info); 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_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":883
*
* if sys.version_info[0] == 2:
* self.obj = XUnicode_2(norm_text, attributes) # <<<<<<<<<<<<<<
* self.norm_unicode = norm_text
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string
*/
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_norm_text);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_norm_text);
__Pyx_GIVEREF(__pyx_v_norm_text);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_XUnicode_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_obj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":884
* if sys.version_info[0] == 2:
* self.obj = XUnicode_2(norm_text, attributes)
* self.norm_unicode = norm_text # <<<<<<<<<<<<<<
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string
* elif sys.version_info[0] == 3:
*/
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_norm_unicode, __pyx_v_norm_text) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":885
* self.obj = XUnicode_2(norm_text, attributes)
* self.norm_unicode = norm_text
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string # <<<<<<<<<<<<<<
* elif sys.version_info[0] == 3:
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __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_Call(__pyx_t_3, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_naked_u_string, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
goto __pyx_L3;
}
/* "lib/Naked/toolshed/c/types.pyx":886
* self.norm_unicode = norm_text
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string
* elif sys.version_info[0] == 3: # <<<<<<<<<<<<<<
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_int_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
/* "lib/Naked/toolshed/c/types.pyx":887
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string
* elif sys.version_info[0] == 3:
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ? # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_norm_text);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_norm_text);
__Pyx_GIVEREF(__pyx_v_norm_text);
__Pyx_INCREF(__pyx_v_attributes);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_attributes);
__Pyx_GIVEREF(__pyx_v_attributes);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_XUnicode_3, __pyx_t_2, 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __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__16, 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_naked_u_string, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":858
* # this version works
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'): # <<<<<<<<<<<<<<
* import sys
* import unicodedata
*/
/* 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("lib.Naked.toolshed.c.types.XUnicode.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_sys);
__Pyx_XDECREF(__pyx_v_unicodedata);
__Pyx_XDECREF(__pyx_v_norm_text);
__Pyx_XDECREF(__pyx_v_XUnicode_2);
__Pyx_XDECREF(__pyx_v_XUnicode_3);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":889
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*
* def __str__(self): # <<<<<<<<<<<<<<
* # return self.naked_u_string
* return self.obj
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_3__str__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_3__str__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("__str__", 0);
/* "lib/Naked/toolshed/c/types.pyx":891
* def __str__(self):
* # return self.naked_u_string
* return self.obj # <<<<<<<<<<<<<<
*
* def __repr__(self):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":889
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*
* def __str__(self): # <<<<<<<<<<<<<<
* # return self.naked_u_string
* return self.obj
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":893
* return self.obj
*
* def __repr__(self): # <<<<<<<<<<<<<<
* return self.naked_u_string
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_5__repr__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_5__repr__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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);
/* "lib/Naked/toolshed/c/types.pyx":894
*
* def __repr__(self):
* return self.naked_u_string # <<<<<<<<<<<<<<
*
* def __getattr__(self, the_attribute):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_u_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":893
* return self.obj
*
* def __repr__(self): # <<<<<<<<<<<<<<
* return self.naked_u_string
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":896
* return self.naked_u_string
*
* def __getattr__(self, the_attribute): # <<<<<<<<<<<<<<
* return self.obj.__dict__[the_attribute]
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_7__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_7__getattr__ = {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_7__getattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_7__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_the_attribute = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_the_attribute,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_attribute)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __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_self = values[0];
__pyx_v_the_attribute = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_6__getattr__(__pyx_self, __pyx_v_self, __pyx_v_the_attribute);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_6__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_the_attribute) {
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("__getattr__", 0);
/* "lib/Naked/toolshed/c/types.pyx":897
*
* def __getattr__(self, the_attribute):
* return self.obj.__dict__[the_attribute] # <<<<<<<<<<<<<<
*
* def __cmp__(self, other_string):
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __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_GetItem(__pyx_t_2, __pyx_v_the_attribute); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __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;
/* "lib/Naked/toolshed/c/types.pyx":896
* return self.naked_u_string
*
* def __getattr__(self, the_attribute): # <<<<<<<<<<<<<<
* return self.obj.__dict__[the_attribute]
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":899
* return self.obj.__dict__[the_attribute]
*
* def __cmp__(self, other_string): # <<<<<<<<<<<<<<
* return hash(self.naked_u_string) == hash(other_string)
* # TODO: add check for same attributes
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_9__cmp__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_9__cmp__ = {__Pyx_NAMESTR("__cmp__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_9__cmp__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_9__cmp__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_other_string = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__cmp__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_other_string,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_self)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_string)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__cmp__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cmp__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __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_self = values[0];
__pyx_v_other_string = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__cmp__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__cmp__(__pyx_self, __pyx_v_self, __pyx_v_other_string);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_8__cmp__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other_string) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_hash_t __pyx_t_2;
Py_hash_t __pyx_t_3;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cmp__", 0);
/* "lib/Naked/toolshed/c/types.pyx":900
*
* def __cmp__(self, other_string):
* return hash(self.naked_u_string) == hash(other_string) # <<<<<<<<<<<<<<
* # TODO: add check for same attributes
*
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_u_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = PyObject_Hash(__pyx_v_other_string); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_2 == __pyx_t_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":899
* return self.obj.__dict__[the_attribute]
*
* def __cmp__(self, other_string): # <<<<<<<<<<<<<<
* return hash(self.naked_u_string) == hash(other_string)
* # TODO: add check for same attributes
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.__cmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":907
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_11_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_11_getAttributeDict = {__Pyx_NAMESTR("_getAttributeDict"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_11_getAttributeDict, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_11_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_getAttributeDict (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_10_getAttributeDict(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_10_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("_getAttributeDict", 0);
/* "lib/Naked/toolshed/c/types.pyx":908
* #------------------------------------------------------------------------------
* def _getAttributeDict(self):
* return self.__dict__ # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":907
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode._getAttributeDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":914
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_13type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_13type = {__Pyx_NAMESTR("type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_13type, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_8XUnicode_13type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("type (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_12type(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_12type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("type", 0);
/* "lib/Naked/toolshed/c/types.pyx":915
* #------------------------------------------------------------------------------
* def type(self):
* if hasattr(self, '_naked_type_'): # <<<<<<<<<<<<<<
* return self._naked_type_
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":916
* def type(self):
* if hasattr(self, '_naked_type_'):
* return self._naked_type_ # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":918
* return self._naked_type_
* else:
* return None # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":914
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XUnicode.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":926
* #------------------------------------------------------------------------------
* class XTuple(tuple):
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'): # <<<<<<<<<<<<<<
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0:
*/
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_6__defaults__(CYTHON_UNUSED PyObject *__pyx_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("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_attributes);
PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_attributes);
__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self)->__pyx_arg_attributes);
__Pyx_INCREF(((PyObject*)__pyx_n_s_XTuple));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_n_s_XTuple));
__Pyx_GIVEREF(((PyObject*)__pyx_n_s_XTuple));
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XTuple.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_1__new__ = {__Pyx_NAMESTR("__new__"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_1__new__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_1__new__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_cls = 0;
PyObject *__pyx_v_the_tuple = 0;
PyObject *__pyx_v_attributes = 0;
PyObject *__pyx_v_naked_type = 0;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__new__ (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_the_tuple,&__pyx_n_s_attributes,&__pyx_n_s_naked_type,0};
PyObject* values[4] = {0,0,0,0};
__pyx_defaults10 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_self);
values[2] = __pyx_dynamic_args->__pyx_arg_attributes;
values[3] = ((PyObject *)((PyObject*)__pyx_n_s_XTuple));
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
switch (pos_args) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
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_cls)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_the_tuple)) != 0)) kw_args--;
else {
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_attributes);
if (value) { values[2] = value; kw_args--; }
}
case 3:
if (kw_args > 0) {
PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_naked_type);
if (value) { values[3] = value; kw_args--; }
}
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__new__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
break;
default: goto __pyx_L5_argtuple_error;
}
}
__pyx_v_cls = values[0];
__pyx_v_the_tuple = values[1];
__pyx_v_attributes = values[2];
__pyx_v_naked_type = values[3];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("__new__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XTuple.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple___new__(__pyx_self, __pyx_v_cls, __pyx_v_the_tuple, __pyx_v_attributes, __pyx_v_naked_type);
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple___new__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_the_tuple, PyObject *__pyx_v_attributes, PyObject *__pyx_v_naked_type) {
PyObject *__pyx_v_tup_obj = NULL;
PyObject *__pyx_v_key = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
int __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
int __pyx_t_7;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__new__", 0);
/* "lib/Naked/toolshed/c/types.pyx":927
* class XTuple(tuple):
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'):
* tup_obj = tuple.__new__(cls, the_tuple) # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_cls);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cls);
__Pyx_GIVEREF(__pyx_v_cls);
__Pyx_INCREF(__pyx_v_the_tuple);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_the_tuple);
__Pyx_GIVEREF(__pyx_v_the_tuple);
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __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_v_tup_obj = __pyx_t_3;
__pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":928
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'):
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0: # <<<<<<<<<<<<<<
* for key in attributes:
* setattr(tup_obj, key, attributes[key])
*/
__pyx_t_4 = PyObject_Length(__pyx_v_attributes); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = ((__pyx_t_4 > 0) != 0);
if (__pyx_t_5) {
/* "lib/Naked/toolshed/c/types.pyx":929
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0:
* for key in attributes: # <<<<<<<<<<<<<<
* setattr(tup_obj, key, attributes[key])
* setattr(tup_obj, '_naked_type_', naked_type)
*/
if (PyList_CheckExact(__pyx_v_attributes) || PyTuple_CheckExact(__pyx_v_attributes)) {
__pyx_t_3 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
__pyx_t_6 = NULL;
} else {
__pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
}
for (;;) {
if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) {
if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
__pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
__pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_2 = __pyx_t_6(__pyx_t_3);
if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_GOTREF(__pyx_t_2);
}
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
__pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":930
* if len(attributes) > 0:
* for key in attributes:
* setattr(tup_obj, key, attributes[key]) # <<<<<<<<<<<<<<
* setattr(tup_obj, '_naked_type_', naked_type)
* return tup_obj
*/
__pyx_t_2 = PyObject_GetItem(__pyx_v_attributes, __pyx_v_key); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_7 = PyObject_SetAttr(__pyx_v_tup_obj, __pyx_v_key, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L3;
}
__pyx_L3:;
/* "lib/Naked/toolshed/c/types.pyx":931
* for key in attributes:
* setattr(tup_obj, key, attributes[key])
* setattr(tup_obj, '_naked_type_', naked_type) # <<<<<<<<<<<<<<
* return tup_obj
*
*/
__pyx_t_7 = PyObject_SetAttr(__pyx_v_tup_obj, __pyx_n_s_naked_type_2, __pyx_v_naked_type); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":932
* setattr(tup_obj, key, attributes[key])
* setattr(tup_obj, '_naked_type_', naked_type)
* return tup_obj # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_v_tup_obj);
__pyx_r = __pyx_v_tup_obj;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":926
* #------------------------------------------------------------------------------
* class XTuple(tuple):
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'): # <<<<<<<<<<<<<<
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XTuple.__new__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_tup_obj);
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":938
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_3_getAttributeDict = {__Pyx_NAMESTR("_getAttributeDict"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_3_getAttributeDict, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_3_getAttributeDict(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_getAttributeDict (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_2_getAttributeDict(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_2_getAttributeDict(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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("_getAttributeDict", 0);
/* "lib/Naked/toolshed/c/types.pyx":939
* #------------------------------------------------------------------------------
* def _getAttributeDict(self):
* return self.__dict__ # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
/* "lib/Naked/toolshed/c/types.pyx":938
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XTuple._getAttributeDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "lib/Naked/toolshed/c/types.pyx":945
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* Python wrapper */
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_5type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_5type = {__Pyx_NAMESTR("type"), (PyCFunction)__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_5type, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_3lib_5Naked_8toolshed_1c_5types_6XTuple_5type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("type (wrapper)", 0);
__pyx_r = __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_4type(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_4type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
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("type", 0);
/* "lib/Naked/toolshed/c/types.pyx":946
* #------------------------------------------------------------------------------
* def type(self):
* if hasattr(self, '_naked_type_'): # <<<<<<<<<<<<<<
* return self._naked_type_
* else:
*/
__pyx_t_1 = PyObject_HasAttr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
/* "lib/Naked/toolshed/c/types.pyx":947
* def type(self):
* if hasattr(self, '_naked_type_'):
* return self._naked_type_ # <<<<<<<<<<<<<<
* else:
* return None
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_naked_type_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
}
/*else*/ {
/* "lib/Naked/toolshed/c/types.pyx":949
* return self._naked_type_
* else:
* return None # <<<<<<<<<<<<<<
*
*
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(Py_None);
__pyx_r = Py_None;
goto __pyx_L0;
}
/* "lib/Naked/toolshed/c/types.pyx":945
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("lib.Naked.toolshed.c.types.XTuple.type", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
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
__Pyx_NAMESTR("types"),
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_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
{&__pyx_n_s_DEBUG_FLAG, __pyx_k_DEBUG_FLAG, sizeof(__pyx_k_DEBUG_FLAG), 0, 0, 1, 1},
{&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
{&__pyx_n_s_NFKD, __pyx_k_NFKD, sizeof(__pyx_k_NFKD), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject, __pyx_k_NakedObject, sizeof(__pyx_k_NakedObject), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject___eq, __pyx_k_NakedObject___eq, sizeof(__pyx_k_NakedObject___eq), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject___init, __pyx_k_NakedObject___init, sizeof(__pyx_k_NakedObject___init), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject___ne, __pyx_k_NakedObject___ne, sizeof(__pyx_k_NakedObject___ne), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject__equal_attributes, __pyx_k_NakedObject__equal_attributes, sizeof(__pyx_k_NakedObject__equal_attributes), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject__equal_type, __pyx_k_NakedObject__equal_type, sizeof(__pyx_k_NakedObject__equal_type), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject__getAttributeDict, __pyx_k_NakedObject__getAttributeDict, sizeof(__pyx_k_NakedObject__getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject_equals, __pyx_k_NakedObject_equals, sizeof(__pyx_k_NakedObject_equals), 0, 0, 1, 1},
{&__pyx_n_s_NakedObject_type, __pyx_k_NakedObject_type, sizeof(__pyx_k_NakedObject_type), 0, 0, 1, 1},
{&__pyx_kp_s_Naked_Framework_Error_unable_to, __pyx_k_Naked_Framework_Error_unable_to, sizeof(__pyx_k_Naked_Framework_Error_unable_to), 0, 0, 1, 0},
{&__pyx_kp_s_Naked_Framework_Error_unable_to_2, __pyx_k_Naked_Framework_Error_unable_to_2, sizeof(__pyx_k_Naked_Framework_Error_unable_to_2), 0, 0, 1, 0},
{&__pyx_n_s_Naked_settings, __pyx_k_Naked_settings, sizeof(__pyx_k_Naked_settings), 0, 0, 1, 1},
{&__pyx_n_s_Naked_toolshed_python, __pyx_k_Naked_toolshed_python, sizeof(__pyx_k_Naked_toolshed_python), 0, 0, 1, 1},
{&__pyx_kp_s_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 0, 1, 0},
{&__pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_k_Users_ces_Desktop_code_naked_li, sizeof(__pyx_k_Users_ces_Desktop_code_naked_li), 0, 0, 1, 0},
{&__pyx_n_s_XDict, __pyx_k_XDict, sizeof(__pyx_k_XDict), 0, 0, 1, 1},
{&__pyx_n_s_XDict___add, __pyx_k_XDict___add, sizeof(__pyx_k_XDict___add), 0, 0, 1, 1},
{&__pyx_n_s_XDict___eq, __pyx_k_XDict___eq, sizeof(__pyx_k_XDict___eq), 0, 0, 1, 1},
{&__pyx_n_s_XDict___iadd, __pyx_k_XDict___iadd, sizeof(__pyx_k_XDict___iadd), 0, 0, 1, 1},
{&__pyx_n_s_XDict___init, __pyx_k_XDict___init, sizeof(__pyx_k_XDict___init), 0, 0, 1, 1},
{&__pyx_n_s_XDict___ne, __pyx_k_XDict___ne, sizeof(__pyx_k_XDict___ne), 0, 0, 1, 1},
{&__pyx_n_s_XDict_conditional_map_to_vals, __pyx_k_XDict_conditional_map_to_vals, sizeof(__pyx_k_XDict_conditional_map_to_vals), 0, 0, 1, 1},
{&__pyx_n_s_XDict_difference, __pyx_k_XDict_difference, sizeof(__pyx_k_XDict_difference), 0, 0, 1, 1},
{&__pyx_n_s_XDict_equals, __pyx_k_XDict_equals, sizeof(__pyx_k_XDict_equals), 0, 0, 1, 1},
{&__pyx_n_s_XDict_intersection, __pyx_k_XDict_intersection, sizeof(__pyx_k_XDict_intersection), 0, 0, 1, 1},
{&__pyx_n_s_XDict_key_xlist, __pyx_k_XDict_key_xlist, sizeof(__pyx_k_XDict_key_xlist), 0, 0, 1, 1},
{&__pyx_n_s_XDict_map_to_vals, __pyx_k_XDict_map_to_vals, sizeof(__pyx_k_XDict_map_to_vals), 0, 0, 1, 1},
{&__pyx_n_s_XDict_max_val, __pyx_k_XDict_max_val, sizeof(__pyx_k_XDict_max_val), 0, 0, 1, 1},
{&__pyx_n_s_XDict_min_val, __pyx_k_XDict_min_val, sizeof(__pyx_k_XDict_min_val), 0, 0, 1, 1},
{&__pyx_n_s_XDict_random, __pyx_k_XDict_random, sizeof(__pyx_k_XDict_random), 0, 0, 1, 1},
{&__pyx_n_s_XDict_random_sample, __pyx_k_XDict_random_sample, sizeof(__pyx_k_XDict_random_sample), 0, 0, 1, 1},
{&__pyx_n_s_XDict_sum_vals, __pyx_k_XDict_sum_vals, sizeof(__pyx_k_XDict_sum_vals), 0, 0, 1, 1},
{&__pyx_n_s_XDict_val_count, __pyx_k_XDict_val_count, sizeof(__pyx_k_XDict_val_count), 0, 0, 1, 1},
{&__pyx_n_s_XDict_val_count_ci, __pyx_k_XDict_val_count_ci, sizeof(__pyx_k_XDict_val_count_ci), 0, 0, 1, 1},
{&__pyx_n_s_XDict_val_xlist, __pyx_k_XDict_val_xlist, sizeof(__pyx_k_XDict_val_xlist), 0, 0, 1, 1},
{&__pyx_n_s_XDict_xitems, __pyx_k_XDict_xitems, sizeof(__pyx_k_XDict_xitems), 0, 0, 1, 1},
{&__pyx_n_s_XFSet, __pyx_k_XFSet, sizeof(__pyx_k_XFSet), 0, 0, 1, 1},
{&__pyx_n_s_XFSet___new, __pyx_k_XFSet___new, sizeof(__pyx_k_XFSet___new), 0, 0, 1, 1},
{&__pyx_n_s_XFSet__getAttributeDict, __pyx_k_XFSet__getAttributeDict, sizeof(__pyx_k_XFSet__getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_XFSet_type, __pyx_k_XFSet_type, sizeof(__pyx_k_XFSet_type), 0, 0, 1, 1},
{&__pyx_n_s_XFSet_xlist, __pyx_k_XFSet_xlist, sizeof(__pyx_k_XFSet_xlist), 0, 0, 1, 1},
{&__pyx_n_s_XFSet_xset, __pyx_k_XFSet_xset, sizeof(__pyx_k_XFSet_xset), 0, 0, 1, 1},
{&__pyx_n_s_XList, __pyx_k_XList, sizeof(__pyx_k_XList), 0, 0, 1, 1},
{&__pyx_n_s_XList___add, __pyx_k_XList___add, sizeof(__pyx_k_XList___add), 0, 0, 1, 1},
{&__pyx_n_s_XList___eq, __pyx_k_XList___eq, sizeof(__pyx_k_XList___eq), 0, 0, 1, 1},
{&__pyx_n_s_XList___iadd, __pyx_k_XList___iadd, sizeof(__pyx_k_XList___iadd), 0, 0, 1, 1},
{&__pyx_n_s_XList___init, __pyx_k_XList___init, sizeof(__pyx_k_XList___init), 0, 0, 1, 1},
{&__pyx_n_s_XList___ne, __pyx_k_XList___ne, sizeof(__pyx_k_XList___ne), 0, 0, 1, 1},
{&__pyx_n_s_XList_conditional_map_to_items, __pyx_k_XList_conditional_map_to_items, sizeof(__pyx_k_XList_conditional_map_to_items), 0, 0, 1, 1},
{&__pyx_n_s_XList_count_ci, __pyx_k_XList_count_ci, sizeof(__pyx_k_XList_count_ci), 0, 0, 1, 1},
{&__pyx_n_s_XList_count_duplicates, __pyx_k_XList_count_duplicates, sizeof(__pyx_k_XList_count_duplicates), 0, 0, 1, 1},
{&__pyx_n_s_XList_difference, __pyx_k_XList_difference, sizeof(__pyx_k_XList_difference), 0, 0, 1, 1},
{&__pyx_n_s_XList_equals, __pyx_k_XList_equals, sizeof(__pyx_k_XList_equals), 0, 0, 1, 1},
{&__pyx_n_s_XList_intersection, __pyx_k_XList_intersection, sizeof(__pyx_k_XList_intersection), 0, 0, 1, 1},
{&__pyx_n_s_XList_join, __pyx_k_XList_join, sizeof(__pyx_k_XList_join), 0, 0, 1, 1},
{&__pyx_n_s_XList_map_to_items, __pyx_k_XList_map_to_items, sizeof(__pyx_k_XList_map_to_items), 0, 0, 1, 1},
{&__pyx_n_s_XList_max, __pyx_k_XList_max, sizeof(__pyx_k_XList_max), 0, 0, 1, 1},
{&__pyx_n_s_XList_min, __pyx_k_XList_min, sizeof(__pyx_k_XList_min), 0, 0, 1, 1},
{&__pyx_n_s_XList_multi_wildcard_match, __pyx_k_XList_multi_wildcard_match, sizeof(__pyx_k_XList_multi_wildcard_match), 0, 0, 1, 1},
{&__pyx_n_s_XList_postfix, __pyx_k_XList_postfix, sizeof(__pyx_k_XList_postfix), 0, 0, 1, 1},
{&__pyx_n_s_XList_prefix, __pyx_k_XList_prefix, sizeof(__pyx_k_XList_prefix), 0, 0, 1, 1},
{&__pyx_n_s_XList_random, __pyx_k_XList_random, sizeof(__pyx_k_XList_random), 0, 0, 1, 1},
{&__pyx_n_s_XList_random_sample, __pyx_k_XList_random_sample, sizeof(__pyx_k_XList_random_sample), 0, 0, 1, 1},
{&__pyx_n_s_XList_remove_duplicates, __pyx_k_XList_remove_duplicates, sizeof(__pyx_k_XList_remove_duplicates), 0, 0, 1, 1},
{&__pyx_n_s_XList_shuffle, __pyx_k_XList_shuffle, sizeof(__pyx_k_XList_shuffle), 0, 0, 1, 1},
{&__pyx_n_s_XList_sum, __pyx_k_XList_sum, sizeof(__pyx_k_XList_sum), 0, 0, 1, 1},
{&__pyx_n_s_XList_surround, __pyx_k_XList_surround, sizeof(__pyx_k_XList_surround), 0, 0, 1, 1},
{&__pyx_n_s_XList_wildcard_match, __pyx_k_XList_wildcard_match, sizeof(__pyx_k_XList_wildcard_match), 0, 0, 1, 1},
{&__pyx_n_s_XList_xfset, __pyx_k_XList_xfset, sizeof(__pyx_k_XList_xfset), 0, 0, 1, 1},
{&__pyx_n_s_XList_xset, __pyx_k_XList_xset, sizeof(__pyx_k_XList_xset), 0, 0, 1, 1},
{&__pyx_n_s_XList_xtuple, __pyx_k_XList_xtuple, sizeof(__pyx_k_XList_xtuple), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap, __pyx_k_XMaxHeap, sizeof(__pyx_k_XMaxHeap), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap___init, __pyx_k_XMaxHeap___init, sizeof(__pyx_k_XMaxHeap___init), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap___len, __pyx_k_XMaxHeap___len, sizeof(__pyx_k_XMaxHeap___len), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap_length, __pyx_k_XMaxHeap_length, sizeof(__pyx_k_XMaxHeap_length), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap_pop, __pyx_k_XMaxHeap_pop, sizeof(__pyx_k_XMaxHeap_pop), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap_push, __pyx_k_XMaxHeap_push, sizeof(__pyx_k_XMaxHeap_push), 0, 0, 1, 1},
{&__pyx_n_s_XMaxHeap_pushpop, __pyx_k_XMaxHeap_pushpop, sizeof(__pyx_k_XMaxHeap_pushpop), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap, __pyx_k_XMinHeap, sizeof(__pyx_k_XMinHeap), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap___init, __pyx_k_XMinHeap___init, sizeof(__pyx_k_XMinHeap___init), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap___len, __pyx_k_XMinHeap___len, sizeof(__pyx_k_XMinHeap___len), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap_length, __pyx_k_XMinHeap_length, sizeof(__pyx_k_XMinHeap_length), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap_pop, __pyx_k_XMinHeap_pop, sizeof(__pyx_k_XMinHeap_pop), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap_push, __pyx_k_XMinHeap_push, sizeof(__pyx_k_XMinHeap_push), 0, 0, 1, 1},
{&__pyx_n_s_XMinHeap_pushpop, __pyx_k_XMinHeap_pushpop, sizeof(__pyx_k_XMinHeap_pushpop), 0, 0, 1, 1},
{&__pyx_n_s_XQueue, __pyx_k_XQueue, sizeof(__pyx_k_XQueue), 0, 0, 1, 1},
{&__pyx_n_s_XQueue___init, __pyx_k_XQueue___init, sizeof(__pyx_k_XQueue___init), 0, 0, 1, 1},
{&__pyx_n_s_XSet, __pyx_k_XSet, sizeof(__pyx_k_XSet), 0, 0, 1, 1},
{&__pyx_n_s_XSet___iadd, __pyx_k_XSet___iadd, sizeof(__pyx_k_XSet___iadd), 0, 0, 1, 1},
{&__pyx_n_s_XSet___init, __pyx_k_XSet___init, sizeof(__pyx_k_XSet___init), 0, 0, 1, 1},
{&__pyx_n_s_XSet___lshift, __pyx_k_XSet___lshift, sizeof(__pyx_k_XSet___lshift), 0, 0, 1, 1},
{&__pyx_n_s_XSet_xfset, __pyx_k_XSet_xfset, sizeof(__pyx_k_XSet_xfset), 0, 0, 1, 1},
{&__pyx_n_s_XSet_xlist, __pyx_k_XSet_xlist, sizeof(__pyx_k_XSet_xlist), 0, 0, 1, 1},
{&__pyx_n_s_XString, __pyx_k_XString, sizeof(__pyx_k_XString), 0, 0, 1, 1},
{&__pyx_n_s_XString___new, __pyx_k_XString___new, sizeof(__pyx_k_XString___new), 0, 0, 1, 1},
{&__pyx_n_s_XString__getAttributeDict, __pyx_k_XString__getAttributeDict, sizeof(__pyx_k_XString__getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_XString_begins, __pyx_k_XString_begins, sizeof(__pyx_k_XString_begins), 0, 0, 1, 1},
{&__pyx_n_s_XString_concat, __pyx_k_XString_concat, sizeof(__pyx_k_XString_concat), 0, 0, 1, 1},
{&__pyx_n_s_XString_contains, __pyx_k_XString_contains, sizeof(__pyx_k_XString_contains), 0, 0, 1, 1},
{&__pyx_n_s_XString_ends, __pyx_k_XString_ends, sizeof(__pyx_k_XString_ends), 0, 0, 1, 1},
{&__pyx_n_s_XString_type, __pyx_k_XString_type, sizeof(__pyx_k_XString_type), 0, 0, 1, 1},
{&__pyx_n_s_XString_unicode, __pyx_k_XString_unicode, sizeof(__pyx_k_XString_unicode), 0, 0, 1, 1},
{&__pyx_n_s_XString_wildcard_match, __pyx_k_XString_wildcard_match, sizeof(__pyx_k_XString_wildcard_match), 0, 0, 1, 1},
{&__pyx_n_s_XString_xsplit, __pyx_k_XString_xsplit, sizeof(__pyx_k_XString_xsplit), 0, 0, 1, 1},
{&__pyx_n_s_XString_xsplit_set, __pyx_k_XString_xsplit_set, sizeof(__pyx_k_XString_xsplit_set), 0, 0, 1, 1},
{&__pyx_n_s_XTuple, __pyx_k_XTuple, sizeof(__pyx_k_XTuple), 0, 0, 1, 1},
{&__pyx_n_s_XTuple___new, __pyx_k_XTuple___new, sizeof(__pyx_k_XTuple___new), 0, 0, 1, 1},
{&__pyx_n_s_XTuple__getAttributeDict, __pyx_k_XTuple__getAttributeDict, sizeof(__pyx_k_XTuple__getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_XTuple_type, __pyx_k_XTuple_type, sizeof(__pyx_k_XTuple_type), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode, __pyx_k_XUnicode, sizeof(__pyx_k_XUnicode), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode2, __pyx_k_XUnicode2, sizeof(__pyx_k_XUnicode2), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode3, __pyx_k_XUnicode3, sizeof(__pyx_k_XUnicode3), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode_2, __pyx_k_XUnicode_2, sizeof(__pyx_k_XUnicode_2), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode_3, __pyx_k_XUnicode_3, sizeof(__pyx_k_XUnicode_3), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___cmp, __pyx_k_XUnicode___cmp, sizeof(__pyx_k_XUnicode___cmp), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___getattr, __pyx_k_XUnicode___getattr, sizeof(__pyx_k_XUnicode___getattr), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___init, __pyx_k_XUnicode___init, sizeof(__pyx_k_XUnicode___init), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___init___locals_XUnicod, __pyx_k_XUnicode___init___locals_XUnicod, sizeof(__pyx_k_XUnicode___init___locals_XUnicod), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___init___locals_XUnicod_2, __pyx_k_XUnicode___init___locals_XUnicod_2, sizeof(__pyx_k_XUnicode___init___locals_XUnicod_2), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___init___locals_XUnicod_3, __pyx_k_XUnicode___init___locals_XUnicod_3, sizeof(__pyx_k_XUnicode___init___locals_XUnicod_3), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___init___locals_XUnicod_4, __pyx_k_XUnicode___init___locals_XUnicod_4, sizeof(__pyx_k_XUnicode___init___locals_XUnicod_4), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___repr, __pyx_k_XUnicode___repr, sizeof(__pyx_k_XUnicode___repr), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode___str, __pyx_k_XUnicode___str, sizeof(__pyx_k_XUnicode___str), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode__getAttributeDict, __pyx_k_XUnicode__getAttributeDict, sizeof(__pyx_k_XUnicode__getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_XUnicode_type, __pyx_k_XUnicode_type, sizeof(__pyx_k_XUnicode_type), 0, 0, 1, 1},
{&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
{&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
{&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
{&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
{&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
{&__pyx_n_s_after, __pyx_k_after, sizeof(__pyx_k_after), 0, 0, 1, 1},
{&__pyx_n_s_another_dict, __pyx_k_another_dict, sizeof(__pyx_k_another_dict), 0, 0, 1, 1},
{&__pyx_n_s_another_list, __pyx_k_another_list, sizeof(__pyx_k_another_list), 0, 0, 1, 1},
{&__pyx_n_s_another_set, __pyx_k_another_set, sizeof(__pyx_k_another_set), 0, 0, 1, 1},
{&__pyx_n_s_attr_dict, __pyx_k_attr_dict, sizeof(__pyx_k_attr_dict), 0, 0, 1, 1},
{&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
{&__pyx_n_s_before, __pyx_k_before, sizeof(__pyx_k_before), 0, 0, 1, 1},
{&__pyx_n_s_begin_string, __pyx_k_begin_string, sizeof(__pyx_k_begin_string), 0, 0, 1, 1},
{&__pyx_n_s_begins, __pyx_k_begins, sizeof(__pyx_k_begins), 0, 0, 1, 1},
{&__pyx_n_s_choice, __pyx_k_choice, sizeof(__pyx_k_choice), 0, 0, 1, 1},
{&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
{&__pyx_n_s_cmp, __pyx_k_cmp, sizeof(__pyx_k_cmp), 0, 0, 1, 1},
{&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
{&__pyx_n_s_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 0, 1, 1},
{&__pyx_n_s_conditional_function, __pyx_k_conditional_function, sizeof(__pyx_k_conditional_function), 0, 0, 1, 1},
{&__pyx_n_s_conditional_map_to_items, __pyx_k_conditional_map_to_items, sizeof(__pyx_k_conditional_map_to_items), 0, 0, 1, 1},
{&__pyx_n_s_conditional_map_to_vals, __pyx_k_conditional_map_to_vals, sizeof(__pyx_k_conditional_map_to_vals), 0, 0, 1, 1},
{&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1},
{&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
{&__pyx_n_s_count_ci, __pyx_k_count_ci, sizeof(__pyx_k_count_ci), 0, 0, 1, 1},
{&__pyx_n_s_count_duplicates, __pyx_k_count_duplicates, sizeof(__pyx_k_count_duplicates), 0, 0, 1, 1},
{&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
{&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
{&__pyx_n_s_delim2, __pyx_k_delim2, sizeof(__pyx_k_delim2), 0, 0, 1, 1},
{&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
{&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
{&__pyx_n_s_dict_obj, __pyx_k_dict_obj, sizeof(__pyx_k_dict_obj), 0, 0, 1, 1},
{&__pyx_n_s_difference, __pyx_k_difference, sizeof(__pyx_k_difference), 0, 0, 1, 1},
{&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
{&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
{&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
{&__pyx_n_s_end_string, __pyx_k_end_string, sizeof(__pyx_k_end_string), 0, 0, 1, 1},
{&__pyx_n_s_ends, __pyx_k_ends, sizeof(__pyx_k_ends), 0, 0, 1, 1},
{&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
{&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1},
{&__pyx_n_s_equal_attributes, __pyx_k_equal_attributes, sizeof(__pyx_k_equal_attributes), 0, 0, 1, 1},
{&__pyx_n_s_equal_type, __pyx_k_equal_type, sizeof(__pyx_k_equal_type), 0, 0, 1, 1},
{&__pyx_n_s_equals, __pyx_k_equals, sizeof(__pyx_k_equals), 0, 0, 1, 1},
{&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
{&__pyx_n_s_first_list, __pyx_k_first_list, sizeof(__pyx_k_first_list), 0, 0, 1, 1},
{&__pyx_n_s_fnmatch, __pyx_k_fnmatch, sizeof(__pyx_k_fnmatch), 0, 0, 1, 1},
{&__pyx_n_s_fnmatchcase, __pyx_k_fnmatchcase, sizeof(__pyx_k_fnmatchcase), 0, 0, 1, 1},
{&__pyx_n_s_getAttributeDict, __pyx_k_getAttributeDict, sizeof(__pyx_k_getAttributeDict), 0, 0, 1, 1},
{&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
{&__pyx_n_s_heappop, __pyx_k_heappop, sizeof(__pyx_k_heappop), 0, 0, 1, 1},
{&__pyx_n_s_heappush, __pyx_k_heappush, sizeof(__pyx_k_heappush), 0, 0, 1, 1},
{&__pyx_n_s_heapq, __pyx_k_heapq, sizeof(__pyx_k_heapq), 0, 0, 1, 1},
{&__pyx_n_s_iadd, __pyx_k_iadd, sizeof(__pyx_k_iadd), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
{&__pyx_n_s_index_2, __pyx_k_index_2, sizeof(__pyx_k_index_2), 0, 0, 1, 1},
{&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
{&__pyx_n_s_initial_iterable, __pyx_k_initial_iterable, sizeof(__pyx_k_initial_iterable), 0, 0, 1, 1},
{&__pyx_n_s_intersection, __pyx_k_intersection, sizeof(__pyx_k_intersection), 0, 0, 1, 1},
{&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
{&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
{&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
{&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
{&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
{&__pyx_n_s_key_xlist, __pyx_k_key_xlist, sizeof(__pyx_k_key_xlist), 0, 0, 1, 1},
{&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
{&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
{&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
{&__pyx_n_s_lib_Naked_toolshed_c_types, __pyx_k_lib_Naked_toolshed_c_types, sizeof(__pyx_k_lib_Naked_toolshed_c_types), 0, 0, 1, 1},
{&__pyx_n_s_list_obj, __pyx_k_list_obj, sizeof(__pyx_k_list_obj), 0, 0, 1, 1},
{&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
{&__pyx_n_s_lshift, __pyx_k_lshift, sizeof(__pyx_k_lshift), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_map_to_items, __pyx_k_map_to_items, sizeof(__pyx_k_map_to_items), 0, 0, 1, 1},
{&__pyx_n_s_map_to_vals, __pyx_k_map_to_vals, sizeof(__pyx_k_map_to_vals), 0, 0, 1, 1},
{&__pyx_n_s_mapped_function, __pyx_k_mapped_function, sizeof(__pyx_k_mapped_function), 0, 0, 1, 1},
{&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
{&__pyx_n_s_max_length, __pyx_k_max_length, sizeof(__pyx_k_max_length), 0, 0, 1, 1},
{&__pyx_n_s_max_val, __pyx_k_max_val, sizeof(__pyx_k_max_val), 0, 0, 1, 1},
{&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
{&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
{&__pyx_n_s_min_val, __pyx_k_min_val, sizeof(__pyx_k_min_val), 0, 0, 1, 1},
{&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
{&__pyx_n_s_multi_wildcard_match, __pyx_k_multi_wildcard_match, sizeof(__pyx_k_multi_wildcard_match), 0, 0, 1, 1},
{&__pyx_n_s_naked_type, __pyx_k_naked_type, sizeof(__pyx_k_naked_type), 0, 0, 1, 1},
{&__pyx_n_s_naked_type_2, __pyx_k_naked_type_2, sizeof(__pyx_k_naked_type_2), 0, 0, 1, 1},
{&__pyx_n_s_naked_u_string, __pyx_k_naked_u_string, sizeof(__pyx_k_naked_u_string), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_ne, __pyx_k_ne, sizeof(__pyx_k_ne), 0, 0, 1, 1},
{&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
{&__pyx_n_s_new_dict, __pyx_k_new_dict, sizeof(__pyx_k_new_dict), 0, 0, 1, 1},
{&__pyx_n_s_nkd_fnmatchcase, __pyx_k_nkd_fnmatchcase, sizeof(__pyx_k_nkd_fnmatchcase), 0, 0, 1, 1},
{&__pyx_n_s_norm_text, __pyx_k_norm_text, sizeof(__pyx_k_norm_text), 0, 0, 1, 1},
{&__pyx_n_s_norm_unicode, __pyx_k_norm_unicode, sizeof(__pyx_k_norm_unicode), 0, 0, 1, 1},
{&__pyx_n_s_normalize, __pyx_k_normalize, sizeof(__pyx_k_normalize), 0, 0, 1, 1},
{&__pyx_n_s_number_of_items, __pyx_k_number_of_items, sizeof(__pyx_k_number_of_items), 0, 0, 1, 1},
{&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
{&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
{&__pyx_n_s_other_dict, __pyx_k_other_dict, sizeof(__pyx_k_other_dict), 0, 0, 1, 1},
{&__pyx_n_s_other_lists, __pyx_k_other_lists, sizeof(__pyx_k_other_lists), 0, 0, 1, 1},
{&__pyx_n_s_other_obj, __pyx_k_other_obj, sizeof(__pyx_k_other_obj), 0, 0, 1, 1},
{&__pyx_n_s_other_string, __pyx_k_other_string, sizeof(__pyx_k_other_string), 0, 0, 1, 1},
{&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
{&__pyx_n_s_postfix, __pyx_k_postfix, sizeof(__pyx_k_postfix), 0, 0, 1, 1},
{&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
{&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
{&__pyx_n_s_priority, __pyx_k_priority, sizeof(__pyx_k_priority), 0, 0, 1, 1},
{&__pyx_n_s_push, __pyx_k_push, sizeof(__pyx_k_push), 0, 0, 1, 1},
{&__pyx_n_s_pushpop, __pyx_k_pushpop, sizeof(__pyx_k_pushpop), 0, 0, 1, 1},
{&__pyx_n_s_py_major_version, __pyx_k_py_major_version, sizeof(__pyx_k_py_major_version), 0, 0, 1, 1},
{&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
{&__pyx_n_s_queue, __pyx_k_queue, sizeof(__pyx_k_queue), 0, 0, 1, 1},
{&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
{&__pyx_n_s_random_key_list, __pyx_k_random_key_list, sizeof(__pyx_k_random_key_list), 0, 0, 1, 1},
{&__pyx_n_s_random_sample, __pyx_k_random_sample, sizeof(__pyx_k_random_sample), 0, 0, 1, 1},
{&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
{&__pyx_n_s_remove_duplicates, __pyx_k_remove_duplicates, sizeof(__pyx_k_remove_duplicates), 0, 0, 1, 1},
{&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
{&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
{&__pyx_n_s_result_list, __pyx_k_result_list, sizeof(__pyx_k_result_list), 0, 0, 1, 1},
{&__pyx_n_s_return_list, __pyx_k_return_list, sizeof(__pyx_k_return_list), 0, 0, 1, 1},
{&__pyx_n_s_sample, __pyx_k_sample, sizeof(__pyx_k_sample), 0, 0, 1, 1},
{&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
{&__pyx_n_s_separator, __pyx_k_separator, sizeof(__pyx_k_separator), 0, 0, 1, 1},
{&__pyx_n_s_set_obj, __pyx_k_set_obj, sizeof(__pyx_k_set_obj), 0, 0, 1, 1},
{&__pyx_n_s_shuffle, __pyx_k_shuffle, sizeof(__pyx_k_shuffle), 0, 0, 1, 1},
{&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
{&__pyx_n_s_split_delimiter, __pyx_k_split_delimiter, sizeof(__pyx_k_split_delimiter), 0, 0, 1, 1},
{&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
{&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
{&__pyx_n_s_str_list, __pyx_k_str_list, sizeof(__pyx_k_str_list), 0, 0, 1, 1},
{&__pyx_n_s_str_obj, __pyx_k_str_obj, sizeof(__pyx_k_str_obj), 0, 0, 1, 1},
{&__pyx_n_s_string_text, __pyx_k_string_text, sizeof(__pyx_k_string_text), 0, 0, 1, 1},
{&__pyx_n_s_strings, __pyx_k_strings, sizeof(__pyx_k_strings), 0, 0, 1, 1},
{&__pyx_n_s_subitem, __pyx_k_subitem, sizeof(__pyx_k_subitem), 0, 0, 1, 1},
{&__pyx_n_s_substring, __pyx_k_substring, sizeof(__pyx_k_substring), 0, 0, 1, 1},
{&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
{&__pyx_n_s_sum_vals, __pyx_k_sum_vals, sizeof(__pyx_k_sum_vals), 0, 0, 1, 1},
{&__pyx_n_s_surround, __pyx_k_surround, sizeof(__pyx_k_surround), 0, 0, 1, 1},
{&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
{&__pyx_n_s_temp_list, __pyx_k_temp_list, sizeof(__pyx_k_temp_list), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_test_string, __pyx_k_test_string, sizeof(__pyx_k_test_string), 0, 0, 1, 1},
{&__pyx_n_s_test_value, __pyx_k_test_value, sizeof(__pyx_k_test_value), 0, 0, 1, 1},
{&__pyx_n_s_the_attribute, __pyx_k_the_attribute, sizeof(__pyx_k_the_attribute), 0, 0, 1, 1},
{&__pyx_n_s_the_key, __pyx_k_the_key, sizeof(__pyx_k_the_key), 0, 0, 1, 1},
{&__pyx_n_s_the_list, __pyx_k_the_list, sizeof(__pyx_k_the_list), 0, 0, 1, 1},
{&__pyx_n_s_the_object, __pyx_k_the_object, sizeof(__pyx_k_the_object), 0, 0, 1, 1},
{&__pyx_n_s_the_set, __pyx_k_the_set, sizeof(__pyx_k_the_set), 0, 0, 1, 1},
{&__pyx_n_s_the_string_text, __pyx_k_the_string_text, sizeof(__pyx_k_the_string_text), 0, 0, 1, 1},
{&__pyx_n_s_the_tuple, __pyx_k_the_tuple, sizeof(__pyx_k_the_tuple), 0, 0, 1, 1},
{&__pyx_n_s_tup_obj, __pyx_k_tup_obj, sizeof(__pyx_k_tup_obj), 0, 0, 1, 1},
{&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
{&__pyx_n_s_unicode, __pyx_k_unicode, sizeof(__pyx_k_unicode), 0, 0, 1, 1},
{&__pyx_n_s_unicodedata, __pyx_k_unicodedata, sizeof(__pyx_k_unicodedata), 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_val_count, __pyx_k_val_count, sizeof(__pyx_k_val_count), 0, 0, 1, 1},
{&__pyx_n_s_val_count_ci, __pyx_k_val_count_ci, sizeof(__pyx_k_val_count_ci), 0, 0, 1, 1},
{&__pyx_n_s_val_xlist, __pyx_k_val_xlist, sizeof(__pyx_k_val_xlist), 0, 0, 1, 1},
{&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
{&__pyx_n_s_value_name, __pyx_k_value_name, sizeof(__pyx_k_value_name), 0, 0, 1, 1},
{&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
{&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
{&__pyx_n_s_wc, __pyx_k_wc, sizeof(__pyx_k_wc), 0, 0, 1, 1},
{&__pyx_n_s_wc_list, __pyx_k_wc_list, sizeof(__pyx_k_wc_list), 0, 0, 1, 1},
{&__pyx_n_s_wildcard, __pyx_k_wildcard, sizeof(__pyx_k_wildcard), 0, 0, 1, 1},
{&__pyx_n_s_wildcard_match, __pyx_k_wildcard_match, sizeof(__pyx_k_wildcard_match), 0, 0, 1, 1},
{&__pyx_n_s_wildcards, __pyx_k_wildcards, sizeof(__pyx_k_wildcards), 0, 0, 1, 1},
{&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
{&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
{&__pyx_n_s_xfset, __pyx_k_xfset, sizeof(__pyx_k_xfset), 0, 0, 1, 1},
{&__pyx_n_s_xitems, __pyx_k_xitems, sizeof(__pyx_k_xitems), 0, 0, 1, 1},
{&__pyx_n_s_xlist, __pyx_k_xlist, sizeof(__pyx_k_xlist), 0, 0, 1, 1},
{&__pyx_n_s_xset, __pyx_k_xset, sizeof(__pyx_k_xset), 0, 0, 1, 1},
{&__pyx_n_s_xsplit, __pyx_k_xsplit, sizeof(__pyx_k_xsplit), 0, 0, 1, 1},
{&__pyx_n_s_xsplit_set, __pyx_k_xsplit_set, sizeof(__pyx_k_xsplit_set), 0, 0, 1, 1},
{&__pyx_n_s_xtuple, __pyx_k_xtuple, sizeof(__pyx_k_xtuple), 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_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __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 = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __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 = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __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);
/* "lib/Naked/toolshed/c/types.pyx":107
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Naked_Framework_Error_unable_to); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
/* "lib/Naked/toolshed/c/types.pyx":126
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XDict with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Naked_Framework_Error_unable_to); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__2);
__Pyx_GIVEREF(__pyx_tuple__2);
/* "lib/Naked/toolshed/c/types.pyx":338
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Naked_Framework_Error_unable_to_2); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__3);
__Pyx_GIVEREF(__pyx_tuple__3);
/* "lib/Naked/toolshed/c/types.pyx":358
* except Exception as e:
* if DEBUG_FLAG:
* sys.stderr.write("Naked Framework Error: unable to combine XList with parameter provided (Naked.toolshed.types.py)") # <<<<<<<<<<<<<<
* raise e
*
*/
__pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Naked_Framework_Error_unable_to_2); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__4);
__Pyx_GIVEREF(__pyx_tuple__4);
/* "lib/Naked/toolshed/c/types.pyx":574
* from fnmatch import fnmatchcase
* self.nkd_fnmatchcase = fnmatchcase
* wc_list = wildcards.split('|') # <<<<<<<<<<<<<<
* return_list = []
* for wc in wc_list:
*/
__pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s__6); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__7);
__Pyx_GIVEREF(__pyx_tuple__7);
/* "lib/Naked/toolshed/c/types.pyx":851
* from unicodedata import normalize
* if version_info[0] == 2:
* return normalize('NFKD', self.decode('UTF-8')) # <<<<<<<<<<<<<<
* else:
* return normalize('NFKD', self)
*/
__pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_UTF_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__10);
__Pyx_GIVEREF(__pyx_tuple__10);
/* "lib/Naked/toolshed/c/types.pyx":864
*
* class XUnicode_2(unicode):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode2'): # <<<<<<<<<<<<<<
* str_obj = unicode.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
__pyx_tuple__11 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_the_string_text, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_str_obj, __pyx_n_s_key); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__11);
__Pyx_GIVEREF(__pyx_tuple__11);
__pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_new, 864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":873
*
* class XUnicode_3(str):
* def __new__(cls, the_string_text, attributes={}, naked_type='XUnicode3'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, the_string_text)
* if len(attributes) > 0:
*/
__pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_the_string_text, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_str_obj, __pyx_n_s_key); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__13);
__Pyx_GIVEREF(__pyx_tuple__13);
__pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_new, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":885
* self.obj = XUnicode_2(norm_text, attributes)
* self.norm_unicode = norm_text
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string # <<<<<<<<<<<<<<
* elif sys.version_info[0] == 3:
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*/
__pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__15);
__Pyx_GIVEREF(__pyx_tuple__15);
/* "lib/Naked/toolshed/c/types.pyx":887
* self.naked_u_string = self.obj.encode('utf-8') # utf-8 encoded byte string
* elif sys.version_info[0] == 3:
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ? # <<<<<<<<<<<<<<
*
* def __str__(self):
*/
__pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__16);
__Pyx_GIVEREF(__pyx_tuple__16);
/* "lib/Naked/toolshed/c/types.pyx":17
* class NakedObject(object):
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'): # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_tuple__17 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_key); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__17);
__Pyx_GIVEREF(__pyx_tuple__17);
__pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 17, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":27
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__19);
__Pyx_GIVEREF(__pyx_tuple__19);
__pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getAttributeDict, 27, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":34
* # returns boolean for type of instance == type of test parameter instance
* #------------------------------------------------------------------------------
* def _equal_type(self, other_obj): # <<<<<<<<<<<<<<
* return type(self) == type(other_obj)
*
*/
__pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__21);
__Pyx_GIVEREF(__pyx_tuple__21);
__pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_equal_type, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":41
* # returns boolean for instance.__dict__ == test parameter .__dict__ (attribute comparison)
* #------------------------------------------------------------------------------
* def _equal_attributes(self, other_obj): # <<<<<<<<<<<<<<
* return self.__dict__ == other_obj.__dict__
*
*/
__pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__23);
__Pyx_GIVEREF(__pyx_tuple__23);
__pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_equal_attributes, 41, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":47
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__25);
__Pyx_GIVEREF(__pyx_tuple__25);
__pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_eq, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":53
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_tuple__27 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__27);
__Pyx_GIVEREF(__pyx_tuple__27);
__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_ne, 53, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":65
* # **NEED TO OVERRIDE IN CLASSES THAT INHERIT
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* return self._equal_type(other_obj) and self._equal_attributes(other_obj)
*
*/
__pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__29);
__Pyx_GIVEREF(__pyx_tuple__29);
__pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_equals, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":72
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__31);
__Pyx_GIVEREF(__pyx_tuple__31);
__pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_type, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":83
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject):
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'): # <<<<<<<<<<<<<<
* dict.__init__(self, dict_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_tuple__33 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_dict_obj, __pyx_n_s_attributes, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__33);
__Pyx_GIVEREF(__pyx_tuple__33);
__pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 83, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":96
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __add__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
__pyx_tuple__35 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_other_dict, __pyx_n_s_attr_dict, __pyx_n_s_key, __pyx_n_s_e); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__35);
__Pyx_GIVEREF(__pyx_tuple__35);
__pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_add, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":115
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __iadd__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
__pyx_tuple__37 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_other_dict, __pyx_n_s_attr_dict, __pyx_n_s_key, __pyx_n_s_e); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__37);
__Pyx_GIVEREF(__pyx_tuple__37);
__pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_iadd, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":132
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__39);
__Pyx_GIVEREF(__pyx_tuple__39);
__pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_eq, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":138
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_tuple__41 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__41);
__Pyx_GIVEREF(__pyx_tuple__41);
__pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_ne, 138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":149
* # tests for equality of the XDict (type, attributes, dictionary equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj):
*/
__pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__43);
__Pyx_GIVEREF(__pyx_tuple__43);
__pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_equals, 149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":167
* # Test: test_xdict_conditional_map
* #------------------------------------------------------------------------------
* def conditional_map_to_vals(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for key, value in self.xitems():
* if conditional_function(key):
*/
__pyx_tuple__45 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_conditional_function, __pyx_n_s_mapped_function, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__45);
__Pyx_GIVEREF(__pyx_tuple__45);
__pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_conditional_map_to_vals, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":178
* # Test: test_xdict_map_to_vals
* #------------------------------------------------------------------------------
* def map_to_vals(self, mapped_function): # <<<<<<<<<<<<<<
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems():
*/
__pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mapped_function, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__47);
__Pyx_GIVEREF(__pyx_tuple__47);
__pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_map_to_vals, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":189
* # Test: test_xdict_val_xlist
* #------------------------------------------------------------------------------
* def val_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.values(), self._getAttributeDict())
*
*/
__pyx_tuple__49 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__49);
__Pyx_GIVEREF(__pyx_tuple__49);
__pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_val_xlist, 189, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":196
* # Test: test_xdict_max_val, test_xdict_max_val_strings (strings are alphabetic if not numerals)
* #------------------------------------------------------------------------------
* def max_val(self): # <<<<<<<<<<<<<<
* return max(zip(self.values(), self.keys()))
*
*/
__pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__51);
__Pyx_GIVEREF(__pyx_tuple__51);
__pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_max_val, 196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":202
* # [ min_val method ] (tuple of minimum value and associated key)
* #------------------------------------------------------------------------------
* def min_val(self): # <<<<<<<<<<<<<<
* return min(zip(self.values(), self.keys()))
*
*/
__pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__53);
__Pyx_GIVEREF(__pyx_tuple__53);
__pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_min_val, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":209
* # returns sum of all values in the dictionary
* #------------------------------------------------------------------------------
* def sum_vals(self): # <<<<<<<<<<<<<<
* return sum(self.values())
*
*/
__pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__55);
__Pyx_GIVEREF(__pyx_tuple__55);
__pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_sum_vals, 209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":218
* # Tests: test_xdict_val_count_string, test_xdict_val_count_integer
* #------------------------------------------------------------------------------
* def val_count(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
__pyx_tuple__57 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value_name, __pyx_n_s_count, __pyx_n_s_test_value); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__57);
__Pyx_GIVEREF(__pyx_tuple__57);
__pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_val_count, 218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":231
* # Test: test_xdict_val_count_ci
* #------------------------------------------------------------------------------
* def val_count_ci(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
__pyx_tuple__59 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_value_name, __pyx_n_s_count, __pyx_n_s_test_value); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__59);
__Pyx_GIVEREF(__pyx_tuple__59);
__pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_val_count_ci, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":250
* # Tests: test_xdict_key_difference, test_xdict_key_difference_when_none_present
* #------------------------------------------------------------------------------
* def difference(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) - set(another_dict.keys())
*
*/
__pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_dict); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__61);
__Pyx_GIVEREF(__pyx_tuple__61);
__pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_difference, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":258
* # Tests: test_xdict_key_intersection, test_xdict_key_intersection_when_none_present
* #------------------------------------------------------------------------------
* def intersection(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) & set(another_dict.keys())
*
*/
__pyx_tuple__63 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_dict); if (unlikely(!__pyx_tuple__63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__63);
__Pyx_GIVEREF(__pyx_tuple__63);
__pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_intersection, 258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":266
* # Test: test_xdict_key_xlist
* #------------------------------------------------------------------------------
* def key_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.keys(), self._getAttributeDict())
*
*/
__pyx_tuple__65 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__65);
__Pyx_GIVEREF(__pyx_tuple__65);
__pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_key_xlist, 266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":274
* # Test: test_xdict_key_random
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* from Naked.toolshed.python import py_major_version
*/
__pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_random, __pyx_n_s_py_major_version, __pyx_n_s_random_key_list, __pyx_n_s_the_key); if (unlikely(!__pyx_tuple__67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__67);
__Pyx_GIVEREF(__pyx_tuple__67);
__pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_random, 274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":286
* # Test: test_xdict_key_random_sample
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* random_key_list = random.sample(self.keys(), number_of_items)
*/
__pyx_tuple__69 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_number_of_items, __pyx_n_s_random, __pyx_n_s_random_key_list, __pyx_n_s_new_dict, __pyx_n_s_item); if (unlikely(!__pyx_tuple__69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__69);
__Pyx_GIVEREF(__pyx_tuple__69);
__pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_random_sample, 286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":300
* # Test: test_xdict_xitems
* #------------------------------------------------------------------------------
* def xitems(self): # <<<<<<<<<<<<<<
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2:
*/
__pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_py_major_version); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__71);
__Pyx_GIVEREF(__pyx_tuple__71);
__pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xitems, 300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":312
* #------------------------------------------------------------------------------
* class XList(list, NakedObject):
* def __init__(self, list_obj, attributes={}, naked_type='XList'): # <<<<<<<<<<<<<<
* list.__init__(self, list_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_tuple__73 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_list_obj, __pyx_n_s_attributes, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__73);
__Pyx_GIVEREF(__pyx_tuple__73);
__pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":324
* # extends XList with one or more other lists (`*other_lists`)
* #------------------------------------------------------------------------------
* def __add__(self, *other_lists): # <<<<<<<<<<<<<<
* try:
* for the_list in other_lists:
*/
__pyx_tuple__75 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_other_lists, __pyx_n_s_the_list, __pyx_n_s_attr_dict, __pyx_n_s_key, __pyx_n_s_e); if (unlikely(!__pyx_tuple__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__75);
__Pyx_GIVEREF(__pyx_tuple__75);
__pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_add, 324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":345
* # extends XList with one other list (`another_list`)
* #------------------------------------------------------------------------------
* def __iadd__(self, another_list): # <<<<<<<<<<<<<<
* try:
* #add attributes if it is an XList
*/
__pyx_tuple__77 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_another_list, __pyx_n_s_attr_dict, __pyx_n_s_key, __pyx_n_s_e); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__77);
__Pyx_GIVEREF(__pyx_tuple__77);
__pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_iadd, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":364
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__79);
__Pyx_GIVEREF(__pyx_tuple__79);
__pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_eq, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":370
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_tuple__81 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_other_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__81);
__Pyx_GIVEREF(__pyx_tuple__81);
__pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_ne, 370, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":381
* # tests for equality of the XList (type, attributes, list equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj):
*/
__pyx_tuple__83 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_obj); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__83);
__Pyx_GIVEREF(__pyx_tuple__83);
__pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_equals, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":402
* # Pass separator character(s) as an argument to the method
* #------------------------------------------------------------------------------
* def join(self, separator=""): # <<<<<<<<<<<<<<
* return separator.join(self)
*
*/
__pyx_tuple__85 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_separator); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__85);
__Pyx_GIVEREF(__pyx_tuple__85);
__pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_join, 402, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_tuple__87 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__5)); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__87);
__Pyx_GIVEREF(__pyx_tuple__87);
/* "lib/Naked/toolshed/c/types.pyx":409
* # Append a string to each list item string
* #------------------------------------------------------------------------------
* def postfix(self, after): # <<<<<<<<<<<<<<
* return [ "".join([x, after]) for x in self ]
*
*/
__pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_after, __pyx_n_s_x); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__88);
__Pyx_GIVEREF(__pyx_tuple__88);
__pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_postfix, 409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":416
* # Prepend a string to each list item string
* #------------------------------------------------------------------------------
* def prefix(self, before): # <<<<<<<<<<<<<<
* return [ "".join([before, x]) for x in self ]
*
*/
__pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_before, __pyx_n_s_x); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__90);
__Pyx_GIVEREF(__pyx_tuple__90);
__pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_prefix, 416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":423
* # Surround each list item string with a before and after string argument passed to the method
* #------------------------------------------------------------------------------
* def surround(self, before, after=""): # <<<<<<<<<<<<<<
* if after == "":
* after = before
*/
__pyx_tuple__92 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_before, __pyx_n_s_after, __pyx_n_s_x); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__92);
__Pyx_GIVEREF(__pyx_tuple__92);
__pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_surround, 423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_tuple__94 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__5)); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__94);
__Pyx_GIVEREF(__pyx_tuple__94);
/* "lib/Naked/toolshed/c/types.pyx":434
* # return maximum value from the list items
* #------------------------------------------------------------------------------
* def max(self): # <<<<<<<<<<<<<<
* return max(self)
*
*/
__pyx_tuple__95 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__95);
__Pyx_GIVEREF(__pyx_tuple__95);
__pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_max, 434, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":441
* # return minimum value from the list items
* #------------------------------------------------------------------------------
* def min(self): # <<<<<<<<<<<<<<
* return min(self)
*
*/
__pyx_tuple__97 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__97);
__Pyx_GIVEREF(__pyx_tuple__97);
__pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_min, 441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":448
* # return the sum of all list items
* #------------------------------------------------------------------------------
* def sum(self): # <<<<<<<<<<<<<<
* return sum(self)
*
*/
__pyx_tuple__99 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__99);
__Pyx_GIVEREF(__pyx_tuple__99);
__pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_sum, 448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":458
* # returns an integer count of number of duplicate values
* #------------------------------------------------------------------------------
* def count_duplicates(self): # <<<<<<<<<<<<<<
* return len(self) - len(set(self))
*
*/
__pyx_tuple__101 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__101)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__101);
__Pyx_GIVEREF(__pyx_tuple__101);
__pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_count_duplicates, 458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":465
* # returns a new XList with duplicates removed
* #------------------------------------------------------------------------------
* def remove_duplicates(self): # <<<<<<<<<<<<<<
* return XList( set(self), self._getAttributeDict() )
*
*/
__pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__103)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__103);
__Pyx_GIVEREF(__pyx_tuple__103);
__pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_remove_duplicates, 465, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":472
* # returns a set containing items in XList that are not contained in `another_list`
* #------------------------------------------------------------------------------
* def difference(self, another_list): # <<<<<<<<<<<<<<
* return set(self) - set(another_list)
*
*/
__pyx_tuple__105 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_list); if (unlikely(!__pyx_tuple__105)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__105);
__Pyx_GIVEREF(__pyx_tuple__105);
__pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_difference, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":479
* # returns a set containing items that are in both XList and `another_list`
* #------------------------------------------------------------------------------
* def intersection(self, another_list): # <<<<<<<<<<<<<<
* return set(self) & set(another_list)
*
*/
__pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_list); if (unlikely(!__pyx_tuple__107)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__107);
__Pyx_GIVEREF(__pyx_tuple__107);
__pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_intersection, 479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":489
* # returns original XList with modification of each item based upon `mapped_function`
* #------------------------------------------------------------------------------
* def map_to_items(self, mapped_function): # <<<<<<<<<<<<<<
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self):
*/
__pyx_tuple__109 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mapped_function, __pyx_n_s_index_2, __pyx_n_s_item); if (unlikely(!__pyx_tuple__109)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__109);
__Pyx_GIVEREF(__pyx_tuple__109);
__pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_map_to_items, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":500
* # `conditional_function` with change performed as defined in `mapped_function`
* #------------------------------------------------------------------------------
* def conditional_map_to_items(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for index, item in enumerate(self):
* if conditional_function(item):
*/
__pyx_tuple__111 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_conditional_function, __pyx_n_s_mapped_function, __pyx_n_s_index_2, __pyx_n_s_item); if (unlikely(!__pyx_tuple__111)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__111);
__Pyx_GIVEREF(__pyx_tuple__111);
__pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_conditional_map_to_items, 500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":513
* # returns an integer count of the number of case-insensitive items that match `test_string`
* #------------------------------------------------------------------------------
* def count_ci(self, test_string): # <<<<<<<<<<<<<<
* count = 0
* for item in self:
*/
__pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_test_string, __pyx_n_s_count, __pyx_n_s_item); if (unlikely(!__pyx_tuple__113)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__113);
__Pyx_GIVEREF(__pyx_tuple__113);
__pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_count_ci, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":527
* # returns a single item list with a random element from the original XList
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* return random.choice(self)
*/
__pyx_tuple__115 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_random); if (unlikely(!__pyx_tuple__115)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__115);
__Pyx_GIVEREF(__pyx_tuple__115);
__pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_random, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":536
* # number of items determined by the `number_of_items` argument
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* return random.sample(self, number_of_items)
*/
__pyx_tuple__117 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_number_of_items, __pyx_n_s_random); if (unlikely(!__pyx_tuple__117)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__117);
__Pyx_GIVEREF(__pyx_tuple__117);
__pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_random_sample, 536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":544
* # randomly shuffle the contents of the list
* #------------------------------------------------------------------------------
* def shuffle(self): # <<<<<<<<<<<<<<
* import random
* random.shuffle(self)
*/
__pyx_tuple__119 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_random); if (unlikely(!__pyx_tuple__119)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__119);
__Pyx_GIVEREF(__pyx_tuple__119);
__pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_shuffle, 544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":556
* # returns a list of items that match the `wildcard` argument
* #------------------------------------------------------------------------------
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
__pyx_tuple__121 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_wildcard, __pyx_n_s_fnmatchcase, __pyx_n_s_x); if (unlikely(!__pyx_tuple__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__121);
__Pyx_GIVEREF(__pyx_tuple__121);
__pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_wildcard_match, 556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":568
* # returns a list of items that match one or more | separated wildcards passed as string
* #------------------------------------------------------------------------------
* def multi_wildcard_match(self, wildcards): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
__pyx_tuple__123 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_wildcards, __pyx_n_s_fnmatchcase, __pyx_n_s_wc_list, __pyx_n_s_return_list, __pyx_n_s_wc, __pyx_n_s_temp_list, __pyx_n_s_result, __pyx_n_s_x); if (unlikely(!__pyx_tuple__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__123);
__Pyx_GIVEREF(__pyx_tuple__123);
__pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_multi_wildcard_match, 568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":589
* # return an XSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(set(self), attr_dict)
*/
__pyx_tuple__125 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__125);
__Pyx_GIVEREF(__pyx_tuple__125);
__pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xset, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":597
* # return an XFSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(set(self), attr_dict)
*/
__pyx_tuple__127 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__127)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__127);
__Pyx_GIVEREF(__pyx_tuple__127);
__pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xfset, 597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":605
* # returns an XTuple with XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xtuple(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XTuple(tuple(self), attr_dict)
*/
__pyx_tuple__129 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__129);
__Pyx_GIVEREF(__pyx_tuple__129);
__pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xtuple, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":615
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
__pyx_tuple__131 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_attributes, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__131);
__Pyx_GIVEREF(__pyx_tuple__131);
__pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":621
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_tuple__133 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__133);
__Pyx_GIVEREF(__pyx_tuple__133);
__pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_len, 621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":625
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
__pyx_tuple__135 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_the_object, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__135);
__Pyx_GIVEREF(__pyx_tuple__135);
__pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_push, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":630
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_tuple__137 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__137);
__Pyx_GIVEREF(__pyx_tuple__137);
__pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_pop, 630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":637
*
* # push new object and return the highest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
__pyx_tuple__139 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_the_object, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__139);
__Pyx_GIVEREF(__pyx_tuple__139);
__pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_pushpop, 637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":646
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_tuple__141 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__141)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__141);
__Pyx_GIVEREF(__pyx_tuple__141);
__pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_length, 646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":655
* from heapq import heappush, heappop
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
__pyx_tuple__143 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_attributes, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__143)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__143);
__Pyx_GIVEREF(__pyx_tuple__143);
__pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":662
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__145);
__Pyx_GIVEREF(__pyx_tuple__145);
__pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_len, 662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":666
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
__pyx_tuple__147 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_the_object, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__147);
__Pyx_GIVEREF(__pyx_tuple__147);
__pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_push, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":671
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_tuple__149 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__149);
__Pyx_GIVEREF(__pyx_tuple__149);
__pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_pop, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":678
*
* # push new object and return the lowest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
__pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_the_object, __pyx_n_s_priority); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__151);
__Pyx_GIVEREF(__pyx_tuple__151);
__pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_pushpop, 678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":687
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__153);
__Pyx_GIVEREF(__pyx_tuple__153);
__pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_length, 687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":697
* from collections import deque
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'): # <<<<<<<<<<<<<<
* deque.__init__(self, initial_iterable, max_length)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_tuple__155 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_initial_iterable, __pyx_n_s_attributes, __pyx_n_s_max_length, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__155)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__155);
__Pyx_GIVEREF(__pyx_tuple__155);
__pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":708
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject):
* def __init__(self, set_obj, attributes={}, naked_type='XSet'): # <<<<<<<<<<<<<<
* set.__init__(self, set_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_tuple__157 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_set_obj, __pyx_n_s_attributes, __pyx_n_s_naked_type); if (unlikely(!__pyx_tuple__157)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__157);
__Pyx_GIVEREF(__pyx_tuple__157);
__pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":713
*
* # << operator is overloaded to extend the XSet with a second set
* def __lshift__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
__pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_set); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__159);
__Pyx_GIVEREF(__pyx_tuple__159);
__pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_lshift, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":718
*
* # += operator overload to extend the XSet with a second set
* def __iadd__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
__pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_another_set); if (unlikely(!__pyx_tuple__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__161);
__Pyx_GIVEREF(__pyx_tuple__161);
__pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_iadd, 718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":722
* return self
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict)
*/
__pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__163)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__163);
__Pyx_GIVEREF(__pyx_tuple__163);
__pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xlist, 722, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":726
* return XList(list(self), attr_dict)
*
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(self, attr_dict)
*/
__pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__165)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__165);
__Pyx_GIVEREF(__pyx_tuple__165);
__pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xfset, 726, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":736
* #------------------------------------------------------------------------------
* class XFSet(frozenset):
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"): # <<<<<<<<<<<<<<
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0:
*/
__pyx_tuple__167 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_the_set, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_set_obj, __pyx_n_s_key); if (unlikely(!__pyx_tuple__167)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__167);
__Pyx_GIVEREF(__pyx_tuple__167);
__pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_new, 736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":744
* return set_obj
*
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__169)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__169);
__Pyx_GIVEREF(__pyx_tuple__169);
__pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getAttributeDict, 744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":747
* return self.__dict__
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict, naked_type="XList")
*/
__pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__171);
__Pyx_GIVEREF(__pyx_tuple__171);
__pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xlist, 747, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":751
* return XList(list(self), attr_dict, naked_type="XList")
*
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(self, attr_dict, naked_type="XSet")
*/
__pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr_dict); if (unlikely(!__pyx_tuple__173)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__173);
__Pyx_GIVEREF(__pyx_tuple__173);
__pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xset, 751, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":759
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_tuple__175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__175)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__175);
__Pyx_GIVEREF(__pyx_tuple__175);
__pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_type, 759, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":774
* #------------------------------------------------------------------------------
* class XString(str):
* def __new__(cls, string_text, attributes={}, naked_type='XString'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0:
*/
__pyx_tuple__177 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_string_text, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_str_obj, __pyx_n_s_key); if (unlikely(!__pyx_tuple__177)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__177);
__Pyx_GIVEREF(__pyx_tuple__177);
__pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_new, 774, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":786
* # returns a dictionary of the XString instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_tuple__179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__179)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__179);
__Pyx_GIVEREF(__pyx_tuple__179);
__pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getAttributeDict, 786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":793
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__181);
__Pyx_GIVEREF(__pyx_tuple__181);
__pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_type, 793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":800
*
* ## TODO: see where + vs. join breakpoint becomes important
* def concat(self, *strings): # <<<<<<<<<<<<<<
* str_list = []
* for x in strings:
*/
__pyx_tuple__183 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_strings, __pyx_n_s_str_list, __pyx_n_s_x); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__183);
__Pyx_GIVEREF(__pyx_tuple__183);
__pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_concat, 800, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":807
*
* # fastest substring search truth test
* def contains(self, substring): # <<<<<<<<<<<<<<
* return substring in self
*
*/
__pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_substring); if (unlikely(!__pyx_tuple__185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__185);
__Pyx_GIVEREF(__pyx_tuple__185);
__pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_contains, 807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":812
* # split the string on one or more delimiters, return list
* # if up to two chars, then uses str.split(), if more chars then use re.split
* def xsplit(self, split_delimiter): # <<<<<<<<<<<<<<
* length = len(split_delimiter)
* if length > 2:
*/
__pyx_tuple__187 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_split_delimiter, __pyx_n_s_length, __pyx_n_s_re, __pyx_n_s_delim2, __pyx_n_s_first_list, __pyx_n_s_result_list, __pyx_n_s_item, __pyx_n_s_subitem); if (unlikely(!__pyx_tuple__187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__187);
__Pyx_GIVEREF(__pyx_tuple__187);
__pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xsplit, 812, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":830
*
* # split the string on one or more characters and return items in set
* def xsplit_set(self, split_delimiter): # <<<<<<<<<<<<<<
* return set(self.xsplit(split_delimiter))
*
*/
__pyx_tuple__189 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_split_delimiter); if (unlikely(!__pyx_tuple__189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__189);
__Pyx_GIVEREF(__pyx_tuple__189);
__pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_xsplit_set, 830, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":834
*
* # str begins with substring - faster than str.startswith()
* def begins(self, begin_string): # <<<<<<<<<<<<<<
* return begin_string in self[0:len(begin_string)]
*
*/
__pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_begin_string); if (unlikely(!__pyx_tuple__191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__191);
__Pyx_GIVEREF(__pyx_tuple__191);
__pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_begins, 834, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":838
*
* # str ends with substring - faster than str.endswith()
* def ends(self, end_string): # <<<<<<<<<<<<<<
* return end_string in self[-len(end_string):]
*
*/
__pyx_tuple__193 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_end_string); if (unlikely(!__pyx_tuple__193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__193);
__Pyx_GIVEREF(__pyx_tuple__193);
__pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_ends, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":842
*
* # case sensitive wildcard match on the XString (boolean returned)
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* from fnmatch import fnmatchcase
* return fnmatchcase(self, wildcard)
*/
__pyx_tuple__195 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_wildcard, __pyx_n_s_fnmatchcase); if (unlikely(!__pyx_tuple__195)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__195);
__Pyx_GIVEREF(__pyx_tuple__195);
__pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_wildcard_match, 842, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":847
*
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
* def unicode(self): # <<<<<<<<<<<<<<
* from sys import version_info
* from unicodedata import normalize
*/
__pyx_tuple__197 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_version_info, __pyx_n_s_normalize); if (unlikely(!__pyx_tuple__197)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__197);
__Pyx_GIVEREF(__pyx_tuple__197);
__pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_unicode, 847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":858
* # this version works
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'): # <<<<<<<<<<<<<<
* import sys
* import unicodedata
*/
__pyx_tuple__199 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_string_text, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_sys, __pyx_n_s_unicodedata, __pyx_n_s_norm_text, __pyx_n_s_XUnicode_2, __pyx_n_s_XUnicode_3); if (unlikely(!__pyx_tuple__199)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__199);
__Pyx_GIVEREF(__pyx_tuple__199);
__pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_init, 858, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":889
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*
* def __str__(self): # <<<<<<<<<<<<<<
* # return self.naked_u_string
* return self.obj
*/
__pyx_tuple__201 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__201)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__201);
__Pyx_GIVEREF(__pyx_tuple__201);
__pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_str, 889, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":893
* return self.obj
*
* def __repr__(self): # <<<<<<<<<<<<<<
* return self.naked_u_string
*
*/
__pyx_tuple__203 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__203);
__Pyx_GIVEREF(__pyx_tuple__203);
__pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_repr, 893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":896
* return self.naked_u_string
*
* def __getattr__(self, the_attribute): # <<<<<<<<<<<<<<
* return self.obj.__dict__[the_attribute]
*
*/
__pyx_tuple__205 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_the_attribute); if (unlikely(!__pyx_tuple__205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__205);
__Pyx_GIVEREF(__pyx_tuple__205);
__pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getattr, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":899
* return self.obj.__dict__[the_attribute]
*
* def __cmp__(self, other_string): # <<<<<<<<<<<<<<
* return hash(self.naked_u_string) == hash(other_string)
* # TODO: add check for same attributes
*/
__pyx_tuple__207 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other_string); if (unlikely(!__pyx_tuple__207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__207);
__Pyx_GIVEREF(__pyx_tuple__207);
__pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_cmp, 899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":907
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_tuple__209 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__209);
__Pyx_GIVEREF(__pyx_tuple__209);
__pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getAttributeDict, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":914
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_tuple__211 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__211);
__Pyx_GIVEREF(__pyx_tuple__211);
__pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_type, 914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":926
* #------------------------------------------------------------------------------
* class XTuple(tuple):
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'): # <<<<<<<<<<<<<<
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0:
*/
__pyx_tuple__213 = PyTuple_Pack(6, __pyx_n_s_cls, __pyx_n_s_the_tuple, __pyx_n_s_attributes, __pyx_n_s_naked_type, __pyx_n_s_tup_obj, __pyx_n_s_key); if (unlikely(!__pyx_tuple__213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__213);
__Pyx_GIVEREF(__pyx_tuple__213);
__pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_new, 926, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":938
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_tuple__215 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__215);
__Pyx_GIVEREF(__pyx_tuple__215);
__pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_getAttributeDict, 938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "lib/Naked/toolshed/c/types.pyx":945
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_tuple__217 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__217);
__Pyx_GIVEREF(__pyx_tuple__217);
__pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ces_Desktop_code_naked_li, __pyx_n_s_type, 945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __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_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_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;}
__pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__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 inittypes(void); /*proto*/
PyMODINIT_FUNC inittypes(void)
#else
PyMODINIT_FUNC PyInit_types(void); /*proto*/
PyMODINIT_FUNC PyInit_types(void)
#endif
{
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_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_types(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(__Pyx_NAMESTR("types"), __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_NAMESTR(__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 (__Pyx_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_lib__Naked__toolshed__c__types) {
if (__Pyx_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, "lib.Naked.toolshed.c.types")) {
if (unlikely(PyDict_SetItemString(modules, "lib.Naked.toolshed.c.types", __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 ---*/
/*--- Variable export code ---*/
/*--- Function export code ---*/
/*--- Type init code ---*/
/*--- Type import code ---*/
/*--- Variable import code ---*/
/*--- Function import code ---*/
/*--- Execution code ---*/
/* "lib/Naked/toolshed/c/types.pyx":5
* # cython: profile=False
*
* import sys # <<<<<<<<<<<<<<
* from Naked.settings import debug as DEBUG_FLAG
*
*/
__pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":6
*
* import sys
* from Naked.settings import debug as DEBUG_FLAG # <<<<<<<<<<<<<<
*
* #------------------------------------------------------------------------------
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(__pyx_n_s_debug);
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_debug);
__Pyx_GIVEREF(__pyx_n_s_debug);
__pyx_t_2 = __Pyx_Import(__pyx_n_s_Naked_settings, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __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_ImportFrom(__pyx_t_2, __pyx_n_s_debug); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_FLAG, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":15
* # Attribute accessors: hasattr, getattr, setattr, delattr
* #------------------------------------------------------------------------------
* class NakedObject(object): # <<<<<<<<<<<<<<
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'):
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_builtin_object);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
__Pyx_GIVEREF(__pyx_builtin_object);
__pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NakedObject, __pyx_n_s_NakedObject, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
/* "lib/Naked/toolshed/c/types.pyx":17
* class NakedObject(object):
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'): # <<<<<<<<<<<<<<
* if len(attributes) > 0:
* for key in attributes:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_1__init__, 0, __pyx_n_s_NakedObject___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_11NakedObject_16__defaults__);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":27
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_3_getAttributeDict, 0, __pyx_n_s_NakedObject__getAttributeDict, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getAttributeDict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":34
* # returns boolean for type of instance == type of test parameter instance
* #------------------------------------------------------------------------------
* def _equal_type(self, other_obj): # <<<<<<<<<<<<<<
* return type(self) == type(other_obj)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_5_equal_type, 0, __pyx_n_s_NakedObject__equal_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_equal_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":41
* # returns boolean for instance.__dict__ == test parameter .__dict__ (attribute comparison)
* #------------------------------------------------------------------------------
* def _equal_attributes(self, other_obj): # <<<<<<<<<<<<<<
* return self.__dict__ == other_obj.__dict__
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_7_equal_attributes, 0, __pyx_n_s_NakedObject__equal_attributes, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_equal_attributes, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":47
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_9__eq__, 0, __pyx_n_s_NakedObject___eq, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_eq, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":53
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_11__ne__, 0, __pyx_n_s_NakedObject___ne, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ne, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":65
* # **NEED TO OVERRIDE IN CLASSES THAT INHERIT
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* return self._equal_type(other_obj) and self._equal_attributes(other_obj)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_13equals, 0, __pyx_n_s_NakedObject_equals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_equals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":72
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_11NakedObject_15type, 0, __pyx_n_s_NakedObject_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":15
* # Attribute accessors: hasattr, getattr, setattr, delattr
* #------------------------------------------------------------------------------
* class NakedObject(object): # <<<<<<<<<<<<<<
* # initialize with an attributes dictionary {attribute_name: attribute_value}
* def __init__(self, attributes={}, naked_type='NakedObject'):
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NakedObject, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_NakedObject, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":82
* # An inherited extension to the dictionary type
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'):
* dict.__init__(self, dict_obj)
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type))));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyDict_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type))));
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
__pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_XDict, __pyx_n_s_XDict, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
/* "lib/Naked/toolshed/c/types.pyx":83
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject):
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'): # <<<<<<<<<<<<<<
* dict.__init__(self, dict_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_1__init__, 0, __pyx_n_s_XDict___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults1), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XDict_40__defaults__);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":96
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __add__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_3__add__, 0, __pyx_n_s_XDict___add, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_add, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":115
* # returns the updated XDict object
* #------------------------------------------------------------------------------
* def __iadd__(self, other_dict): # <<<<<<<<<<<<<<
* try:
* self.update(other_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_5__iadd__, 0, __pyx_n_s_XDict___iadd, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_iadd, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":132
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_7__eq__, 0, __pyx_n_s_XDict___eq, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_eq, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":138
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_9__ne__, 0, __pyx_n_s_XDict___ne, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ne, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":149
* # tests for equality of the XDict (type, attributes, dictionary equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if dict(self) == dict(other_obj):
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_11equals, 0, __pyx_n_s_XDict_equals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_equals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":167
* # Test: test_xdict_conditional_map
* #------------------------------------------------------------------------------
* def conditional_map_to_vals(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for key, value in self.xitems():
* if conditional_function(key):
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_13conditional_map_to_vals, 0, __pyx_n_s_XDict_conditional_map_to_vals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_conditional_map_to_vals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":178
* # Test: test_xdict_map_to_vals
* #------------------------------------------------------------------------------
* def map_to_vals(self, mapped_function): # <<<<<<<<<<<<<<
* # return XDict( zip(self, map(mapped_function, self.values())), self._getAttributeDict() ) - slower in Py2
* for key, value in self.xitems():
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_15map_to_vals, 0, __pyx_n_s_XDict_map_to_vals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_map_to_vals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":189
* # Test: test_xdict_val_xlist
* #------------------------------------------------------------------------------
* def val_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.values(), self._getAttributeDict())
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_17val_xlist, 0, __pyx_n_s_XDict_val_xlist, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_val_xlist, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":196
* # Test: test_xdict_max_val, test_xdict_max_val_strings (strings are alphabetic if not numerals)
* #------------------------------------------------------------------------------
* def max_val(self): # <<<<<<<<<<<<<<
* return max(zip(self.values(), self.keys()))
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_19max_val, 0, __pyx_n_s_XDict_max_val, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_max_val, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":202
* # [ min_val method ] (tuple of minimum value and associated key)
* #------------------------------------------------------------------------------
* def min_val(self): # <<<<<<<<<<<<<<
* return min(zip(self.values(), self.keys()))
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_21min_val, 0, __pyx_n_s_XDict_min_val, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_min_val, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":209
* # returns sum of all values in the dictionary
* #------------------------------------------------------------------------------
* def sum_vals(self): # <<<<<<<<<<<<<<
* return sum(self.values())
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_23sum_vals, 0, __pyx_n_s_XDict_sum_vals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_sum_vals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":218
* # Tests: test_xdict_val_count_string, test_xdict_val_count_integer
* #------------------------------------------------------------------------------
* def val_count(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_25val_count, 0, __pyx_n_s_XDict_val_count, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_val_count, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":231
* # Test: test_xdict_val_count_ci
* #------------------------------------------------------------------------------
* def val_count_ci(self, value_name): # <<<<<<<<<<<<<<
* count = 0
* for test_value in self.values():
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_27val_count_ci, 0, __pyx_n_s_XDict_val_count_ci, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_val_count_ci, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":250
* # Tests: test_xdict_key_difference, test_xdict_key_difference_when_none_present
* #------------------------------------------------------------------------------
* def difference(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) - set(another_dict.keys())
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_29difference, 0, __pyx_n_s_XDict_difference, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_difference, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":258
* # Tests: test_xdict_key_intersection, test_xdict_key_intersection_when_none_present
* #------------------------------------------------------------------------------
* def intersection(self, another_dict): # <<<<<<<<<<<<<<
* return set(self.keys()) & set(another_dict.keys())
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_31intersection, 0, __pyx_n_s_XDict_intersection, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_intersection, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":266
* # Test: test_xdict_key_xlist
* #------------------------------------------------------------------------------
* def key_xlist(self): # <<<<<<<<<<<<<<
* return XList(self.keys(), self._getAttributeDict())
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_33key_xlist, 0, __pyx_n_s_XDict_key_xlist, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_key_xlist, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":274
* # Test: test_xdict_key_random
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* from Naked.toolshed.python import py_major_version
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_35random, 0, __pyx_n_s_XDict_random, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_random, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":286
* # Test: test_xdict_key_random_sample
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* random_key_list = random.sample(self.keys(), number_of_items)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_37random_sample, 0, __pyx_n_s_XDict_random_sample, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_random_sample, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":300
* # Test: test_xdict_xitems
* #------------------------------------------------------------------------------
* def xitems(self): # <<<<<<<<<<<<<<
* from Naked.toolshed.python import py_major_version
* if py_major_version() > 2:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XDict_39xitems, 0, __pyx_n_s_XDict_xitems, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_xitems, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":82
* # An inherited extension to the dictionary type
* #------------------------------------------------------------------------------
* class XDict(dict, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, dict_obj, attributes={}, naked_type='XDict'):
* dict.__init__(self, dict_obj)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_XDict, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XDict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__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;
/* "lib/Naked/toolshed/c/types.pyx":311
* # An inherited extension to the list object that permits attachment of attributes
* #------------------------------------------------------------------------------
* class XList(list, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, list_obj, attributes={}, naked_type='XList'):
* list.__init__(self, list_obj)
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyList_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_XList, __pyx_n_s_XList, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
/* "lib/Naked/toolshed/c/types.pyx":312
* #------------------------------------------------------------------------------
* class XList(list, NakedObject):
* def __init__(self, list_obj, attributes={}, naked_type='XList'): # <<<<<<<<<<<<<<
* list.__init__(self, list_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_1__init__, 0, __pyx_n_s_XList___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults2), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XList_56__defaults__);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":324
* # extends XList with one or more other lists (`*other_lists`)
* #------------------------------------------------------------------------------
* def __add__(self, *other_lists): # <<<<<<<<<<<<<<
* try:
* for the_list in other_lists:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_3__add__, 0, __pyx_n_s_XList___add, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_add, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":345
* # extends XList with one other list (`another_list`)
* #------------------------------------------------------------------------------
* def __iadd__(self, another_list): # <<<<<<<<<<<<<<
* try:
* #add attributes if it is an XList
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_5__iadd__, 0, __pyx_n_s_XList___iadd, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_iadd, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":364
* # == overload
* #------------------------------------------------------------------------------
* def __eq__(self, other_obj): # <<<<<<<<<<<<<<
* return self.equals(other_obj)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_7__eq__, 0, __pyx_n_s_XList___eq, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_eq, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":370
* # != overload
* #------------------------------------------------------------------------------
* def __ne__(self, other_obj): # <<<<<<<<<<<<<<
* result = self.equals(other_obj)
* if result:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_9__ne__, 0, __pyx_n_s_XList___ne, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ne, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":381
* # tests for equality of the XList (type, attributes, list equality)
* #------------------------------------------------------------------------------
* def equals(self, other_obj): # <<<<<<<<<<<<<<
* if self._equal_type(other_obj) and self._equal_attributes(other_obj):
* if list(self) == list(other_obj):
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_11equals, 0, __pyx_n_s_XList_equals, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_equals, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":402
* # Pass separator character(s) as an argument to the method
* #------------------------------------------------------------------------------
* def join(self, separator=""): # <<<<<<<<<<<<<<
* return separator.join(self)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_13join, 0, __pyx_n_s_XList_join, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__87);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_join, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":409
* # Append a string to each list item string
* #------------------------------------------------------------------------------
* def postfix(self, after): # <<<<<<<<<<<<<<
* return [ "".join([x, after]) for x in self ]
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_15postfix, 0, __pyx_n_s_XList_postfix, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_postfix, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":416
* # Prepend a string to each list item string
* #------------------------------------------------------------------------------
* def prefix(self, before): # <<<<<<<<<<<<<<
* return [ "".join([before, x]) for x in self ]
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_17prefix, 0, __pyx_n_s_XList_prefix, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_prefix, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":423
* # Surround each list item string with a before and after string argument passed to the method
* #------------------------------------------------------------------------------
* def surround(self, before, after=""): # <<<<<<<<<<<<<<
* if after == "":
* after = before
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_19surround, 0, __pyx_n_s_XList_surround, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__94);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_surround, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":434
* # return maximum value from the list items
* #------------------------------------------------------------------------------
* def max(self): # <<<<<<<<<<<<<<
* return max(self)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_21max, 0, __pyx_n_s_XList_max, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_max, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":441
* # return minimum value from the list items
* #------------------------------------------------------------------------------
* def min(self): # <<<<<<<<<<<<<<
* return min(self)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_23min, 0, __pyx_n_s_XList_min, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_min, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":448
* # return the sum of all list items
* #------------------------------------------------------------------------------
* def sum(self): # <<<<<<<<<<<<<<
* return sum(self)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_25sum, 0, __pyx_n_s_XList_sum, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_sum, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":458
* # returns an integer count of number of duplicate values
* #------------------------------------------------------------------------------
* def count_duplicates(self): # <<<<<<<<<<<<<<
* return len(self) - len(set(self))
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_27count_duplicates, 0, __pyx_n_s_XList_count_duplicates, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_count_duplicates, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":465
* # returns a new XList with duplicates removed
* #------------------------------------------------------------------------------
* def remove_duplicates(self): # <<<<<<<<<<<<<<
* return XList( set(self), self._getAttributeDict() )
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_29remove_duplicates, 0, __pyx_n_s_XList_remove_duplicates, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_remove_duplicates, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":472
* # returns a set containing items in XList that are not contained in `another_list`
* #------------------------------------------------------------------------------
* def difference(self, another_list): # <<<<<<<<<<<<<<
* return set(self) - set(another_list)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_31difference, 0, __pyx_n_s_XList_difference, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__106)); 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);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_difference, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":479
* # returns a set containing items that are in both XList and `another_list`
* #------------------------------------------------------------------------------
* def intersection(self, another_list): # <<<<<<<<<<<<<<
* return set(self) & set(another_list)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_33intersection, 0, __pyx_n_s_XList_intersection, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_intersection, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":489
* # returns original XList with modification of each item based upon `mapped_function`
* #------------------------------------------------------------------------------
* def map_to_items(self, mapped_function): # <<<<<<<<<<<<<<
* # return XList( map(mapped_function, self), self._getAttributeDict() ) - slower
* for index, item in enumerate(self):
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_35map_to_items, 0, __pyx_n_s_XList_map_to_items, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_map_to_items, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":500
* # `conditional_function` with change performed as defined in `mapped_function`
* #------------------------------------------------------------------------------
* def conditional_map_to_items(self, conditional_function, mapped_function): # <<<<<<<<<<<<<<
* for index, item in enumerate(self):
* if conditional_function(item):
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_37conditional_map_to_items, 0, __pyx_n_s_XList_conditional_map_to_items, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_conditional_map_to_items, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":513
* # returns an integer count of the number of case-insensitive items that match `test_string`
* #------------------------------------------------------------------------------
* def count_ci(self, test_string): # <<<<<<<<<<<<<<
* count = 0
* for item in self:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_39count_ci, 0, __pyx_n_s_XList_count_ci, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_count_ci, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":527
* # returns a single item list with a random element from the original XList
* #------------------------------------------------------------------------------
* def random(self): # <<<<<<<<<<<<<<
* import random
* return random.choice(self)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_41random, 0, __pyx_n_s_XList_random, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_random, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":536
* # number of items determined by the `number_of_items` argument
* #------------------------------------------------------------------------------
* def random_sample(self, number_of_items): # <<<<<<<<<<<<<<
* import random
* return random.sample(self, number_of_items)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_43random_sample, 0, __pyx_n_s_XList_random_sample, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_random_sample, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":544
* # randomly shuffle the contents of the list
* #------------------------------------------------------------------------------
* def shuffle(self): # <<<<<<<<<<<<<<
* import random
* random.shuffle(self)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_45shuffle, 0, __pyx_n_s_XList_shuffle, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__120)); 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);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_shuffle, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":556
* # returns a list of items that match the `wildcard` argument
* #------------------------------------------------------------------------------
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_47wildcard_match, 0, __pyx_n_s_XList_wildcard_match, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_wildcard_match, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":568
* # returns a list of items that match one or more | separated wildcards passed as string
* #------------------------------------------------------------------------------
* def multi_wildcard_match(self, wildcards): # <<<<<<<<<<<<<<
* if hasattr(self, 'nkd_fnmatchcase'):
* fnmatchcase = self.nkd_fnmatchcase
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_49multi_wildcard_match, 0, __pyx_n_s_XList_multi_wildcard_match, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_multi_wildcard_match, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":589
* # return an XSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(set(self), attr_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_51xset, 0, __pyx_n_s_XList_xset, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_xset, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":597
* # return an XFSet with unique XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(set(self), attr_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_53xfset, 0, __pyx_n_s_XList_xfset, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_xfset, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":605
* # returns an XTuple with XList item values and XList attributes
* #------------------------------------------------------------------------------
* def xtuple(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XTuple(tuple(self), attr_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XList_55xtuple, 0, __pyx_n_s_XList_xtuple, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_xtuple, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":311
* # An inherited extension to the list object that permits attachment of attributes
* #------------------------------------------------------------------------------
* class XList(list, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, list_obj, attributes={}, naked_type='XList'):
* list.__init__(self, list_obj)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_XList, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XList, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":613
* # max heap queue
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop # <<<<<<<<<<<<<<
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'):
*/
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_n_s_heappush);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_heappush);
__Pyx_GIVEREF(__pyx_n_s_heappush);
__Pyx_INCREF(__pyx_n_s_heappop);
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_heappop);
__Pyx_GIVEREF(__pyx_n_s_heappop);
__pyx_t_1 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __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_ImportFrom(__pyx_t_1, __pyx_n_s_heappush); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_heappush, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heappop); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_heappop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":614
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, attributes={}, naked_type='XMaxHeap'):
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); 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_t_2 = PyTuple_New(1); 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);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); 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_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_XMaxHeap, __pyx_n_s_XMaxHeap, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
/* "lib/Naked/toolshed/c/types.pyx":615
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMaxHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_1__init__, 0, __pyx_n_s_XMaxHeap___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults3), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_12__defaults__);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":621
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_3__len__, 0, __pyx_n_s_XMaxHeap___len, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_len, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":625
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_5push, 0, __pyx_n_s_XMaxHeap_push, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_push, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":630
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_7pop, 0, __pyx_n_s_XMaxHeap_pop, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pop, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":637
*
* # push new object and return the highest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (-priority, self._index, the_object))
* self._index += 1
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_9pushpop, 0, __pyx_n_s_XMaxHeap_pushpop, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pushpop, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":646
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMaxHeap_11length, 0, __pyx_n_s_XMaxHeap_length, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_length, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":614
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop
* class XMaxHeap(NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, attributes={}, naked_type='XMaxHeap'):
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_XMaxHeap, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMaxHeap, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":653
* # min heap queue
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop # <<<<<<<<<<<<<<
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'):
*/
__pyx_t_2 = PyList_New(2); 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_INCREF(__pyx_n_s_heappush);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_heappush);
__Pyx_GIVEREF(__pyx_n_s_heappush);
__Pyx_INCREF(__pyx_n_s_heappop);
PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_heappop);
__Pyx_GIVEREF(__pyx_n_s_heappop);
__pyx_t_1 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_2, -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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heappush); 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);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_heappush, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heappop); 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);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_heappop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":654
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop
* class XMinHeap(NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, attributes={}, naked_type='XMinHeap'):
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); 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 = PyTuple_New(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);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); 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_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_XMinHeap, __pyx_n_s_XMinHeap, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
/* "lib/Naked/toolshed/c/types.pyx":655
* from heapq import heappush, heappop
* class XMinHeap(NakedObject):
* def __init__(self, attributes={}, naked_type='XMinHeap'): # <<<<<<<<<<<<<<
* NakedObject.__init__(self, attributes, naked_type)
* self._queue = []
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_1__init__, 0, __pyx_n_s_XMinHeap___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults4), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_12__defaults__);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":662
*
* # length of the queue
* def __len__(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_3__len__, 0, __pyx_n_s_XMinHeap___len, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_len, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":666
*
* # O(log n) complexity
* def push(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_5push, 0, __pyx_n_s_XMinHeap_push, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_push, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":671
*
* # O(log n) complexity
* def pop(self): # <<<<<<<<<<<<<<
* if self._queue:
* return heappop(self._queue)[-1]
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_7pop, 0, __pyx_n_s_XMinHeap_pop, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pop, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":678
*
* # push new object and return the lowest priority object
* def pushpop(self, the_object, priority): # <<<<<<<<<<<<<<
* heappush(self._queue, (priority, self._index, the_object))
* self._index += 1
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_9pushpop, 0, __pyx_n_s_XMinHeap_pushpop, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pushpop, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":687
*
* # the length of the queue
* def length(self): # <<<<<<<<<<<<<<
* return len(self._queue)
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XMinHeap_11length, 0, __pyx_n_s_XMinHeap_length, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_length, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":654
* #------------------------------------------------------------------------------
* from heapq import heappush, heappop
* class XMinHeap(NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, attributes={}, naked_type='XMinHeap'):
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_XMinHeap, __pyx_t_2, __pyx_t_3, NULL, 0, 1); 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);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMinHeap, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":695
* #
* #------------------------------------------------------------------------------
* from collections import deque # <<<<<<<<<<<<<<
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'):
*/
__pyx_t_2 = PyList_New(1); 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_INCREF(__pyx_n_s_deque);
PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_deque);
__Pyx_GIVEREF(__pyx_n_s_deque);
__pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_deque); 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);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_deque, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "lib/Naked/toolshed/c/types.pyx":696
* #------------------------------------------------------------------------------
* from collections import deque
* class XQueue(deque, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'):
* deque.__init__(self, initial_iterable, max_length)
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_deque); 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_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); 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_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __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);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_1 = 0;
__pyx_t_2 = 0;
__pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); 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_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_XQueue, __pyx_n_s_XQueue, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); 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);
/* "lib/Naked/toolshed/c/types.pyx":697
* from collections import deque
* class XQueue(deque, NakedObject):
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'): # <<<<<<<<<<<<<<
* deque.__init__(self, initial_iterable, max_length)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XQueue_1__init__, 0, __pyx_n_s_XQueue___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults5), 2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_4)->__pyx_arg_initial_iterable = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults5, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XQueue_2__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":696
* #------------------------------------------------------------------------------
* from collections import deque
* class XQueue(deque, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, initial_iterable=[], attributes={}, max_length=10, naked_type='XQueue'):
* deque.__init__(self, initial_iterable, max_length)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_XQueue, __pyx_t_3, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XQueue, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":707
* # Inherits from set and from NakedObject (see methods in NakedObject at top of this module
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, set_obj, attributes={}, naked_type='XSet'):
* set.__init__(self, set_obj)
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NakedObject); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PySet_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PySet_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PySet_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
__pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_XSet, __pyx_n_s_XSet, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":708
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject):
* def __init__(self, set_obj, attributes={}, naked_type='XSet'): # <<<<<<<<<<<<<<
* set.__init__(self, set_obj)
* NakedObject.__init__(self, attributes, naked_type)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_1__init__, 0, __pyx_n_s_XSet___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults6), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults6, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_4XSet_10__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":713
*
* # << operator is overloaded to extend the XSet with a second set
* def __lshift__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_3__lshift__, 0, __pyx_n_s_XSet___lshift, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_lshift, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":718
*
* # += operator overload to extend the XSet with a second set
* def __iadd__(self, another_set): # <<<<<<<<<<<<<<
* self.update(another_set)
* return self
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_5__iadd__, 0, __pyx_n_s_XSet___iadd, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_iadd, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":722
* return self
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_7xlist, 0, __pyx_n_s_XSet_xlist, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xlist, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":726
* return XList(list(self), attr_dict)
*
* def xfset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XFSet(self, attr_dict)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_4XSet_9xfset, 0, __pyx_n_s_XSet_xfset, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xfset, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":707
* # Inherits from set and from NakedObject (see methods in NakedObject at top of this module
* #------------------------------------------------------------------------------
* class XSet(set, NakedObject): # <<<<<<<<<<<<<<
* def __init__(self, set_obj, attributes={}, naked_type='XSet'):
* set.__init__(self, set_obj)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_XSet, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XSet, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":735
* # Immutable so there is no setter method, attributes must be set in the constructor
* #------------------------------------------------------------------------------
* class XFSet(frozenset): # <<<<<<<<<<<<<<
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"):
* set_obj = frozenset.__new__(cls, the_set)
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyFrozenSet_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyFrozenSet_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFrozenSet_Type))));
__pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_XFSet, __pyx_n_s_XFSet, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":736
* #------------------------------------------------------------------------------
* class XFSet(frozenset):
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"): # <<<<<<<<<<<<<<
* set_obj = frozenset.__new__(cls, the_set)
* if len(attributes) > 0:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_XFSet___new, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults7), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults7, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_5XFSet_10__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":744
* return set_obj
*
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_3_getAttributeDict, 0, __pyx_n_s_XFSet__getAttributeDict, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getAttributeDict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":747
* return self.__dict__
*
* def xlist(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XList(list(self), attr_dict, naked_type="XList")
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_5xlist, 0, __pyx_n_s_XFSet_xlist, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xlist, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":751
* return XList(list(self), attr_dict, naked_type="XList")
*
* def xset(self): # <<<<<<<<<<<<<<
* attr_dict = self._getAttributeDict()
* return XSet(self, attr_dict, naked_type="XSet")
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_7xset, 0, __pyx_n_s_XFSet_xset, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xset, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":759
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_5XFSet_9type, 0, __pyx_n_s_XFSet_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":735
* # Immutable so there is no setter method, attributes must be set in the constructor
* #------------------------------------------------------------------------------
* class XFSet(frozenset): # <<<<<<<<<<<<<<
* def __new__(cls, the_set, attributes={}, naked_type="XFSet"):
* set_obj = frozenset.__new__(cls, the_set)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_XFSet, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XFSet, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":773
* # Python 3: string (that permits unicode) by default, can normalize with XString().unicode() method
* #------------------------------------------------------------------------------
* class XString(str): # <<<<<<<<<<<<<<
* def __new__(cls, string_text, attributes={}, naked_type='XString'):
* str_obj = str.__new__(cls, string_text)
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyString_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
__pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_XString, __pyx_n_s_XString, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":774
* #------------------------------------------------------------------------------
* class XString(str):
* def __new__(cls, string_text, attributes={}, naked_type='XString'): # <<<<<<<<<<<<<<
* str_obj = str.__new__(cls, string_text)
* if len(attributes) > 0:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_XString___new, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults8), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults8, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_7XString_22__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":786
* # returns a dictionary of the XString instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_3_getAttributeDict, 0, __pyx_n_s_XString__getAttributeDict, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getAttributeDict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":793
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_5type, 0, __pyx_n_s_XString_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":800
*
* ## TODO: see where + vs. join breakpoint becomes important
* def concat(self, *strings): # <<<<<<<<<<<<<<
* str_list = []
* for x in strings:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_7concat, 0, __pyx_n_s_XString_concat, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_concat, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":807
*
* # fastest substring search truth test
* def contains(self, substring): # <<<<<<<<<<<<<<
* return substring in self
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_9contains, 0, __pyx_n_s_XString_contains, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_contains, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":812
* # split the string on one or more delimiters, return list
* # if up to two chars, then uses str.split(), if more chars then use re.split
* def xsplit(self, split_delimiter): # <<<<<<<<<<<<<<
* length = len(split_delimiter)
* if length > 2:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_11xsplit, 0, __pyx_n_s_XString_xsplit, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xsplit, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":830
*
* # split the string on one or more characters and return items in set
* def xsplit_set(self, split_delimiter): # <<<<<<<<<<<<<<
* return set(self.xsplit(split_delimiter))
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_13xsplit_set, 0, __pyx_n_s_XString_xsplit_set, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xsplit_set, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":834
*
* # str begins with substring - faster than str.startswith()
* def begins(self, begin_string): # <<<<<<<<<<<<<<
* return begin_string in self[0:len(begin_string)]
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_15begins, 0, __pyx_n_s_XString_begins, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_begins, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":838
*
* # str ends with substring - faster than str.endswith()
* def ends(self, end_string): # <<<<<<<<<<<<<<
* return end_string in self[-len(end_string):]
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_17ends, 0, __pyx_n_s_XString_ends, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_ends, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":842
*
* # case sensitive wildcard match on the XString (boolean returned)
* def wildcard_match(self, wildcard): # <<<<<<<<<<<<<<
* from fnmatch import fnmatchcase
* return fnmatchcase(self, wildcard)
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_19wildcard_match, 0, __pyx_n_s_XString_wildcard_match, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_wildcard_match, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":847
*
* # convert string to normalized UTF-8 in Python 2 and 3 (##TODO: convert to XUnicode with attributes?)
* def unicode(self): # <<<<<<<<<<<<<<
* from sys import version_info
* from unicodedata import normalize
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_7XString_21unicode, 0, __pyx_n_s_XString_unicode, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_unicode, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":773
* # Python 3: string (that permits unicode) by default, can normalize with XString().unicode() method
* #------------------------------------------------------------------------------
* class XString(str): # <<<<<<<<<<<<<<
* def __new__(cls, string_text, attributes={}, naked_type='XString'):
* str_obj = str.__new__(cls, string_text)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_XString, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XString, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":857
*
* # this version works
* class XUnicode: # <<<<<<<<<<<<<<
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'):
* import sys
*/
__pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_XUnicode, __pyx_n_s_XUnicode, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
/* "lib/Naked/toolshed/c/types.pyx":858
* # this version works
* class XUnicode:
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'): # <<<<<<<<<<<<<<
* import sys
* import unicodedata
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_1__init__, 0, __pyx_n_s_XUnicode___init, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, sizeof(__pyx_defaults9), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = PyDict_New(); 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_CyFunction_Defaults(__pyx_defaults9, __pyx_t_3)->__pyx_arg_attributes = __pyx_t_1;
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_3, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_8XUnicode_14__defaults__);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":889
* self.naked_u_string = XUnicode_3(norm_text, attributes).encode('utf-8') # ?
*
* def __str__(self): # <<<<<<<<<<<<<<
* # return self.naked_u_string
* return self.obj
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_3__str__, 0, __pyx_n_s_XUnicode___str, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_str, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":893
* return self.obj
*
* def __repr__(self): # <<<<<<<<<<<<<<
* return self.naked_u_string
*
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_5__repr__, 0, __pyx_n_s_XUnicode___repr, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_repr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":896
* return self.naked_u_string
*
* def __getattr__(self, the_attribute): # <<<<<<<<<<<<<<
* return self.obj.__dict__[the_attribute]
*
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_7__getattr__, 0, __pyx_n_s_XUnicode___getattr, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_getattr, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":899
* return self.obj.__dict__[the_attribute]
*
* def __cmp__(self, other_string): # <<<<<<<<<<<<<<
* return hash(self.naked_u_string) == hash(other_string)
* # TODO: add check for same attributes
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_9__cmp__, 0, __pyx_n_s_XUnicode___cmp, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_cmp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":907
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_11_getAttributeDict, 0, __pyx_n_s_XUnicode__getAttributeDict, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__210)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_getAttributeDict, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":914
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_8XUnicode_13type, 0, __pyx_n_s_XUnicode_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_type, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "lib/Naked/toolshed/c/types.pyx":857
*
* # this version works
* class XUnicode: # <<<<<<<<<<<<<<
* def __init__(self, string_text, attributes={}, naked_type='XUnicode'):
* import sys
*/
__pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_XUnicode, __pyx_empty_tuple, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XUnicode, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":925
* #
* #------------------------------------------------------------------------------
* class XTuple(tuple): # <<<<<<<<<<<<<<
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'):
* tup_obj = tuple.__new__(cls, the_tuple)
*/
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyTuple_Type))));
__Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyTuple_Type))));
__pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_XTuple, __pyx_n_s_XTuple, (PyObject *) NULL, __pyx_n_s_lib_Naked_toolshed_c_types, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "lib/Naked/toolshed/c/types.pyx":926
* #------------------------------------------------------------------------------
* class XTuple(tuple):
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'): # <<<<<<<<<<<<<<
* tup_obj = tuple.__new__(cls, the_tuple)
* if len(attributes) > 0:
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_XTuple___new, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults10), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_CyFunction_Defaults(__pyx_defaults10, __pyx_t_4)->__pyx_arg_attributes = __pyx_t_5;
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_3lib_5Naked_8toolshed_1c_5types_6XTuple_6__defaults__);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_new, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":938
* # returns a dictionary of the NakedObject instance attributes
* #------------------------------------------------------------------------------
* def _getAttributeDict(self): # <<<<<<<<<<<<<<
* return self.__dict__
*
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_3_getAttributeDict, 0, __pyx_n_s_XTuple__getAttributeDict, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_getAttributeDict, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":945
* # returns the Naked type extension string that is set in the constructor for each object type
* #------------------------------------------------------------------------------
* def type(self): # <<<<<<<<<<<<<<
* if hasattr(self, '_naked_type_'):
* return self._naked_type_
*/
__pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_3lib_5Naked_8toolshed_1c_5types_6XTuple_5type, 0, __pyx_n_s_XTuple_type, NULL, __pyx_n_s_lib_Naked_toolshed_c_types, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "lib/Naked/toolshed/c/types.pyx":925
* #
* #------------------------------------------------------------------------------
* class XTuple(tuple): # <<<<<<<<<<<<<<
* def __new__(cls, the_tuple, attributes={}, naked_type='XTuple'):
* tup_obj = tuple.__new__(cls, the_tuple)
*/
__pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_XTuple, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_XTuple, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "lib/Naked/toolshed/c/types.pyx":952
*
*
* if __name__ == '__main__': # <<<<<<<<<<<<<<
* pass
* # no = nobj({"version":"1.0.1", "test":"code"})
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (__pyx_t_6) {
goto __pyx_L2;
}
__pyx_L2:;
/* "lib/Naked/toolshed/c/types.pyx":1
* #!/usr/bin/env python # <<<<<<<<<<<<<<
* # encoding: utf-8
* # cython: profile=False
*/
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_XDECREF(__pyx_t_5);
if (__pyx_m) {
__Pyx_AddTraceback("init lib.Naked.toolshed.c.types", __pyx_clineno, __pyx_lineno, __pyx_filename);
Py_DECREF(__pyx_m); __pyx_m = 0;
} else if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_ImportError, "init lib.Naked.toolshed.c.types");
}
__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 /* CYTHON_REFNANNY */
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_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;
}
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);
}
#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 PY_VERSION_HEX >= 0x02060000
if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
return NULL;
#endif
result = (*call)(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
Py_LeaveRecursiveCall();
#endif
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
PyErr_SetString(
PyExc_SystemError,
"NULL result without error in PyObject_Call");
}
return result;
}
#endif
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
result = PyDict_GetItem(__pyx_d, name);
if (result) {
Py_INCREF(result);
} else {
#else
result = PyObject_GetItem(__pyx_d, name);
if (!result) {
PyErr_Clear();
#endif
result = __Pyx_GetBuiltinName(name);
}
return result;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VERSION >= 3
if (likely(PyUnicode_Check(n)))
#else
if (likely(PyString_Check(n)))
#endif
return __Pyx_PyObject_GetAttrStr(o, n);
#endif
return PyObject_GetAttr(o, n);
}
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
return PyObject_RichCompareBool(s1, s2, equals);
#else
if (s1 == s2) {
return (equals == Py_EQ);
} else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
const char *ps1, *ps2;
Py_ssize_t length = PyBytes_GET_SIZE(s1);
if (length != PyBytes_GET_SIZE(s2))
return (equals == Py_NE);
ps1 = PyBytes_AS_STRING(s1);
ps2 = PyBytes_AS_STRING(s2);
if (ps1[0] != ps2[0]) {
return (equals == Py_NE);
} else if (length == 1) {
return (equals == Py_EQ);
} else {
int result = memcmp(ps1, ps2, (size_t)length);
return (equals == Py_EQ) ? (result == 0) : (result != 0);
}
} else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
return (equals == Py_NE);
} else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
return (equals == Py_NE);
} else {
int result;
PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
if (!py_result)
return -1;
result = __Pyx_PyObject_IsTrue(py_result);
Py_DECREF(py_result);
return result;
}
#endif
}
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
PyObject* owned_ref = NULL;
#endif
int s1_is_unicode, s2_is_unicode;
if (s1 == s2) {
goto return_eq;
}
s1_is_unicode = PyUnicode_CheckExact(s1);
s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
owned_ref = PyUnicode_FromObject(s2);
if (unlikely(!owned_ref))
return -1;
s2 = owned_ref;
s2_is_unicode = 1;
} else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
owned_ref = PyUnicode_FromObject(s1);
if (unlikely(!owned_ref))
return -1;
s1 = owned_ref;
s1_is_unicode = 1;
} else if (((!s2_is_unicode) & (!s1_is_unicode))) {
return __Pyx_PyBytes_Equals(s1, s2, equals);
}
#endif
if (s1_is_unicode & s2_is_unicode) {
Py_ssize_t length;
int kind;
void *data1, *data2;
#if CYTHON_PEP393_ENABLED
if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
return -1;
#endif
length = __Pyx_PyUnicode_GET_LENGTH(s1);
if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
goto return_ne;
}
kind = __Pyx_PyUnicode_KIND(s1);
if (kind != __Pyx_PyUnicode_KIND(s2)) {
goto return_ne;
}
data1 = __Pyx_PyUnicode_DATA(s1);
data2 = __Pyx_PyUnicode_DATA(s2);
if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
goto return_ne;
} else if (length == 1) {
goto return_eq;
} else {
int result = memcmp(data1, data2, length * kind);
#if PY_MAJOR_VERSION < 3
Py_XDECREF(owned_ref);
#endif
return (equals == Py_EQ) ? (result == 0) : (result != 0);
}
} else if ((s1 == Py_None) & s2_is_unicode) {
goto return_ne;
} else if ((s2 == Py_None) & s1_is_unicode) {
goto return_ne;
} else {
int result;
PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
if (!py_result)
return -1;
result = __Pyx_PyObject_IsTrue(py_result);
Py_DECREF(py_result);
return result;
}
return_eq:
#if PY_MAJOR_VERSION < 3
Py_XDECREF(owned_ref);
#endif
return (equals == Py_EQ);
return_ne:
#if PY_MAJOR_VERSION < 3
Py_XDECREF(owned_ref);
#endif
return (equals == Py_NE);
#endif
}
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 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_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 PY_VERSION_HEX < 0x02050000
if (PyClass_Check(type)) {
#else
if (PyType_Check(type)) {
#endif
#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;
#if PY_VERSION_HEX < 0x02050000
if (PyInstance_Check(type)) {
type = (PyObject*) ((PyInstanceObject*)type)->in_class;
Py_INCREF(type);
} else {
type = 0;
PyErr_SetString(PyExc_TypeError,
"raise: exception must be an old-style class or instance");
goto raise_error;
}
#else
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;
}
#endif
}
__Pyx_ErrRestore(type, value, tb);
return;
raise_error:
Py_XDECREF(value);
Py_XDECREF(type);
Py_XDECREF(tb);
return;
}
#else /* Python 3+ */
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) {
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);
}
}
bad:
Py_XDECREF(owned_instance);
return;
}
#endif
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 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 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 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 PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Format(PyExc_ImportError,
#if PY_MAJOR_VERSION < 3
"cannot import name %.230s", PyString_AS_STRING(name));
#else
"cannot import name %S", name);
#endif
}
return value;
}
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));
}
#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 PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
for (i=0; i < nbases; i++) {
PyTypeObject *tmptype;
PyObject *tmp = PyTuple_GET_ITEM(bases, i);
tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
if (tmptype == &PyClass_Type)
continue;
#endif
if (!metaclass) {
metaclass = tmptype;
continue;
}
if (PyType_IsSubtype(metaclass, tmptype))
continue;
if (PyType_IsSubtype(tmptype, metaclass)) {
metaclass = tmptype;
continue;
}
PyErr_SetString(PyExc_TypeError,
"metaclass conflict: "
"the metaclass of a derived class "
"must be a (non-strict) subclass "
"of the metaclasses of all its bases");
return NULL;
}
if (!metaclass) {
#if PY_MAJOR_VERSION < 3
metaclass = &PyClass_Type;
#else
metaclass = &PyType_Type;
#endif
}
Py_INCREF((PyObject*) metaclass);
return (PyObject*) metaclass;
}
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; /* Mark as deleted */
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}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
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[] = {
{__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
{0, 0, 0, 0}
};
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;
op->func_weakreflist = 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 (m->func_weakreflist != 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 PyMethod_New(func,
type, (PyObject *)(Py_TYPE(type)));
}
if (obj == Py_None)
obj = NULL;
return 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 (%zd 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 (%zd 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)
__Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/
0, /*tp_itemsize*/
(destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
0, /*tp_compare*/
#else
0, /*reserved*/
#endif
(reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
__Pyx_CyFunction_Call, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
0, /*tp_doc*/
(traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/
(inquiry) __Pyx_CyFunction_clear, /*tp_clear*/
0, /*tp_richcompare*/
offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_CyFunction_methods, /*tp_methods*/
__pyx_CyFunction_members, /*tp_members*/
__pyx_CyFunction_getsets, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
__Pyx_CyFunction_descr_get, /*tp_descr_get*/
0, /*tp_descr_set*/
offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
0, /*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*/
#if PY_VERSION_HEX >= 0x02060000
0, /*tp_version_tag*/
#endif
#if PY_VERSION_HEX >= 0x030400a1
0, /*tp_finalize*/
#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 PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
PyObject *ns;
if (metaclass) {
PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
if (prep) {
PyObject *pargs = PyTuple_Pack(2, name, bases);
if (unlikely(!pargs)) {
Py_DECREF(prep);
return NULL;
}
ns = PyObject_Call(prep, pargs, mkw);
Py_DECREF(prep);
Py_DECREF(pargs);
} else {
if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
return NULL;
PyErr_Clear();
ns = PyDict_New();
}
} else {
ns = PyDict_New();
}
if (unlikely(!ns))
return NULL;
if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
return ns;
bad:
Py_DECREF(ns);
return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
PyObject *dict, PyObject *mkw,
int calculate_metaclass, int allow_py2_metaclass) {
PyObject *result, *margs;
PyObject *owned_metaclass = NULL;
if (allow_py2_metaclass) {
owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
if (owned_metaclass) {
metaclass = owned_metaclass;
} else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
PyErr_Clear();
} else {
return NULL;
}
}
if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
Py_XDECREF(owned_metaclass);
if (unlikely(!metaclass))
return NULL;
owned_metaclass = metaclass;
}
margs = PyTuple_Pack(3, name, bases, dict);
if (unlikely(!margs)) {
result = NULL;
} else {
result = PyObject_Call(metaclass, margs, mkw);
Py_DECREF(margs);
}
Py_XDECREF(owned_metaclass);
return result;
}
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
PyObject *empty_list = 0;
PyObject *module = 0;
PyObject *global_dict = 0;
PyObject *empty_dict = 0;
PyObject *list;
#if PY_VERSION_HEX < 0x03030000
PyObject *py_import;
py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
if (!py_import)
goto bad;
#endif
if (from_list)
list = from_list;
else {
empty_list = PyList_New(0);
if (!empty_list)
goto bad;
list = empty_list;
}
global_dict = PyModule_GetDict(__pyx_m);
if (!global_dict)
goto bad;
empty_dict = PyDict_New();
if (!empty_dict)
goto bad;
#if PY_VERSION_HEX >= 0x02050000
{
#if PY_MAJOR_VERSION >= 3
if (level == -1) {
if (strchr(__Pyx_MODULE_NAME, '.')) {
#if PY_VERSION_HEX < 0x03030000
PyObject *py_level = PyInt_FromLong(1);
if (!py_level)
goto bad;
module = PyObject_CallFunctionObjArgs(py_import,
name, global_dict, empty_dict, list, py_level, NULL);
Py_DECREF(py_level);
#else
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, 1);
#endif
if (!module) {
if (!PyErr_ExceptionMatches(PyExc_ImportError))
goto bad;
PyErr_Clear();
}
}
level = 0; /* try absolute import on failure */
}
#endif
if (!module) {
#if PY_VERSION_HEX < 0x03030000
PyObject *py_level = PyInt_FromLong(level);
if (!py_level)
goto bad;
module = PyObject_CallFunctionObjArgs(py_import,
name, global_dict, empty_dict, list, py_level, NULL);
Py_DECREF(py_level);
#else
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, level);
#endif
}
}
#else
if (level>0) {
PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
goto bad;
}
module = PyObject_CallFunctionObjArgs(py_import,
name, global_dict, empty_dict, list, NULL);
#endif
bad:
#if PY_VERSION_HEX < 0x03030000
Py_XDECREF(py_import);
#endif
Py_XDECREF(empty_list);
Py_XDECREF(empty_dict);
return module;
}
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);
}
}
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \
{ \
func_type value = func(x); \
if (sizeof(target_type) < sizeof(func_type)) { \
if (unlikely(value != (func_type) (target_type) value)) { \
func_type zero = 0; \
PyErr_SetString(PyExc_OverflowError, \
(is_unsigned && unlikely(value < zero)) ? \
"can't convert negative value to " #target_type : \
"value too large to convert to " #target_type); \
return (target_type) -1; \
} \
} \
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 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)
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to long");
return (long) -1;
}
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
if (sizeof(digit) <= sizeof(long)) {
switch (Py_SIZE(x)) {
case 0: return 0;
case 1: return (long) ((PyLongObject*)x)->ob_digit[0];
}
}
#endif
#endif
if (unlikely(Py_SIZE(x) < 0)) {
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to long");
return (long) -1;
}
if (sizeof(long) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
} else if (sizeof(long) <= sizeof(unsigned long long)) {
__PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
}
} else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
if (sizeof(digit) <= sizeof(long)) {
switch (Py_SIZE(x)) {
case 0: return 0;
case 1: return +(long) ((PyLongObject*)x)->ob_digit[0];
case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
}
}
#endif
#endif
if (sizeof(long) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
} else if (sizeof(long) <= sizeof(long long)) {
__PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
}
}
{
#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;
}
}
#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)
} else {
long val = PyInt_AS_LONG(x);
if (is_unsigned && unlikely(val < 0)) {
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to int");
return (int) -1;
}
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
if (sizeof(digit) <= sizeof(int)) {
switch (Py_SIZE(x)) {
case 0: return 0;
case 1: return (int) ((PyLongObject*)x)->ob_digit[0];
}
}
#endif
#endif
if (unlikely(Py_SIZE(x) < 0)) {
PyErr_SetString(PyExc_OverflowError,
"can't convert negative value to int");
return (int) -1;
}
if (sizeof(int) <= sizeof(unsigned long)) {
__PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
} else if (sizeof(int) <= sizeof(unsigned long long)) {
__PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
}
} else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
if (sizeof(digit) <= sizeof(int)) {
switch (Py_SIZE(x)) {
case 0: return 0;
case 1: return +(int) ((PyLongObject*)x)->ob_digit[0];
case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
}
}
#endif
#endif
if (sizeof(int) <= sizeof(long)) {
__PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
} else if (sizeof(int) <= sizeof(long long)) {
__PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
}
}
{
#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;
}
}
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);
#if PY_VERSION_HEX < 0x02050000
return PyErr_Warn(NULL, message);
#else
return PyErr_WarnEx(NULL, message, 1);
#endif
}
return 0;
}
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, 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, /*int argcount,*/
0, /*int kwonlyargcount,*/
0, /*int nlocals,*/
0, /*int stacksize,*/
0, /*int flags,*/
__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, /*int firstlineno,*/
__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;
PyObject *py_globals = 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_globals = PyModule_GetDict(__pyx_m);
if (!py_globals) goto bad;
py_frame = PyFrame_New(
PyThreadState_GET(), /*PyThreadState *tstate,*/
py_code, /*PyCodeObject *code,*/
py_globals, /*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);
}
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 /* Python 3+ has unicode identifiers */
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(char* c_str) {
return __Pyx_PyUnicode_FromStringAndSize(c_str, 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 /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
*length = PyBytes_GET_SIZE(defenc);
return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
if (PyUnicode_IS_ASCII(o)) {
*length = PyUnicode_GET_DATA_SIZE(o);
return PyUnicode_AsUTF8(o);
} else {
PyUnicode_AsASCIIString(o);
return NULL;
}
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
} else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
if (PyByteArray_Check(o)) {
*length = PyByteArray_GET_SIZE(o);
return PyByteArray_AS_STRING(o);
} else
#endif
#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;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
#if CYTHON_USE_PYLONG_INTERNALS
#include "longintrepr.h"
#endif
#endif
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
#if PY_VERSION_HEX < 0x02060000
return PyInt_AsSsize_t(b);
#else
return PyLong_AsSsize_t(b);
#endif
}
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) {
#if PY_VERSION_HEX < 0x02050000
if (ival <= LONG_MAX)
return PyInt_FromLong((long)ival);
else {
unsigned char *bytes = (unsigned char *) &ival;
int one = 1; int little = (int)*(unsigned char*)&one;
return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
}
#else
return PyInt_FromSize_t(ival);
#endif
}
#endif /* Py_PYTHON_H */