/* Generated by Cython 0.25 */

/* BEGIN: Cython Metadata
{
    "distutils": {},
    "module_name": "Cython.Tempita._tempita"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_25"
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
    #define HAVE_LONG_LONG
  #endif
#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_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_FASTCALL
  #define METH_FASTCALL 0x80
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
                                              Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
#else
#define __Pyx_PyFastCFunction_Check(func) 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_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #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)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #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_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #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]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#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
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#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 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#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
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#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

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif


#define __PYX_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
}

#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

#define __PYX_HAVE__Cython__Tempita___tempita
#define __PYX_HAVE_API__Cython__Tempita___tempita
#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
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#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)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(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_ASSUME_SAFE_MACROS
#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
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


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

static PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
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[] = {
  "Cython/Tempita/_tempita.py",
};

/*--- Type declarations ---*/
struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_get_template;
};

/* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */
struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature {
  PyObject_HEAD
  PyObject *__pyx_v_tokens;
};


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

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
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

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* RaiseArgTupleInvalid.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);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

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

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

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

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#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

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

/* GetItemInt.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);

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

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

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* SliceObject.proto */
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);

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* py_dict_items.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    ((likely((cfunc)->func)) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
             ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
              (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?  (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
                __Pyx__CallUnboundCMethod0(cfunc, self))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
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

/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* pop_index.proto */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#else
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
    __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
        __Pyx__PyObject_PopIndex(L, py_ix))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
#else
#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
    PyObject_RichCompare(op1, op2, Py_EQ)
    #endif

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

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

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

/* ListExtend.proto */
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject* none = _PyList_Extend((PyListObject*)L, v);
    if (unlikely(!none))
        return -1;
    Py_DECREF(none);
    return 0;
#else
    return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
#endif
}

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* ClassMethod.proto */
#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __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);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* PyExec.proto */
static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*);

/* Print.proto */
static int __Pyx_Print(PyObject*, PyObject *, int);
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

/* PrintOne.proto */
static int __Pyx_PrintOne(PyObject* stream, PyObject *o);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'Cython.Tempita._tempita' */
static PyTypeObject *__pyx_ptype_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature = 0;
#define __Pyx_MODULE_NAME "Cython.Tempita._tempita"
int __pyx_module_is_main_Cython__Tempita___tempita = 0;

/* Implementation of 'Cython.Tempita._tempita' */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_eval;
static PyObject *__pyx_builtin_SyntaxError;
static PyObject *__pyx_builtin_UnicodeDecodeError;
static PyObject *__pyx_builtin_UnicodeEncodeError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_StopIteration;
static const char __pyx_k_[] = " ";
static const char __pyx_k_3[] = "3";
static const char __pyx_k_I[] = "I";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_o[] = "-o";
static const char __pyx_k_s[] = ":%s";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_OP[] = "OP";
static const char __pyx_k__9[] = "";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_if[] = "if ";
static const char __pyx_k_io[] = "io";
static const char __pyx_k_kw[] = "kw";
static const char __pyx_k_ns[] = "ns";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_py[] = "py";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_wb[] = "wb";
static const char __pyx_k__12[] = "|";
static const char __pyx_k__19[] = "_";
static const char __pyx_k__22[] = ", ";
static const char __pyx_k__24[] = "\n";
static const char __pyx_k__28[] = " \t";
static const char __pyx_k__31[] = "\r";
static const char __pyx_k__33[] = "\r\n";
static const char __pyx_k__47[] = "#";
static const char __pyx_k__55[] = ":";
static const char __pyx_k__70[] = "(";
static const char __pyx_k__71[] = ",";
static const char __pyx_k__77[] = "=";
static const char __pyx_k__89[] = ")";
static const char __pyx_k__99[] = "*";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_cgi[] = "cgi";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_def[] = "def";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_env[] = "--env";
static const char __pyx_k_for[] = "for";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_hex[] = "hex";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_lex[] = "lex";
static const char __pyx_k_msg[] = "msg";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_out[] = "out";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_pos[] = "pos";
static const char __pyx_k_pyc[] = ".pyc";
static const char __pyx_k_pyo[] = ".pyo";
static const char __pyx_k_s_2[] = "s";
static const char __pyx_k_s_r[] = "%s=%r";
static const char __pyx_k_s_s[] = "<%s %s>";
static const char __pyx_k_sig[] = "sig";
static const char __pyx_k_str[] = "__str__";
static const char __pyx_k_sub[] = "sub";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_t_n[] = "^[\\t ]*\\n";
static const char __pyx_k_url[] = "url";
static const char __pyx_k_var[] = "var";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k_NAME[] = "NAME";
static const char __pyx_k__100[] = "**";
static const char __pyx_k__101[] = "[";
static const char __pyx_k__102[] = "{";
  static const char __pyx_k__103[] = "]";
static const char __pyx_k__104[] = "}";
static const char __pyx_k__117[] = "-";
static const char __pyx_k__126[] = "{{";
static const char __pyx_k__127[] = "}}";
static const char __pyx_k_arg0[] = "arg0";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_argv[] = "argv";
static const char __pyx_k_attr[] = "attr";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_body[] = "body";
static const char __pyx_k_bool[] = "__bool__";
static const char __pyx_k_call[] = "__call__";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_cond[] = "cond";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_defs[] = "defs";
static const char __pyx_k_dest[] = "dest";
static const char __pyx_k_dist[] = "dist";
static const char __pyx_k_ecol[] = "ecol";
static const char __pyx_k_elif[] = "elif ";
static const char __pyx_k_else[] = "else";
static const char __pyx_k_erow[] = "erow";
static const char __pyx_k_eval[] = "eval";
static const char __pyx_k_exec[] = "_exec";
static const char __pyx_k_exit[] = "exit";
static const char __pyx_k_expr[] = "expr";
static const char __pyx_k_file[] = "__file__";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_help[] = "help";
static const char __pyx_k_html[] = "__html__";
static const char __pyx_k_if_2[] = "if";
static const char __pyx_k_in_s[] = " in %s";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_last[] = "last";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_ns_2[] = "_ns";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_part[] = "part";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_prev[] = "prev";
static const char __pyx_k_py_2[] = "py:";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_repr[] = "_repr";
static const char __pyx_k_scol[] = "scol";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_srow[] = "srow";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_tmpl[] = "tmpl";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_utf8[] = "utf8";
static const char __pyx_k_vars[] = "vars";
static const char __pyx_k_Empty[] = "Empty";
static const char __pyx_k_Paste[] = "Paste";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_break[] = "break";
static const char __pyx_k_bunch[] = "bunch";
static const char __pyx_k_bytes[] = "bytes";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_codes[] = "codes";
static const char __pyx_k_count[] = "count";
static const char __pyx_k_def_2[] = "def ";
static const char __pyx_k_endif[] = "endif";
static const char __pyx_k_first[] = "first";
static const char __pyx_k_for_2[] = "for ";
static const char __pyx_k_force[] = "force";
static const char __pyx_k_get_2[] = "__get__";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_in_re[] = "in_re";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_lines[] = "lines";
static const char __pyx_k_match[] = "match";
static const char __pyx_k_n_r_t[] = "\\n\\r?[\\t ]*$";
static const char __pyx_k_parse[] = "parse";
static const char __pyx_k_parts[] = "parts";
static const char __pyx_k_plain[] = "plain";
static const char __pyx_k_pos_2[] = "_pos";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_quote[] = "quote";
static const char __pyx_k_rfind[] = "rfind";
static const char __pyx_k_s_r_2[] = "<%s %r>";
static const char __pyx_k_s_s_2[] = "%s=\"%s\"";
static const char __pyx_k_s_s_3[] = "%s|%s";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_stdin[] = "stdin";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_templ[] = "templ";
static const char __pyx_k_usage[] = "usage";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_action[] = "action";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_body_2[] = "_body";
static const char __pyx_k_caller[] = "caller";
static const char __pyx_k_chunks[] = "chunks";
static const char __pyx_k_column[] = "column";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_elif_2[] = "elif";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_enddef[] = "enddef";
static const char __pyx_k_endfor[] = "endfor";
static const char __pyx_k_escape[] = "escape";
static const char __pyx_k_eval_2[] = "_eval";
static const char __pyx_k_file_2[] = "file";
static const char __pyx_k_html_2[] = "html";
static const char __pyx_k_html_3[] = "--html";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_latin1[] = "latin1";
static const char __pyx_k_lineno[] = "lineno";
static const char __pyx_k_looper[] = "_looper";
static const char __pyx_k_lstrip[] = "lstrip";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_name_3[] = "__name";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_output[] = "--output";
static const char __pyx_k_parsed[] = "_parsed";
static const char __pyx_k_parser[] = "parser";
static const char __pyx_k_pieces[] = "pieces";
static const char __pyx_k_reason[] = "reason";
static const char __pyx_k_repr_2[] = "__repr__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_s_in_s[] = "\\s+in\\s+";
static const char __pyx_k_search[] = "search";
static const char __pyx_k_self_2[] = "self_";
static const char __pyx_k_stdout[] = "stdout";
static const char __pyx_k_string[] = "<string>";
static const char __pyx_k_tokens[] = "tokens";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_urllib[] = "urllib";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_var_kw[] = "var_kw";
static const char __pyx_k_var_re[] = "var_re";
static const char __pyx_k_Empty_2[] = "_Empty";
static const char __pyx_k_comment[] = "comment";
static const char __pyx_k_compat3[] = "compat3";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_content[] = "content";
static const char __pyx_k_context[] = "context";
static const char __pyx_k_current[] = "current";
static const char __pyx_k_default[] = "default";
static const char __pyx_k_dirname[] = "dirname";
static const char __pyx_k_end_pos[] = "end_pos";
static const char __pyx_k_environ[] = "environ";
static const char __pyx_k_getattr[] = "__getattr__";
static const char __pyx_k_getitem[] = "__getitem__";
static const char __pyx_k_globals[] = "globals";
static const char __pyx_k_in_expr[] = "in_expr";
static const char __pyx_k_inherit[] = "__inherit__";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_metavar[] = "metavar";
static const char __pyx_k_nonzero[] = "__nonzero__";
static const char __pyx_k_options[] = "options";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_prev_ok[] = "prev_ok";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_setattr[] = "__setattr__";
static const char __pyx_k_stdin_2[] = "<stdin>";
static const char __pyx_k_subdefs[] = "subdefs";
static const char __pyx_k_unicode[] = "_unicode";
static const char __pyx_k_use_env[] = "use_env";
static const char __pyx_k_var_arg[] = "var_arg";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_FILENAME[] = "FILENAME";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_No_endif[] = "No {{endif}}";
static const char __pyx_k_StringIO[] = "StringIO";
static const char __pyx_k_Template[] = "Template";
static const char __pyx_k_builtins[] = "__builtins__";
static const char __pyx_k_continue[] = "continue";
static const char __pyx_k_defaults[] = "defaults";
static const char __pyx_k_encoding[] = "encoding";
static const char __pyx_k_endswith[] = "endswith";
static const char __pyx_k_extra_kw[] = "extra_kw";
static const char __pyx_k_f_lineno[] = "f_lineno";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_finditer[] = "finditer";
static const char __pyx_k_getframe[] = "_getframe";
static const char __pyx_k_last_pos[] = "last_pos";
static const char __pyx_k_looper_2[] = "looper";
static const char __pyx_k_optparse[] = "optparse";
static const char __pyx_k_output_2[] = "output";
static const char __pyx_k_position[] = "position";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_readline[] = "readline";
static const char __pyx_k_sig_args[] = "sig_args";
static const char __pyx_k_sig_text[] = "sig_text";
static const char __pyx_k_string_2[] = "string";
static const char __pyx_k_sub_html[] = "sub_html";
static const char __pyx_k_template[] = "template";
static const char __pyx_k_tok_type[] = "tok_type";
static const char __pyx_k_token_re[] = "token_re";
static const char __pyx_k_tokenize[] = "tokenize";
static const char __pyx_k_trim_lex[] = "trim_lex";
static const char __pyx_k_use_html[] = "use_html";
static const char __pyx_k_var_args[] = "var_args";
static const char __pyx_k_var_name[] = "var_name";
static const char __pyx_k_ENDMARKER[] = "ENDMARKER";
static const char __pyx_k_No_endfor[] = "No {{endfor}}";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_default_2[] = "default ";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_f_globals[] = "f_globals";
static const char __pyx_k_func_name[] = "func_name";
static const char __pyx_k_get_token[] = "get_token";
static const char __pyx_k_in_file_s[] = " in file %s";
static const char __pyx_k_inherit_2[] = "inherit";
static const char __pyx_k_inherit_3[] = "inherit ";
static const char __pyx_k_interpret[] = "_interpret";
static const char __pyx_k_last_trim[] = "last_trim";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_namespace[] = "namespace";
static const char __pyx_k_nest_type[] = "nest_type";
static const char __pyx_k_parse_def[] = "parse_def";
static const char __pyx_k_parse_for[] = "parse_for";
static const char __pyx_k_signature[] = "signature";
static const char __pyx_k_start_pos[] = "start_pos";
static const char __pyx_k_unicode_2[] = "unicode_";
static const char __pyx_k_unicode_3[] = "__unicode__";
static const char __pyx_k_url_quote[] = "url_quote";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_add_option[] = "add_option";
static const char __pyx_k_basestring[] = "basestring_";
static const char __pyx_k_bound_self[] = "bound_self";
static const char __pyx_k_delimeters[] = "delimeters";
static const char __pyx_k_end_braces[] = "end_braces";
static const char __pyx_k_html___str[] = "html.__str__";
static const char __pyx_k_html_quote[] = "html_quote";
static const char __pyx_k_is_unicode[] = "is_unicode";
static const char __pyx_k_last_index[] = "last_index";
static const char __pyx_k_nest_count[] = "nest_count";
static const char __pyx_k_next_chunk[] = "next_chunk";
static const char __pyx_k_parse_args[] = "parse_args";
static const char __pyx_k_parse_cond[] = "parse_cond";
static const char __pyx_k_parse_expr[] = "parse_expr";
static const char __pyx_k_s_around_r[] = "<%s around %r>";
static const char __pyx_k_s_s_name_r[] = "<%s %s name=%r>";
static const char __pyx_k_splitlines[] = "splitlines";
static const char __pyx_k_stacklevel[] = "stacklevel";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_store_true[] = "store_true";
static const char __pyx_k_substitute[] = "substitute";
static const char __pyx_k_template_2[] = "_template";
static const char __pyx_k_tok_string[] = "tok_string";
static const char __pyx_k_value_expr[] = "value_expr";
static const char __pyx_k_Empty___str[] = "_Empty.__str__";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_SyntaxError[] = "SyntaxError";
static const char __pyx_k_TemplateDef[] = "TemplateDef";
static const char __pyx_k_a_z__a_z0_9[] = "^[a-z_][a-z0-9_]*$";
static const char __pyx_k_coerce_text[] = "coerce_text";
static const char __pyx_k_func_name_2[] = "_func_name";
static const char __pyx_k_html___html[] = "html.__html__";
static const char __pyx_k_html___init[] = "html.__init__";
static const char __pyx_k_html___repr[] = "html.__repr__";
static const char __pyx_k_in_string_r[] = " in string %r";
static const char __pyx_k_line_offset[] = "line_offset";
static const char __pyx_k_unnest_type[] = "unnest_type";
static const char __pyx_k_Empty___bool[] = "_Empty.__bool__";
static const char __pyx_k_Empty___call[] = "_Empty.__call__";
static const char __pyx_k_Empty___iter[] = "_Empty.__iter__";
static const char __pyx_k_Empty___repr[] = "_Empty.__repr__";
static const char __pyx_k_HTMLTemplate[] = "HTMLTemplate";
static const char __pyx_k_OptionParser[] = "OptionParser";
static const char __pyx_k_Unexpected_s[] = "Unexpected %s";
static const char __pyx_k_bound_self_2[] = "_bound_self";
static const char __pyx_k_bunch___init[] = "bunch.__init__";
static const char __pyx_k_bunch___repr[] = "bunch.__repr__";
static const char __pyx_k_default_expr[] = "default_expr";
static const char __pyx_k_fill_command[] = "fill_command";
static const char __pyx_k_get_template[] = "get_template";
static const char __pyx_k_interpret_if[] = "_interpret_if";
static const char __pyx_k_lex_line_629[] = "lex (line 629)";
static const char __pyx_k_start_braces[] = "start_braces";
static const char __pyx_k_statement_re[] = "statement_re";
static const char __pyx_k_template_obj[] = "template_obj";
static const char __pyx_k_urllib_parse[] = "urllib.parse";
static const char __pyx_k_var_arg_type[] = "var_arg_type";
static const char __pyx_k_Missing_endif[] = "Missing {{endif}}";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_TemplateBreak[] = "_TemplateBreak";
static const char __pyx_k_TemplateClass[] = "TemplateClass";
static const char __pyx_k_TemplateError[] = "TemplateError";
static const char __pyx_k_add_line_info[] = "_add_line_info";
static const char __pyx_k_find_position[] = "find_position";
static const char __pyx_k_from_filename[] = "from_filename";
static const char __pyx_k_from_template[] = "from_template";
static const char __pyx_k_interpret_for[] = "_interpret_for";
static const char __pyx_k_parse_default[] = "parse_default";
static const char __pyx_k_parse_inherit[] = "parse_inherit";
static const char __pyx_k_pkg_resources[] = "pkg_resources";
static const char __pyx_k_template_name[] = "__template_name__";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_Bad_argument_r[] = "Bad argument: %r";
static const char __pyx_k_Missing_enddef[] = "Missing {{enddef}}";
static const char __pyx_k_TemplateObject[] = "TemplateObject";
static const char __pyx_k_Template__eval[] = "Template._eval";
static const char __pyx_k_Template__exec[] = "Template._exec";
static const char __pyx_k_Template__repr[] = "Template._repr";
static const char __pyx_k_Unknown_code_r[] = "Unknown code: %r";
static const char __pyx_k_func_signature[] = "func_signature";
static const char __pyx_k_interpret_code[] = "_interpret_code";
static const char __pyx_k_parse_line_766[] = "parse (line 766)";
static const char __pyx_k_parse_one_cond[] = "parse_one_cond";
static const char __pyx_k_traceback_hide[] = "__traceback_hide__";
static const char __pyx_k_Empty___unicode[] = "_Empty.__unicode__";
static const char __pyx_k_Template___init[] = "Template.__init__";
static const char __pyx_k_Template___repr[] = "Template.__repr__";
static const char __pyx_k_bunch___getattr[] = "bunch.__getattr__";
static const char __pyx_k_bunch___getitem[] = "bunch.__getitem__";
static const char __pyx_k_bunch___setattr[] = "bunch.__setattr__";
static const char __pyx_k_default_inherit[] = "default_inherit";
static const char __pyx_k_generate_tokens[] = "generate_tokens";
static const char __pyx_k_interpret_codes[] = "_interpret_codes";
static const char __pyx_k_parse_signature[] = "_parse_signature";
static const char __pyx_k_template_name_2[] = "template_name";
static const char __pyx_k_trim_whitespace[] = "trim_whitespace";
static const char __pyx_k_TemplateContinue[] = "_TemplateContinue";
static const char __pyx_k_default_encoding[] = "default_encoding";
static const char __pyx_k_func_signature_2[] = "_func_signature";
static const char __pyx_k_get_distribution[] = "get_distribution";
static const char __pyx_k_inherit_template[] = "inherit_template";
static const char __pyx_k_template_content[] = "template_content";
static const char __pyx_k_TemplateDef___get[] = "TemplateDef.__get__";
static const char __pyx_k_TemplateDef___str[] = "TemplateDef.__str__";
static const char __pyx_k_default_namespace[] = "default_namespace";
static const char __pyx_k_get_file_template[] = "get_file_template";
static const char __pyx_k_interpret_inherit[] = "_interpret_inherit";
static const char __pyx_k_parse_signature_2[] = "parse_signature";
static const char __pyx_k_single_statements[] = "single_statements";
static const char __pyx_k_trim_lex_line_698[] = "trim_lex (line 698)";
static const char __pyx_k_xmlcharrefreplace[] = "xmlcharrefreplace";
static const char __pyx_k_Bad_for_no_in_in_r[] = "Bad for (no \"in\") in %r";
static const char __pyx_k_HTMLTemplate__repr[] = "HTMLTemplate._repr";
static const char __pyx_k_Missing_argument_s[] = "Missing argument: %s";
static const char __pyx_k_TemplateDef___call[] = "TemplateDef.__call__";
static const char __pyx_k_TemplateDef___init[] = "TemplateDef.__init__";
static const char __pyx_k_TemplateDef___repr[] = "TemplateDef.__repr__";
static const char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
static const char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
static const char __pyx_k_fill_command_usage[] = "_fill_command_usage";
static const char __pyx_k_isolate_expression[] = "isolate_expression";
static const char __pyx_k_lead_whitespace_re[] = "lead_whitespace_re";
static const char __pyx_k_Invalid_signature_s[] = "Invalid signature: (%s)";
static const char __pyx_k_TemplateError___str[] = "TemplateError.__str__";
static const char __pyx_k_Template__interpret[] = "Template._interpret";
static const char __pyx_k_Template_substitute[] = "Template.substitute";
static const char __pyx_k_s_inside_expression[] = "%s inside expression";
static const char __pyx_k_trail_whitespace_re[] = "trail_whitespace_re";
static const char __pyx_k_TemplateError___init[] = "TemplateError.__init__";
static const char __pyx_k_TemplateObjectGetter[] = "TemplateObjectGetter";
static const char __pyx_k_TemplateObject__name[] = "_TemplateObject__name";
static const char __pyx_k_s_at_line_s_column_s[] = "%s at line %s column %s";
static const char __pyx_k_s_outside_expression[] = "%s outside expression";
static const char __pyx_k_s_with_no_expression[] = "%s with no expression";
static const char __pyx_k_TemplateObject___init[] = "TemplateObject.__init__";
static const char __pyx_k_TemplateObject___repr[] = "TemplateObject.__repr__";
static const char __pyx_k_Unexpected_argument_s[] = "Unexpected argument %s";
static const char __pyx_k_Template__interpret_if[] = "Template._interpret_if";
static const char __pyx_k_Template_from_filename[] = "Template.from_filename";
static const char __pyx_k_Cython_Tempita__tempita[] = "Cython.Tempita._tempita";
static const char __pyx_k_Template__add_line_info[] = "Template._add_line_info";
static const char __pyx_k_Template__interpret_for[] = "Template._interpret_for";
static const char __pyx_k_Unexpected_token_r_at_s[] = "Unexpected token %r at %s";
static const char __pyx_k_Template__interpret_code[] = "Template._interpret_code";
static const char __pyx_k_s_outside_of_an_if_block[] = "%s outside of an if block";
static const char __pyx_k_Template__interpret_codes[] = "Template._interpret_codes";
static const char __pyx_k_Extra_position_arguments_s[] = "Extra position arguments: %s";
static const char __pyx_k_TemplateObjectGetter___init[] = "TemplateObjectGetter.__init__";
static const char __pyx_k_TemplateObjectGetter___repr[] = "TemplateObjectGetter.__repr__";
static const char __pyx_k_Template__interpret_inherit[] = "Template._interpret_inherit";
static const char __pyx_k_tempita_function_s_s_at_s_s[] = "<tempita function %s(%s) at %s:%s>";
static const char __pyx_k_TemplateDef__parse_signature[] = "TemplateDef._parse_signature";
static const char __pyx_k_continue_outside_of_for_loop[] = "continue outside of for loop";
static const char __pyx_k_default_x_y_is_not_supported[] = "{{default x, y = ...}} is not supported";
static const char __pyx_k_No_s_to_finish_last_expression[] = "No %s to finish last expression";
static const char __pyx_k_Parses_a_string_into_a_kind_of[] = "\n    Parses a string into a kind of AST\n\n        >>> parse('{{x}}')\n        [('expr', (1, 3), 'x')]\n        >>> parse('foo')\n        ['foo']\n        >>> parse('{{if x}}test{{endif}}')\n        [('cond', (1, 3), ('if', (1, 3), 'x', ['test']))]\n        >>> parse('series->{{for x in y}}x={{x}}{{endfor}}')\n        ['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', (1, 27), 'x')])]\n        >>> parse('{{for x, y in z:}}{{continue}}{{endfor}}')\n        [('for', (1, 3), ('x', 'y'), 'z', [('continue', (1, 21))])]\n        >>> parse('{{py:x=1}}')\n        [('py', (1, 3), 'x=1')]\n        >>> parse('{{if x}}a{{elif y}}b{{else}}c{{endif}}')\n        [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))]\n\n    Some exceptions::\n\n        >>> parse('{{continue}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: continue outside of for loop at line 1 column 3\n        >>> parse('{{if x}}foo')\n        Traceback (most recent call last):\n            ...\n        TemplateError: No {{endif}} at line 1 column 3\n        >>> parse('{{else}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: else outside of an if block at line 1 column 3\n        >>> parse('{{if x}}{{for x in y}}{{endif}}{{endfor}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Unexpected endif at line 1 column 25\n        >>> parse('{{if}}{{endif}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: if with no expression at line 1 column 3\n        >>> parse('{{for x y}}{{endfor}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Bad for (no \"in\") in 'x y' at line 1 column 3\n        >>> parse('{{py:x=1\\ny=2}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Multi-line py blocks must start with a newline at line 1 column 3""\n    ";
static const char __pyx_k_TemplateObjectGetter___getattr[] = "TemplateObjectGetter.__getattr__";
static const char __pyx_k_TemplateObjectGetter__template[] = "_TemplateObjectGetter__template_obj";
static const char __pyx_k_invalid_syntax_in_expression_s[] = "invalid syntax in expression: %s";
static const char __pyx_k_paste_script_template_renderer[] = "paste_script_template_renderer";
static const char __pyx_k_A_small_templating_language_Thi[] = "\nA small templating language\n\nThis implements a small templating language.  This language implements\nif/elif/else, for/continue/break, expressions, and blocks of Python\ncode.  The syntax is::\n\n  {{any expression (function calls etc)}}\n  {{any expression | filter}}\n  {{for x in y}}...{{endfor}}\n  {{if x}}x{{elif y}}y{{else}}z{{endif}}\n  {{py:x=1}}\n  {{py:\n  def foo(bar):\n      return 'baz'\n  }}\n  {{default var = default_value}}\n  {{# comment}}\n\nYou use this with the ``Template`` class or the ``sub`` shortcut.\nThe ``Template`` class takes the template string and the name of\nthe template (for errors) and a default namespace.  Then (like\n``string.Template``) you can call the ``tmpl.substitute(**kw)``\nmethod to make a substitution (or ``tmpl.substitute(a_dict)``).\n\n``sub(content, **kw)`` substitutes the template immediately.  You\ncan use ``__name='tmpl.html'`` to set the name of the template.\n\nIf there are syntax errors ``TemplateError`` will be raised.\n";
static const char __pyx_k_File_to_write_output_to_default[] = "File to write output to (default stdout)";
static const char __pyx_k_Function_definition_doesn_t_end[] = "Function definition doesn't end with ): %s";
static const char __pyx_k_Lex_a_string_into_chunks_lex_he[] = "\n    Lex a string into chunks:\n\n        >>> lex('hey')\n        ['hey']\n        >>> lex('hey {{you}}')\n        ['hey ', ('you', (1, 7))]\n        >>> lex('hey {{')\n        Traceback (most recent call last):\n            ...\n        TemplateError: No }} to finish last expression at line 1 column 7\n        >>> lex('hey }}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: }} outside expression at line 1 column 7\n        >>> lex('hey {{ {{')\n        Traceback (most recent call last):\n            ...\n        TemplateError: {{ inside expression at line 1 column 10\n\n    ";
    static const char __pyx_k_Multi_line_py_blocks_must_start[] = "Multi-line py blocks must start with a newline";
    static const char __pyx_k_Takes_a_lexed_set_of_tokens_and[] = "\n    Takes a lexed set of tokens, and removes whitespace when there is\n    a directive on a line by itself:\n\n       >>> tokens = lex('{{if x}}\\nx\\n{{endif}}\\ny', trim_whitespace=False)\n       >>> tokens\n       [('if x', (1, 3)), '\\nx\\n', ('endif', (3, 3)), '\\ny']\n       >>> trim_lex(tokens)\n       [('if x', (1, 3)), 'x\\n', ('endif', (3, 3)), 'y']\n    ";
    static const char __pyx_k_You_can_only_give_positional_or[] = "You can only give positional *or* keyword arguments";
    static const char __pyx_k_You_cannot_have_in_the_variable[] = "You cannot have () in the variable section of a for loop (%r)";
    static const char __pyx_k_if_elif_for_def_inherit_default[] = "^(?:if |elif |for |def |inherit |default |py:)";
    static const char __pyx_k_prog_OPTIONS_TEMPLATE_arg_value[] = "%prog [OPTIONS] TEMPLATE arg=value\n\nUse py:arg=value to set a Python value; otherwise all values are\nstrings.\n";
    static const char __pyx_k_tmp_pip_install_9i_72p5f_cython[] = "/tmp/pip-install-9i_72p5f/cython_58c0ae716fd246eb8843b3dfd03bc38a/Cython/Tempita/_tempita.py";
    static const char __pyx_k_Cannot_decode_bytes_value_r_into[] = "Cannot decode bytes value %r into unicode (no default_encoding provided)";
    static const char __pyx_k_Cannot_encode_unicode_value_r_in[] = "Cannot encode unicode value %r into bytes (no default_encoding provided)";
    static const char __pyx_k_Exception_raised_while_parsing_a[] = "Exception raised while parsing a template\n    ";
    static const char __pyx_k_Expression_must_be_default_var_v[] = "Expression must be {{default var=value}}; no = found in %r";
    static const char __pyx_k_If_you_pass_in_a_single_argument[] = "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r";
    static const char __pyx_k_Need_i_items_to_unpack_got_i_ite[] = "Need %i items to unpack (got %i items)";
    static const char __pyx_k_Not_a_valid_variable_name_for_de[] = "Not a valid variable name for {{default}}: %r";
    static const char __pyx_k_Put_the_environment_in_as_top_le[] = "Put the environment in as top-level variables";
    static const char __pyx_k_Use_HTML_style_filling_including[] = "Use HTML style filling (including automatic HTML quoting)";
    static const char __pyx_k_You_can_only_give_one_positional[] = "You can only give one positional argument";
    static const char __pyx_k_You_cannot_use_inheritance_witho[] = "You cannot use inheritance without passing in get_template";
    static const char __pyx_k_You_must_give_a_template_filenam[] = "You must give a template filename";
    static const char __pyx_k_parse_signature_locals_get_token[] = "parse_signature.<locals>.get_token";
    static PyObject *__pyx_kp_s_;
    static PyObject *__pyx_kp_s_3;
    static PyObject *__pyx_n_s_AttributeError;
    static PyObject *__pyx_kp_s_Bad_argument_r;
    static PyObject *__pyx_kp_s_Bad_for_no_in_in_r;
    static PyObject *__pyx_kp_s_Cannot_decode_bytes_value_r_into;
    static PyObject *__pyx_kp_s_Cannot_encode_unicode_value_r_in;
    static PyObject *__pyx_n_s_Cython_Tempita__tempita;
    static PyObject *__pyx_n_s_ENDMARKER;
    static PyObject *__pyx_n_s_Empty;
    static PyObject *__pyx_n_s_Empty_2;
    static PyObject *__pyx_n_s_Empty___bool;
    static PyObject *__pyx_n_s_Empty___call;
    static PyObject *__pyx_n_s_Empty___iter;
    static PyObject *__pyx_n_s_Empty___repr;
    static PyObject *__pyx_n_s_Empty___str;
    static PyObject *__pyx_n_s_Empty___unicode;
    static PyObject *__pyx_kp_s_Exception_raised_while_parsing_a;
    static PyObject *__pyx_kp_s_Expression_must_be_default_var_v;
    static PyObject *__pyx_kp_s_Extra_position_arguments_s;
    static PyObject *__pyx_n_s_FILENAME;
    static PyObject *__pyx_kp_s_File_to_write_output_to_default;
    static PyObject *__pyx_kp_s_Function_definition_doesn_t_end;
    static PyObject *__pyx_n_s_HTMLTemplate;
    static PyObject *__pyx_n_s_HTMLTemplate__repr;
    static PyObject *__pyx_n_s_I;
    static PyObject *__pyx_kp_s_If_you_pass_in_a_single_argument;
    static PyObject *__pyx_n_s_ImportError;
    static PyObject *__pyx_kp_s_Invalid_signature_s;
    static PyObject *__pyx_n_s_KeyError;
    static PyObject *__pyx_kp_u_Lex_a_string_into_chunks_lex_he;
    static PyObject *__pyx_kp_s_Missing_argument_s;
    static PyObject *__pyx_kp_s_Missing_enddef;
    static PyObject *__pyx_kp_s_Missing_endif;
    static PyObject *__pyx_kp_s_Multi_line_py_blocks_must_start;
    static PyObject *__pyx_n_s_NAME;
    static PyObject *__pyx_kp_s_Need_i_items_to_unpack_got_i_ite;
    static PyObject *__pyx_kp_s_No_endfor;
    static PyObject *__pyx_kp_s_No_endif;
    static PyObject *__pyx_kp_s_No_s_to_finish_last_expression;
    static PyObject *__pyx_kp_s_Not_a_valid_variable_name_for_de;
    static PyObject *__pyx_n_s_OP;
    static PyObject *__pyx_n_s_OptionParser;
    static PyObject *__pyx_kp_u_Parses_a_string_into_a_kind_of;
    static PyObject *__pyx_n_s_Paste;
    static PyObject *__pyx_kp_s_Put_the_environment_in_as_top_le;
    static PyObject *__pyx_n_s_StopIteration;
    static PyObject *__pyx_n_s_StringIO;
    static PyObject *__pyx_n_s_SyntaxError;
    static PyObject *__pyx_kp_u_Takes_a_lexed_set_of_tokens_and;
    static PyObject *__pyx_n_s_Template;
    static PyObject *__pyx_n_s_TemplateBreak;
    static PyObject *__pyx_n_s_TemplateClass;
    static PyObject *__pyx_n_s_TemplateContinue;
    static PyObject *__pyx_n_s_TemplateDef;
    static PyObject *__pyx_n_s_TemplateDef___call;
    static PyObject *__pyx_n_s_TemplateDef___get;
    static PyObject *__pyx_n_s_TemplateDef___init;
    static PyObject *__pyx_n_s_TemplateDef___repr;
    static PyObject *__pyx_n_s_TemplateDef___str;
    static PyObject *__pyx_n_s_TemplateDef__parse_signature;
    static PyObject *__pyx_n_s_TemplateError;
    static PyObject *__pyx_n_s_TemplateError___init;
    static PyObject *__pyx_n_s_TemplateError___str;
    static PyObject *__pyx_n_s_TemplateObject;
    static PyObject *__pyx_n_s_TemplateObjectGetter;
    static PyObject *__pyx_n_s_TemplateObjectGetter___getattr;
    static PyObject *__pyx_n_s_TemplateObjectGetter___init;
    static PyObject *__pyx_n_s_TemplateObjectGetter___repr;
    static PyObject *__pyx_n_s_TemplateObjectGetter__template;
    static PyObject *__pyx_n_s_TemplateObject___init;
    static PyObject *__pyx_n_s_TemplateObject___repr;
    static PyObject *__pyx_n_s_TemplateObject__name;
    static PyObject *__pyx_n_s_Template___init;
    static PyObject *__pyx_n_s_Template___repr;
    static PyObject *__pyx_n_s_Template__add_line_info;
    static PyObject *__pyx_n_s_Template__eval;
    static PyObject *__pyx_n_s_Template__exec;
    static PyObject *__pyx_n_s_Template__interpret;
    static PyObject *__pyx_n_s_Template__interpret_code;
    static PyObject *__pyx_n_s_Template__interpret_codes;
    static PyObject *__pyx_n_s_Template__interpret_for;
    static PyObject *__pyx_n_s_Template__interpret_if;
    static PyObject *__pyx_n_s_Template__interpret_inherit;
    static PyObject *__pyx_n_s_Template__repr;
    static PyObject *__pyx_n_s_Template_from_filename;
    static PyObject *__pyx_n_s_Template_substitute;
    static PyObject *__pyx_n_s_TypeError;
    static PyObject *__pyx_kp_s_Unexpected_argument_s;
    static PyObject *__pyx_kp_s_Unexpected_s;
    static PyObject *__pyx_kp_s_Unexpected_token_r_at_s;
    static PyObject *__pyx_n_s_UnicodeDecodeError;
    static PyObject *__pyx_n_s_UnicodeEncodeError;
    static PyObject *__pyx_kp_s_Unknown_code_r;
    static PyObject *__pyx_kp_s_Use_HTML_style_filling_including;
    static PyObject *__pyx_n_s_ValueError;
    static PyObject *__pyx_kp_s_You_can_only_give_one_positional;
    static PyObject *__pyx_kp_s_You_can_only_give_positional_or;
    static PyObject *__pyx_kp_s_You_cannot_have_in_the_variable;
    static PyObject *__pyx_kp_s_You_cannot_use_inheritance_witho;
    static PyObject *__pyx_kp_s_You_must_give_a_template_filenam;
    static PyObject *__pyx_kp_s__100;
    static PyObject *__pyx_kp_s__101;
    static PyObject *__pyx_kp_s__102;
    static PyObject *__pyx_kp_s__103;
    static PyObject *__pyx_kp_s__104;
    static PyObject *__pyx_kp_s__117;
    static PyObject *__pyx_kp_s__12;
    static PyObject *__pyx_kp_s__126;
    static PyObject *__pyx_kp_s__127;
    static PyObject *__pyx_n_s__19;
    static PyObject *__pyx_kp_s__22;
    static PyObject *__pyx_kp_s__24;
    static PyObject *__pyx_kp_s__28;
    static PyObject *__pyx_kp_s__31;
    static PyObject *__pyx_kp_s__33;
    static PyObject *__pyx_kp_s__47;
    static PyObject *__pyx_kp_s__55;
    static PyObject *__pyx_kp_s__70;
    static PyObject *__pyx_kp_s__71;
    static PyObject *__pyx_kp_s__77;
    static PyObject *__pyx_kp_s__89;
    static PyObject *__pyx_kp_s__9;
    static PyObject *__pyx_kp_u__9;
    static PyObject *__pyx_kp_s__99;
    static PyObject *__pyx_kp_s_a_z__a_z0_9;
    static PyObject *__pyx_n_s_action;
    static PyObject *__pyx_n_s_add_line_info;
    static PyObject *__pyx_n_s_add_option;
    static PyObject *__pyx_n_s_all;
    static PyObject *__pyx_n_s_append;
    static PyObject *__pyx_n_s_arg0;
    static PyObject *__pyx_n_s_args;
    static PyObject *__pyx_n_s_argv;
    static PyObject *__pyx_n_s_ascii;
    static PyObject *__pyx_n_s_attr;
    static PyObject *__pyx_n_s_base;
    static PyObject *__pyx_n_s_basestring;
    static PyObject *__pyx_n_s_body;
    static PyObject *__pyx_n_s_body_2;
    static PyObject *__pyx_n_s_bool;
    static PyObject *__pyx_n_s_bound_self;
    static PyObject *__pyx_n_s_bound_self_2;
    static PyObject *__pyx_n_s_break;
    static PyObject *__pyx_n_s_builtins;
    static PyObject *__pyx_n_s_bunch;
    static PyObject *__pyx_n_s_bunch___getattr;
    static PyObject *__pyx_n_s_bunch___getitem;
    static PyObject *__pyx_n_s_bunch___init;
    static PyObject *__pyx_n_s_bunch___repr;
    static PyObject *__pyx_n_s_bunch___setattr;
    static PyObject *__pyx_n_s_bytes;
    static PyObject *__pyx_n_s_c;
    static PyObject *__pyx_n_s_call;
    static PyObject *__pyx_n_s_caller;
    static PyObject *__pyx_n_s_cgi;
    static PyObject *__pyx_n_s_chunks;
    static PyObject *__pyx_n_s_class;
    static PyObject *__pyx_n_s_close;
    static PyObject *__pyx_n_s_cls;
    static PyObject *__pyx_n_s_code;
    static PyObject *__pyx_n_s_codes;
    static PyObject *__pyx_n_s_coerce_text;
    static PyObject *__pyx_n_s_column;
    static PyObject *__pyx_n_s_comment;
    static PyObject *__pyx_n_s_compat3;
    static PyObject *__pyx_n_s_compile;
    static PyObject *__pyx_n_s_cond;
    static PyObject *__pyx_n_s_content;
    static PyObject *__pyx_n_s_context;
    static PyObject *__pyx_n_s_continue;
    static PyObject *__pyx_kp_s_continue_outside_of_for_loop;
    static PyObject *__pyx_n_s_copy;
    static PyObject *__pyx_n_s_count;
    static PyObject *__pyx_n_s_current;
    static PyObject *__pyx_n_s_decode;
    static PyObject *__pyx_n_s_def;
    static PyObject *__pyx_kp_s_def_2;
    static PyObject *__pyx_n_s_default;
    static PyObject *__pyx_kp_s_default_2;
    static PyObject *__pyx_n_s_default_encoding;
    static PyObject *__pyx_n_s_default_expr;
    static PyObject *__pyx_n_s_default_inherit;
    static PyObject *__pyx_n_s_default_namespace;
    static PyObject *__pyx_kp_s_default_x_y_is_not_supported;
    static PyObject *__pyx_n_s_defaults;
    static PyObject *__pyx_n_s_defs;
    static PyObject *__pyx_n_s_delimeters;
    static PyObject *__pyx_n_s_dest;
    static PyObject *__pyx_n_s_dirname;
    static PyObject *__pyx_n_s_dist;
    static PyObject *__pyx_n_s_doc;
    static PyObject *__pyx_n_s_e;
    static PyObject *__pyx_n_s_ecol;
    static PyObject *__pyx_kp_s_elif;
    static PyObject *__pyx_n_s_elif_2;
    static PyObject *__pyx_n_s_else;
    static PyObject *__pyx_n_s_encode;
    static PyObject *__pyx_n_s_encoding;
    static PyObject *__pyx_n_s_end;
    static PyObject *__pyx_n_s_end_braces;
    static PyObject *__pyx_n_s_end_pos;
    static PyObject *__pyx_n_s_enddef;
    static PyObject *__pyx_n_s_endfor;
    static PyObject *__pyx_n_s_endif;
    static PyObject *__pyx_n_s_endswith;
    static PyObject *__pyx_n_s_enumerate;
    static PyObject *__pyx_kp_s_env;
    static PyObject *__pyx_n_s_environ;
    static PyObject *__pyx_n_s_erow;
    static PyObject *__pyx_n_s_escape;
    static PyObject *__pyx_n_s_eval;
    static PyObject *__pyx_n_s_eval_2;
    static PyObject *__pyx_n_s_exec;
    static PyObject *__pyx_n_s_exit;
    static PyObject *__pyx_n_s_expr;
    static PyObject *__pyx_n_s_extra_kw;
    static PyObject *__pyx_n_s_f;
    static PyObject *__pyx_n_s_f_globals;
    static PyObject *__pyx_n_s_f_lineno;
    static PyObject *__pyx_n_s_file;
    static PyObject *__pyx_n_s_file_2;
    static PyObject *__pyx_n_s_filename;
    static PyObject *__pyx_n_s_fill_command;
    static PyObject *__pyx_n_s_fill_command_usage;
    static PyObject *__pyx_n_s_find_position;
    static PyObject *__pyx_n_s_finditer;
    static PyObject *__pyx_n_s_first;
    static PyObject *__pyx_n_s_for;
    static PyObject *__pyx_kp_s_for_2;
    static PyObject *__pyx_n_s_force;
    static PyObject *__pyx_n_s_from_filename;
    static PyObject *__pyx_n_s_from_template;
    static PyObject *__pyx_n_s_func;
    static PyObject *__pyx_n_s_func_name;
    static PyObject *__pyx_n_s_func_name_2;
    static PyObject *__pyx_n_s_func_signature;
    static PyObject *__pyx_n_s_func_signature_2;
    static PyObject *__pyx_n_s_generate_tokens;
    static PyObject *__pyx_n_s_get;
    static PyObject *__pyx_n_s_get_2;
    static PyObject *__pyx_n_s_get_distribution;
    static PyObject *__pyx_n_s_get_file_template;
    static PyObject *__pyx_n_s_get_template;
    static PyObject *__pyx_n_s_get_token;
    static PyObject *__pyx_n_s_getattr;
    static PyObject *__pyx_n_s_getframe;
    static PyObject *__pyx_n_s_getitem;
    static PyObject *__pyx_n_s_globals;
    static PyObject *__pyx_n_s_group;
    static PyObject *__pyx_n_s_help;
    static PyObject *__pyx_n_s_hex;
    static PyObject *__pyx_n_s_html;
    static PyObject *__pyx_n_s_html_2;
    static PyObject *__pyx_kp_s_html_3;
    static PyObject *__pyx_n_s_html___html;
    static PyObject *__pyx_n_s_html___init;
    static PyObject *__pyx_n_s_html___repr;
    static PyObject *__pyx_n_s_html___str;
    static PyObject *__pyx_n_s_html_quote;
    static PyObject *__pyx_n_s_i;
    static PyObject *__pyx_n_s_id;
    static PyObject *__pyx_kp_s_if;
    static PyObject *__pyx_n_s_if_2;
    static PyObject *__pyx_kp_s_if_elif_for_def_inherit_default;
    static PyObject *__pyx_n_s_import;
    static PyObject *__pyx_n_s_in_expr;
    static PyObject *__pyx_kp_s_in_file_s;
    static PyObject *__pyx_n_s_in_re;
    static PyObject *__pyx_kp_s_in_s;
    static PyObject *__pyx_kp_s_in_string_r;
    static PyObject *__pyx_n_s_index;
    static PyObject *__pyx_n_s_inherit;
    static PyObject *__pyx_n_s_inherit_2;
    static PyObject *__pyx_kp_s_inherit_3;
    static PyObject *__pyx_n_s_inherit_template;
    static PyObject *__pyx_n_s_init;
    static PyObject *__pyx_n_s_interpret;
    static PyObject *__pyx_n_s_interpret_code;
    static PyObject *__pyx_n_s_interpret_codes;
    static PyObject *__pyx_n_s_interpret_for;
    static PyObject *__pyx_n_s_interpret_if;
    static PyObject *__pyx_n_s_interpret_inherit;
    static PyObject *__pyx_kp_s_invalid_syntax_in_expression_s;
    static PyObject *__pyx_n_s_io;
    static PyObject *__pyx_n_s_is_unicode;
    static PyObject *__pyx_n_s_isolate_expression;
    static PyObject *__pyx_n_s_item;
    static PyObject *__pyx_n_s_items;
    static PyObject *__pyx_n_s_iter;
    static PyObject *__pyx_n_s_join;
    static PyObject *__pyx_n_s_k;
    static PyObject *__pyx_n_s_key;
    static PyObject *__pyx_n_s_kw;
    static PyObject *__pyx_n_s_last;
    static PyObject *__pyx_n_s_last_index;
    static PyObject *__pyx_n_s_last_pos;
    static PyObject *__pyx_n_s_last_trim;
    static PyObject *__pyx_n_s_latin1;
    static PyObject *__pyx_n_s_lead_whitespace_re;
    static PyObject *__pyx_n_s_lex;
    static PyObject *__pyx_kp_u_lex_line_629;
    static PyObject *__pyx_n_s_line;
    static PyObject *__pyx_n_s_line_offset;
    static PyObject *__pyx_n_s_lineno;
    static PyObject *__pyx_n_s_lines;
    static PyObject *__pyx_n_s_looper;
    static PyObject *__pyx_n_s_looper_2;
    static PyObject *__pyx_n_s_lstrip;
    static PyObject *__pyx_n_s_m;
    static PyObject *__pyx_n_s_main;
    static PyObject *__pyx_n_s_match;
    static PyObject *__pyx_n_s_message;
    static PyObject *__pyx_n_s_metaclass;
    static PyObject *__pyx_n_s_metavar;
    static PyObject *__pyx_n_s_module;
    static PyObject *__pyx_n_s_msg;
    static PyObject *__pyx_kp_s_n_r_t;
    static PyObject *__pyx_n_s_name;
    static PyObject *__pyx_n_s_name_2;
    static PyObject *__pyx_n_s_name_3;
    static PyObject *__pyx_n_s_namespace;
    static PyObject *__pyx_n_s_nest_count;
    static PyObject *__pyx_n_s_nest_type;
    static PyObject *__pyx_n_s_next;
    static PyObject *__pyx_n_s_next_chunk;
    static PyObject *__pyx_n_s_nonzero;
    static PyObject *__pyx_n_s_ns;
    static PyObject *__pyx_n_s_ns_2;
    static PyObject *__pyx_kp_s_o;
    static PyObject *__pyx_n_s_obj;
    static PyObject *__pyx_n_s_object;
    static PyObject *__pyx_n_s_open;
    static PyObject *__pyx_n_s_options;
    static PyObject *__pyx_n_s_optparse;
    static PyObject *__pyx_n_s_os;
    static PyObject *__pyx_n_s_out;
    static PyObject *__pyx_kp_s_output;
    static PyObject *__pyx_n_s_output_2;
    static PyObject *__pyx_n_s_parse;
    static PyObject *__pyx_n_s_parse_args;
    static PyObject *__pyx_n_s_parse_cond;
    static PyObject *__pyx_n_s_parse_def;
    static PyObject *__pyx_n_s_parse_default;
    static PyObject *__pyx_n_s_parse_expr;
    static PyObject *__pyx_n_s_parse_for;
    static PyObject *__pyx_n_s_parse_inherit;
    static PyObject *__pyx_kp_u_parse_line_766;
    static PyObject *__pyx_n_s_parse_one_cond;
    static PyObject *__pyx_n_s_parse_signature;
    static PyObject *__pyx_n_s_parse_signature_2;
    static PyObject *__pyx_n_s_parse_signature_locals_get_token;
    static PyObject *__pyx_n_s_parsed;
    static PyObject *__pyx_n_s_parser;
    static PyObject *__pyx_n_s_part;
    static PyObject *__pyx_n_s_parts;
    static PyObject *__pyx_n_s_paste_script_template_renderer;
    static PyObject *__pyx_n_s_path;
    static PyObject *__pyx_n_s_pieces;
    static PyObject *__pyx_n_s_pkg_resources;
    static PyObject *__pyx_n_s_plain;
    static PyObject *__pyx_n_s_pop;
    static PyObject *__pyx_n_s_pos;
    static PyObject *__pyx_n_s_pos_2;
    static PyObject *__pyx_n_s_position;
    static PyObject *__pyx_n_s_prepare;
    static PyObject *__pyx_n_s_prev;
    static PyObject *__pyx_n_s_prev_ok;
    static PyObject *__pyx_n_s_print;
    static PyObject *__pyx_kp_s_prog_OPTIONS_TEMPLATE_arg_value;
    static PyObject *__pyx_n_s_py;
    static PyObject *__pyx_kp_s_py_2;
    static PyObject *__pyx_kp_s_pyc;
    static PyObject *__pyx_kp_s_pyo;
    static PyObject *__pyx_n_s_qualname;
    static PyObject *__pyx_n_s_quote;
    static PyObject *__pyx_n_s_rb;
    static PyObject *__pyx_n_s_re;
    static PyObject *__pyx_n_s_read;
    static PyObject *__pyx_n_s_readline;
    static PyObject *__pyx_n_s_reason;
    static PyObject *__pyx_n_s_replace;
    static PyObject *__pyx_n_s_repr;
    static PyObject *__pyx_n_s_repr_2;
    static PyObject *__pyx_n_s_result;
    static PyObject *__pyx_n_s_rfind;
    static PyObject *__pyx_kp_s_s;
    static PyObject *__pyx_n_s_s_2;
    static PyObject *__pyx_kp_s_s_around_r;
    static PyObject *__pyx_kp_s_s_at_line_s_column_s;
    static PyObject *__pyx_kp_s_s_in_s;
    static PyObject *__pyx_kp_s_s_inside_expression;
    static PyObject *__pyx_kp_s_s_outside_expression;
    static PyObject *__pyx_kp_s_s_outside_of_an_if_block;
    static PyObject *__pyx_kp_s_s_r;
    static PyObject *__pyx_kp_s_s_r_2;
    static PyObject *__pyx_kp_s_s_s;
    static PyObject *__pyx_kp_s_s_s_2;
    static PyObject *__pyx_kp_s_s_s_3;
    static PyObject *__pyx_kp_s_s_s_name_r;
    static PyObject *__pyx_kp_s_s_with_no_expression;
    static PyObject *__pyx_n_s_scol;
    static PyObject *__pyx_n_s_search;
    static PyObject *__pyx_n_s_self;
    static PyObject *__pyx_n_s_self_2;
    static PyObject *__pyx_n_s_setattr;
    static PyObject *__pyx_n_s_sig;
    static PyObject *__pyx_n_s_sig_args;
    static PyObject *__pyx_n_s_sig_text;
    static PyObject *__pyx_n_s_signature;
    static PyObject *__pyx_n_s_single_statements;
    static PyObject *__pyx_n_s_split;
    static PyObject *__pyx_n_s_splitlines;
    static PyObject *__pyx_n_s_srow;
    static PyObject *__pyx_n_s_stacklevel;
    static PyObject *__pyx_n_s_start;
    static PyObject *__pyx_n_s_start_braces;
    static PyObject *__pyx_n_s_start_pos;
    static PyObject *__pyx_n_s_startswith;
    static PyObject *__pyx_n_s_statement_re;
    static PyObject *__pyx_n_s_stdin;
    static PyObject *__pyx_kp_s_stdin_2;
    static PyObject *__pyx_n_s_stdout;
    static PyObject *__pyx_n_s_store_true;
    static PyObject *__pyx_n_s_str;
    static PyObject *__pyx_kp_s_string;
    static PyObject *__pyx_n_s_string_2;
    static PyObject *__pyx_n_s_strip;
    static PyObject *__pyx_n_s_sub;
    static PyObject *__pyx_n_s_sub_html;
    static PyObject *__pyx_n_s_subdefs;
    static PyObject *__pyx_n_s_substitute;
    static PyObject *__pyx_n_s_sys;
    static PyObject *__pyx_kp_s_t_n;
    static PyObject *__pyx_kp_s_tempita_function_s_s_at_s_s;
    static PyObject *__pyx_n_s_templ;
    static PyObject *__pyx_n_s_template;
    static PyObject *__pyx_n_s_template_2;
    static PyObject *__pyx_n_s_template_content;
    static PyObject *__pyx_n_s_template_name;
    static PyObject *__pyx_n_s_template_name_2;
    static PyObject *__pyx_n_s_template_obj;
    static PyObject *__pyx_n_s_test;
    static PyObject *__pyx_kp_s_tmp_pip_install_9i_72p5f_cython;
    static PyObject *__pyx_n_s_tmpl;
    static PyObject *__pyx_n_s_tok_string;
    static PyObject *__pyx_n_s_tok_type;
    static PyObject *__pyx_n_s_token_re;
    static PyObject *__pyx_n_s_tokenize;
    static PyObject *__pyx_n_s_tokens;
    static PyObject *__pyx_n_s_traceback_hide;
    static PyObject *__pyx_n_s_trail_whitespace_re;
    static PyObject *__pyx_n_s_trim_lex;
    static PyObject *__pyx_kp_u_trim_lex_line_698;
    static PyObject *__pyx_n_s_trim_whitespace;
    static PyObject *__pyx_n_s_type;
    static PyObject *__pyx_n_s_unicode;
    static PyObject *__pyx_n_s_unicode_2;
    static PyObject *__pyx_n_s_unicode_3;
    static PyObject *__pyx_n_s_unnest_type;
    static PyObject *__pyx_n_s_update;
    static PyObject *__pyx_n_s_url;
    static PyObject *__pyx_n_s_url_quote;
    static PyObject *__pyx_n_s_urllib;
    static PyObject *__pyx_n_s_urllib_parse;
    static PyObject *__pyx_n_s_usage;
    static PyObject *__pyx_n_s_use_env;
    static PyObject *__pyx_n_s_use_html;
    static PyObject *__pyx_n_s_utf8;
    static PyObject *__pyx_n_s_v;
    static PyObject *__pyx_n_s_value;
    static PyObject *__pyx_n_s_value_expr;
    static PyObject *__pyx_n_s_values;
    static PyObject *__pyx_n_s_var;
    static PyObject *__pyx_n_s_var_arg;
    static PyObject *__pyx_n_s_var_arg_type;
    static PyObject *__pyx_n_s_var_args;
    static PyObject *__pyx_n_s_var_kw;
    static PyObject *__pyx_n_s_var_name;
    static PyObject *__pyx_n_s_var_re;
    static PyObject *__pyx_n_s_vars;
    static PyObject *__pyx_n_s_version;
    static PyObject *__pyx_n_s_wb;
    static PyObject *__pyx_n_s_write;
    static PyObject *__pyx_n_s_xmlcharrefreplace;
    static PyObject *__pyx_n_s_zip;
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_position, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_get_file_template(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_from_template); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_content, PyObject *__pyx_v_name, PyObject *__pyx_v_namespace, PyObject *__pyx_v_stacklevel, PyObject *__pyx_v_get_template, PyObject *__pyx_v_default_inherit, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_42__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_2from_filename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_filename, PyObject *__pyx_v_namespace, PyObject *__pyx_v_encoding, PyObject *__pyx_v_default_inherit, PyObject *__pyx_v_get_template); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_6substitute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_8_interpret(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ns); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_10_interpret_inherit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_body, PyObject *__pyx_v_defs, PyObject *__pyx_v_inherit_template, PyObject *__pyx_v_ns); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_12_interpret_codes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_codes, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_14_interpret_code(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_16_interpret_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_expr, PyObject *__pyx_v_content, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_18_interpret_if(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parts, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_20_eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_22_exec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_24_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_26_add_line_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_msg, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_2sub(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_delimeters, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4paste_script_template_renderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_vars, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_4__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_6__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_8__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_4__html__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_6__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6html_quote(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_force); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_10attr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_12HTMLTemplate__repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_12sub_html(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_template, PyObject *__pyx_v_func_name, PyObject *__pyx_v_func_signature, PyObject *__pyx_v_body, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos, PyObject *__pyx_v_bound_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_6__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_8__get__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_10_parse_signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_template_obj); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_2__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty___call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kw); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_6__unicode__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_8__iter__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_10__bool__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14lex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_name, PyObject *__pyx_v_trim_whitespace, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_16trim_lex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_18find_position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_index, PyObject *__pyx_v_last_index, PyObject *__pyx_v_last_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_name, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_22parse_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_24parse_cond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_26parse_one_cond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_28parse_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_30parse_default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_32parse_inherit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_34parse_def(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_15parse_signature_get_token(PyObject *__pyx_self, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_36parse_signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sig_text, PyObject *__pyx_v_name, PyObject *__pyx_v_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_38isolate_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_start_pos, PyObject *__pyx_v_end_pos); /* proto */
static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_40fill_command(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_tp_new_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_slice__4;
static PyObject *__pyx_slice__5;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_slice__11;
static PyObject *__pyx_slice__14;
static PyObject *__pyx_slice__21;
static PyObject *__pyx_slice__25;
static PyObject *__pyx_slice__27;
static PyObject *__pyx_slice__38;
static PyObject *__pyx_slice__40;
static PyObject *__pyx_slice__49;
static PyObject *__pyx_slice__50;
static PyObject *__pyx_slice__53;
static PyObject *__pyx_slice__54;
static PyObject *__pyx_slice__57;
static PyObject *__pyx_slice__59;
static PyObject *__pyx_slice__61;
static PyObject *__pyx_slice__64;
static PyObject *__pyx_slice__68;
static PyObject *__pyx_slice__69;
static PyObject *__pyx_slice__74;
static PyObject *__pyx_slice__80;
static PyObject *__pyx_slice__83;
static PyObject *__pyx_slice__84;
static PyObject *__pyx_slice__88;
static PyObject *__pyx_slice__91;
static PyObject *__pyx_slice__95;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__85;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_slice__106;
static PyObject *__pyx_slice__112;
static PyObject *__pyx_slice__116;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__108;
static PyObject *__pyx_tuple__109;
static PyObject *__pyx_tuple__110;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__114;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__118;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__121;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__124;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
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__160;
static PyObject *__pyx_tuple__162;
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__184;
static PyObject *__pyx_tuple__186;
static PyObject *__pyx_tuple__188;
static PyObject *__pyx_tuple__190;
static PyObject *__pyx_tuple__192;
static PyObject *__pyx_tuple__194;
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__204;
static PyObject *__pyx_tuple__206;
static PyObject *__pyx_tuple__208;
static PyObject *__pyx_tuple__210;
static PyObject *__pyx_tuple__212;
static PyObject *__pyx_tuple__214;
static PyObject *__pyx_tuple__216;
static PyObject *__pyx_tuple__218;
static PyObject *__pyx_tuple__220;
static PyObject *__pyx_tuple__222;
static PyObject *__pyx_tuple__224;
static PyObject *__pyx_tuple__226;
static PyObject *__pyx_tuple__228;
static PyObject *__pyx_tuple__230;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__232;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__234;
static PyObject *__pyx_tuple__236;
static PyObject *__pyx_tuple__238;
static PyObject *__pyx_tuple__240;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__244;
static PyObject *__pyx_tuple__246;
static PyObject *__pyx_tuple__248;
static PyObject *__pyx_tuple__250;
static PyObject *__pyx_tuple__252;
static PyObject *__pyx_tuple__254;
static PyObject *__pyx_tuple__256;
static PyObject *__pyx_tuple__258;
static PyObject *__pyx_tuple__260;
static PyObject *__pyx_tuple__262;
static PyObject *__pyx_codeobj__97;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__129;
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__161;
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__185;
static PyObject *__pyx_codeobj__187;
static PyObject *__pyx_codeobj__189;
static PyObject *__pyx_codeobj__191;
static PyObject *__pyx_codeobj__193;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__205;
static PyObject *__pyx_codeobj__207;
static PyObject *__pyx_codeobj__209;
static PyObject *__pyx_codeobj__211;
static PyObject *__pyx_codeobj__213;
static PyObject *__pyx_codeobj__215;
static PyObject *__pyx_codeobj__217;
static PyObject *__pyx_codeobj__219;
static PyObject *__pyx_codeobj__221;
static PyObject *__pyx_codeobj__223;
static PyObject *__pyx_codeobj__225;
static PyObject *__pyx_codeobj__227;
static PyObject *__pyx_codeobj__229;
static PyObject *__pyx_codeobj__235;
static PyObject *__pyx_codeobj__237;
static PyObject *__pyx_codeobj__239;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__245;
static PyObject *__pyx_codeobj__247;
static PyObject *__pyx_codeobj__249;
static PyObject *__pyx_codeobj__251;
static PyObject *__pyx_codeobj__253;
static PyObject *__pyx_codeobj__255;
static PyObject *__pyx_codeobj__257;
static PyObject *__pyx_codeobj__259;
static PyObject *__pyx_codeobj__261;

/* "Cython/Tempita/_tempita.py":59
 *     """
 * 
 *     def __init__(self, message, position, name=None):             # <<<<<<<<<<<<<<
 *         Exception.__init__(self, message)
 *         self.position = position
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_13TemplateError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_message = 0;
  PyObject *__pyx_v_position = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,&__pyx_n_s_position,&__pyx_n_s_name,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  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_message)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 59, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 59, __pyx_L3_error)
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
          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_ERR(0, 59, __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);
        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_message = values[1];
    __pyx_v_position = values[2];
    __pyx_v_name = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 59, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_position, __pyx_v_name);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_position, PyObject *__pyx_v_name) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":60
 * 
 *     def __init__(self, message, position, name=None):
 *         Exception.__init__(self, message)             # <<<<<<<<<<<<<<
 *         self.position = position
 *         self.name = name
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_message};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_message};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_message);
    __Pyx_GIVEREF(__pyx_v_message);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_message);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":61
 *     def __init__(self, message, position, name=None):
 *         Exception.__init__(self, message)
 *         self.position = position             # <<<<<<<<<<<<<<
 *         self.name = name
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_position, __pyx_v_position) < 0) __PYX_ERR(0, 61, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":62
 *         Exception.__init__(self, message)
 *         self.position = position
 *         self.name = name             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 62, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":59
 *     """
 * 
 *     def __init__(self, message, position, name=None):             # <<<<<<<<<<<<<<
 *         Exception.__init__(self, message)
 *         self.position = position
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":64
 *         self.name = name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         msg = ' '.join(self.args)
 *         if self.position:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_13TemplateError_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_3__str__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_13TemplateError_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_msg = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":65
 * 
 *     def __str__(self):
 *         msg = ' '.join(self.args)             # <<<<<<<<<<<<<<
 *         if self.position:
 *             msg = '%s at line %s column %s' % (
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_msg = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":66
 *     def __str__(self):
 *         msg = ' '.join(self.args)
 *         if self.position:             # <<<<<<<<<<<<<<
 *             msg = '%s at line %s column %s' % (
 *                 msg, self.position[0], self.position[1])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":68
 *         if self.position:
 *             msg = '%s at line %s column %s' % (
 *                 msg, self.position[0], self.position[1])             # <<<<<<<<<<<<<<
 *         if self.name:
 *             msg += ' in %s' % self.name
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_msg);
    __Pyx_GIVEREF(__pyx_v_msg);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":67
 *         msg = ' '.join(self.args)
 *         if self.position:
 *             msg = '%s at line %s column %s' % (             # <<<<<<<<<<<<<<
 *                 msg, self.position[0], self.position[1])
 *         if self.name:
 */
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_at_line_s_column_s, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":66
 *     def __str__(self):
 *         msg = ' '.join(self.args)
 *         if self.position:             # <<<<<<<<<<<<<<
 *             msg = '%s at line %s column %s' % (
 *                 msg, self.position[0], self.position[1])
 */
  }

  /* "Cython/Tempita/_tempita.py":69
 *             msg = '%s at line %s column %s' % (
 *                 msg, self.position[0], self.position[1])
 *         if self.name:             # <<<<<<<<<<<<<<
 *             msg += ' in %s' % self.name
 *         return msg
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":70
 *                 msg, self.position[0], self.position[1])
 *         if self.name:
 *             msg += ' in %s' % self.name             # <<<<<<<<<<<<<<
 *         return msg
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_in_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":69
 *             msg = '%s at line %s column %s' % (
 *                 msg, self.position[0], self.position[1])
 *         if self.name:             # <<<<<<<<<<<<<<
 *             msg += ' in %s' % self.name
 *         return msg
 */
  }

  /* "Cython/Tempita/_tempita.py":71
 *         if self.name:
 *             msg += ' in %s' % self.name
 *         return msg             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":64
 *         self.name = name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         msg = ' '.join(self.args)
 *         if self.position:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateError.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":82
 * 
 * 
 * def get_file_template(name, from_template):             # <<<<<<<<<<<<<<
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_1get_file_template(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_1get_file_template = {"get_file_template", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_1get_file_template, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_1get_file_template(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_from_template = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_file_template (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_from_template,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_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_from_template)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_file_template", 1, 2, 2, 1); __PYX_ERR(0, 82, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_file_template") < 0)) __PYX_ERR(0, 82, __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_name = values[0];
    __pyx_v_from_template = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_file_template", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.get_file_template", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_get_file_template(__pyx_self, __pyx_v_name, __pyx_v_from_template);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_get_file_template(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_from_template) {
  PyObject *__pyx_v_path = 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;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("get_file_template", 0);

  /* "Cython/Tempita/_tempita.py":83
 * 
 * def get_file_template(name, from_template):
 *     path = os.path.join(os.path.dirname(from_template.name), name)             # <<<<<<<<<<<<<<
 *     return from_template.__class__.from_filename(
 *         path, namespace=from_template.namespace,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __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_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_dirname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_name};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_name);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_path = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":84
 * def get_file_template(name, from_template):
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(             # <<<<<<<<<<<<<<
 *         path, namespace=from_template.namespace,
 *         get_template=from_template.get_template)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_from_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":85
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(
 *         path, namespace=from_template.namespace,             # <<<<<<<<<<<<<<
 *         get_template=from_template.get_template)
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path);
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_namespace, __pyx_t_3) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":86
 *     return from_template.__class__.from_filename(
 *         path, namespace=from_template.namespace,
 *         get_template=from_template.get_template)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_get_template); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_get_template, __pyx_t_3) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":84
 * def get_file_template(name, from_template):
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(             # <<<<<<<<<<<<<<
 *         path, namespace=from_template.namespace,
 *         get_template=from_template.get_template)
 */
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __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_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":82
 * 
 * 
 * def get_file_template(name, from_template):             # <<<<<<<<<<<<<<
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("Cython.Tempita._tempita.get_file_template", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_path);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":100
 *     default_inherit = None
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,             # <<<<<<<<<<<<<<
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_content = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_namespace = 0;
  PyObject *__pyx_v_stacklevel = 0;
  PyObject *__pyx_v_get_template = 0;
  PyObject *__pyx_v_default_inherit = 0;
  PyObject *__pyx_v_line_offset = 0;
  PyObject *__pyx_v_delimeters = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_content,&__pyx_n_s_name,&__pyx_n_s_namespace,&__pyx_n_s_stacklevel,&__pyx_n_s_get_template,&__pyx_n_s_default_inherit,&__pyx_n_s_line_offset,&__pyx_n_s_delimeters,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));

    /* "Cython/Tempita/_tempita.py":101
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,
 *                  get_template=None, default_inherit=None, line_offset=0,             # <<<<<<<<<<<<<<
 *                  delimeters=None):
 *         self.content = content
 */
    values[5] = ((PyObject *)((PyObject *)Py_None));
    values[6] = ((PyObject *)((PyObject *)Py_None));
    values[7] = ((PyObject *)((PyObject *)__pyx_int_0));

    /* "Cython/Tempita/_tempita.py":102
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):             # <<<<<<<<<<<<<<
 *         self.content = content
 * 
 */
    values[8] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_content)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 9, 1); __PYX_ERR(0, 100, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_namespace);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stacklevel);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_get_template);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default_inherit);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line_offset);
          if (value) { values[7] = value; kw_args--; }
        }
        case  8:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimeters);
          if (value) { values[8] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 100, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_content = values[1];
    __pyx_v_name = values[2];
    __pyx_v_namespace = values[3];
    __pyx_v_stacklevel = values[4];
    __pyx_v_get_template = values[5];
    __pyx_v_default_inherit = values[6];
    __pyx_v_line_offset = values[7];
    __pyx_v_delimeters = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 100, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template___init__(__pyx_self, __pyx_v_self, __pyx_v_content, __pyx_v_name, __pyx_v_namespace, __pyx_v_stacklevel, __pyx_v_get_template, __pyx_v_default_inherit, __pyx_v_line_offset, __pyx_v_delimeters);

  /* "Cython/Tempita/_tempita.py":100
 *     default_inherit = None
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,             # <<<<<<<<<<<<<<
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 */

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_content, PyObject *__pyx_v_name, PyObject *__pyx_v_namespace, PyObject *__pyx_v_stacklevel, PyObject *__pyx_v_get_template, PyObject *__pyx_v_default_inherit, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters) {
  PyObject *__pyx_v_caller = NULL;
  PyObject *__pyx_v_globals = NULL;
  PyObject *__pyx_v_lineno = 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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_INCREF(__pyx_v_namespace);
  __Pyx_INCREF(__pyx_v_delimeters);

  /* "Cython/Tempita/_tempita.py":103
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 *         self.content = content             # <<<<<<<<<<<<<<
 * 
 *         # set delimeters
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_content, __pyx_v_content) < 0) __PYX_ERR(0, 103, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":106
 * 
 *         # set delimeters
 *         if delimeters is None:             # <<<<<<<<<<<<<<
 *             delimeters = (self.default_namespace['start_braces'],
 *                           self.default_namespace['end_braces'])
 */
  __pyx_t_1 = (__pyx_v_delimeters == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":107
 *         # set delimeters
 *         if delimeters is None:
 *             delimeters = (self.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                           self.default_namespace['end_braces'])
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_start_braces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":108
 *         if delimeters is None:
 *             delimeters = (self.default_namespace['start_braces'],
 *                           self.default_namespace['end_braces'])             # <<<<<<<<<<<<<<
 *         else:
 *             #assert len(delimeters) == 2 and all([isinstance(delimeter, basestring)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_end_braces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":107
 *         # set delimeters
 *         if delimeters is None:
 *             delimeters = (self.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                           self.default_namespace['end_braces'])
 *         else:
 */
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":106
 * 
 *         # set delimeters
 *         if delimeters is None:             # <<<<<<<<<<<<<<
 *             delimeters = (self.default_namespace['start_braces'],
 *                           self.default_namespace['end_braces'])
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":112
 *             #assert len(delimeters) == 2 and all([isinstance(delimeter, basestring)
 *             #                                     for delimeter in delimeters])
 *             self.default_namespace = self.__class__.default_namespace.copy()             # <<<<<<<<<<<<<<
 *             self.default_namespace['start_braces'] = delimeters[0]
 *             self.default_namespace['end_braces'] = delimeters[1]
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 112, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace, __pyx_t_3) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":113
 *             #                                     for delimeter in delimeters])
 *             self.default_namespace = self.__class__.default_namespace.copy()
 *             self.default_namespace['start_braces'] = delimeters[0]             # <<<<<<<<<<<<<<
 *             self.default_namespace['end_braces'] = delimeters[1]
 *         self.delimeters = delimeters
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_n_s_start_braces, __pyx_t_3) < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":114
 *             self.default_namespace = self.__class__.default_namespace.copy()
 *             self.default_namespace['start_braces'] = delimeters[0]
 *             self.default_namespace['end_braces'] = delimeters[1]             # <<<<<<<<<<<<<<
 *         self.delimeters = delimeters
 * 
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_n_s_end_braces, __pyx_t_3) < 0)) __PYX_ERR(0, 114, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":115
 *             self.default_namespace['start_braces'] = delimeters[0]
 *             self.default_namespace['end_braces'] = delimeters[1]
 *         self.delimeters = delimeters             # <<<<<<<<<<<<<<
 * 
 *         self._unicode = is_unicode(content)
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_delimeters, __pyx_v_delimeters) < 0) __PYX_ERR(0, 115, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":117
 *         self.delimeters = delimeters
 * 
 *         self._unicode = is_unicode(content)             # <<<<<<<<<<<<<<
 *         if name is None and stacklevel is not None:
 *             try:
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_content); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_content};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_content};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_content);
      __Pyx_GIVEREF(__pyx_v_content);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_content);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unicode, __pyx_t_3) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":118
 * 
 *         self._unicode = is_unicode(content)
 *         if name is None and stacklevel is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 caller = sys._getframe(stacklevel)
 */
  __pyx_t_1 = (__pyx_v_name == Py_None);
  __pyx_t_7 = (__pyx_t_1 != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_2 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = (__pyx_v_stacklevel != Py_None);
  __pyx_t_1 = (__pyx_t_7 != 0);
  __pyx_t_2 = __pyx_t_1;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":119
 *         self._unicode = is_unicode(content)
 *         if name is None and stacklevel is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 caller = sys._getframe(stacklevel)
 *             except ValueError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "Cython/Tempita/_tempita.py":120
 *         if name is None and stacklevel is not None:
 *             try:
 *                 caller = sys._getframe(stacklevel)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 pass
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getframe); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_5) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_stacklevel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_stacklevel};
            __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_stacklevel};
            __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L7_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_3);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 120, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
            __Pyx_INCREF(__pyx_v_stacklevel);
            __Pyx_GIVEREF(__pyx_v_stacklevel);
            PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_stacklevel);
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_caller = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":119
 *         self._unicode = is_unicode(content)
 *         if name is None and stacklevel is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 caller = sys._getframe(stacklevel)
 *             except ValueError:
 */
      }

      /* "Cython/Tempita/_tempita.py":124
 *                 pass
 *             else:
 *                 globals = caller.f_globals             # <<<<<<<<<<<<<<
 *                 lineno = caller.f_lineno
 *                 if '__file__' in globals:
 */
      /*else:*/ {
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_caller, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_globals = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":125
 *             else:
 *                 globals = caller.f_globals
 *                 lineno = caller.f_lineno             # <<<<<<<<<<<<<<
 *                 if '__file__' in globals:
 *                     name = globals['__file__']
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_caller, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L9_except_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_lineno = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":126
 *                 globals = caller.f_globals
 *                 lineno = caller.f_lineno
 *                 if '__file__' in globals:             # <<<<<<<<<<<<<<
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 */
        __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_file, __pyx_v_globals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 126, __pyx_L9_except_error)
        __pyx_t_1 = (__pyx_t_2 != 0);
        if (__pyx_t_1) {

          /* "Cython/Tempita/_tempita.py":127
 *                 lineno = caller.f_lineno
 *                 if '__file__' in globals:
 *                     name = globals['__file__']             # <<<<<<<<<<<<<<
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 *                         name = name[:-1]
 */
          __pyx_t_3 = PyObject_GetItem(__pyx_v_globals, __pyx_n_s_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "Cython/Tempita/_tempita.py":128
 *                 if '__file__' in globals:
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):             # <<<<<<<<<<<<<<
 *                         name = name[:-1]
 *                 elif '__name__' in globals:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (!__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L17_bool_binop_done;
          }
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 128, __pyx_L9_except_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_1 = __pyx_t_2;
          __pyx_L17_bool_binop_done:;
          if (__pyx_t_1) {

            /* "Cython/Tempita/_tempita.py":129
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 *                         name = name[:-1]             # <<<<<<<<<<<<<<
 *                 elif '__name__' in globals:
 *                     name = globals['__name__']
 */
            __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L9_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
            __pyx_t_3 = 0;

            /* "Cython/Tempita/_tempita.py":128
 *                 if '__file__' in globals:
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):             # <<<<<<<<<<<<<<
 *                         name = name[:-1]
 *                 elif '__name__' in globals:
 */
          }

          /* "Cython/Tempita/_tempita.py":126
 *                 globals = caller.f_globals
 *                 lineno = caller.f_lineno
 *                 if '__file__' in globals:             # <<<<<<<<<<<<<<
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 */
          goto __pyx_L15;
        }

        /* "Cython/Tempita/_tempita.py":130
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 *                         name = name[:-1]
 *                 elif '__name__' in globals:             # <<<<<<<<<<<<<<
 *                     name = globals['__name__']
 *                 else:
 */
        __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_name_2, __pyx_v_globals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 130, __pyx_L9_except_error)
        __pyx_t_2 = (__pyx_t_1 != 0);
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":131
 *                         name = name[:-1]
 *                 elif '__name__' in globals:
 *                     name = globals['__name__']             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = '<string>'
 */
          __pyx_t_3 = PyObject_GetItem(__pyx_v_globals, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "Cython/Tempita/_tempita.py":130
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 *                         name = name[:-1]
 *                 elif '__name__' in globals:             # <<<<<<<<<<<<<<
 *                     name = globals['__name__']
 *                 else:
 */
          goto __pyx_L15;
        }

        /* "Cython/Tempita/_tempita.py":133
 *                     name = globals['__name__']
 *                 else:
 *                     name = '<string>'             # <<<<<<<<<<<<<<
 *                 if lineno:
 *                     name += ':%s' % lineno
 */
        /*else*/ {
          __Pyx_INCREF(__pyx_kp_s_string);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_kp_s_string);
        }
        __pyx_L15:;

        /* "Cython/Tempita/_tempita.py":134
 *                 else:
 *                     name = '<string>'
 *                 if lineno:             # <<<<<<<<<<<<<<
 *                     name += ':%s' % lineno
 *         self.name = name
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lineno); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 134, __pyx_L9_except_error)
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":135
 *                     name = '<string>'
 *                 if lineno:
 *                     name += ':%s' % lineno             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)
 */
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "Cython/Tempita/_tempita.py":134
 *                 else:
 *                     name = '<string>'
 *                 if lineno:             # <<<<<<<<<<<<<<
 *                     name += ':%s' % lineno
 *         self.name = name
 */
        }
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L14_try_end;
      __pyx_L7_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":121
 *             try:
 *                 caller = sys._getframe(stacklevel)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
 */
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_11) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L8_exception_handled;
      }
      goto __pyx_L9_except_error;
      __pyx_L9_except_error:;

      /* "Cython/Tempita/_tempita.py":119
 *         self._unicode = is_unicode(content)
 *         if name is None and stacklevel is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 caller = sys._getframe(stacklevel)
 *             except ValueError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L8_exception_handled:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L14_try_end:;
    }

    /* "Cython/Tempita/_tempita.py":118
 * 
 *         self._unicode = is_unicode(content)
 *         if name is None and stacklevel is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 caller = sys._getframe(stacklevel)
 */
  }

  /* "Cython/Tempita/_tempita.py":136
 *                 if lineno:
 *                     name += ':%s' % lineno
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)
 *         if namespace is None:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 136, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":137
 *                     name += ':%s' % lineno
 *         self.name = name
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)             # <<<<<<<<<<<<<<
 *         if namespace is None:
 *             namespace = {}
 */
  __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_content);
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_line_offset, __pyx_v_line_offset) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delimeters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_delimeters, __pyx_t_5) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parsed, __pyx_t_5) < 0) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":138
 *         self.name = name
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             namespace = {}
 *         self.namespace = namespace
 */
  __pyx_t_2 = (__pyx_v_namespace == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":139
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)
 *         if namespace is None:
 *             namespace = {}             # <<<<<<<<<<<<<<
 *         self.namespace = namespace
 *         self.get_template = get_template
 */
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_namespace, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":138
 *         self.name = name
 *         self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters)
 *         if namespace is None:             # <<<<<<<<<<<<<<
 *             namespace = {}
 *         self.namespace = namespace
 */
  }

  /* "Cython/Tempita/_tempita.py":140
 *         if namespace is None:
 *             namespace = {}
 *         self.namespace = namespace             # <<<<<<<<<<<<<<
 *         self.get_template = get_template
 *         if default_inherit is not None:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_namespace, __pyx_v_namespace) < 0) __PYX_ERR(0, 140, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":141
 *             namespace = {}
 *         self.namespace = namespace
 *         self.get_template = get_template             # <<<<<<<<<<<<<<
 *         if default_inherit is not None:
 *             self.default_inherit = default_inherit
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_get_template, __pyx_v_get_template) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":142
 *         self.namespace = namespace
 *         self.get_template = get_template
 *         if default_inherit is not None:             # <<<<<<<<<<<<<<
 *             self.default_inherit = default_inherit
 * 
 */
  __pyx_t_1 = (__pyx_v_default_inherit != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":143
 *         self.get_template = get_template
 *         if default_inherit is not None:
 *             self.default_inherit = default_inherit             # <<<<<<<<<<<<<<
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_default_inherit, __pyx_v_default_inherit) < 0) __PYX_ERR(0, 143, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":142
 *         self.namespace = namespace
 *         self.get_template = get_template
 *         if default_inherit is not None:             # <<<<<<<<<<<<<<
 *             self.default_inherit = default_inherit
 * 
 */
  }

  /* "Cython/Tempita/_tempita.py":100
 *     default_inherit = None
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,             # <<<<<<<<<<<<<<
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_caller);
  __Pyx_XDECREF(__pyx_v_globals);
  __Pyx_XDECREF(__pyx_v_lineno);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_namespace);
  __Pyx_XDECREF(__pyx_v_delimeters);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":145
 *             self.default_inherit = default_inherit
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,             # <<<<<<<<<<<<<<
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 */

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_42__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "Cython/Tempita/_tempita.py":146
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,
 *                       default_inherit=None, get_template=get_file_template):             # <<<<<<<<<<<<<<
 *         f = open(filename, 'rb')
 *         c = f.read()
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_get_template);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_get_template);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_get_template);

  /* "Cython/Tempita/_tempita.py":145
 *             self.default_inherit = default_inherit
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,             # <<<<<<<<<<<<<<
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, 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("Cython.Tempita._tempita.__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_6Cython_7Tempita_8_tempita_8Template_3from_filename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_3from_filename = {"from_filename", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_3from_filename, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_3from_filename(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cls = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_v_namespace = 0;
  PyObject *__pyx_v_encoding = 0;
  PyObject *__pyx_v_default_inherit = 0;
  PyObject *__pyx_v_get_template = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("from_filename (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cls,&__pyx_n_s_filename,&__pyx_n_s_namespace,&__pyx_n_s_encoding,&__pyx_n_s_default_inherit,&__pyx_n_s_get_template,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[2] = ((PyObject *)((PyObject *)Py_None));
    values[3] = ((PyObject *)((PyObject *)Py_None));
    values[4] = ((PyObject *)((PyObject *)Py_None));
    values[5] = __pyx_dynamic_args->__pyx_arg_get_template;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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_cls)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("from_filename", 0, 2, 6, 1); __PYX_ERR(0, 145, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_namespace);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_default_inherit);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_get_template);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_filename") < 0)) __PYX_ERR(0, 145, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_cls = values[0];
    __pyx_v_filename = values[1];
    __pyx_v_namespace = values[2];
    __pyx_v_encoding = values[3];
    __pyx_v_default_inherit = values[4];
    __pyx_v_get_template = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("from_filename", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 145, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.from_filename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_2from_filename(__pyx_self, __pyx_v_cls, __pyx_v_filename, __pyx_v_namespace, __pyx_v_encoding, __pyx_v_default_inherit, __pyx_v_get_template);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_2from_filename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cls, PyObject *__pyx_v_filename, PyObject *__pyx_v_namespace, PyObject *__pyx_v_encoding, PyObject *__pyx_v_default_inherit, PyObject *__pyx_v_get_template) {
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_c = 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;
  __Pyx_RefNannySetupContext("from_filename", 0);

  /* "Cython/Tempita/_tempita.py":147
 *     def from_filename(cls, filename, namespace=None, encoding=None,
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')             # <<<<<<<<<<<<<<
 *         c = f.read()
 *         f.close()
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
  __Pyx_INCREF(__pyx_n_s_rb);
  __Pyx_GIVEREF(__pyx_n_s_rb);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_rb);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_f = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":148
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 *         c = f.read()             # <<<<<<<<<<<<<<
 *         f.close()
 *         if encoding:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_c = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":149
 *         f = open(filename, 'rb')
 *         c = f.read()
 *         f.close()             # <<<<<<<<<<<<<<
 *         if encoding:
 *             c = c.decode(encoding)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":150
 *         c = f.read()
 *         f.close()
 *         if encoding:             # <<<<<<<<<<<<<<
 *             c = c.decode(encoding)
 *         return cls(content=c, name=filename, namespace=namespace,
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 150, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "Cython/Tempita/_tempita.py":151
 *         f.close()
 *         if encoding:
 *             c = c.decode(encoding)             # <<<<<<<<<<<<<<
 *         return cls(content=c, name=filename, namespace=namespace,
 *                    default_inherit=default_inherit, get_template=get_template)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_3) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_encoding); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoding};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_encoding};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_encoding);
        __Pyx_GIVEREF(__pyx_v_encoding);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_encoding);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":150
 *         c = f.read()
 *         f.close()
 *         if encoding:             # <<<<<<<<<<<<<<
 *             c = c.decode(encoding)
 *         return cls(content=c, name=filename, namespace=namespace,
 */
  }

  /* "Cython/Tempita/_tempita.py":152
 *         if encoding:
 *             c = c.decode(encoding)
 *         return cls(content=c, name=filename, namespace=namespace,             # <<<<<<<<<<<<<<
 *                    default_inherit=default_inherit, get_template=get_template)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_content, __pyx_v_c) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_filename) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_namespace, __pyx_v_namespace) < 0) __PYX_ERR(0, 152, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":153
 *             c = c.decode(encoding)
 *         return cls(content=c, name=filename, namespace=namespace,
 *                    default_inherit=default_inherit, get_template=get_template)             # <<<<<<<<<<<<<<
 * 
 *     from_filename = classmethod(from_filename)
 */
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_default_inherit, __pyx_v_default_inherit) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_get_template, __pyx_v_get_template) < 0) __PYX_ERR(0, 152, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":152
 *         if encoding:
 *             c = c.decode(encoding)
 *         return cls(content=c, name=filename, namespace=namespace,             # <<<<<<<<<<<<<<
 *                    default_inherit=default_inherit, get_template=get_template)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_cls, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __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;

  /* "Cython/Tempita/_tempita.py":145
 *             self.default_inherit = default_inherit
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,             # <<<<<<<<<<<<<<
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 */

  /* 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("Cython.Tempita._tempita.Template.from_filename", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":157
 *     from_filename = classmethod(from_filename)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_4__repr__(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;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":158
 * 
 *     def __repr__(self):
 *         return '<%s %s name=%r>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__,
 *             hex(id(self))[2:], self.name)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "Cython/Tempita/_tempita.py":159
 *     def __repr__(self):
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             hex(id(self))[2:], self.name)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":160
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 *             hex(id(self))[2:], self.name)             # <<<<<<<<<<<<<<
 * 
 *     def substitute(self, *args, **kw):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __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_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 2, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "Cython/Tempita/_tempita.py":159
 *     def __repr__(self):
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             hex(id(self))[2:], self.name)
 * 
 */
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":158
 * 
 *     def __repr__(self):
 *         return '<%s %s name=%r>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__,
 *             hex(id(self))[2:], self.name)
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_name_r, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":157
 *     from_filename = classmethod(from_filename)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 */

  /* 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("Cython.Tempita._tempita.Template.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":162
 *             hex(id(self))[2:], self.name)
 * 
 *     def substitute(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         if args:
 *             if kw:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_7substitute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_7substitute = {"substitute", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_7substitute, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_7substitute(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("substitute (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __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, __pyx_v_kw, values, used_pos_args, "substitute") < 0)) __PYX_ERR(0, 162, __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("substitute", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 162, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.substitute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_6substitute(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_6substitute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_defs = NULL;
  PyObject *__pyx_v_inherit = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("substitute", 0);
  __Pyx_INCREF(__pyx_v_kw);

  /* "Cython/Tempita/_tempita.py":163
 * 
 *     def substitute(self, *args, **kw):
 *         if args:             # <<<<<<<<<<<<<<
 *             if kw:
 *                 raise TypeError(
 */
  __pyx_t_1 = (__pyx_v_args != Py_None) && (PyTuple_GET_SIZE(__pyx_v_args) != 0);
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":164
 *     def substitute(self, *args, **kw):
 *         if args:
 *             if kw:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "You can only give positional *or* keyword arguments")
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kw); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "Cython/Tempita/_tempita.py":165
 *         if args:
 *             if kw:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 165, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":164
 *     def substitute(self, *args, **kw):
 *         if args:
 *             if kw:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "You can only give positional *or* keyword arguments")
 */
    }

    /* "Cython/Tempita/_tempita.py":167
 *                 raise TypeError(
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "You can only give one positional argument")
 */
    __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 167, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_3 > 1) != 0);
    if (__pyx_t_1) {

      /* "Cython/Tempita/_tempita.py":168
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "You can only give one positional argument")
 *             if not hasattr(args[0], 'items'):
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 168, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":167
 *                 raise TypeError(
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "You can only give one positional argument")
 */
    }

    /* "Cython/Tempita/_tempita.py":170
 *                 raise TypeError(
 *                     "You can only give one positional argument")
 *             if not hasattr(args[0], 'items'):             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r"
 */
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_HasAttr(__pyx_t_2, __pyx_n_s_items); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = ((!(__pyx_t_1 != 0)) != 0);
    if (__pyx_t_4) {

      /* "Cython/Tempita/_tempita.py":173
 *                 raise TypeError(
 *                     "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r"
 *                     % (args[0],))             # <<<<<<<<<<<<<<
 *             kw = args[0]
 *         ns = kw
 */
      __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_If_you_pass_in_a_single_argument, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":171
 *                     "You can only give one positional argument")
 *             if not hasattr(args[0], 'items'):
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r"
 *                     % (args[0],))
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __PYX_ERR(0, 171, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":170
 *                 raise TypeError(
 *                     "You can only give one positional argument")
 *             if not hasattr(args[0], 'items'):             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r"
 */
    }

    /* "Cython/Tempita/_tempita.py":174
 *                     "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r"
 *                     % (args[0],))
 *             kw = args[0]             # <<<<<<<<<<<<<<
 *         ns = kw
 *         ns['__template_name__'] = self.name
 */
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_kw, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":163
 * 
 *     def substitute(self, *args, **kw):
 *         if args:             # <<<<<<<<<<<<<<
 *             if kw:
 *                 raise TypeError(
 */
  }

  /* "Cython/Tempita/_tempita.py":175
 *                     % (args[0],))
 *             kw = args[0]
 *         ns = kw             # <<<<<<<<<<<<<<
 *         ns['__template_name__'] = self.name
 *         if self.namespace:
 */
  __Pyx_INCREF(__pyx_v_kw);
  __pyx_v_ns = __pyx_v_kw;

  /* "Cython/Tempita/_tempita.py":176
 *             kw = args[0]
 *         ns = kw
 *         ns['__template_name__'] = self.name             # <<<<<<<<<<<<<<
 *         if self.namespace:
 *             ns.update(self.namespace)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_n_s_template_name, __pyx_t_2) < 0)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":177
 *         ns = kw
 *         ns['__template_name__'] = self.name
 *         if self.namespace:             # <<<<<<<<<<<<<<
 *             ns.update(self.namespace)
 *         result, defs, inherit = self._interpret(ns)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_namespace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "Cython/Tempita/_tempita.py":178
 *         ns['__template_name__'] = self.name
 *         if self.namespace:
 *             ns.update(self.namespace)             # <<<<<<<<<<<<<<
 *         result, defs, inherit = self._interpret(ns)
 *         if not inherit:
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_namespace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":177
 *         ns = kw
 *         ns['__template_name__'] = self.name
 *         if self.namespace:             # <<<<<<<<<<<<<<
 *             ns.update(self.namespace)
 *         result, defs, inherit = self._interpret(ns)
 */
  }

  /* "Cython/Tempita/_tempita.py":179
 *         if self.namespace:
 *             ns.update(self.namespace)
 *         result, defs, inherit = self._interpret(ns)             # <<<<<<<<<<<<<<
 *         if not inherit:
 *             inherit = self.default_inherit
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_8) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_ns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ns};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_ns};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_ns);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 179, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_8 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_8);
    #else
    __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    #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_ERR(0, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
    index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 2; __pyx_t_8 = __pyx_t_9(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_8);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_7), 3) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L9_unpacking_done;
    __pyx_L8_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 179, __pyx_L1_error)
    __pyx_L9_unpacking_done:;
  }
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_defs = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_inherit = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":180
 *             ns.update(self.namespace)
 *         result, defs, inherit = self._interpret(ns)
 *         if not inherit:             # <<<<<<<<<<<<<<
 *             inherit = self.default_inherit
 *         if inherit:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_inherit); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 180, __pyx_L1_error)
  __pyx_t_1 = ((!__pyx_t_4) != 0);
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":181
 *         result, defs, inherit = self._interpret(ns)
 *         if not inherit:
 *             inherit = self.default_inherit             # <<<<<<<<<<<<<<
 *         if inherit:
 *             result = self._interpret_inherit(result, defs, inherit, ns)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_inherit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_inherit, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":180
 *             ns.update(self.namespace)
 *         result, defs, inherit = self._interpret(ns)
 *         if not inherit:             # <<<<<<<<<<<<<<
 *             inherit = self.default_inherit
 *         if inherit:
 */
  }

  /* "Cython/Tempita/_tempita.py":182
 *         if not inherit:
 *             inherit = self.default_inherit
 *         if inherit:             # <<<<<<<<<<<<<<
 *             result = self._interpret_inherit(result, defs, inherit, ns)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_inherit); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 182, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":183
 *             inherit = self.default_inherit
 *         if inherit:
 *             result = self._interpret_inherit(result, defs, inherit, ns)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_inherit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_6 = NULL;
    __pyx_t_10 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_result, __pyx_v_defs, __pyx_v_inherit, __pyx_v_ns};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
      PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_result, __pyx_v_defs, __pyx_v_inherit, __pyx_v_ns};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_result);
      __Pyx_GIVEREF(__pyx_v_result);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_result);
      __Pyx_INCREF(__pyx_v_defs);
      __Pyx_GIVEREF(__pyx_v_defs);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_defs);
      __Pyx_INCREF(__pyx_v_inherit);
      __Pyx_GIVEREF(__pyx_v_inherit);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_10, __pyx_v_inherit);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_10, __pyx_v_ns);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":182
 *         if not inherit:
 *             inherit = self.default_inherit
 *         if inherit:             # <<<<<<<<<<<<<<
 *             result = self._interpret_inherit(result, defs, inherit, ns)
 *         return result
 */
  }

  /* "Cython/Tempita/_tempita.py":184
 *         if inherit:
 *             result = self._interpret_inherit(result, defs, inherit, ns)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _interpret(self, ns):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":162
 *             hex(id(self))[2:], self.name)
 * 
 *     def substitute(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         if args:
 *             if kw:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.substitute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kw);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_defs);
  __Pyx_XDECREF(__pyx_v_inherit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":186
 *         return result
 * 
 *     def _interpret(self, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         parts = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_9_interpret(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_9_interpret = {"_interpret", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_9_interpret, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_9_interpret(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ns,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_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret", 1, 2, 2, 1); __PYX_ERR(0, 186, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret") < 0)) __PYX_ERR(0, 186, __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_ns = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 186, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_8_interpret(__pyx_self, __pyx_v_self, __pyx_v_ns);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_8_interpret(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ns) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_parts = NULL;
  PyObject *__pyx_v_defs = NULL;
  PyObject *__pyx_v_inherit = 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_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("_interpret", 0);

  /* "Cython/Tempita/_tempita.py":187
 * 
 *     def _interpret(self, ns):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         parts = []
 *         defs = {}
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":188
 *     def _interpret(self, ns):
 *         __traceback_hide__ = True
 *         parts = []             # <<<<<<<<<<<<<<
 *         defs = {}
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_parts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":189
 *         __traceback_hide__ = True
 *         parts = []
 *         defs = {}             # <<<<<<<<<<<<<<
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 *         if '__inherit__' in defs:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_defs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":190
 *         parts = []
 *         defs = {}
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)             # <<<<<<<<<<<<<<
 *         if '__inherit__' in defs:
 *             inherit = defs.pop('__inherit__')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parsed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ns);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_out, __pyx_v_parts) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_defs, __pyx_v_defs) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __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_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":191
 *         defs = {}
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 *         if '__inherit__' in defs:             # <<<<<<<<<<<<<<
 *             inherit = defs.pop('__inherit__')
 *         else:
 */
  __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_inherit, __pyx_v_defs, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 191, __pyx_L1_error)
  __pyx_t_6 = (__pyx_t_5 != 0);
  if (__pyx_t_6) {

    /* "Cython/Tempita/_tempita.py":192
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 *         if '__inherit__' in defs:
 *             inherit = defs.pop('__inherit__')             # <<<<<<<<<<<<<<
 *         else:
 *             inherit = None
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_defs, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_inherit = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":191
 *         defs = {}
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 *         if '__inherit__' in defs:             # <<<<<<<<<<<<<<
 *             inherit = defs.pop('__inherit__')
 *         else:
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":194
 *             inherit = defs.pop('__inherit__')
 *         else:
 *             inherit = None             # <<<<<<<<<<<<<<
 *         return ''.join(parts), defs, inherit
 * 
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_inherit = Py_None;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":195
 *         else:
 *             inherit = None
 *         return ''.join(parts), defs, inherit             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_parts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_INCREF(__pyx_v_defs);
  __Pyx_GIVEREF(__pyx_v_defs);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_defs);
  __Pyx_INCREF(__pyx_v_inherit);
  __Pyx_GIVEREF(__pyx_v_inherit);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_inherit);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":186
 *         return result
 * 
 *     def _interpret(self, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         parts = []
 */

  /* 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("Cython.Tempita._tempita.Template._interpret", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_defs);
  __Pyx_XDECREF(__pyx_v_inherit);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":197
 *         return ''.join(parts), defs, inherit
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         if not self.get_template:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit = {"_interpret_inherit", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_body = 0;
  PyObject *__pyx_v_defs = 0;
  PyObject *__pyx_v_inherit_template = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret_inherit (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_body,&__pyx_n_s_defs,&__pyx_n_s_inherit_template,&__pyx_n_s_ns,0};
    PyObject* values[5] = {0,0,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  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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_body)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_inherit", 1, 5, 5, 1); __PYX_ERR(0, 197, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_inherit", 1, 5, 5, 2); __PYX_ERR(0, 197, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_inherit_template)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_inherit", 1, 5, 5, 3); __PYX_ERR(0, 197, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_inherit", 1, 5, 5, 4); __PYX_ERR(0, 197, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_inherit") < 0)) __PYX_ERR(0, 197, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_body = values[1];
    __pyx_v_defs = values[2];
    __pyx_v_inherit_template = values[3];
    __pyx_v_ns = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret_inherit", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 197, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_10_interpret_inherit(__pyx_self, __pyx_v_self, __pyx_v_body, __pyx_v_defs, __pyx_v_inherit_template, __pyx_v_ns);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_10_interpret_inherit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_body, PyObject *__pyx_v_defs, PyObject *__pyx_v_inherit_template, PyObject *__pyx_v_ns) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_templ = NULL;
  PyObject *__pyx_v_self_ = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  __Pyx_RefNannySetupContext("_interpret_inherit", 0);
  __Pyx_INCREF(__pyx_v_ns);

  /* "Cython/Tempita/_tempita.py":198
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         if not self.get_template:
 *             raise TemplateError(
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":199
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):
 *         __traceback_hide__ = True
 *         if not self.get_template:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'You cannot use inheritance without passing in get_template',
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 199, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":200
 *         __traceback_hide__ = True
 *         if not self.get_template:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'You cannot use inheritance without passing in get_template',
 *                 position=None, name=self.name)
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "Cython/Tempita/_tempita.py":202
 *             raise TemplateError(
 *                 'You cannot use inheritance without passing in get_template',
 *                 position=None, name=self.name)             # <<<<<<<<<<<<<<
 *         templ = self.get_template(inherit_template, self)
 *         self_ = TemplateObject(self.name)
 */
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_position, Py_None) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_5) < 0) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":200
 *         __traceback_hide__ = True
 *         if not self.get_template:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'You cannot use inheritance without passing in get_template',
 *                 position=None, name=self.name)
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __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_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 200, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":199
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):
 *         __traceback_hide__ = True
 *         if not self.get_template:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'You cannot use inheritance without passing in get_template',
 */
  }

  /* "Cython/Tempita/_tempita.py":203
 *                 'You cannot use inheritance without passing in get_template',
 *                 position=None, name=self.name)
 *         templ = self.get_template(inherit_template, self)             # <<<<<<<<<<<<<<
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.items():
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_template); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_inherit_template, __pyx_v_self};
    __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
    PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_inherit_template, __pyx_v_self};
    __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_1) {
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
    }
    __Pyx_INCREF(__pyx_v_inherit_template);
    __Pyx_GIVEREF(__pyx_v_inherit_template);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_inherit_template);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_templ = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":204
 *                 position=None, name=self.name)
 *         templ = self.get_template(inherit_template, self)
 *         self_ = TemplateObject(self.name)             # <<<<<<<<<<<<<<
 *         for name, value in defs.items():
 *             setattr(self_, name, value)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateObject); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (!__pyx_t_1) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_5);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_self_ = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":205
 *         templ = self.get_template(inherit_template, self)
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.items():             # <<<<<<<<<<<<<<
 *             setattr(self_, name, value)
 *         self_.body = body
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_defs, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  if (__pyx_t_8) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 205, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_10(__pyx_t_4);
      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_ERR(0, 205, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 205, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext;
      index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_1), 2) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
      __pyx_t_11 = NULL;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_11 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 205, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8);
    __pyx_t_8 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":206
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.items():
 *             setattr(self_, name, value)             # <<<<<<<<<<<<<<
 *         self_.body = body
 *         ns = ns.copy()
 */
    __pyx_t_12 = PyObject_SetAttr(__pyx_v_self_, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 206, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":205
 *         templ = self.get_template(inherit_template, self)
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.items():             # <<<<<<<<<<<<<<
 *             setattr(self_, name, value)
 *         self_.body = body
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":207
 *         for name, value in defs.items():
 *             setattr(self_, name, value)
 *         self_.body = body             # <<<<<<<<<<<<<<
 *         ns = ns.copy()
 *         ns['self'] = self_
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self_, __pyx_n_s_body, __pyx_v_body) < 0) __PYX_ERR(0, 207, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":208
 *             setattr(self_, name, value)
 *         self_.body = body
 *         ns = ns.copy()             # <<<<<<<<<<<<<<
 *         ns['self'] = self_
 *         return templ.substitute(ns)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_ns, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":209
 *         self_.body = body
 *         ns = ns.copy()
 *         ns['self'] = self_             # <<<<<<<<<<<<<<
 *         return templ.substitute(ns)
 * 
 */
  if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_n_s_self, __pyx_v_self_) < 0)) __PYX_ERR(0, 209, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":210
 *         ns = ns.copy()
 *         ns['self'] = self_
 *         return templ.substitute(ns)             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_templ, __pyx_n_s_substitute); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_7) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_ns); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ns};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ns};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ns);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":197
 *         return ''.join(parts), defs, inherit
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         if not self.get_template:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_templ);
  __Pyx_XDECREF(__pyx_v_self_);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":212
 *         return templ.substitute(ns)
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in codes:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes = {"_interpret_codes", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_codes = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_defs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret_codes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_codes,&__pyx_n_s_ns,&__pyx_n_s_out,&__pyx_n_s_defs,0};
    PyObject* values[5] = {0,0,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  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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_codes)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_codes", 1, 5, 5, 1); __PYX_ERR(0, 212, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_codes", 1, 5, 5, 2); __PYX_ERR(0, 212, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_codes", 1, 5, 5, 3); __PYX_ERR(0, 212, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_codes", 1, 5, 5, 4); __PYX_ERR(0, 212, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_codes") < 0)) __PYX_ERR(0, 212, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_codes = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_out = values[3];
    __pyx_v_defs = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret_codes", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 212, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_codes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_12_interpret_codes(__pyx_self, __pyx_v_self, __pyx_v_codes, __pyx_v_ns, __pyx_v_out, __pyx_v_defs);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_12_interpret_codes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_codes, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  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;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("_interpret_codes", 0);

  /* "Cython/Tempita/_tempita.py":213
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         for item in codes:
 *             if isinstance(item, basestring_):
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":214
 *     def _interpret_codes(self, codes, ns, out, defs):
 *         __traceback_hide__ = True
 *         for item in codes:             # <<<<<<<<<<<<<<
 *             if isinstance(item, basestring_):
 *                 out.append(item)
 */
  if (likely(PyList_CheckExact(__pyx_v_codes)) || PyTuple_CheckExact(__pyx_v_codes)) {
    __pyx_t_1 = __pyx_v_codes; __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_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 214, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 214, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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_ERR(0, 214, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":215
 *         __traceback_hide__ = True
 *         for item in codes:
 *             if isinstance(item, basestring_):             # <<<<<<<<<<<<<<
 *                 out.append(item)
 *             else:
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_IsInstance(__pyx_v_item, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "Cython/Tempita/_tempita.py":216
 *         for item in codes:
 *             if isinstance(item, basestring_):
 *                 out.append(item)             # <<<<<<<<<<<<<<
 *             else:
 *                 self._interpret_code(item, ns, out, defs)
 */
      __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_v_item); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 216, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":215
 *         __traceback_hide__ = True
 *         for item in codes:
 *             if isinstance(item, basestring_):             # <<<<<<<<<<<<<<
 *                 out.append(item)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "Cython/Tempita/_tempita.py":218
 *                 out.append(item)
 *             else:
 *                 self._interpret_code(item, ns, out, defs)             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_code(self, code, ns, out, defs):
 */
    /*else*/ {
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_item, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_item, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 218, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (__pyx_t_9) {
          __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
        }
        __Pyx_INCREF(__pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_item);
        __Pyx_INCREF(__pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_ns);
        __Pyx_INCREF(__pyx_v_out);
        __Pyx_GIVEREF(__pyx_v_out);
        PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_v_out);
        __Pyx_INCREF(__pyx_v_defs);
        __Pyx_GIVEREF(__pyx_v_defs);
        PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_v_defs);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 218, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L5:;

    /* "Cython/Tempita/_tempita.py":214
 *     def _interpret_codes(self, codes, ns, out, defs):
 *         __traceback_hide__ = True
 *         for item in codes:             # <<<<<<<<<<<<<<
 *             if isinstance(item, basestring_):
 *                 out.append(item)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":212
 *         return templ.substitute(ns)
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in codes:
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_codes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":220
 *                 self._interpret_code(item, ns, out, defs)
 * 
 *     def _interpret_code(self, code, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_15_interpret_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_15_interpret_code = {"_interpret_code", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_15_interpret_code, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_15_interpret_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_defs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret_code (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_ns,&__pyx_n_s_out,&__pyx_n_s_defs,0};
    PyObject* values[5] = {0,0,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  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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_code", 1, 5, 5, 1); __PYX_ERR(0, 220, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_code", 1, 5, 5, 2); __PYX_ERR(0, 220, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_code", 1, 5, 5, 3); __PYX_ERR(0, 220, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_code", 1, 5, 5, 4); __PYX_ERR(0, 220, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_code") < 0)) __PYX_ERR(0, 220, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_code = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_out = values[3];
    __pyx_v_defs = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret_code", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 220, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_14_interpret_code(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_ns, __pyx_v_out, __pyx_v_defs);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_14_interpret_code(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_pos = NULL;
  PyObject *__pyx_v_vars = NULL;
  PyObject *__pyx_v_expr = NULL;
  PyObject *__pyx_v_content = NULL;
  PyObject *__pyx_v_parts = NULL;
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_v_part = NULL;
  PyObject *__pyx_v_func = NULL;
  PyObject *__pyx_v_var = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_signature = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  __Pyx_RefNannySetupContext("_interpret_code", 0);

  /* "Cython/Tempita/_tempita.py":221
 * 
 *     def _interpret_code(self, code, ns, out, defs):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         name, pos = code[0], code[1]
 *         if name == 'py':
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":222
 *     def _interpret_code(self, code, ns, out, defs):
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]             # <<<<<<<<<<<<<<
 *         if name == 'py':
 *             self._exec(code[2], ns, pos)
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_code, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_pos = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":223
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]
 *         if name == 'py':             # <<<<<<<<<<<<<<
 *             self._exec(code[2], ns, pos)
 *         elif name == 'continue':
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_py, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 223, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":224
 *         name, pos = code[0], code[1]
 *         if name == 'py':
 *             self._exec(code[2], ns, pos)             # <<<<<<<<<<<<<<
 *         elif name == 'continue':
 *             raise _TemplateContinue()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_exec); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_4, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_4, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_pos);
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":223
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]
 *         if name == 'py':             # <<<<<<<<<<<<<<
 *             self._exec(code[2], ns, pos)
 *         elif name == 'continue':
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":225
 *         if name == 'py':
 *             self._exec(code[2], ns, pos)
 *         elif name == 'continue':             # <<<<<<<<<<<<<<
 *             raise _TemplateContinue()
 *         elif name == 'break':
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_continue, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 225, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":226
 *             self._exec(code[2], ns, pos)
 *         elif name == 'continue':
 *             raise _TemplateContinue()             # <<<<<<<<<<<<<<
 *         elif name == 'break':
 *             raise _TemplateBreak()
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateContinue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 226, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":225
 *         if name == 'py':
 *             self._exec(code[2], ns, pos)
 *         elif name == 'continue':             # <<<<<<<<<<<<<<
 *             raise _TemplateContinue()
 *         elif name == 'break':
 */
  }

  /* "Cython/Tempita/_tempita.py":227
 *         elif name == 'continue':
 *             raise _TemplateContinue()
 *         elif name == 'break':             # <<<<<<<<<<<<<<
 *             raise _TemplateBreak()
 *         elif name == 'for':
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_break, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 227, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":228
 *             raise _TemplateContinue()
 *         elif name == 'break':
 *             raise _TemplateBreak()             # <<<<<<<<<<<<<<
 *         elif name == 'for':
 *             vars, expr, content = code[2], code[3], code[4]
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateBreak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 228, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":227
 *         elif name == 'continue':
 *             raise _TemplateContinue()
 *         elif name == 'break':             # <<<<<<<<<<<<<<
 *             raise _TemplateBreak()
 *         elif name == 'for':
 */
  }

  /* "Cython/Tempita/_tempita.py":229
 *         elif name == 'break':
 *             raise _TemplateBreak()
 *         elif name == 'for':             # <<<<<<<<<<<<<<
 *             vars, expr, content = code[2], code[3], code[4]
 *             expr = self._eval(expr, ns, pos)
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_for, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":230
 *             raise _TemplateBreak()
 *         elif name == 'for':
 *             vars, expr, content = code[2], code[3], code[4]             # <<<<<<<<<<<<<<
 *             expr = self._eval(expr, ns, pos)
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_vars = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_expr = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_content = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":231
 *         elif name == 'for':
 *             vars, expr, content = code[2], code[3], code[4]
 *             expr = self._eval(expr, ns, pos)             # <<<<<<<<<<<<<<
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 *         elif name == 'cond':
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_expr);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_v_pos);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 231, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":232
 *             vars, expr, content = code[2], code[3], code[4]
 *             expr = self._eval(expr, ns, pos)
 *             self._interpret_for(vars, expr, content, ns, out, defs)             # <<<<<<<<<<<<<<
 *         elif name == 'cond':
 *             parts = code[2:]
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_for); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[7] = {__pyx_t_4, __pyx_v_vars, __pyx_v_expr, __pyx_v_content, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[7] = {__pyx_t_4, __pyx_v_vars, __pyx_v_expr, __pyx_v_content, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_2 = PyTuple_New(6+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_vars);
      __Pyx_GIVEREF(__pyx_v_vars);
      PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_vars);
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_expr);
      __Pyx_INCREF(__pyx_v_content);
      __Pyx_GIVEREF(__pyx_v_content);
      PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_v_content);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_2, 4+__pyx_t_6, __pyx_v_out);
      __Pyx_INCREF(__pyx_v_defs);
      __Pyx_GIVEREF(__pyx_v_defs);
      PyTuple_SET_ITEM(__pyx_t_2, 5+__pyx_t_6, __pyx_v_defs);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":229
 *         elif name == 'break':
 *             raise _TemplateBreak()
 *         elif name == 'for':             # <<<<<<<<<<<<<<
 *             vars, expr, content = code[2], code[3], code[4]
 *             expr = self._eval(expr, ns, pos)
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":233
 *             expr = self._eval(expr, ns, pos)
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 *         elif name == 'cond':             # <<<<<<<<<<<<<<
 *             parts = code[2:]
 *             self._interpret_if(parts, ns, out, defs)
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_cond, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 233, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":234
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 *         elif name == 'cond':
 *             parts = code[2:]             # <<<<<<<<<<<<<<
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':
 */
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_code, 2, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_parts = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":235
 *         elif name == 'cond':
 *             parts = code[2:]
 *             self._interpret_if(parts, ns, out, defs)             # <<<<<<<<<<<<<<
 *         elif name == 'expr':
 *             parts = code[2].split('|')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_parts, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_v_parts, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_INCREF(__pyx_v_parts);
      __Pyx_GIVEREF(__pyx_v_parts);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_parts);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_v_out);
      __Pyx_INCREF(__pyx_v_defs);
      __Pyx_GIVEREF(__pyx_v_defs);
      PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_6, __pyx_v_defs);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":233
 *             expr = self._eval(expr, ns, pos)
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 *         elif name == 'cond':             # <<<<<<<<<<<<<<
 *             parts = code[2:]
 *             self._interpret_if(parts, ns, out, defs)
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":236
 *             parts = code[2:]
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':             # <<<<<<<<<<<<<<
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_expr, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 236, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":237
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':
 *             parts = code[2].split('|')             # <<<<<<<<<<<<<<
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_parts = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":238
 *         elif name == 'expr':
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)             # <<<<<<<<<<<<<<
 *             for part in parts[1:]:
 *                 func = self._eval(part, ns, pos)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_parts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_t_4, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_2) {
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_4);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_pos);
      __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_base = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":239
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:             # <<<<<<<<<<<<<<
 *                 func = self._eval(part, ns, pos)
 *                 base = func(base)
 */
    __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_parts, 1, 0, NULL, NULL, &__pyx_slice__14, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
          #else
          __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 239, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_9(__pyx_t_1);
        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_ERR(0, 239, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":240
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:
 *                 func = self._eval(part, ns, pos)             # <<<<<<<<<<<<<<
 *                 base = func(base)
 *             out.append(self._repr(base, pos))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_part, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_part, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_part);
        __Pyx_GIVEREF(__pyx_v_part);
        PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_part);
        __Pyx_INCREF(__pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_v_ns);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_v_pos);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF_SET(__pyx_v_func, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":241
 *             for part in parts[1:]:
 *                 func = self._eval(part, ns, pos)
 *                 base = func(base)             # <<<<<<<<<<<<<<
 *             out.append(self._repr(base, pos))
 *         elif name == 'default':
 */
      __Pyx_INCREF(__pyx_v_func);
      __pyx_t_5 = __pyx_v_func; __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_base); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_base};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_base};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_7);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_base);
          __Pyx_GIVEREF(__pyx_v_base);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_base);
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 241, __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;
      __Pyx_DECREF_SET(__pyx_v_base, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":239
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:             # <<<<<<<<<<<<<<
 *                 func = self._eval(part, ns, pos)
 *                 base = func(base)
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":242
 *                 func = self._eval(part, ns, pos)
 *                 base = func(base)
 *             out.append(self._repr(base, pos))             # <<<<<<<<<<<<<<
 *         elif name == 'default':
 *             var, expr = code[2], code[3]
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_repr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_base, __pyx_v_pos};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_base, __pyx_v_pos};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_base);
      __Pyx_GIVEREF(__pyx_v_base);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_base);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_pos);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 242, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":236
 *             parts = code[2:]
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':             # <<<<<<<<<<<<<<
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":243
 *                 base = func(base)
 *             out.append(self._repr(base, pos))
 *         elif name == 'default':             # <<<<<<<<<<<<<<
 *             var, expr = code[2], code[3]
 *             if var not in ns:
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_default, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 243, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":244
 *             out.append(self._repr(base, pos))
 *         elif name == 'default':
 *             var, expr = code[2], code[3]             # <<<<<<<<<<<<<<
 *             if var not in ns:
 *                 result = self._eval(expr, ns, pos)
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_var = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_expr = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":245
 *         elif name == 'default':
 *             var, expr = code[2], code[3]
 *             if var not in ns:             # <<<<<<<<<<<<<<
 *                 result = self._eval(expr, ns, pos)
 *                 ns[var] = result
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_var, __pyx_v_ns, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 245, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_3 != 0);
    if (__pyx_t_11) {

      /* "Cython/Tempita/_tempita.py":246
 *             var, expr = code[2], code[3]
 *             if var not in ns:
 *                 result = self._eval(expr, ns, pos)             # <<<<<<<<<<<<<<
 *                 ns[var] = result
 *         elif name == 'inherit':
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_6 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_expr);
        __Pyx_GIVEREF(__pyx_v_expr);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_expr);
        __Pyx_INCREF(__pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_ns);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_v_pos);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 246, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_result = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":247
 *             if var not in ns:
 *                 result = self._eval(expr, ns, pos)
 *                 ns[var] = result             # <<<<<<<<<<<<<<
 *         elif name == 'inherit':
 *             expr = code[2]
 */
      if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_v_var, __pyx_v_result) < 0)) __PYX_ERR(0, 247, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":245
 *         elif name == 'default':
 *             var, expr = code[2], code[3]
 *             if var not in ns:             # <<<<<<<<<<<<<<
 *                 result = self._eval(expr, ns, pos)
 *                 ns[var] = result
 */
    }

    /* "Cython/Tempita/_tempita.py":243
 *                 base = func(base)
 *             out.append(self._repr(base, pos))
 *         elif name == 'default':             # <<<<<<<<<<<<<<
 *             var, expr = code[2], code[3]
 *             if var not in ns:
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":248
 *                 result = self._eval(expr, ns, pos)
 *                 ns[var] = result
 *         elif name == 'inherit':             # <<<<<<<<<<<<<<
 *             expr = code[2]
 *             value = self._eval(expr, ns, pos)
 */
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_inherit_2, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 248, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":249
 *                 ns[var] = result
 *         elif name == 'inherit':
 *             expr = code[2]             # <<<<<<<<<<<<<<
 *             value = self._eval(expr, ns, pos)
 *             defs['__inherit__'] = value
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_expr = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":250
 *         elif name == 'inherit':
 *             expr = code[2]
 *             value = self._eval(expr, ns, pos)             # <<<<<<<<<<<<<<
 *             defs['__inherit__'] = value
 *         elif name == 'def':
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_expr, __pyx_v_ns, __pyx_v_pos};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_expr);
      __Pyx_INCREF(__pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_v_pos);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_value = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":251
 *             expr = code[2]
 *             value = self._eval(expr, ns, pos)
 *             defs['__inherit__'] = value             # <<<<<<<<<<<<<<
 *         elif name == 'def':
 *             name = code[2]
 */
    if (unlikely(PyObject_SetItem(__pyx_v_defs, __pyx_n_s_inherit, __pyx_v_value) < 0)) __PYX_ERR(0, 251, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":248
 *                 result = self._eval(expr, ns, pos)
 *                 ns[var] = result
 *         elif name == 'inherit':             # <<<<<<<<<<<<<<
 *             expr = code[2]
 *             value = self._eval(expr, ns, pos)
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":252
 *             value = self._eval(expr, ns, pos)
 *             defs['__inherit__'] = value
 *         elif name == 'def':             # <<<<<<<<<<<<<<
 *             name = code[2]
 *             signature = code[3]
 */
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_def, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 252, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":253
 *             defs['__inherit__'] = value
 *         elif name == 'def':
 *             name = code[2]             # <<<<<<<<<<<<<<
 *             signature = code[3]
 *             parts = code[4]
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":254
 *         elif name == 'def':
 *             name = code[2]
 *             signature = code[3]             # <<<<<<<<<<<<<<
 *             parts = code[4]
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_signature = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":255
 *             name = code[2]
 *             signature = code[3]
 *             parts = code[4]             # <<<<<<<<<<<<<<
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,
 *                                                 pos=pos)
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_code, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_v_parts = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":256
 *             signature = code[3]
 *             parts = code[4]
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,             # <<<<<<<<<<<<<<
 *                                                 pos=pos)
 *         elif name == 'comment':
 */
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateDef); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
    __Pyx_INCREF(__pyx_v_signature);
    __Pyx_GIVEREF(__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_signature);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_body, __pyx_v_parts) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ns, __pyx_v_ns) < 0) __PYX_ERR(0, 256, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":257
 *             parts = code[4]
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,
 *                                                 pos=pos)             # <<<<<<<<<<<<<<
 *         elif name == 'comment':
 *             return
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pos, __pyx_v_pos) < 0) __PYX_ERR(0, 256, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":256
 *             signature = code[3]
 *             parts = code[4]
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,             # <<<<<<<<<<<<<<
 *                                                 pos=pos)
 *         elif name == 'comment':
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 256, __pyx_L1_error)
    if (unlikely(PyObject_SetItem(__pyx_v_defs, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":252
 *             value = self._eval(expr, ns, pos)
 *             defs['__inherit__'] = value
 *         elif name == 'def':             # <<<<<<<<<<<<<<
 *             name = code[2]
 *             signature = code[3]
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":258
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,
 *                                                 pos=pos)
 *         elif name == 'comment':             # <<<<<<<<<<<<<<
 *             return
 *         else:
 */
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_comment, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 258, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":259
 *                                                 pos=pos)
 *         elif name == 'comment':
 *             return             # <<<<<<<<<<<<<<
 *         else:
 *             assert 0, "Unknown code: %r" % name
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "Cython/Tempita/_tempita.py":258
 *             ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns,
 *                                                 pos=pos)
 *         elif name == 'comment':             # <<<<<<<<<<<<<<
 *             return
 *         else:
 */
  }

  /* "Cython/Tempita/_tempita.py":261
 *             return
 *         else:
 *             assert 0, "Unknown code: %r" % name             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):
 */
  /*else*/ {
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      if (unlikely(!0)) {
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_code_r, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        PyErr_SetObject(PyExc_AssertionError, __pyx_t_5);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 261, __pyx_L1_error)
      }
    }
    #endif
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":220
 *                 self._interpret_code(item, ns, out, defs)
 * 
 *     def _interpret_code(self, code, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_vars);
  __Pyx_XDECREF(__pyx_v_expr);
  __Pyx_XDECREF(__pyx_v_content);
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_v_part);
  __Pyx_XDECREF(__pyx_v_func);
  __Pyx_XDECREF(__pyx_v_var);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_signature);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":263
 *             assert 0, "Unknown code: %r" % name
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in expr:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_17_interpret_for(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_17_interpret_for = {"_interpret_for", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_17_interpret_for, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_17_interpret_for(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_vars = 0;
  PyObject *__pyx_v_expr = 0;
  PyObject *__pyx_v_content = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_defs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret_for (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_vars,&__pyx_n_s_expr,&__pyx_n_s_content,&__pyx_n_s_ns,&__pyx_n_s_out,&__pyx_n_s_defs,0};
    PyObject* values[7] = {0,0,0,0,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  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 1); __PYX_ERR(0, 263, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 2); __PYX_ERR(0, 263, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_content)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 3); __PYX_ERR(0, 263, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 4); __PYX_ERR(0, 263, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 5); __PYX_ERR(0, 263, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, 6); __PYX_ERR(0, 263, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_for") < 0)) __PYX_ERR(0, 263, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_self = values[0];
    __pyx_v_vars = values[1];
    __pyx_v_expr = values[2];
    __pyx_v_content = values[3];
    __pyx_v_ns = values[4];
    __pyx_v_out = values[5];
    __pyx_v_defs = values[6];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret_for", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 263, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_16_interpret_for(__pyx_self, __pyx_v_self, __pyx_v_vars, __pyx_v_expr, __pyx_v_content, __pyx_v_ns, __pyx_v_out, __pyx_v_defs);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_16_interpret_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_vars, PyObject *__pyx_v_expr, PyObject *__pyx_v_content, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = 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;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  __Pyx_RefNannySetupContext("_interpret_for", 0);

  /* "Cython/Tempita/_tempita.py":264
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         for item in expr:
 *             if len(vars) == 1:
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":265
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):
 *         __traceback_hide__ = True
 *         for item in expr:             # <<<<<<<<<<<<<<
 *             if len(vars) == 1:
 *                 ns[vars[0]] = item
 */
  if (likely(PyList_CheckExact(__pyx_v_expr)) || PyTuple_CheckExact(__pyx_v_expr)) {
    __pyx_t_1 = __pyx_v_expr; __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_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 265, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 265, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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_ERR(0, 265, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":266
 *         __traceback_hide__ = True
 *         for item in expr:
 *             if len(vars) == 1:             # <<<<<<<<<<<<<<
 *                 ns[vars[0]] = item
 *             else:
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 266, __pyx_L1_error)
    __pyx_t_6 = ((__pyx_t_5 == 1) != 0);
    if (__pyx_t_6) {

      /* "Cython/Tempita/_tempita.py":267
 *         for item in expr:
 *             if len(vars) == 1:
 *                 ns[vars[0]] = item             # <<<<<<<<<<<<<<
 *             else:
 *                 if len(vars) != len(item):
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_vars, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_t_4, __pyx_v_item) < 0)) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":266
 *         __traceback_hide__ = True
 *         for item in expr:
 *             if len(vars) == 1:             # <<<<<<<<<<<<<<
 *                 ns[vars[0]] = item
 *             else:
 */
      goto __pyx_L5;
    }

    /* "Cython/Tempita/_tempita.py":269
 *                 ns[vars[0]] = item
 *             else:
 *                 if len(vars) != len(item):             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         'Need %i items to unpack (got %i items)'
 */
    /*else*/ {
      __pyx_t_5 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 269, __pyx_L1_error)
      __pyx_t_7 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 269, __pyx_L1_error)
      __pyx_t_6 = ((__pyx_t_5 != __pyx_t_7) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":272
 *                     raise ValueError(
 *                         'Need %i items to unpack (got %i items)'
 *                         % (len(vars), len(item)))             # <<<<<<<<<<<<<<
 *                 for name, value in zip(vars, item):
 *                     ns[name] = value
 */
        __pyx_t_7 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 272, __pyx_L1_error)
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 272, __pyx_L1_error)
        __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
        __pyx_t_4 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Need_i_items_to_unpack_got_i_ite, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "Cython/Tempita/_tempita.py":270
 *             else:
 *                 if len(vars) != len(item):
 *                     raise ValueError(             # <<<<<<<<<<<<<<
 *                         'Need %i items to unpack (got %i items)'
 *                         % (len(vars), len(item)))
 */
        __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(0, 270, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":269
 *                 ns[vars[0]] = item
 *             else:
 *                 if len(vars) != len(item):             # <<<<<<<<<<<<<<
 *                     raise ValueError(
 *                         'Need %i items to unpack (got %i items)'
 */
      }

      /* "Cython/Tempita/_tempita.py":273
 *                         'Need %i items to unpack (got %i items)'
 *                         % (len(vars), len(item)))
 *                 for name, value in zip(vars, item):             # <<<<<<<<<<<<<<
 *                     ns[name] = value
 *             try:
 */
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_vars);
      __Pyx_GIVEREF(__pyx_v_vars);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_vars);
      __Pyx_INCREF(__pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_item);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_7 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_7 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 273, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_8))) {
            if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 273, __pyx_L1_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 273, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          } else {
            if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 273, __pyx_L1_error)
            #else
            __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 273, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          }
        } else {
          __pyx_t_9 = __pyx_t_10(__pyx_t_8);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 273, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
          PyObject* sequence = __pyx_t_9;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 273, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_11);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_11);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
          __pyx_t_13 = NULL;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L10_unpacking_done;
          __pyx_L9_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_13 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 273, __pyx_L1_error)
          __pyx_L10_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "Cython/Tempita/_tempita.py":274
 *                         % (len(vars), len(item)))
 *                 for name, value in zip(vars, item):
 *                     ns[name] = value             # <<<<<<<<<<<<<<
 *             try:
 *                 self._interpret_codes(content, ns, out, defs)
 */
        if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 274, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":273
 *                         'Need %i items to unpack (got %i items)'
 *                         % (len(vars), len(item)))
 *                 for name, value in zip(vars, item):             # <<<<<<<<<<<<<<
 *                     ns[name] = value
 *             try:
 */
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_L5:;

    /* "Cython/Tempita/_tempita.py":275
 *                 for name, value in zip(vars, item):
 *                     ns[name] = value
 *             try:             # <<<<<<<<<<<<<<
 *                 self._interpret_codes(content, ns, out, defs)
 *             except _TemplateContinue:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      /*try:*/ {

        /* "Cython/Tempita/_tempita.py":276
 *                     ns[name] = value
 *             try:
 *                 self._interpret_codes(content, ns, out, defs)             # <<<<<<<<<<<<<<
 *             except _TemplateContinue:
 *                 continue
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 276, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_11 = NULL;
        __pyx_t_17 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_17 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_content, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 4+__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 276, __pyx_L11_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
          PyObject *__pyx_temp[5] = {__pyx_t_11, __pyx_v_content, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_17, 4+__pyx_t_17); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 276, __pyx_L11_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(4+__pyx_t_17); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
          }
          __Pyx_INCREF(__pyx_v_content);
          __Pyx_GIVEREF(__pyx_v_content);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_17, __pyx_v_content);
          __Pyx_INCREF(__pyx_v_ns);
          __Pyx_GIVEREF(__pyx_v_ns);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_17, __pyx_v_ns);
          __Pyx_INCREF(__pyx_v_out);
          __Pyx_GIVEREF(__pyx_v_out);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_17, __pyx_v_out);
          __Pyx_INCREF(__pyx_v_defs);
          __Pyx_GIVEREF(__pyx_v_defs);
          PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_17, __pyx_v_defs);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 276, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":275
 *                 for name, value in zip(vars, item):
 *                     ns[name] = value
 *             try:             # <<<<<<<<<<<<<<
 *                 self._interpret_codes(content, ns, out, defs)
 *             except _TemplateContinue:
 */
      }
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      goto __pyx_L18_try_end;
      __pyx_L11_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "Cython/Tempita/_tempita.py":277
 *             try:
 *                 self._interpret_codes(content, ns, out, defs)
 *             except _TemplateContinue:             # <<<<<<<<<<<<<<
 *                 continue
 *             except _TemplateBreak:
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateContinue); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 277, __pyx_L13_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_17) {
        __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_4) < 0) __PYX_ERR(0, 277, __pyx_L13_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_4);

        /* "Cython/Tempita/_tempita.py":278
 *                 self._interpret_codes(content, ns, out, defs)
 *             except _TemplateContinue:
 *                 continue             # <<<<<<<<<<<<<<
 *             except _TemplateBreak:
 *                 break
 */
        goto __pyx_L20_except_continue;
        __pyx_L20_except_continue:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L17_try_continue;
      }

      /* "Cython/Tempita/_tempita.py":279
 *             except _TemplateContinue:
 *                 continue
 *             except _TemplateBreak:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateBreak); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L13_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_17) {
        __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 279, __pyx_L13_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_8);

        /* "Cython/Tempita/_tempita.py":280
 *                 continue
 *             except _TemplateBreak:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_if(self, parts, ns, out, defs):
 */
        goto __pyx_L21_except_break;
        __pyx_L21_except_break:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L16_try_break;
      }
      goto __pyx_L13_except_error;
      __pyx_L13_except_error:;

      /* "Cython/Tempita/_tempita.py":275
 *                 for name, value in zip(vars, item):
 *                     ns[name] = value
 *             try:             # <<<<<<<<<<<<<<
 *                 self._interpret_codes(content, ns, out, defs)
 *             except _TemplateContinue:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      goto __pyx_L1_error;
      __pyx_L16_try_break:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      goto __pyx_L4_break;
      __pyx_L17_try_continue:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      goto __pyx_L3_continue;
      __pyx_L18_try_end:;
    }

    /* "Cython/Tempita/_tempita.py":265
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):
 *         __traceback_hide__ = True
 *         for item in expr:             # <<<<<<<<<<<<<<
 *             if len(vars) == 1:
 *                 ns[vars[0]] = item
 */
    __pyx_L3_continue:;
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":263
 *             assert 0, "Unknown code: %r" % name
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in expr:
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":282
 *                 break
 * 
 *     def _interpret_if(self, parts, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_19_interpret_if(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_19_interpret_if = {"_interpret_if", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_19_interpret_if, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_19_interpret_if(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_parts = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_defs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_interpret_if (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_parts,&__pyx_n_s_ns,&__pyx_n_s_out,&__pyx_n_s_defs,0};
    PyObject* values[5] = {0,0,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  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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_parts)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_if", 1, 5, 5, 1); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_if", 1, 5, 5, 2); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_out)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_if", 1, 5, 5, 3); __PYX_ERR(0, 282, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_interpret_if", 1, 5, 5, 4); __PYX_ERR(0, 282, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_if") < 0)) __PYX_ERR(0, 282, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_self = values[0];
    __pyx_v_parts = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_out = values[3];
    __pyx_v_defs = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_interpret_if", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_if", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_18_interpret_if(__pyx_self, __pyx_v_self, __pyx_v_parts, __pyx_v_ns, __pyx_v_out, __pyx_v_defs);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_18_interpret_if(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parts, PyObject *__pyx_v_ns, PyObject *__pyx_v_out, PyObject *__pyx_v_defs) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_part = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_pos = NULL;
  PyObject *__pyx_v_result = 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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("_interpret_if", 0);

  /* "Cython/Tempita/_tempita.py":283
 * 
 *     def _interpret_if(self, parts, ns, out, defs):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         # @@: if/else/else gets through
 *         for part in parts:
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":285
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 *         for part in parts:             # <<<<<<<<<<<<<<
 *             assert not isinstance(part, basestring_)
 *             name, pos = part[0], part[1]
 */
  if (likely(PyList_CheckExact(__pyx_v_parts)) || PyTuple_CheckExact(__pyx_v_parts)) {
    __pyx_t_1 = __pyx_v_parts; __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_parts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 285, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __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_ERR(0, 285, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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_ERR(0, 285, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":286
 *         # @@: if/else/else gets through
 *         for part in parts:
 *             assert not isinstance(part, basestring_)             # <<<<<<<<<<<<<<
 *             name, pos = part[0], part[1]
 *             if name == 'else':
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_IsInstance(__pyx_v_part, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 286, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!((!(__pyx_t_5 != 0)) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        __PYX_ERR(0, 286, __pyx_L1_error)
      }
    }
    #endif

    /* "Cython/Tempita/_tempita.py":287
 *         for part in parts:
 *             assert not isinstance(part, basestring_)
 *             name, pos = part[0], part[1]             # <<<<<<<<<<<<<<
 *             if name == 'else':
 *                 result = True
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_part, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_part, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "Cython/Tempita/_tempita.py":288
 *             assert not isinstance(part, basestring_)
 *             name, pos = part[0], part[1]
 *             if name == 'else':             # <<<<<<<<<<<<<<
 *                 result = True
 *             else:
 */
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 288, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "Cython/Tempita/_tempita.py":289
 *             name, pos = part[0], part[1]
 *             if name == 'else':
 *                 result = True             # <<<<<<<<<<<<<<
 *             else:
 *                 result = self._eval(part[2], ns, pos)
 */
      __Pyx_INCREF(Py_True);
      __Pyx_XDECREF_SET(__pyx_v_result, Py_True);

      /* "Cython/Tempita/_tempita.py":288
 *             assert not isinstance(part, basestring_)
 *             name, pos = part[0], part[1]
 *             if name == 'else':             # <<<<<<<<<<<<<<
 *                 result = True
 *             else:
 */
      goto __pyx_L5;
    }

    /* "Cython/Tempita/_tempita.py":291
 *                 result = True
 *             else:
 *                 result = self._eval(part[2], ns, pos)             # <<<<<<<<<<<<<<
 *             if result:
 *                 self._interpret_codes(part[3], ns, out, defs)
 */
    /*else*/ {
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_part, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_7, __pyx_v_ns, __pyx_v_pos};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else
      #endif
      {
        __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_8) {
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
        __Pyx_INCREF(__pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_ns);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_v_pos);
        __pyx_t_7 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6);
      __pyx_t_6 = 0;
    }
    __pyx_L5:;

    /* "Cython/Tempita/_tempita.py":292
 *             else:
 *                 result = self._eval(part[2], ns, pos)
 *             if result:             # <<<<<<<<<<<<<<
 *                 self._interpret_codes(part[3], ns, out, defs)
 *                 break
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 292, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "Cython/Tempita/_tempita.py":293
 *                 result = self._eval(part[2], ns, pos)
 *             if result:
 *                 self._interpret_codes(part[3], ns, out, defs)             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_part, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 293, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_10, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_10, __pyx_v_ns, __pyx_v_out, __pyx_v_defs};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_8 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (__pyx_t_7) {
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_10);
        __Pyx_INCREF(__pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_ns);
        __Pyx_INCREF(__pyx_v_out);
        __Pyx_GIVEREF(__pyx_v_out);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_9, __pyx_v_out);
        __Pyx_INCREF(__pyx_v_defs);
        __Pyx_GIVEREF(__pyx_v_defs);
        PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_9, __pyx_v_defs);
        __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 293, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":294
 *             if result:
 *                 self._interpret_codes(part[3], ns, out, defs)
 *                 break             # <<<<<<<<<<<<<<
 * 
 *     def _eval(self, code, ns, pos):
 */
      goto __pyx_L4_break;

      /* "Cython/Tempita/_tempita.py":292
 *             else:
 *                 result = self._eval(part[2], ns, pos)
 *             if result:             # <<<<<<<<<<<<<<
 *                 self._interpret_codes(part[3], ns, out, defs)
 *                 break
 */
    }

    /* "Cython/Tempita/_tempita.py":285
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 *         for part in parts:             # <<<<<<<<<<<<<<
 *             assert not isinstance(part, basestring_)
 *             name, pos = part[0], part[1]
 */
  }
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":282
 *                 break
 * 
 *     def _interpret_if(self, parts, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._interpret_if", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_part);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_pos);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_21_eval(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_21_eval = {"_eval", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_21_eval, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_21_eval(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_eval (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_ns,&__pyx_n_s_pos,0};
    PyObject* values[4] = {0,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  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_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_eval", 1, 4, 4, 1); __PYX_ERR(0, 296, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_eval", 1, 4, 4, 2); __PYX_ERR(0, 296, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_eval", 1, 4, 4, 3); __PYX_ERR(0, 296, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_eval") < 0)) __PYX_ERR(0, 296, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_code = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_eval", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 296, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_20_eval(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_ns, __pyx_v_pos);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_20_eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_arg0 = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  __Pyx_RefNannySetupContext("_eval", 0);

  /* "Cython/Tempita/_tempita.py":297
 * 
 *     def _eval(self, code, ns, pos):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         try:
 *             try:
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":298
 *     def _eval(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             try:
 *                 value = eval(code, self.default_namespace, ns)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "Cython/Tempita/_tempita.py":299
 *         __traceback_hide__ = True
 *         try:
 *             try:             # <<<<<<<<<<<<<<
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError as e:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_6);
        /*try:*/ {

          /* "Cython/Tempita/_tempita.py":300
 *         try:
 *             try:
 *                 value = eval(code, self.default_namespace, ns)             # <<<<<<<<<<<<<<
 *             except SyntaxError as e:
 *                 raise SyntaxError(
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 300, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_code);
          __Pyx_GIVEREF(__pyx_v_code);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_code);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
          __Pyx_INCREF(__pyx_v_ns);
          __Pyx_GIVEREF(__pyx_v_ns);
          PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ns);
          __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_v_value = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "Cython/Tempita/_tempita.py":299
 *         __traceback_hide__ = True
 *         try:
 *             try:             # <<<<<<<<<<<<<<
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError as e:
 */
        }
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L18_try_end;
        __pyx_L11_error:;
        __Pyx_PyThreadState_assign
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":301
 *             try:
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError as e:             # <<<<<<<<<<<<<<
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)
 */
        __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_SyntaxError);
        if (__pyx_t_9) {
          __Pyx_AddTraceback("Cython.Tempita._tempita.Template._eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_10) < 0) __PYX_ERR(0, 301, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_8);
          __pyx_v_e = __pyx_t_8;

          /* "Cython/Tempita/_tempita.py":303
 *             except SyntaxError as e:
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)             # <<<<<<<<<<<<<<
 *             return value
 *         except Exception as e:
 */
          __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_invalid_syntax_in_expression_s, __pyx_v_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 303, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_11);

          /* "Cython/Tempita/_tempita.py":302
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError as e:
 *                 raise SyntaxError(             # <<<<<<<<<<<<<<
 *                     'invalid syntax in expression: %s' % code)
 *             return value
 */
          __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 302, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_SyntaxError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 302, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 302, __pyx_L13_except_error)
        }
        goto __pyx_L13_except_error;
        __pyx_L13_except_error:;

        /* "Cython/Tempita/_tempita.py":299
 *         __traceback_hide__ = True
 *         try:
 *             try:             # <<<<<<<<<<<<<<
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError as e:
 */
        __Pyx_PyThreadState_assign
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        goto __pyx_L3_error;
        __pyx_L18_try_end:;
      }

      /* "Cython/Tempita/_tempita.py":304
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)
 *             return value             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             if getattr(e, 'args', None):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      goto __pyx_L7_try_return;

      /* "Cython/Tempita/_tempita.py":298
 *     def _eval(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             try:
 *                 value = eval(code, self.default_namespace, ns)
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "Cython/Tempita/_tempita.py":305
 *                     'invalid syntax in expression: %s' % code)
 *             return value
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             if getattr(e, 'args', None):
 *                 arg0 = e.args[0]
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("Cython.Tempita._tempita.Template._eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 305, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_8);

      /* "Cython/Tempita/_tempita.py":306
 *             return value
 *         except Exception as e:
 *             if getattr(e, 'args', None):             # <<<<<<<<<<<<<<
 *                 arg0 = e.args[0]
 *             else:
 */
      __pyx_t_11 = __Pyx_GetAttr3(__pyx_v_e, __pyx_n_s_args, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 306, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 306, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_13) {

        /* "Cython/Tempita/_tempita.py":307
 *         except Exception as e:
 *             if getattr(e, 'args', None):
 *                 arg0 = e.args[0]             # <<<<<<<<<<<<<<
 *             else:
 *                 arg0 = coerce_text(e)
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 307, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 307, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_arg0 = __pyx_t_12;
        __pyx_t_12 = 0;

        /* "Cython/Tempita/_tempita.py":306
 *             return value
 *         except Exception as e:
 *             if getattr(e, 'args', None):             # <<<<<<<<<<<<<<
 *                 arg0 = e.args[0]
 *             else:
 */
        goto __pyx_L23;
      }

      /* "Cython/Tempita/_tempita.py":309
 *                 arg0 = e.args[0]
 *             else:
 *                 arg0 = coerce_text(e)             # <<<<<<<<<<<<<<
 *             e.args = (self._add_line_info(arg0, pos),)
 *             raise
 */
      /*else*/ {
        __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 309, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_14 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
          }
        }
        if (!__pyx_t_14) {
          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_e); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 309, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_e};
            __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 309, __pyx_L5_except_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_12);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
            PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_e};
            __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 309, __pyx_L5_except_error)
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_GOTREF(__pyx_t_12);
          } else
          #endif
          {
            __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 309, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
            __Pyx_INCREF(__pyx_v_e);
            __Pyx_GIVEREF(__pyx_v_e);
            PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_e);
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_15, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 309, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_arg0 = __pyx_t_12;
        __pyx_t_12 = 0;
      }
      __pyx_L23:;

      /* "Cython/Tempita/_tempita.py":310
 *             else:
 *                 arg0 = coerce_text(e)
 *             e.args = (self._add_line_info(arg0, pos),)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_15 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_9 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_arg0, __pyx_v_pos};
        __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_12);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_arg0, __pyx_v_pos};
        __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_12);
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 310, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_15) {
          __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15); __pyx_t_15 = NULL;
        }
        __Pyx_INCREF(__pyx_v_arg0);
        __Pyx_GIVEREF(__pyx_v_arg0);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_9, __pyx_v_arg0);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_9, __pyx_v_pos);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_12);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
      __pyx_t_12 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_11) < 0) __PYX_ERR(0, 310, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "Cython/Tempita/_tempita.py":311
 *                 arg0 = coerce_text(e)
 *             e.args = (self._add_line_info(arg0, pos),)
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     def _exec(self, code, ns, pos):
 */
      __Pyx_GIVEREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_8, __pyx_t_7);
      __pyx_t_10 = 0; __pyx_t_8 = 0; __pyx_t_7 = 0; 
      __PYX_ERR(0, 311, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "Cython/Tempita/_tempita.py":298
 *     def _eval(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             try:
 *                 value = eval(code, self.default_namespace, ns)
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_arg0);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":313
 *             raise
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_23_exec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_23_exec = {"_exec", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_23_exec, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_23_exec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_exec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_code,&__pyx_n_s_ns,&__pyx_n_s_pos,0};
    PyObject* values[4] = {0,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  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_code)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_exec", 1, 4, 4, 1); __PYX_ERR(0, 313, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_exec", 1, 4, 4, 2); __PYX_ERR(0, 313, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_exec", 1, 4, 4, 3); __PYX_ERR(0, 313, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_exec") < 0)) __PYX_ERR(0, 313, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      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);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_code = values[1];
    __pyx_v_ns = values[2];
    __pyx_v_pos = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_exec", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 313, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_22_exec(__pyx_self, __pyx_v_self, __pyx_v_code, __pyx_v_ns, __pyx_v_pos);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_22_exec(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("_exec", 0);

  /* "Cython/Tempita/_tempita.py":314
 * 
 *     def _exec(self, code, ns, pos):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         try:
 *             exec(code, self.default_namespace, ns)
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":315
 *     def _exec(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "Cython/Tempita/_tempita.py":316
 *         __traceback_hide__ = True
 *         try:
 *             exec(code, self.default_namespace, ns)             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             if e.args:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyExec3(__pyx_v_code, __pyx_t_4, __pyx_v_ns);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":315
 *     def _exec(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:
 */
    }
    __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_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":317
 *         try:
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             if e.args:
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_6) {
      __Pyx_AddTraceback("Cython.Tempita._tempita.Template._exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 317, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;

      /* "Cython/Tempita/_tempita.py":318
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:
 *             if e.args:             # <<<<<<<<<<<<<<
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 *             else:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 318, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 318, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_9) {

        /* "Cython/Tempita/_tempita.py":319
 *         except Exception as e:
 *             if e.args:
 *                 e.args = (self._add_line_info(e.args[0], pos),)             # <<<<<<<<<<<<<<
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 319, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 319, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 319, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_12, __pyx_v_pos};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 319, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_12, __pyx_v_pos};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 319, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 319, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_11) {
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
          }
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_6, __pyx_t_12);
          __Pyx_INCREF(__pyx_v_pos);
          __Pyx_GIVEREF(__pyx_v_pos);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_6, __pyx_v_pos);
          __pyx_t_12 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 319, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 319, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
        __pyx_t_8 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_10) < 0) __PYX_ERR(0, 319, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "Cython/Tempita/_tempita.py":318
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:
 *             if e.args:             # <<<<<<<<<<<<<<
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 *             else:
 */
        goto __pyx_L13;
      }

      /* "Cython/Tempita/_tempita.py":321
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      /*else*/ {
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_13 = NULL;
        __pyx_t_6 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_6 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, Py_None, __pyx_v_pos};
          __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
          PyObject *__pyx_temp[3] = {__pyx_t_13, Py_None, __pyx_v_pos};
          __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_GOTREF(__pyx_t_10);
        } else
        #endif
        {
          __pyx_t_12 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 321, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          if (__pyx_t_13) {
            __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
          }
          __Pyx_INCREF(Py_None);
          __Pyx_GIVEREF(Py_None);
          PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_6, Py_None);
          __Pyx_INCREF(__pyx_v_pos);
          __Pyx_GIVEREF(__pyx_v_pos);
          PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_6, __pyx_v_pos);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
        __pyx_t_10 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_8) < 0) __PYX_ERR(0, 321, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L13:;

      /* "Cython/Tempita/_tempita.py":322
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     def _repr(self, value, pos):
 */
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_7);
      __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_7 = 0; 
      __PYX_ERR(0, 322, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "Cython/Tempita/_tempita.py":315
 *     def _exec(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             exec(code, self.default_namespace, ns)
 *         except Exception as e:
 */
    __Pyx_PyThreadState_assign
    __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_L10_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":313
 *             raise
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":324
 *             raise
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_25_repr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_25_repr = {"_repr", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_25_repr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_25_repr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_pos,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_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, 1); __PYX_ERR(0, 324, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, 2); __PYX_ERR(0, 324, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_repr") < 0)) __PYX_ERR(0, 324, __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_value = values[1];
    __pyx_v_pos = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 324, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_24_repr(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_pos);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_24_repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_pos) {
  CYTHON_UNUSED int __pyx_v___traceback_hide__;
  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;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  __Pyx_RefNannySetupContext("_repr", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "Cython/Tempita/_tempita.py":325
 * 
 *     def _repr(self, value, pos):
 *         __traceback_hide__ = True             # <<<<<<<<<<<<<<
 *         try:
 *             if value is None:
 */
  __pyx_v___traceback_hide__ = 1;

  /* "Cython/Tempita/_tempita.py":326
 *     def _repr(self, value, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             if value is None:
 *                 return ''
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "Cython/Tempita/_tempita.py":327
 *         __traceback_hide__ = True
 *         try:
 *             if value is None:             # <<<<<<<<<<<<<<
 *                 return ''
 *             if self._unicode:
 */
      __pyx_t_4 = (__pyx_v_value == Py_None);
      __pyx_t_5 = (__pyx_t_4 != 0);
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":328
 *         try:
 *             if value is None:
 *                 return ''             # <<<<<<<<<<<<<<
 *             if self._unicode:
 *                 try:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_kp_s__9);
        __pyx_r = __pyx_kp_s__9;
        goto __pyx_L7_try_return;

        /* "Cython/Tempita/_tempita.py":327
 *         __traceback_hide__ = True
 *         try:
 *             if value is None:             # <<<<<<<<<<<<<<
 *                 return ''
 *             if self._unicode:
 */
      }

      /* "Cython/Tempita/_tempita.py":329
 *             if value is None:
 *                 return ''
 *             if self._unicode:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value = unicode_(value)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 329, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":330
 *                 return ''
 *             if self._unicode:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = unicode_(value)
 *                 except UnicodeDecodeError:
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          /*try:*/ {

            /* "Cython/Tempita/_tempita.py":331
 *             if self._unicode:
 *                 try:
 *                     value = unicode_(value)             # <<<<<<<<<<<<<<
 *                 except UnicodeDecodeError:
 *                     value = bytes(value)
 */
            __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_unicode_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 331, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_10, function);
              }
            }
            if (!__pyx_t_11) {
              __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_6);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_value};
                __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_GOTREF(__pyx_t_6);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_value};
                __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L13_error)
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_GOTREF(__pyx_t_6);
              } else
              #endif
              {
                __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 331, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
                __Pyx_INCREF(__pyx_v_value);
                __Pyx_GIVEREF(__pyx_v_value);
                PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_value);
                __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
            __pyx_t_6 = 0;

            /* "Cython/Tempita/_tempita.py":330
 *                 return ''
 *             if self._unicode:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = unicode_(value)
 *                 except UnicodeDecodeError:
 */
          }
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L20_try_end;
          __pyx_L13_error:;
          __Pyx_PyThreadState_assign
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "Cython/Tempita/_tempita.py":332
 *                 try:
 *                     value = unicode_(value)
 *                 except UnicodeDecodeError:             # <<<<<<<<<<<<<<
 *                     value = bytes(value)
 *             else:
 */
          __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
          if (__pyx_t_13) {
            __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_12) < 0) __PYX_ERR(0, 332, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_t_12);

            /* "Cython/Tempita/_tempita.py":333
 *                     value = unicode_(value)
 *                 except UnicodeDecodeError:
 *                     value = bytes(value)             # <<<<<<<<<<<<<<
 *             else:
 *                 if not isinstance(value, basestring_):
 */
            __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 333, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_15 = NULL;
            if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
              __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
              if (likely(__pyx_t_15)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                __Pyx_INCREF(__pyx_t_15);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_14, function);
              }
            }
            if (!__pyx_t_15) {
              __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 333, __pyx_L15_except_error)
              __Pyx_GOTREF(__pyx_t_11);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_14)) {
                PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_value};
                __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 333, __pyx_L15_except_error)
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_GOTREF(__pyx_t_11);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
                PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_value};
                __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 333, __pyx_L15_except_error)
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_GOTREF(__pyx_t_11);
              } else
              #endif
              {
                __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 333, __pyx_L15_except_error)
                __Pyx_GOTREF(__pyx_t_16);
                __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
                __Pyx_INCREF(__pyx_v_value);
                __Pyx_GIVEREF(__pyx_v_value);
                PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_value);
                __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 333, __pyx_L15_except_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
            __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L14_exception_handled;
          }
          goto __pyx_L15_except_error;
          __pyx_L15_except_error:;

          /* "Cython/Tempita/_tempita.py":330
 *                 return ''
 *             if self._unicode:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = unicode_(value)
 *                 except UnicodeDecodeError:
 */
          __Pyx_PyThreadState_assign
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          goto __pyx_L3_error;
          __pyx_L14_exception_handled:;
          __Pyx_PyThreadState_assign
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          __pyx_L20_try_end:;
        }

        /* "Cython/Tempita/_tempita.py":329
 *             if value is None:
 *                 return ''
 *             if self._unicode:             # <<<<<<<<<<<<<<
 *                 try:
 *                     value = unicode_(value)
 */
        goto __pyx_L12;
      }

      /* "Cython/Tempita/_tempita.py":335
 *                     value = bytes(value)
 *             else:
 *                 if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)
 */
      /*else*/ {
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 335, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_12); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 335, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0);
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":336
 *             else:
 *                 if not isinstance(value, basestring_):
 *                     value = coerce_text(value)             # <<<<<<<<<<<<<<
 *                 if (is_unicode(value)
 *                     and self.default_encoding):
 */
          __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
            }
          }
          if (!__pyx_t_6) {
            __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_12);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_10)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
              __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_12);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
              __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_12);
            } else
            #endif
            {
              __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 336, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
              __Pyx_INCREF(__pyx_v_value);
              __Pyx_GIVEREF(__pyx_v_value);
              PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_value);
              __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_12);
          __pyx_t_12 = 0;

          /* "Cython/Tempita/_tempita.py":335
 *                     value = bytes(value)
 *             else:
 *                 if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)
 */
        }

        /* "Cython/Tempita/_tempita.py":337
 *                 if not isinstance(value, basestring_):
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)             # <<<<<<<<<<<<<<
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)
 */
        __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_11) {
          __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 337, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_12);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_value};
            __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 337, __pyx_L3_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_12);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_v_value};
            __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 337, __pyx_L3_error)
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_GOTREF(__pyx_t_12);
          } else
          #endif
          {
            __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
            __Pyx_INCREF(__pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_value);
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 337, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 337, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L25_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":338
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)
 *                     and self.default_encoding):             # <<<<<<<<<<<<<<
 *                     value = value.encode(self.default_encoding)
 *         except Exception as e:
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 338, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 338, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_4 = __pyx_t_5;
        __pyx_L25_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":337
 *                 if not isinstance(value, basestring_):
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)             # <<<<<<<<<<<<<<
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)
 */
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":339
 *                 if (is_unicode(value)
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             e.args = (self._add_line_info(e.args[0], pos),)
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 339, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
            }
          }
          if (!__pyx_t_11) {
            __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L3_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_12);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_10)) {
              PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_6};
              __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
              PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_6};
              __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            } else
            #endif
            {
              __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 339, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_11); __pyx_t_11 = NULL;
              __Pyx_GIVEREF(__pyx_t_6);
              PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_6);
              __pyx_t_6 = 0;
              __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_12);
          __pyx_t_12 = 0;

          /* "Cython/Tempita/_tempita.py":337
 *                 if not isinstance(value, basestring_):
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)             # <<<<<<<<<<<<<<
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)
 */
        }
      }
      __pyx_L12:;

      /* "Cython/Tempita/_tempita.py":326
 *     def _repr(self, value, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             if value is None:
 *                 return ''
 */
    }

    /* "Cython/Tempita/_tempita.py":344
 *             raise
 *         else:
 *             if self._unicode and isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *                 if not self.default_encoding:
 *                     raise UnicodeDecodeError(
 */
    /*else:*/ {
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 344, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (__pyx_t_5) {
      } else {
        __pyx_t_4 = __pyx_t_5;
        goto __pyx_L28_bool_binop_done;
      }
      __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_5 = PyObject_IsInstance(__pyx_v_value, __pyx_t_12); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(0, 344, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_17 = (__pyx_t_5 != 0);
      __pyx_t_4 = __pyx_t_17;
      __pyx_L28_bool_binop_done:;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":345
 *         else:
 *             if self._unicode and isinstance(value, bytes):
 *                 if not self.default_encoding:             # <<<<<<<<<<<<<<
 *                     raise UnicodeDecodeError(
 *                         'Cannot decode bytes value %r into unicode '
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 345, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 345, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_17 = ((!__pyx_t_4) != 0);
        if (__pyx_t_17) {

          /* "Cython/Tempita/_tempita.py":348
 *                     raise UnicodeDecodeError(
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)             # <<<<<<<<<<<<<<
 *                 try:
 *                     value = value.decode(self.default_encoding)
 */
          __pyx_t_12 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_decode_bytes_value_r_into, __pyx_v_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 348, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);

          /* "Cython/Tempita/_tempita.py":346
 *             if self._unicode and isinstance(value, bytes):
 *                 if not self.default_encoding:
 *                     raise UnicodeDecodeError(             # <<<<<<<<<<<<<<
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)
 */
          __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 346, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12);
          __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeDecodeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_Raise(__pyx_t_12, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __PYX_ERR(0, 346, __pyx_L5_except_error)

          /* "Cython/Tempita/_tempita.py":345
 *         else:
 *             if self._unicode and isinstance(value, bytes):
 *                 if not self.default_encoding:             # <<<<<<<<<<<<<<
 *                     raise UnicodeDecodeError(
 *                         'Cannot decode bytes value %r into unicode '
 */
        }

        /* "Cython/Tempita/_tempita.py":349
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError as e:
 */
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_7);
          /*try:*/ {

            /* "Cython/Tempita/_tempita.py":350
 *                         '(no default_encoding provided)' % value)
 *                 try:
 *                     value = value.decode(self.default_encoding)             # <<<<<<<<<<<<<<
 *                 except UnicodeDecodeError as e:
 *                     raise UnicodeDecodeError(
 */
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 350, __pyx_L31_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 350, __pyx_L31_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_6 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_10, function);
              }
            }
            if (!__pyx_t_6) {
              __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 350, __pyx_L31_error)
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_GOTREF(__pyx_t_12);
            } else {
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_14};
                __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 350, __pyx_L31_error)
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
                PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_14};
                __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 350, __pyx_L31_error)
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              } else
              #endif
              {
                __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 350, __pyx_L31_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
                __Pyx_GIVEREF(__pyx_t_14);
                PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_14);
                __pyx_t_14 = 0;
                __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 350, __pyx_L31_error)
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              }
            }
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_12);
            __pyx_t_12 = 0;

            /* "Cython/Tempita/_tempita.py":349
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError as e:
 */
          }
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L38_try_end;
          __pyx_L31_error:;
          __Pyx_PyThreadState_assign
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

          /* "Cython/Tempita/_tempita.py":351
 *                 try:
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError as e:             # <<<<<<<<<<<<<<
 *                     raise UnicodeDecodeError(
 *                         e.encoding,
 */
          __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
          if (__pyx_t_13) {
            __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 351, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __pyx_v_e = __pyx_t_10;

            /* "Cython/Tempita/_tempita.py":353
 *                 except UnicodeDecodeError as e:
 *                     raise UnicodeDecodeError(
 *                         e.encoding,             # <<<<<<<<<<<<<<
 *                         e.object,
 *                         e.start,
 */
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_encoding); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 353, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_14);

            /* "Cython/Tempita/_tempita.py":354
 *                     raise UnicodeDecodeError(
 *                         e.encoding,
 *                         e.object,             # <<<<<<<<<<<<<<
 *                         e.start,
 *                         e.end,
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_object); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_6);

            /* "Cython/Tempita/_tempita.py":355
 *                         e.encoding,
 *                         e.object,
 *                         e.start,             # <<<<<<<<<<<<<<
 *                         e.end,
 *                         e.reason + ' in string %r' % value)
 */
            __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_start); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 355, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_16);

            /* "Cython/Tempita/_tempita.py":356
 *                         e.object,
 *                         e.start,
 *                         e.end,             # <<<<<<<<<<<<<<
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):
 */
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_end); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 356, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_15);

            /* "Cython/Tempita/_tempita.py":357
 *                         e.start,
 *                         e.end,
 *                         e.reason + ' in string %r' % value)             # <<<<<<<<<<<<<<
 *             elif not self._unicode and is_unicode(value):
 *                 if not self.default_encoding:
 */
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_reason); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 357, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_19 = __Pyx_PyString_Format(__pyx_kp_s_in_string_r, __pyx_v_value); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 357, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_20 = PyNumber_Add(__pyx_t_18, __pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 357, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_20);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

            /* "Cython/Tempita/_tempita.py":352
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError as e:
 *                     raise UnicodeDecodeError(             # <<<<<<<<<<<<<<
 *                         e.encoding,
 *                         e.object,
 */
            __pyx_t_19 = PyTuple_New(5); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 352, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_16);
            PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_16);
            __Pyx_GIVEREF(__pyx_t_15);
            PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_15);
            __Pyx_GIVEREF(__pyx_t_20);
            PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_20);
            __pyx_t_14 = 0;
            __pyx_t_6 = 0;
            __pyx_t_16 = 0;
            __pyx_t_15 = 0;
            __pyx_t_20 = 0;
            __pyx_t_20 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeDecodeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 352, __pyx_L33_except_error)
            __Pyx_GOTREF(__pyx_t_20);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_Raise(__pyx_t_20, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
            __PYX_ERR(0, 352, __pyx_L33_except_error)
          }
          goto __pyx_L33_except_error;
          __pyx_L33_except_error:;

          /* "Cython/Tempita/_tempita.py":349
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError as e:
 */
          __Pyx_PyThreadState_assign
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7);
          goto __pyx_L5_except_error;
          __pyx_L38_try_end:;
        }

        /* "Cython/Tempita/_tempita.py":344
 *             raise
 *         else:
 *             if self._unicode and isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *                 if not self.default_encoding:
 *                     raise UnicodeDecodeError(
 */
        goto __pyx_L27;
      }

      /* "Cython/Tempita/_tempita.py":358
 *                         e.end,
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):             # <<<<<<<<<<<<<<
 *                 if not self.default_encoding:
 *                     raise UnicodeEncodeError(
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 358, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 358, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_5 = ((!__pyx_t_4) != 0);
      if (__pyx_t_5) {
      } else {
        __pyx_t_17 = __pyx_t_5;
        goto __pyx_L41_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 358, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
        }
      }
      if (!__pyx_t_12) {
        __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 358, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value};
          __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 358, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
          PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v_value};
          __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 358, __pyx_L5_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else
        #endif
        {
          __pyx_t_20 = PyTuple_New(1+1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 358, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_20);
          __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_12); __pyx_t_12 = NULL;
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_20, 0+1, __pyx_v_value);
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_20, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 358, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 358, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_17 = __pyx_t_5;
      __pyx_L41_bool_binop_done:;
      if (__pyx_t_17) {

        /* "Cython/Tempita/_tempita.py":359
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):
 *                 if not self.default_encoding:             # <<<<<<<<<<<<<<
 *                     raise UnicodeEncodeError(
 *                         'Cannot encode unicode value %r into bytes '
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 359, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_17 < 0)) __PYX_ERR(0, 359, __pyx_L5_except_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_5 = ((!__pyx_t_17) != 0);
        if (__pyx_t_5) {

          /* "Cython/Tempita/_tempita.py":362
 *                     raise UnicodeEncodeError(
 *                         'Cannot encode unicode value %r into bytes '
 *                         '(no default_encoding provided)' % value)             # <<<<<<<<<<<<<<
 *                 value = value.encode(self.default_encoding)
 *             return value
 */
          __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_encode_unicode_value_r_in, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 362, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);

          /* "Cython/Tempita/_tempita.py":360
 *             elif not self._unicode and is_unicode(value):
 *                 if not self.default_encoding:
 *                     raise UnicodeEncodeError(             # <<<<<<<<<<<<<<
 *                         'Cannot encode unicode value %r into bytes '
 *                         '(no default_encoding provided)' % value)
 */
          __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 360, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11);
          __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeEncodeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 360, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_Raise(__pyx_t_11, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __PYX_ERR(0, 360, __pyx_L5_except_error)

          /* "Cython/Tempita/_tempita.py":359
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):
 *                 if not self.default_encoding:             # <<<<<<<<<<<<<<
 *                     raise UnicodeEncodeError(
 *                         'Cannot encode unicode value %r into bytes '
 */
        }

        /* "Cython/Tempita/_tempita.py":363
 *                         'Cannot encode unicode value %r into bytes '
 *                         '(no default_encoding provided)' % value)
 *                 value = value.encode(self.default_encoding)             # <<<<<<<<<<<<<<
 *             return value
 * 
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 363, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 363, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_12 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (!__pyx_t_12) {
          __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_20); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 363, __pyx_L5_except_error)
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          __Pyx_GOTREF(__pyx_t_11);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_20};
            __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 363, __pyx_L5_except_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
            PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_20};
            __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 363, __pyx_L5_except_error)
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          } else
          #endif
          {
            __pyx_t_19 = PyTuple_New(1+1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 363, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_12); __pyx_t_12 = NULL;
            __Pyx_GIVEREF(__pyx_t_20);
            PyTuple_SET_ITEM(__pyx_t_19, 0+1, __pyx_t_20);
            __pyx_t_20 = 0;
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 363, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "Cython/Tempita/_tempita.py":358
 *                         e.end,
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):             # <<<<<<<<<<<<<<
 *                 if not self.default_encoding:
 *                     raise UnicodeEncodeError(
 */
      }
      __pyx_L27:;

      /* "Cython/Tempita/_tempita.py":364
 *                         '(no default_encoding provided)' % value)
 *                 value = value.encode(self.default_encoding)
 *             return value             # <<<<<<<<<<<<<<
 * 
 *     def _add_line_info(self, msg, pos):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      goto __pyx_L6_except_return;
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "Cython/Tempita/_tempita.py":340
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             e.args = (self._add_line_info(e.args[0], pos),)
 *             raise
 */
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_19) < 0) __PYX_ERR(0, 340, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_10);
      __pyx_v_e = __pyx_t_10;

      /* "Cython/Tempita/_tempita.py":341
 *                     value = value.encode(self.default_encoding)
 *         except Exception as e:
 *             e.args = (self._add_line_info(e.args[0], pos),)             # <<<<<<<<<<<<<<
 *             raise
 *         else:
 */
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
        __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_12);
        if (likely(__pyx_t_15)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
          __Pyx_INCREF(__pyx_t_15);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_12, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_16, __pyx_v_pos};
        __pyx_t_20 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 341, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
        PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_16, __pyx_v_pos};
        __pyx_t_20 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 341, __pyx_L5_except_error)
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 341, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__pyx_t_15) {
          __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15); __pyx_t_15 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_13, __pyx_t_16);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_13, __pyx_v_pos);
        __pyx_t_16 = 0;
        __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 341, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 341, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_20);
      PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_20);
      __pyx_t_20 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_12) < 0) __PYX_ERR(0, 341, __pyx_L5_except_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "Cython/Tempita/_tempita.py":342
 *         except Exception as e:
 *             e.args = (self._add_line_info(e.args[0], pos),)
 *             raise             # <<<<<<<<<<<<<<
 *         else:
 *             if self._unicode and isinstance(value, bytes):
 */
      __Pyx_GIVEREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_10, __pyx_t_19);
      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_19 = 0; 
      __PYX_ERR(0, 342, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "Cython/Tempita/_tempita.py":326
 *     def _repr(self, value, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             if value is None:
 *                 return ''
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_L6_except_return:;
    __Pyx_PyThreadState_assign
    __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;
  }

  /* "Cython/Tempita/_tempita.py":324
 *             raise
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":366
 *             return value
 * 
 *     def _add_line_info(self, msg, pos):             # <<<<<<<<<<<<<<
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_27_add_line_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_8Template_27_add_line_info = {"_add_line_info", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_27_add_line_info, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_8Template_27_add_line_info(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_msg = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_add_line_info (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_msg,&__pyx_n_s_pos,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_msg)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_add_line_info", 1, 3, 3, 1); __PYX_ERR(0, 366, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_add_line_info", 1, 3, 3, 2); __PYX_ERR(0, 366, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_add_line_info") < 0)) __PYX_ERR(0, 366, __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_msg = values[1];
    __pyx_v_pos = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_add_line_info", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 366, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._add_line_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8Template_26_add_line_info(__pyx_self, __pyx_v_self, __pyx_v_msg, __pyx_v_pos);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8Template_26_add_line_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_msg, PyObject *__pyx_v_pos) {
  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;
  __Pyx_RefNannySetupContext("_add_line_info", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "Cython/Tempita/_tempita.py":368
 *     def _add_line_info(self, msg, pos):
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])             # <<<<<<<<<<<<<<
 *         if self.name:
 *             msg += " in file %s" % self.name
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_msg);
  __Pyx_GIVEREF(__pyx_v_msg);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":367
 * 
 *     def _add_line_info(self, msg, pos):
 *         msg = "%s at line %s column %s" % (             # <<<<<<<<<<<<<<
 *             msg, pos[0], pos[1])
 *         if self.name:
 */
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_at_line_s_column_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":369
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 *         if self.name:             # <<<<<<<<<<<<<<
 *             msg += " in file %s" % self.name
 *         return msg
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "Cython/Tempita/_tempita.py":370
 *             msg, pos[0], pos[1])
 *         if self.name:
 *             msg += " in file %s" % self.name             # <<<<<<<<<<<<<<
 *         return msg
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_in_file_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_msg, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_msg, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":369
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 *         if self.name:             # <<<<<<<<<<<<<<
 *             msg += " in file %s" % self.name
 *         return msg
 */
  }

  /* "Cython/Tempita/_tempita.py":371
 *         if self.name:
 *             msg += " in file %s" % self.name
 *         return msg             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_msg);
  __pyx_r = __pyx_v_msg;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":366
 *             return value
 * 
 *     def _add_line_info(self, msg, pos):             # <<<<<<<<<<<<<<
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._add_line_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_msg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":374
 * 
 * 
 * def sub(content, delimeters=None, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_3sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_3sub = {"sub", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_3sub, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_3sub(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_content = 0;
  PyObject *__pyx_v_delimeters = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sub (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_content,&__pyx_n_s_delimeters,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_content)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimeters);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "sub") < 0)) __PYX_ERR(0, 374, __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_content = values[0];
    __pyx_v_delimeters = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sub", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 374, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_2sub(__pyx_self, __pyx_v_content, __pyx_v_delimeters, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_2sub(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_delimeters, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_tmpl = 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;
  __Pyx_RefNannySetupContext("sub", 0);

  /* "Cython/Tempita/_tempita.py":375
 * 
 * def sub(content, delimeters=None, **kw):
 *     name = kw.get('__name')             # <<<<<<<<<<<<<<
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 *     return tmpl.substitute(kw)
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kw, __pyx_n_s_name_3, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":376
 * def sub(content, delimeters=None, **kw):
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)             # <<<<<<<<<<<<<<
 *     return tmpl.substitute(kw)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimeters, __pyx_v_delimeters) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":377
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 *     return tmpl.substitute(kw)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_kw};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_kw};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_kw);
      __Pyx_GIVEREF(__pyx_v_kw);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_kw);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 377, __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_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":374
 * 
 * 
 * def sub(content, delimeters=None, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 */

  /* 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("Cython.Tempita._tempita.sub", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_tmpl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * def paste_script_template_renderer(content, vars, filename=None):             # <<<<<<<<<<<<<<
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5paste_script_template_renderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5paste_script_template_renderer = {"paste_script_template_renderer", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5paste_script_template_renderer, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5paste_script_template_renderer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_content = 0;
  PyObject *__pyx_v_vars = 0;
  PyObject *__pyx_v_filename = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("paste_script_template_renderer (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_content,&__pyx_n_s_vars,&__pyx_n_s_filename,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_content)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vars)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("paste_script_template_renderer", 0, 2, 3, 1); __PYX_ERR(0, 380, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_filename);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "paste_script_template_renderer") < 0)) __PYX_ERR(0, 380, __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_content = values[0];
    __pyx_v_vars = values[1];
    __pyx_v_filename = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("paste_script_template_renderer", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 380, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.paste_script_template_renderer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_4paste_script_template_renderer(__pyx_self, __pyx_v_content, __pyx_v_vars, __pyx_v_filename);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4paste_script_template_renderer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_vars, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_tmpl = 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;
  __Pyx_RefNannySetupContext("paste_script_template_renderer", 0);

  /* "Cython/Tempita/_tempita.py":381
 * 
 * def paste_script_template_renderer(content, vars, filename=None):
 *     tmpl = Template(content, name=filename)             # <<<<<<<<<<<<<<
 *     return tmpl.substitute(vars)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_filename) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":382
 * def paste_script_template_renderer(content, vars, filename=None):
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_vars};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_vars};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_vars);
      __Pyx_GIVEREF(__pyx_v_vars);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_vars);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __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_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * def paste_script_template_renderer(content, vars, filename=None):             # <<<<<<<<<<<<<<
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)
 */

  /* 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("Cython.Tempita._tempita.paste_script_template_renderer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmpl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":387
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.items():
 *             setattr(self, name, value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  {
    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) {
        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;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 387, __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("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 387, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_5bunch___init__(__pyx_self, __pyx_v_self, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_name = 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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":388
 * 
 *     def __init__(self, **kw):
 *         for name, value in kw.items():             # <<<<<<<<<<<<<<
 *             setattr(self, name, value)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 388, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 388, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 388, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 388, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 388, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      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_ERR(0, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_ERR(0, 388, __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_ERR(0, 388, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "Cython/Tempita/_tempita.py":389
 *     def __init__(self, **kw):
 *         for name, value in kw.items():
 *             setattr(self, name, value)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name, value):
 */
    __pyx_t_9 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 389, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":388
 * 
 *     def __init__(self, **kw):
 *         for name, value in kw.items():             # <<<<<<<<<<<<<<
 *             setattr(self, name, value)
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":387
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.items():
 *             setattr(self, name, value)
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":391
 *             setattr(self, name, value)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         self[name] = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_3__setattr__ = {"__setattr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_3__setattr__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_3__setattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 1); __PYX_ERR(0, 391, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); __PYX_ERR(0, 391, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) __PYX_ERR(0, 391, __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_name = values[1];
    __pyx_v_value = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 391, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_5bunch_2__setattr__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_value);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_2__setattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "Cython/Tempita/_tempita.py":392
 * 
 *     def __setattr__(self, name, value):
 *         self[name] = value             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name):
 */
  if (unlikely(PyObject_SetItem(__pyx_v_self, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 392, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":391
 *             setattr(self, name, value)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         self[name] = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":394
 *         self[name] = value
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self[name]
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_5__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_5__getattr__ = {"__getattr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_5__getattr__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_5__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 394, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 394, __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_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_5bunch_4__getattr__(__pyx_self, __pyx_v_self, __pyx_v_name);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_4__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "Cython/Tempita/_tempita.py":395
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self[name]
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __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:*/ {

      /* "Cython/Tempita/_tempita.py":396
 *     def __getattr__(self, name):
 *         try:
 *             return self[name]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             raise AttributeError(name)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetItem(__pyx_v_self, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "Cython/Tempita/_tempita.py":395
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self[name]
 *         except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":397
 *         try:
 *             return self[name]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             raise AttributeError(name)
 * 
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 397, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "Cython/Tempita/_tempita.py":398
 *             return self[name]
 *         except KeyError:
 *             raise AttributeError(name)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 398, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_name);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 398, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(0, 398, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "Cython/Tempita/_tempita.py":395
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self[name]
 *         except KeyError:
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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;
  }

  /* "Cython/Tempita/_tempita.py":394
 *         self[name] = value
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self[name]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":400
 *             raise AttributeError(name)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if 'default' in self:
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_7__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_7__getitem__ = {"__getitem__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_7__getitem__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_7__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_key = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_key,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 400, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 400, __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_key = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_5bunch_6__getitem__(__pyx_self, __pyx_v_self, __pyx_v_key);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_6__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "Cython/Tempita/_tempita.py":401
 * 
 *     def __getitem__(self, key):
 *         if 'default' in self:             # <<<<<<<<<<<<<<
 *             try:
 *                 return dict.__getitem__(self, key)
 */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_default, __pyx_v_self, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":402
 *     def __getitem__(self, key):
 *         if 'default' in self:
 *             try:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "Cython/Tempita/_tempita.py":403
 *         if 'default' in self:
 *             try:
 *                 return dict.__getitem__(self, key)             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 return dict.__getitem__(self, 'default')
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyDict_Type)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_v_key};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_self, __pyx_v_key};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 403, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__pyx_t_8) {
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
          }
          __Pyx_INCREF(__pyx_v_self);
          __Pyx_GIVEREF(__pyx_v_self);
          PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self);
          __Pyx_INCREF(__pyx_v_key);
          __Pyx_GIVEREF(__pyx_v_key);
          PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_key);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L8_try_return;

        /* "Cython/Tempita/_tempita.py":402
 *     def __getitem__(self, key):
 *         if 'default' in self:
 *             try:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 */
      }
      __pyx_L4_error:;
      __Pyx_PyThreadState_assign
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":404
 *             try:
 *                 return dict.__getitem__(self, key)
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, 'default')
 *         else:
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_10) < 0) __PYX_ERR(0, 404, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_10);

        /* "Cython/Tempita/_tempita.py":405
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 *                 return dict.__getitem__(self, 'default')             # <<<<<<<<<<<<<<
 *         else:
 *             return dict.__getitem__(self, key)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyDict_Type)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 405, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_9 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_self, __pyx_n_s_default};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L6_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
          PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v_self, __pyx_n_s_default};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L6_except_error)
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_GOTREF(__pyx_t_8);
        } else
        #endif
        {
          __pyx_t_13 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 405, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (__pyx_t_12) {
            __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
          }
          __Pyx_INCREF(__pyx_v_self);
          __Pyx_GIVEREF(__pyx_v_self);
          PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_9, __pyx_v_self);
          __Pyx_INCREF(__pyx_n_s_default);
          __Pyx_GIVEREF(__pyx_n_s_default);
          PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_9, __pyx_n_s_default);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_13, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L6_except_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L7_except_return;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;

      /* "Cython/Tempita/_tempita.py":402
 *     def __getitem__(self, key):
 *         if 'default' in self:
 *             try:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 */
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L8_try_return:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
      __pyx_L7_except_return:;
      __Pyx_PyThreadState_assign
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L0;
    }

    /* "Cython/Tempita/_tempita.py":401
 * 
 *     def __getitem__(self, key):
 *         if 'default' in self:             # <<<<<<<<<<<<<<
 *             try:
 *                 return dict.__getitem__(self, key)
 */
  }

  /* "Cython/Tempita/_tempita.py":407
 *                 return dict.__getitem__(self, 'default')
 *         else:
 *             return dict.__getitem__(self, key)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyDict_Type)), __pyx_n_s_getitem); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = NULL;
    __pyx_t_9 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_9 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_key};
      __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_self, __pyx_v_key};
      __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_10);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_v_self);
      __Pyx_INCREF(__pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_v_key);
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 407, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L0;
  }

  /* "Cython/Tempita/_tempita.py":400
 *             raise AttributeError(name)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if 'default' in self:
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":409
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_9__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_9__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_9__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_9__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_5bunch_8__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_5bunch_8__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = 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;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":410
 * 
 *     def __repr__(self):
 *         return '<%s %s>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__,
 *             ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())]))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "Cython/Tempita/_tempita.py":411
 *     def __repr__(self):
 *         return '<%s %s>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())]))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":412
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 *             ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())]))             # <<<<<<<<<<<<<<
 * 
 * ############################################################
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_6) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PySequence_List(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_7 = PyList_Sort(__pyx_t_3); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 412, __pyx_L1_error)
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 412, __pyx_L1_error)
  }
  __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 412, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 412, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 412, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
    __Pyx_INCREF(__pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v);
    __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_r, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":411
 *     def __repr__(self):
 *         return '<%s %s>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())]))
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":410
 * 
 *     def __repr__(self):
 *         return '<%s %s>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__,
 *             ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())]))
 */
  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":409
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("Cython.Tempita._tempita.bunch.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":421
 * class html(object):
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.value = value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_4html_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 421, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 421, __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 = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 421, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.html.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_4html___init__(__pyx_self, __pyx_v_self, __pyx_v_value);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":422
 * 
 *     def __init__(self, value):
 *         self.value = value             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 422, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":421
 * class html(object):
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.value = value
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.html.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":424
 *         self.value = value
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_4html_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_3__str__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_4html_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":425
 * 
 *     def __str__(self):
 *         return self.value             # <<<<<<<<<<<<<<
 * 
 *     def __html__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":424
 *         self.value = value
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Cython.Tempita._tempita.html.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":427
 *         return self.value
 * 
 *     def __html__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_5__html__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_4html_5__html__ = {"__html__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_5__html__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_5__html__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__html__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_4html_4__html__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_4__html__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__html__", 0);

  /* "Cython/Tempita/_tempita.py":428
 * 
 *     def __html__(self):
 *         return self.value             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":427
 *         return self.value
 * 
 *     def __html__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Cython.Tempita._tempita.html.__html__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":430
 *         return self.value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_4html_7__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_7__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_4html_7__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_4html_6__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_4html_6__repr__(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;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":431
 * 
 *     def __repr__(self):
 *         return '<%s %r>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__, self.value)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "Cython/Tempita/_tempita.py":432
 *     def __repr__(self):
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":431
 * 
 *     def __repr__(self):
 *         return '<%s %r>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__, self.value)
 * 
 */
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_r_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":430
 *         return self.value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("Cython.Tempita._tempita.html.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":435
 * 
 * 
 * def html_quote(value, force=True):             # <<<<<<<<<<<<<<
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_7html_quote(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_7html_quote = {"html_quote", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_7html_quote, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_7html_quote(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_force = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("html_quote (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,&__pyx_n_s_force,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)((PyObject *)Py_True));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_force);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "html_quote") < 0)) __PYX_ERR(0, 435, __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_value = values[0];
    __pyx_v_force = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("html_quote", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 435, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.html_quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6html_quote(__pyx_self, __pyx_v_value, __pyx_v_force);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6html_quote(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value, PyObject *__pyx_v_force) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  __Pyx_RefNannySetupContext("html_quote", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "Cython/Tempita/_tempita.py":436
 * 
 * def html_quote(value, force=True):
 *     if not force and hasattr(value, '__html__'):             # <<<<<<<<<<<<<<
 *         return value.__html__()
 *     if value is None:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyObject_HasAttr(__pyx_v_value, __pyx_n_s_html); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 436, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":437
 * def html_quote(value, force=True):
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()             # <<<<<<<<<<<<<<
 *     if value is None:
 *         return ''
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_html); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "Cython/Tempita/_tempita.py":436
 * 
 * def html_quote(value, force=True):
 *     if not force and hasattr(value, '__html__'):             # <<<<<<<<<<<<<<
 *         return value.__html__()
 *     if value is None:
 */
  }

  /* "Cython/Tempita/_tempita.py":438
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 *     if value is None:             # <<<<<<<<<<<<<<
 *         return ''
 *     if not isinstance(value, basestring_):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":439
 *         return value.__html__()
 *     if value is None:
 *         return ''             # <<<<<<<<<<<<<<
 *     if not isinstance(value, basestring_):
 *         value = coerce_text(value)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__9);
    __pyx_r = __pyx_kp_s__9;
    goto __pyx_L0;

    /* "Cython/Tempita/_tempita.py":438
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 *     if value is None:             # <<<<<<<<<<<<<<
 *         return ''
 *     if not isinstance(value, basestring_):
 */
  }

  /* "Cython/Tempita/_tempita.py":440
 *     if value is None:
 *         return ''
 *     if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":441
 *         return ''
 *     if not isinstance(value, basestring_):
 *         value = coerce_text(value)             # <<<<<<<<<<<<<<
 *     if sys.version >= "3" and isinstance(value, bytes):
 *         value = cgi.escape(value.decode('latin1'), 1)
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":440
 *     if value is None:
 *         return ''
 *     if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):
 */
  }

  /* "Cython/Tempita/_tempita.py":442
 *     if not isinstance(value, basestring_):
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *         value = cgi.escape(value.decode('latin1'), 1)
 *         value = value.encode('latin1')
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_kp_s_3, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_4); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":443
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):
 *         value = cgi.escape(value.decode('latin1'), 1)             # <<<<<<<<<<<<<<
 *         value = value.encode('latin1')
 *     else:
 */
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_cgi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_escape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_int_1};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_int_1};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else
    #endif
    {
      __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_int_1);
      __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":444
 *     if sys.version >= "3" and isinstance(value, bytes):
 *         value = cgi.escape(value.decode('latin1'), 1)
 *         value = value.encode('latin1')             # <<<<<<<<<<<<<<
 *     else:
 *         value = cgi.escape(value, 1)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":442
 *     if not isinstance(value, basestring_):
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *         value = cgi.escape(value.decode('latin1'), 1)
 *         value = value.encode('latin1')
 */
    goto __pyx_L8;
  }

  /* "Cython/Tempita/_tempita.py":446
 *         value = value.encode('latin1')
 *     else:
 *         value = cgi.escape(value, 1)             # <<<<<<<<<<<<<<
 *     if sys.version < "3":
 *         if is_unicode(value):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cgi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_escape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 446, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = NULL;
    __pyx_t_8 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_8 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_value, __pyx_int_1};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 446, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
      PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_value, __pyx_int_1};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 446, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_value);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_int_1);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 446, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_7);
    __pyx_t_7 = 0;
  }
  __pyx_L8:;

  /* "Cython/Tempita/_tempita.py":447
 *     else:
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_9, __pyx_kp_s_3, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":448
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":
 *         if is_unicode(value):             # <<<<<<<<<<<<<<
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 *     return value
 */
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_value};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_value);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "Cython/Tempita/_tempita.py":449
 *     if sys.version < "3":
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 449, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "Cython/Tempita/_tempita.py":448
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":
 *         if is_unicode(value):             # <<<<<<<<<<<<<<
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 *     return value
 */
    }

    /* "Cython/Tempita/_tempita.py":447
 *     else:
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 */
  }

  /* "Cython/Tempita/_tempita.py":450
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 *     return value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_value);
  __pyx_r = __pyx_v_value;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":435
 * 
 * 
 * def html_quote(value, force=True):             # <<<<<<<<<<<<<<
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("Cython.Tempita._tempita.html_quote", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":453
 * 
 * 
 * def url(v):             # <<<<<<<<<<<<<<
 *     v = coerce_text(v)
 *     if is_unicode(v):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_9url(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_9url = {"url", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_9url, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_9url(PyObject *__pyx_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("url (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_8url(__pyx_self, ((PyObject *)__pyx_v_v));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_8url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_v) {
  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;
  __Pyx_RefNannySetupContext("url", 0);
  __Pyx_INCREF(__pyx_v_v);

  /* "Cython/Tempita/_tempita.py":454
 * 
 * def url(v):
 *     v = coerce_text(v)             # <<<<<<<<<<<<<<
 *     if is_unicode(v):
 *         v = v.encode('utf8')
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_v);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":455
 * def url(v):
 *     v = coerce_text(v)
 *     if is_unicode(v):             # <<<<<<<<<<<<<<
 *         v = v.encode('utf8')
 *     return url_quote(v)
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_v};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_v};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_v);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __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_ERR(0, 455, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "Cython/Tempita/_tempita.py":456
 *     v = coerce_text(v)
 *     if is_unicode(v):
 *         v = v.encode('utf8')             # <<<<<<<<<<<<<<
 *     return url_quote(v)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "Cython/Tempita/_tempita.py":455
 * def url(v):
 *     v = coerce_text(v)
 *     if is_unicode(v):             # <<<<<<<<<<<<<<
 *         v = v.encode('utf8')
 *     return url_quote(v)
 */
  }

  /* "Cython/Tempita/_tempita.py":457
 *     if is_unicode(v):
 *         v = v.encode('utf8')
 *     return url_quote(v)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_url_quote); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
      __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
      __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_2);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_v);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":453
 * 
 * 
 * def url(v):             # <<<<<<<<<<<<<<
 *     v = coerce_text(v)
 *     if is_unicode(v):
 */

  /* 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("Cython.Tempita._tempita.url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":460
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     parts = []
 *     for name, value in sorted(kw.items()):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11attr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11attr = {"attr", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11attr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11attr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("attr (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("attr", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "attr", 1))) return NULL;
  __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_10attr(__pyx_self, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_10attr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_parts = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = 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;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  __Pyx_RefNannySetupContext("attr", 0);

  /* "Cython/Tempita/_tempita.py":461
 * 
 * def attr(**kw):
 *     parts = []             # <<<<<<<<<<<<<<
 *     for name, value in sorted(kw.items()):
 *         if value is None:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_parts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":462
 * def attr(**kw):
 *     parts = []
 *     for name, value in sorted(kw.items()):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             continue
 */
  __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_kw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_4 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 462, __pyx_L1_error)
  if (unlikely(__pyx_t_1 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 462, __pyx_L1_error)
  }
  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 462, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 462, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 462, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      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_ERR(0, 462, __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_ERR(0, 462, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "Cython/Tempita/_tempita.py":463
 *     parts = []
 *     for name, value in sorted(kw.items()):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             continue
 *         if name.endswith('_'):
 */
    __pyx_t_9 = (__pyx_v_value == Py_None);
    __pyx_t_10 = (__pyx_t_9 != 0);
    if (__pyx_t_10) {

      /* "Cython/Tempita/_tempita.py":464
 *     for name, value in sorted(kw.items()):
 *         if value is None:
 *             continue             # <<<<<<<<<<<<<<
 *         if name.endswith('_'):
 *             name = name[:-1]
 */
      goto __pyx_L3_continue;

      /* "Cython/Tempita/_tempita.py":463
 *     parts = []
 *     for name, value in sorted(kw.items()):
 *         if value is None:             # <<<<<<<<<<<<<<
 *             continue
 *         if name.endswith('_'):
 */
    }

    /* "Cython/Tempita/_tempita.py":465
 *         if value is None:
 *             continue
 *         if name.endswith('_'):             # <<<<<<<<<<<<<<
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_10) {

      /* "Cython/Tempita/_tempita.py":466
 *             continue
 *         if name.endswith('_'):
 *             name = name[:-1]             # <<<<<<<<<<<<<<
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 *     return html(' '.join(parts))
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, -1L, NULL, NULL, &__pyx_slice__21, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":465
 *         if value is None:
 *             continue
 *         if name.endswith('_'):             # <<<<<<<<<<<<<<
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 */
    }

    /* "Cython/Tempita/_tempita.py":467
 *         if name.endswith('_'):
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))             # <<<<<<<<<<<<<<
 *     return html(' '.join(parts))
 * 
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_name};
        __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_name};
        __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_6);
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_name);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (!__pyx_t_2) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
        PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_value};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_value);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
    __pyx_t_6 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":462
 * def attr(**kw):
 *     parts = []
 *     for name, value in sorted(kw.items()):             # <<<<<<<<<<<<<<
 *         if value is None:
 *             continue
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":468
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 *     return html(' '.join(parts))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_parts); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
      PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
      __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else
    #endif
    {
      __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL;
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":460
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     parts = []
 *     for name, value in sorted(kw.items()):
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("Cython.Tempita._tempita.attr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":481
 *         ))
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr = {"_repr", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_repr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_value,&__pyx_n_s_pos,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_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, 1); __PYX_ERR(0, 481, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, 2); __PYX_ERR(0, 481, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_repr") < 0)) __PYX_ERR(0, 481, __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_value = values[1];
    __pyx_v_pos = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_repr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 481, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.HTMLTemplate._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_12HTMLTemplate__repr(__pyx_self, __pyx_v_self, __pyx_v_value, __pyx_v_pos);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_12HTMLTemplate__repr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value, PyObject *__pyx_v_pos) {
  int __pyx_v_quote;
  PyObject *__pyx_v_plain = 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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("_repr", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "Cython/Tempita/_tempita.py":482
 * 
 *     def _repr(self, value, pos):
 *         if hasattr(value, '__html__'):             # <<<<<<<<<<<<<<
 *             value = value.__html__()
 *             quote = False
 */
  __pyx_t_1 = PyObject_HasAttr(__pyx_v_value, __pyx_n_s_html); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 482, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":483
 *     def _repr(self, value, pos):
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()             # <<<<<<<<<<<<<<
 *             quote = False
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_html); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":484
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 *             quote = False             # <<<<<<<<<<<<<<
 *         else:
 *             quote = True
 */
    __pyx_v_quote = 0;

    /* "Cython/Tempita/_tempita.py":482
 * 
 *     def _repr(self, value, pos):
 *         if hasattr(value, '__html__'):             # <<<<<<<<<<<<<<
 *             value = value.__html__()
 *             quote = False
 */
    goto __pyx_L3;
  }

  /* "Cython/Tempita/_tempita.py":486
 *             quote = False
 *         else:
 *             quote = True             # <<<<<<<<<<<<<<
 *         plain = Template._repr(self, value, pos)
 *         if quote:
 */
  /*else*/ {
    __pyx_v_quote = 1;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":487
 *         else:
 *             quote = True
 *         plain = Template._repr(self, value, pos)             # <<<<<<<<<<<<<<
 *         if quote:
 *             return html_quote(plain)
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_repr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self, __pyx_v_value, __pyx_v_pos};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_self, __pyx_v_value, __pyx_v_pos};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_value);
    __Pyx_INCREF(__pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_pos);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_plain = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":488
 *             quote = True
 *         plain = Template._repr(self, value, pos)
 *         if quote:             # <<<<<<<<<<<<<<
 *             return html_quote(plain)
 *         else:
 */
  __pyx_t_2 = (__pyx_v_quote != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":489
 *         plain = Template._repr(self, value, pos)
 *         if quote:
 *             return html_quote(plain)             # <<<<<<<<<<<<<<
 *         else:
 *             return plain
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (!__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_plain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_plain};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
        PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_plain};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_3);
      } else
      #endif
      {
        __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
        __Pyx_INCREF(__pyx_v_plain);
        __Pyx_GIVEREF(__pyx_v_plain);
        PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_plain);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "Cython/Tempita/_tempita.py":488
 *             quote = True
 *         plain = Template._repr(self, value, pos)
 *         if quote:             # <<<<<<<<<<<<<<
 *             return html_quote(plain)
 *         else:
 */
  }

  /* "Cython/Tempita/_tempita.py":491
 *             return html_quote(plain)
 *         else:
 *             return plain             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_plain);
    __pyx_r = __pyx_v_plain;
    goto __pyx_L0;
  }

  /* "Cython/Tempita/_tempita.py":481
 *         ))
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 */

  /* 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("Cython.Tempita._tempita.HTMLTemplate._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_plain);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":494
 * 
 * 
 * def sub_html(content, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13sub_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_13sub_html = {"sub_html", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13sub_html, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_13sub_html(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_content = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sub_html (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_content,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_content)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kw, values, pos_args, "sub_html") < 0)) __PYX_ERR(0, 494, __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_content = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sub_html", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 494, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita.sub_html", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_12sub_html(__pyx_self, __pyx_v_content, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_12sub_html(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_content, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_tmpl = 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;
  __Pyx_RefNannySetupContext("sub_html", 0);

  /* "Cython/Tempita/_tempita.py":495
 * 
 * def sub_html(content, **kw):
 *     name = kw.get('__name')             # <<<<<<<<<<<<<<
 *     tmpl = HTMLTemplate(content, name=name)
 *     return tmpl.substitute(kw)
 */
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kw, __pyx_n_s_name_3, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":496
 * def sub_html(content, **kw):
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)             # <<<<<<<<<<<<<<
 *     return tmpl.substitute(kw)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTMLTemplate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 496, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":497
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 *     return tmpl.substitute(kw)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_kw};
      __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_kw};
      __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_4);
    } else
    #endif
    {
      __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_kw);
      __Pyx_GIVEREF(__pyx_v_kw);
      PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_kw);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __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_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":494
 * 
 * 
 * def sub_html(content, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 */

  /* 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("Cython.Tempita._tempita.sub_html", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_tmpl);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":501
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_template = 0;
  PyObject *__pyx_v_func_name = 0;
  PyObject *__pyx_v_func_signature = 0;
  PyObject *__pyx_v_body = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_v_pos = 0;
  PyObject *__pyx_v_bound_self = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_template,&__pyx_n_s_func_name,&__pyx_n_s_func_signature,&__pyx_n_s_body,&__pyx_n_s_ns,&__pyx_n_s_pos,&__pyx_n_s_bound_self,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};

    /* "Cython/Tempita/_tempita.py":502
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,
 *                  body, ns, pos, bound_self=None):             # <<<<<<<<<<<<<<
 *         self._template = template
 *         self._func_name = func_name
 */
    values[7] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        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 (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_template)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 1); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 2); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_func_signature)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 3); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_body)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 4); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ns)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 5); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, 6); __PYX_ERR(0, 501, __pyx_L3_error)
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bound_self);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 501, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 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_template = values[1];
    __pyx_v_func_name = values[2];
    __pyx_v_func_signature = values[3];
    __pyx_v_body = values[4];
    __pyx_v_ns = values[5];
    __pyx_v_pos = values[6];
    __pyx_v_bound_self = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 7, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 501, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef___init__(__pyx_self, __pyx_v_self, __pyx_v_template, __pyx_v_func_name, __pyx_v_func_signature, __pyx_v_body, __pyx_v_ns, __pyx_v_pos, __pyx_v_bound_self);

  /* "Cython/Tempita/_tempita.py":501
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_template, PyObject *__pyx_v_func_name, PyObject *__pyx_v_func_signature, PyObject *__pyx_v_body, PyObject *__pyx_v_ns, PyObject *__pyx_v_pos, PyObject *__pyx_v_bound_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":503
 *     def __init__(self, template, func_name, func_signature,
 *                  body, ns, pos, bound_self=None):
 *         self._template = template             # <<<<<<<<<<<<<<
 *         self._func_name = func_name
 *         self._func_signature = func_signature
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_template_2, __pyx_v_template) < 0) __PYX_ERR(0, 503, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":504
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 *         self._func_name = func_name             # <<<<<<<<<<<<<<
 *         self._func_signature = func_signature
 *         self._body = body
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_func_name_2, __pyx_v_func_name) < 0) __PYX_ERR(0, 504, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":505
 *         self._template = template
 *         self._func_name = func_name
 *         self._func_signature = func_signature             # <<<<<<<<<<<<<<
 *         self._body = body
 *         self._ns = ns
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_func_signature_2, __pyx_v_func_signature) < 0) __PYX_ERR(0, 505, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":506
 *         self._func_name = func_name
 *         self._func_signature = func_signature
 *         self._body = body             # <<<<<<<<<<<<<<
 *         self._ns = ns
 *         self._pos = pos
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_body_2, __pyx_v_body) < 0) __PYX_ERR(0, 506, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":507
 *         self._func_signature = func_signature
 *         self._body = body
 *         self._ns = ns             # <<<<<<<<<<<<<<
 *         self._pos = pos
 *         self._bound_self = bound_self
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ns_2, __pyx_v_ns) < 0) __PYX_ERR(0, 507, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":508
 *         self._body = body
 *         self._ns = ns
 *         self._pos = pos             # <<<<<<<<<<<<<<
 *         self._bound_self = bound_self
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_pos_2, __pyx_v_pos) < 0) __PYX_ERR(0, 508, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":509
 *         self._ns = ns
 *         self._pos = pos
 *         self._bound_self = bound_self             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_bound_self_2, __pyx_v_bound_self) < 0) __PYX_ERR(0, 509, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":501
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":511
 *         self._bound_self = bound_self
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_2__repr__(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;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":512
 * 
 *     def __repr__(self):
 *         return '<tempita function %s(%s) at %s:%s>' % (             # <<<<<<<<<<<<<<
 *             self._func_name, self._func_signature,
 *             self._template.name, self._pos)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "Cython/Tempita/_tempita.py":513
 *     def __repr__(self):
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,             # <<<<<<<<<<<<<<
 *             self._template.name, self._pos)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_signature_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "Cython/Tempita/_tempita.py":514
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 *             self._template.name, self._pos)             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "Cython/Tempita/_tempita.py":513
 *     def __repr__(self):
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,             # <<<<<<<<<<<<<<
 *             self._template.name, self._pos)
 * 
 */
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":512
 * 
 *     def __repr__(self):
 *         return '<tempita function %s(%s) at %s:%s>' % (             # <<<<<<<<<<<<<<
 *             self._func_name, self._func_signature,
 *             self._template.name, self._pos)
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_tempita_function_s_s_at_s_s, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":511
 *         self._bound_self = bound_self
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 */

  /* 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("Cython.Tempita._tempita.TemplateDef.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":516
 *             self._template.name, self._pos)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__ = {"__str__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_4__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_4__str__(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;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":517
 * 
 *     def __str__(self):
 *         return self()             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, *args, **kw):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_t_2 = __pyx_v_self; __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __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;

  /* "Cython/Tempita/_tempita.py":516
 *             self._template.name, self._pos)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         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("Cython.Tempita._tempita.TemplateDef.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":519
 *         return self()
 * 
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__ = {"__call__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __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, __pyx_v_kw, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 519, __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("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 519, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_6__call__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_6__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_subdefs = 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;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "Cython/Tempita/_tempita.py":520
 * 
 *     def __call__(self, *args, **kw):
 *         values = self._parse_signature(args, kw)             # <<<<<<<<<<<<<<
 *         ns = self._ns.copy()
 *         ns.update(values)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_signature); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_args, __pyx_v_kw};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_args, __pyx_v_kw};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_args);
    __Pyx_GIVEREF(__pyx_v_args);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_args);
    __Pyx_INCREF(__pyx_v_kw);
    __Pyx_GIVEREF(__pyx_v_kw);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_kw);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_values = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":521
 *     def __call__(self, *args, **kw):
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()             # <<<<<<<<<<<<<<
 *         ns.update(values)
 *         if self._bound_self is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ns_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_ns = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":522
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 *         ns.update(values)             # <<<<<<<<<<<<<<
 *         if self._bound_self is not None:
 *             ns['self'] = self._bound_self
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_2) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_values};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
      PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_values};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_values);
      __Pyx_GIVEREF(__pyx_v_values);
      PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_values);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":523
 *         ns = self._ns.copy()
 *         ns.update(values)
 *         if self._bound_self is not None:             # <<<<<<<<<<<<<<
 *             ns['self'] = self._bound_self
 *         out = []
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bound_self_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "Cython/Tempita/_tempita.py":524
 *         ns.update(values)
 *         if self._bound_self is not None:
 *             ns['self'] = self._bound_self             # <<<<<<<<<<<<<<
 *         out = []
 *         subdefs = {}
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_bound_self_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_n_s_self, __pyx_t_1) < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":523
 *         ns = self._ns.copy()
 *         ns.update(values)
 *         if self._bound_self is not None:             # <<<<<<<<<<<<<<
 *             ns['self'] = self._bound_self
 *         out = []
 */
  }

  /* "Cython/Tempita/_tempita.py":525
 *         if self._bound_self is not None:
 *             ns['self'] = self._bound_self
 *         out = []             # <<<<<<<<<<<<<<
 *         subdefs = {}
 *         self._template._interpret_codes(self._body, ns, out, subdefs)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":526
 *             ns['self'] = self._bound_self
 *         out = []
 *         subdefs = {}             # <<<<<<<<<<<<<<
 *         self._template._interpret_codes(self._body, ns, out, subdefs)
 *         return ''.join(out)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_subdefs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":527
 *         out = []
 *         subdefs = {}
 *         self._template._interpret_codes(self._body, ns, out, subdefs)             # <<<<<<<<<<<<<<
 *         return ''.join(out)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_5, __pyx_v_ns, __pyx_v_out, __pyx_v_subdefs};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[5] = {__pyx_t_2, __pyx_t_5, __pyx_v_ns, __pyx_v_out, __pyx_v_subdefs};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 4+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(4+__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_4, __pyx_t_5);
    __Pyx_INCREF(__pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_4, __pyx_v_ns);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_4, __pyx_v_out);
    __Pyx_INCREF(__pyx_v_subdefs);
    __Pyx_GIVEREF(__pyx_v_subdefs);
    PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_4, __pyx_v_subdefs);
    __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":528
 *         subdefs = {}
 *         self._template._interpret_codes(self._body, ns, out, subdefs)
 *         return ''.join(out)             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_out); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":519
 *         return self()
 * 
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 */

  /* 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_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_subdefs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":530
 *         return ''.join(out)
 * 
 *     def __get__(self, obj, type=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__ = {"__get__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_obj = 0;
  CYTHON_UNUSED PyObject *__pyx_v_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_obj,&__pyx_n_s_type,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)((PyObject *)Py_None));
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__get__", 0, 2, 3, 1); __PYX_ERR(0, 530, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_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, "__get__") < 0)) __PYX_ERR(0, 530, __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_obj = values[1];
    __pyx_v_type = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__get__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 530, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_8__get__(__pyx_self, __pyx_v_self, __pyx_v_obj, __pyx_v_type);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_8__get__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __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 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "Cython/Tempita/_tempita.py":531
 * 
 *     def __get__(self, obj, type=None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return self
 *         return self.__class__(
 */
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":532
 *     def __get__(self, obj, type=None):
 *         if obj is None:
 *             return self             # <<<<<<<<<<<<<<
 *         return self.__class__(
 *             self._template, self._func_name, self._func_signature,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self);
    __pyx_r = __pyx_v_self;
    goto __pyx_L0;

    /* "Cython/Tempita/_tempita.py":531
 * 
 *     def __get__(self, obj, type=None):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return self
 *         return self.__class__(
 */
  }

  /* "Cython/Tempita/_tempita.py":533
 *         if obj is None:
 *             return self
 *         return self.__class__(             # <<<<<<<<<<<<<<
 *             self._template, self._func_name, self._func_signature,
 *             self._body, self._ns, self._pos, bound_self=obj)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "Cython/Tempita/_tempita.py":534
 *             return self
 *         return self.__class__(
 *             self._template, self._func_name, self._func_signature,             # <<<<<<<<<<<<<<
 *             self._body, self._ns, self._pos, bound_self=obj)
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_signature_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);

  /* "Cython/Tempita/_tempita.py":535
 *         return self.__class__(
 *             self._template, self._func_name, self._func_signature,
 *             self._body, self._ns, self._pos, bound_self=obj)             # <<<<<<<<<<<<<<
 * 
 *     def _parse_signature(self, args, kw):
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ns_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "Cython/Tempita/_tempita.py":533
 *         if obj is None:
 *             return self
 *         return self.__class__(             # <<<<<<<<<<<<<<
 *             self._template, self._func_name, self._func_signature,
 *             self._body, self._ns, self._pos, bound_self=obj)
 */
  __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":535
 *         return self.__class__(
 *             self._template, self._func_name, self._func_signature,
 *             self._body, self._ns, self._pos, bound_self=obj)             # <<<<<<<<<<<<<<
 * 
 *     def _parse_signature(self, args, kw):
 */
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_bound_self, __pyx_v_obj) < 0) __PYX_ERR(0, 535, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":533
 *         if obj is None:
 *             return self
 *         return self.__class__(             # <<<<<<<<<<<<<<
 *             self._template, self._func_name, self._func_signature,
 *             self._body, self._ns, self._pos, bound_self=obj)
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":530
 *         return ''.join(out)
 * 
 *     def __get__(self, obj, type=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":537
 *             self._body, self._ns, self._pos, bound_self=obj)
 * 
 *     def _parse_signature(self, args, kw):             # <<<<<<<<<<<<<<
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature = {"_parse_signature", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_parse_signature (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_kw,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_args)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_signature", 1, 3, 3, 1); __PYX_ERR(0, 537, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kw)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_parse_signature", 1, 3, 3, 2); __PYX_ERR(0, 537, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_signature") < 0)) __PYX_ERR(0, 537, __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_args = values[1];
    __pyx_v_kw = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_parse_signature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 537, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef._parse_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_10_parse_signature(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_11TemplateDef_10_parse_signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kw) {
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_sig_args = NULL;
  PyObject *__pyx_v_var_args = NULL;
  PyObject *__pyx_v_var_kw = NULL;
  PyObject *__pyx_v_defaults = NULL;
  PyObject *__pyx_v_extra_kw = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_value_expr = NULL;
  PyObject *__pyx_v_v = 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;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  __Pyx_RefNannySetupContext("_parse_signature", 0);
  __Pyx_INCREF(__pyx_v_args);

  /* "Cython/Tempita/_tempita.py":538
 * 
 *     def _parse_signature(self, args, kw):
 *         values = {}             # <<<<<<<<<<<<<<
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":539
 *     def _parse_signature(self, args, kw):
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature             # <<<<<<<<<<<<<<
 *         extra_kw = {}
 *         for name, value in kw.items():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_signature_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if !CYTHON_COMPILING_IN_PYPY
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 539, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 539, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
    __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_7(__pyx_t_6); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 539, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_sig_args = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_var_args = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_var_kw = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_defaults = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":540
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}             # <<<<<<<<<<<<<<
 *         for name, value in kw.items():
 *             if not var_kw and name not in sig_args:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_extra_kw = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":541
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}
 *         for name, value in kw.items():             # <<<<<<<<<<<<<<
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_kw, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_5 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 541, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_5))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
        #else
        __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__pyx_t_5);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 541, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 541, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) __PYX_ERR(0, 541, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 541, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":542
 *         extra_kw = {}
 *         for name, value in kw.items():
 *             if not var_kw and name not in sig_args:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_var_kw); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
    __pyx_t_12 = ((!__pyx_t_11) != 0);
    if (__pyx_t_12) {
    } else {
      __pyx_t_10 = __pyx_t_12;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_v_sig_args, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_12 != 0);
    __pyx_t_10 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_10) {

      /* "Cython/Tempita/_tempita.py":544
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)             # <<<<<<<<<<<<<<
 *             if name in sig_args:
 *                 values[sig_args] = value
 */
      __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_s, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "Cython/Tempita/_tempita.py":543
 *         for name, value in kw.items():
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 543, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":542
 *         extra_kw = {}
 *         for name, value in kw.items():
 *             if not var_kw and name not in sig_args:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 */
    }

    /* "Cython/Tempita/_tempita.py":545
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:             # <<<<<<<<<<<<<<
 *                 values[sig_args] = value
 *             else:
 */
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_v_sig_args, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 545, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_10 != 0);
    if (__pyx_t_11) {

      /* "Cython/Tempita/_tempita.py":546
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:
 *                 values[sig_args] = value             # <<<<<<<<<<<<<<
 *             else:
 *                 extra_kw[name] = value
 */
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_sig_args, __pyx_v_value) < 0)) __PYX_ERR(0, 546, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":545
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:             # <<<<<<<<<<<<<<
 *                 values[sig_args] = value
 *             else:
 */
      goto __pyx_L12;
    }

    /* "Cython/Tempita/_tempita.py":548
 *                 values[sig_args] = value
 *             else:
 *                 extra_kw[name] = value             # <<<<<<<<<<<<<<
 *         args = list(args)
 *         sig_args = list(sig_args)
 */
    /*else*/ {
      if (unlikely(PyDict_SetItem(__pyx_v_extra_kw, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
    }
    __pyx_L12:;

    /* "Cython/Tempita/_tempita.py":541
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}
 *         for name, value in kw.items():             # <<<<<<<<<<<<<<
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":549
 *             else:
 *                 extra_kw[name] = value
 *         args = list(args)             # <<<<<<<<<<<<<<
 *         sig_args = list(sig_args)
 *         while args:
 */
  __pyx_t_5 = PySequence_List(__pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":550
 *                 extra_kw[name] = value
 *         args = list(args)
 *         sig_args = list(sig_args)             # <<<<<<<<<<<<<<
 *         while args:
 *             while sig_args and sig_args[0] in values:
 */
  __pyx_t_5 = PySequence_List(__pyx_v_sig_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF_SET(__pyx_v_sig_args, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":551
 *         args = list(args)
 *         sig_args = list(sig_args)
 *         while args:             # <<<<<<<<<<<<<<
 *             while sig_args and sig_args[0] in values:
 *                 sig_args.pop(0)
 */
  while (1) {
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 551, __pyx_L1_error)
    if (!__pyx_t_11) break;

    /* "Cython/Tempita/_tempita.py":552
 *         sig_args = list(sig_args)
 *         while args:
 *             while sig_args and sig_args[0] in values:             # <<<<<<<<<<<<<<
 *                 sig_args.pop(0)
 *             if sig_args:
 */
    while (1) {
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_sig_args); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
      if (__pyx_t_10) {
      } else {
        __pyx_t_11 = __pyx_t_10;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_sig_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = (__Pyx_PyDict_ContainsTF(__pyx_t_5, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_12 = (__pyx_t_10 != 0);
      __pyx_t_11 = __pyx_t_12;
      __pyx_L17_bool_binop_done:;
      if (!__pyx_t_11) break;

      /* "Cython/Tempita/_tempita.py":553
 *         while args:
 *             while sig_args and sig_args[0] in values:
 *                 sig_args.pop(0)             # <<<<<<<<<<<<<<
 *             if sig_args:
 *                 name = sig_args.pop(0)
 */
      __pyx_t_5 = __Pyx_PyObject_PopIndex(__pyx_v_sig_args, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }

    /* "Cython/Tempita/_tempita.py":554
 *             while sig_args and sig_args[0] in values:
 *                 sig_args.pop(0)
 *             if sig_args:             # <<<<<<<<<<<<<<
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_sig_args); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 554, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "Cython/Tempita/_tempita.py":555
 *                 sig_args.pop(0)
 *             if sig_args:
 *                 name = sig_args.pop(0)             # <<<<<<<<<<<<<<
 *                 values[name] = args.pop(0)
 *             elif var_args:
 */
      __pyx_t_5 = __Pyx_PyList_PopIndex(__pyx_v_sig_args, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":556
 *             if sig_args:
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)             # <<<<<<<<<<<<<<
 *             elif var_args:
 *                 values[var_args] = tuple(args)
 */
      __pyx_t_5 = __Pyx_PyObject_PopIndex(__pyx_v_args, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 556, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":554
 *             while sig_args and sig_args[0] in values:
 *                 sig_args.pop(0)
 *             if sig_args:             # <<<<<<<<<<<<<<
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)
 */
      goto __pyx_L19;
    }

    /* "Cython/Tempita/_tempita.py":557
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)
 *             elif var_args:             # <<<<<<<<<<<<<<
 *                 values[var_args] = tuple(args)
 *                 break
 */
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_var_args); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 557, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "Cython/Tempita/_tempita.py":558
 *                 values[name] = args.pop(0)
 *             elif var_args:
 *                 values[var_args] = tuple(args)             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_5 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_var_args, __pyx_t_5) < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":559
 *             elif var_args:
 *                 values[var_args] = tuple(args)
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError(
 */
      goto __pyx_L14_break;

      /* "Cython/Tempita/_tempita.py":557
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)
 *             elif var_args:             # <<<<<<<<<<<<<<
 *                 values[var_args] = tuple(args)
 *                 break
 */
    }

    /* "Cython/Tempita/_tempita.py":561
 *                 break
 *             else:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))
 */
    /*else*/ {

      /* "Cython/Tempita/_tempita.py":563
 *                 raise TypeError(
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))             # <<<<<<<<<<<<<<
 *         for name, value_expr in defaults.items():
 *             if name not in values:
 */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (likely(PyList_CheckExact(__pyx_v_args)) || PyTuple_CheckExact(__pyx_v_args)) {
        __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 563, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 563, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 563, __pyx_L1_error)
            #else
            __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_9(__pyx_t_1);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 563, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_Repr(__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 563, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Extra_position_arguments_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":561
 *                 break
 *             else:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 561, __pyx_L1_error)
    }
    __pyx_L19:;
  }
  __pyx_L14_break:;

  /* "Cython/Tempita/_tempita.py":564
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.items():             # <<<<<<<<<<<<<<
 *             if name not in values:
 *                 values[name] = self._template._eval(
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_defaults, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_3) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
    __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 564, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 564, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 564, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_9(__pyx_t_1);
      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_ERR(0, 564, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
      PyObject* sequence = __pyx_t_5;
      #if !CYTHON_COMPILING_IN_PYPY
      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_ERR(0, 564, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L24_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L25_unpacking_done;
      __pyx_L24_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 564, __pyx_L1_error)
      __pyx_L25_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_expr, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":565
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.items():
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)
 */
    __pyx_t_11 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_values, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 565, __pyx_L1_error)
    __pyx_t_12 = (__pyx_t_11 != 0);
    if (__pyx_t_12) {

      /* "Cython/Tempita/_tempita.py":566
 *         for name, value_expr in defaults.items():
 *             if name not in values:
 *                 values[name] = self._template._eval(             # <<<<<<<<<<<<<<
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":567
 *             if name not in values:
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)             # <<<<<<<<<<<<<<
 *         for name in sig_args:
 *             if name not in values:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ns_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_13 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_13 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_value_expr, __pyx_t_4, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_value_expr, __pyx_t_4, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_14 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        if (__pyx_t_6) {
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
        }
        __Pyx_INCREF(__pyx_v_value_expr);
        __Pyx_GIVEREF(__pyx_v_value_expr);
        PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_value_expr);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_2);
        __pyx_t_4 = 0;
        __pyx_t_2 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 566, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":566
 *         for name, value_expr in defaults.items():
 *             if name not in values:
 *                 values[name] = self._template._eval(             # <<<<<<<<<<<<<<
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 */
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_name, __pyx_t_5) < 0)) __PYX_ERR(0, 566, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":565
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.items():
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)
 */
    }

    /* "Cython/Tempita/_tempita.py":564
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.items():             # <<<<<<<<<<<<<<
 *             if name not in values:
 *                 values[name] = self._template._eval(
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":568
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:             # <<<<<<<<<<<<<<
 *             if name not in values:
 *                 raise TypeError(
 */
  __pyx_t_1 = __pyx_v_sig_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
  for (;;) {
    if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 568, __pyx_L1_error)
    #else
    __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":569
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 */
    __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_values, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 569, __pyx_L1_error)
    __pyx_t_11 = (__pyx_t_12 != 0);
    if (__pyx_t_11) {

      /* "Cython/Tempita/_tempita.py":571
 *             if name not in values:
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)             # <<<<<<<<<<<<<<
 *         if var_kw:
 *             values[var_kw] = extra_kw
 */
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Missing_argument_s, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "Cython/Tempita/_tempita.py":570
 *         for name in sig_args:
 *             if name not in values:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Missing argument: %s' % name)
 *         if var_kw:
 */
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(0, 570, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":569
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 */
    }

    /* "Cython/Tempita/_tempita.py":568
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:             # <<<<<<<<<<<<<<
 *             if name not in values:
 *                 raise TypeError(
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":572
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 *         if var_kw:             # <<<<<<<<<<<<<<
 *             values[var_kw] = extra_kw
 *         return values
 */
  __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_var_kw); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 572, __pyx_L1_error)
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":573
 *                     'Missing argument: %s' % name)
 *         if var_kw:
 *             values[var_kw] = extra_kw             # <<<<<<<<<<<<<<
 *         return values
 * 
 */
    if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_var_kw, __pyx_v_extra_kw) < 0)) __PYX_ERR(0, 573, __pyx_L1_error)

    /* "Cython/Tempita/_tempita.py":572
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 *         if var_kw:             # <<<<<<<<<<<<<<
 *             values[var_kw] = extra_kw
 *         return values
 */
  }

  /* "Cython/Tempita/_tempita.py":574
 *         if var_kw:
 *             values[var_kw] = extra_kw
 *         return values             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_values);
  __pyx_r = __pyx_v_values;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":537
 *             self._body, self._ns, self._pos, bound_self=obj)
 * 
 *     def _parse_signature(self, args, kw):             # <<<<<<<<<<<<<<
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateDef._parse_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_sig_args);
  __Pyx_XDECREF(__pyx_v_var_args);
  __Pyx_XDECREF(__pyx_v_var_kw);
  __Pyx_XDECREF(__pyx_v_defaults);
  __Pyx_XDECREF(__pyx_v_extra_kw);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_value_expr);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":579
 * class TemplateObject(object):
 * 
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 579, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 579, __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_name = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 579, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject___init__(__pyx_self, __pyx_v_self, __pyx_v_name);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  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;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":580
 * 
 *     def __init__(self, name):
 *         self.__name = name             # <<<<<<<<<<<<<<
 *         self.get = TemplateObjectGetter(self)
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_TemplateObject__name, __pyx_v_name) < 0) __PYX_ERR(0, 580, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":581
 *     def __init__(self, name):
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateObjectGetter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_v_self);
      __Pyx_GIVEREF(__pyx_v_self);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":579
 * class TemplateObject(object):
 * 
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)
 */

  /* 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("Cython.Tempita._tempita.TemplateObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":583
 *         self.get = TemplateObjectGetter(self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject_2__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14TemplateObject_2__repr__(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;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":584
 * 
 *     def __repr__(self):
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __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_TemplateObject__name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":583
 *         self.get = TemplateObjectGetter(self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObject.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":589
 * class TemplateObjectGetter(object):
 * 
 *     def __init__(self, template_obj):             # <<<<<<<<<<<<<<
 *         self.__template_obj = template_obj
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__ = {"__init__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_template_obj = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_template_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_template_obj)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 589, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 589, __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_template_obj = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 589, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObjectGetter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter___init__(__pyx_self, __pyx_v_self, __pyx_v_template_obj);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_template_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":590
 * 
 *     def __init__(self, template_obj):
 *         self.__template_obj = template_obj             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, attr):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_TemplateObjectGetter__template, __pyx_v_template_obj) < 0) __PYX_ERR(0, 590, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":589
 * class TemplateObjectGetter(object):
 * 
 *     def __init__(self, template_obj):             # <<<<<<<<<<<<<<
 *         self.__template_obj = template_obj
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObjectGetter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":592
 *         self.__template_obj = template_obj
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__ = {"__getattr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_attr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_attr,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_attr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, 1); __PYX_ERR(0, 592, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) __PYX_ERR(0, 592, __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_attr = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getattr__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 592, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObjectGetter.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_2__getattr__(__pyx_self, __pyx_v_self, __pyx_v_attr);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_2__getattr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "Cython/Tempita/_tempita.py":593
 * 
 *     def __getattr__(self, attr):
 *         return getattr(self.__template_obj, attr, Empty)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_TemplateObjectGetter__template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_1, __pyx_v_attr, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __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;

  /* "Cython/Tempita/_tempita.py":592
 *         self.__template_obj = template_obj
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObjectGetter.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":595
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_4__repr__(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;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":596
 * 
 *     def __repr__(self):
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __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_TemplateObjectGetter__template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_around_r, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":595
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("Cython.Tempita._tempita.TemplateObjectGetter.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":600
 * 
 * class _Empty(object):
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_1__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_1__call__ = {"__call__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_1__call__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_1__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kw = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
  __pyx_v_kw = PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
  __Pyx_GOTREF(__pyx_v_kw);
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_args)) {
      __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_args);
  } else {
    __pyx_v_args = __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, __pyx_v_kw, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 600, __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("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 600, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_DECREF(__pyx_v_kw); __pyx_v_kw = 0;
  __Pyx_AddTraceback("Cython.Tempita._tempita._Empty.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty___call__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kw);

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty___call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "Cython/Tempita/_tempita.py":601
 * class _Empty(object):
 *     def __call__(self, *args, **kw):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":600
 * 
 * class _Empty(object):
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "Cython/Tempita/_tempita.py":603
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_3__str__ = {"__str__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_3__str__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_2__str__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":604
 * 
 *     def __str__(self):
 *         return ''             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_s__9);
  __pyx_r = __pyx_kp_s__9;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":603
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */

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

/* "Cython/Tempita/_tempita.py":606
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":607
 * 
 *     def __repr__(self):
 *         return 'Empty'             # <<<<<<<<<<<<<<
 * 
 *     def __unicode__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_n_s_Empty);
  __pyx_r = __pyx_n_s_Empty;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":606
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */

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

/* "Cython/Tempita/_tempita.py":609
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__ = {"__unicode__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_6__unicode__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_6__unicode__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__unicode__", 0);

  /* "Cython/Tempita/_tempita.py":610
 * 
 *     def __unicode__(self):
 *         return u''             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_u__9);
  __pyx_r = __pyx_kp_u__9;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":609
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */

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

/* "Cython/Tempita/_tempita.py":612
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_9__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_9__iter__ = {"__iter__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_9__iter__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_9__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_8__iter__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_8__iter__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "Cython/Tempita/_tempita.py":613
 * 
 *     def __iter__(self):
 *         return iter(())             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetIter(__pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":612
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("Cython.Tempita._tempita._Empty.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":615
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_11__bool__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_11__bool__ = {"__bool__", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_11__bool__, METH_O, 0};
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_11__bool__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_10__bool__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_6_Empty_10__bool__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__", 0);

  /* "Cython/Tempita/_tempita.py":616
 * 
 *     def __bool__(self):
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     if sys.version < "3":
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":615
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */

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

/* "Cython/Tempita/_tempita.py":629
 * 
 * 
 * def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     """
 *     Lex a string into chunks:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_15lex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6Cython_7Tempita_8_tempita_14lex[] = "\n    Lex a string into chunks:\n\n        >>> lex('hey')\n        ['hey']\n        >>> lex('hey {{you}}')\n        ['hey ', ('you', (1, 7))]\n        >>> lex('hey {{')\n        Traceback (most recent call last):\n            ...\n        TemplateError: No }} to finish last expression at line 1 column 7\n        >>> lex('hey }}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: }} outside expression at line 1 column 7\n        >>> lex('hey {{ {{')\n        Traceback (most recent call last):\n            ...\n        TemplateError: {{ inside expression at line 1 column 10\n\n    ";
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_15lex = {"lex", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_15lex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6Cython_7Tempita_8_tempita_14lex};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_15lex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_s = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_trim_whitespace = 0;
      PyObject *__pyx_v_line_offset = 0;
      PyObject *__pyx_v_delimeters = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lex (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_2,&__pyx_n_s_name,&__pyx_n_s_trim_whitespace,&__pyx_n_s_line_offset,&__pyx_n_s_delimeters,0};
        PyObject* values[5] = {0,0,0,0,0};
        values[1] = ((PyObject *)((PyObject *)Py_None));
        values[2] = ((PyObject *)((PyObject *)Py_True));
        values[3] = ((PyObject *)((PyObject *)__pyx_int_0));
        values[4] = ((PyObject *)((PyObject *)Py_None));
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  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_s_2)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
              if (value) { values[1] = value; kw_args--; }
            }
            case  2:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trim_whitespace);
              if (value) { values[2] = value; kw_args--; }
            }
            case  3:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line_offset);
              if (value) { values[3] = value; kw_args--; }
            }
            case  4:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimeters);
              if (value) { values[4] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lex") < 0)) __PYX_ERR(0, 629, __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_s = values[0];
        __pyx_v_name = values[1];
        __pyx_v_trim_whitespace = values[2];
        __pyx_v_line_offset = values[3];
        __pyx_v_delimeters = values[4];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("lex", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 629, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.lex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_14lex(__pyx_self, __pyx_v_s, __pyx_v_name, __pyx_v_trim_whitespace, __pyx_v_line_offset, __pyx_v_delimeters);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_14lex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_name, PyObject *__pyx_v_trim_whitespace, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters) {
      int __pyx_v_in_expr;
      PyObject *__pyx_v_chunks = NULL;
      PyObject *__pyx_v_last = NULL;
      PyObject *__pyx_v_last_pos = NULL;
      PyObject *__pyx_v_token_re = NULL;
      PyObject *__pyx_v_match = NULL;
      PyObject *__pyx_v_expr = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_v_part = 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;
      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;
      PyObject *__pyx_t_10 = NULL;
      Py_ssize_t __pyx_t_11;
      PyObject *(*__pyx_t_12)(PyObject *);
      int __pyx_t_13;
      int __pyx_t_14;
      __Pyx_RefNannySetupContext("lex", 0);
      __Pyx_INCREF(__pyx_v_delimeters);

      /* "Cython/Tempita/_tempita.py":651
 * 
 *     """
 *     if delimeters is None:             # <<<<<<<<<<<<<<
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 */
      __pyx_t_1 = (__pyx_v_delimeters == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":652
 *     """
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                        Template.default_namespace['end_braces'] )
 *     in_expr = False
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_start_braces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":653
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )             # <<<<<<<<<<<<<<
 *     in_expr = False
 *     chunks = []
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 653, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_end_braces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":652
 *     """
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                        Template.default_namespace['end_braces'] )
 *     in_expr = False
 */
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 652, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":651
 * 
 *     """
 *     if delimeters is None:             # <<<<<<<<<<<<<<
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 */
      }

      /* "Cython/Tempita/_tempita.py":654
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 *     in_expr = False             # <<<<<<<<<<<<<<
 *     chunks = []
 *     last = 0
 */
      __pyx_v_in_expr = 0;

      /* "Cython/Tempita/_tempita.py":655
 *                        Template.default_namespace['end_braces'] )
 *     in_expr = False
 *     chunks = []             # <<<<<<<<<<<<<<
 *     last = 0
 *     last_pos = (line_offset + 1, 1)
 */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 655, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_chunks = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":656
 *     in_expr = False
 *     chunks = []
 *     last = 0             # <<<<<<<<<<<<<<
 *     last_pos = (line_offset + 1, 1)
 * 
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_v_last = __pyx_int_0;

      /* "Cython/Tempita/_tempita.py":657
 *     chunks = []
 *     last = 0
 *     last_pos = (line_offset + 1, 1)             # <<<<<<<<<<<<<<
 * 
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),
 */
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_line_offset, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
      __pyx_t_5 = 0;
      __pyx_v_last_pos = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":659
 *     last_pos = (line_offset + 1, 1)
 * 
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),             # <<<<<<<<<<<<<<
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_escape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else
        #endif
        {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":660
 * 
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),
 *                                       re.escape(delimeters[1])))             # <<<<<<<<<<<<<<
 *     for match in token_re.finditer(s):
 *         expr = match.group(0)
 */
      __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_escape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_GOTREF(__pyx_t_7);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":659
 *     last_pos = (line_offset + 1, 1)
 * 
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),             # <<<<<<<<<<<<<<
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):
 */
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
      __pyx_t_5 = 0;
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_6) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7);
          __pyx_t_7 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_token_re = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":661
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):             # <<<<<<<<<<<<<<
 *         expr = match.group(0)
 *         pos = find_position(s, match.end(), last, last_pos)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_token_re, __pyx_n_s_finditer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_s};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_s};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_4);
        } else
        #endif
        {
          __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 661, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_s);
          __Pyx_GIVEREF(__pyx_v_s);
          PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_s);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
      } else {
        __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 661, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_12)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 661, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 661, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_12(__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_ERR(0, 661, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":662
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):
 *         expr = match.group(0)             # <<<<<<<<<<<<<<
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_expr, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":663
 *     for match in token_re.finditer(s):
 *         expr = match.group(0)
 *         pos = find_position(s, match.end(), last, last_pos)             # <<<<<<<<<<<<<<
 *         if expr == delimeters[0] and in_expr:
 *             raise TemplateError('%s inside expression' % delimeters[0],
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (__pyx_t_10) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_13 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_13 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_s, __pyx_t_5, __pyx_v_last, __pyx_v_last_pos};
          __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_s, __pyx_t_5, __pyx_v_last, __pyx_v_last_pos};
          __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else
        #endif
        {
          __pyx_t_10 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 663, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_s);
          __Pyx_GIVEREF(__pyx_v_s);
          PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_v_s);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_t_5);
          __Pyx_INCREF(__pyx_v_last);
          __Pyx_GIVEREF(__pyx_v_last);
          PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_13, __pyx_v_last);
          __Pyx_INCREF(__pyx_v_last_pos);
          __Pyx_GIVEREF(__pyx_v_last_pos);
          PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_13, __pyx_v_last_pos);
          __pyx_t_5 = 0;
          __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":664
 *         expr = match.group(0)
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:             # <<<<<<<<<<<<<<
 *             raise TemplateError('%s inside expression' % delimeters[0],
 *                                 position=pos,
 */
        __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {
        } else {
          __pyx_t_2 = __pyx_t_1;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_1 = (__pyx_v_in_expr != 0);
        __pyx_t_2 = __pyx_t_1;
        __pyx_L7_bool_binop_done:;
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":665
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:
 *             raise TemplateError('%s inside expression' % delimeters[0],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_s_inside_expression, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10);
          __pyx_t_10 = 0;

          /* "Cython/Tempita/_tempita.py":666
 *         if expr == delimeters[0] and in_expr:
 *             raise TemplateError('%s inside expression' % delimeters[0],
 *                                 position=pos,             # <<<<<<<<<<<<<<
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:
 */
          __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 666, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 666, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":667
 *             raise TemplateError('%s inside expression' % delimeters[0],
 *                                 position=pos,
 *                                 name=name)             # <<<<<<<<<<<<<<
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],
 */
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 666, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":665
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:
 *             raise TemplateError('%s inside expression' % delimeters[0],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(0, 665, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":664
 *         expr = match.group(0)
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:             # <<<<<<<<<<<<<<
 *             raise TemplateError('%s inside expression' % delimeters[0],
 *                                 position=pos,
 */
        }

        /* "Cython/Tempita/_tempita.py":668
 *                                 position=pos,
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:             # <<<<<<<<<<<<<<
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_1) {
        } else {
          __pyx_t_2 = __pyx_t_1;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_1 = ((!(__pyx_v_in_expr != 0)) != 0);
        __pyx_t_2 = __pyx_t_1;
        __pyx_L9_bool_binop_done:;
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":669
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_outside_expression, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "Cython/Tempita/_tempita.py":670
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,             # <<<<<<<<<<<<<<
 *                                 name=name)
 *         if expr == delimeters[0]:
 */
          __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 670, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":671
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,
 *                                 name=name)             # <<<<<<<<<<<<<<
 *         if expr == delimeters[0]:
 *             part = s[last:match.start()]
 */
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 670, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":669
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 669, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":668
 *                                 position=pos,
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:             # <<<<<<<<<<<<<<
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,
 */
        }

        /* "Cython/Tempita/_tempita.py":672
 *                                 position=pos,
 *                                 name=name)
 *         if expr == delimeters[0]:             # <<<<<<<<<<<<<<
 *             part = s[last:match.start()]
 *             if part:
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 672, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":673
 *                                 name=name)
 *         if expr == delimeters[0]:
 *             part = s[last:match.start()]             # <<<<<<<<<<<<<<
 *             if part:
 *                 chunks.append(part)
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 673, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_v_last, &__pyx_t_7, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":674
 *         if expr == delimeters[0]:
 *             part = s[last:match.start()]
 *             if part:             # <<<<<<<<<<<<<<
 *                 chunks.append(part)
 *             in_expr = True
 */
          __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 674, __pyx_L1_error)
          if (__pyx_t_2) {

            /* "Cython/Tempita/_tempita.py":675
 *             part = s[last:match.start()]
 *             if part:
 *                 chunks.append(part)             # <<<<<<<<<<<<<<
 *             in_expr = True
 *         else:
 */
            __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_part); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 675, __pyx_L1_error)

            /* "Cython/Tempita/_tempita.py":674
 *         if expr == delimeters[0]:
 *             part = s[last:match.start()]
 *             if part:             # <<<<<<<<<<<<<<
 *                 chunks.append(part)
 *             in_expr = True
 */
          }

          /* "Cython/Tempita/_tempita.py":676
 *             if part:
 *                 chunks.append(part)
 *             in_expr = True             # <<<<<<<<<<<<<<
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))
 */
          __pyx_v_in_expr = 1;

          /* "Cython/Tempita/_tempita.py":672
 *                                 position=pos,
 *                                 name=name)
 *         if expr == delimeters[0]:             # <<<<<<<<<<<<<<
 *             part = s[last:match.start()]
 *             if part:
 */
          goto __pyx_L11;
        }

        /* "Cython/Tempita/_tempita.py":678
 *             in_expr = True
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))             # <<<<<<<<<<<<<<
 *             in_expr = False
 *         last = match.end()
 */
        /*else*/ {
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_5 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
            }
          }
          if (__pyx_t_5) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          } else {
            __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_v_last, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
          __Pyx_INCREF(__pyx_v_last_pos);
          __Pyx_GIVEREF(__pyx_v_last_pos);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_last_pos);
          __pyx_t_7 = 0;
          __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_t_4); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 678, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":679
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))
 *             in_expr = False             # <<<<<<<<<<<<<<
 *         last = match.end()
 *         last_pos = pos
 */
          __pyx_v_in_expr = 0;
        }
        __pyx_L11:;

        /* "Cython/Tempita/_tempita.py":680
 *             chunks.append((s[last:match.start()], last_pos))
 *             in_expr = False
 *         last = match.end()             # <<<<<<<<<<<<<<
 *         last_pos = pos
 *     if in_expr:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (__pyx_t_5) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        } else {
          __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 680, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_last, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":681
 *             in_expr = False
 *         last = match.end()
 *         last_pos = pos             # <<<<<<<<<<<<<<
 *     if in_expr:
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 */
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_DECREF_SET(__pyx_v_last_pos, __pyx_v_pos);

        /* "Cython/Tempita/_tempita.py":661
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):             # <<<<<<<<<<<<<<
 *         expr = match.group(0)
 *         pos = find_position(s, match.end(), last, last_pos)
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":682
 *         last = match.end()
 *         last_pos = pos
 *     if in_expr:             # <<<<<<<<<<<<<<
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 *                             name=name, position=last_pos)
 */
      __pyx_t_2 = (__pyx_v_in_expr != 0);
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":683
 *         last_pos = pos
 *     if in_expr:
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                             name=name, position=last_pos)
 *     part = s[last:]
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_No_s_to_finish_last_expression, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":684
 *     if in_expr:
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 *                             name=name, position=last_pos)             # <<<<<<<<<<<<<<
 *     part = s[last:]
 *     if part:
 */
        __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_position, __pyx_v_last_pos) < 0) __PYX_ERR(0, 684, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":683
 *         last_pos = pos
 *     if in_expr:
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                             name=name, position=last_pos)
 *     part = s[last:]
 */
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 683, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":682
 *         last = match.end()
 *         last_pos = pos
 *     if in_expr:             # <<<<<<<<<<<<<<
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 *                             name=name, position=last_pos)
 */
      }

      /* "Cython/Tempita/_tempita.py":685
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 *                             name=name, position=last_pos)
 *     part = s[last:]             # <<<<<<<<<<<<<<
 *     if part:
 *         chunks.append(part)
 */
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_v_last, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":686
 *                             name=name, position=last_pos)
 *     part = s[last:]
 *     if part:             # <<<<<<<<<<<<<<
 *         chunks.append(part)
 *     if trim_whitespace:
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":687
 *     part = s[last:]
 *     if part:
 *         chunks.append(part)             # <<<<<<<<<<<<<<
 *     if trim_whitespace:
 *         chunks = trim_lex(chunks)
 */
        __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_part); if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 687, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":686
 *                             name=name, position=last_pos)
 *     part = s[last:]
 *     if part:             # <<<<<<<<<<<<<<
 *         chunks.append(part)
 *     if trim_whitespace:
 */
      }

      /* "Cython/Tempita/_tempita.py":688
 *     if part:
 *         chunks.append(part)
 *     if trim_whitespace:             # <<<<<<<<<<<<<<
 *         chunks = trim_lex(chunks)
 *     return chunks
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_trim_whitespace); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 688, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":689
 *         chunks.append(part)
 *     if trim_whitespace:
 *         chunks = trim_lex(chunks)             # <<<<<<<<<<<<<<
 *     return chunks
 * 
 */
        __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_trim_lex); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_4) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_chunks); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_chunks};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_chunks};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
            __Pyx_INCREF(__pyx_v_chunks);
            __Pyx_GIVEREF(__pyx_v_chunks);
            PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_chunks);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_chunks, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":688
 *     if part:
 *         chunks.append(part)
 *     if trim_whitespace:             # <<<<<<<<<<<<<<
 *         chunks = trim_lex(chunks)
 *     return chunks
 */
      }

      /* "Cython/Tempita/_tempita.py":690
 *     if trim_whitespace:
 *         chunks = trim_lex(chunks)
 *     return chunks             # <<<<<<<<<<<<<<
 * 
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_chunks);
      __pyx_r = __pyx_v_chunks;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":629
 * 
 * 
 * def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     """
 *     Lex a string into chunks:
 */

      /* 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_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("Cython.Tempita._tempita.lex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_chunks);
      __Pyx_XDECREF(__pyx_v_last);
      __Pyx_XDECREF(__pyx_v_last_pos);
      __Pyx_XDECREF(__pyx_v_token_re);
      __Pyx_XDECREF(__pyx_v_match);
      __Pyx_XDECREF(__pyx_v_expr);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XDECREF(__pyx_v_part);
      __Pyx_XDECREF(__pyx_v_delimeters);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":698
 * 
 * 
 * def trim_lex(tokens):             # <<<<<<<<<<<<<<
 *     r"""
 *     Takes a lexed set of tokens, and removes whitespace when there is
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_17trim_lex(PyObject *__pyx_self, PyObject *__pyx_v_tokens); /*proto*/
    static char __pyx_doc_6Cython_7Tempita_8_tempita_16trim_lex[] = "\n    Takes a lexed set of tokens, and removes whitespace when there is\n    a directive on a line by itself:\n\n       >>> tokens = lex('{{if x}}\\nx\\n{{endif}}\\ny', trim_whitespace=False)\n       >>> tokens\n       [('if x', (1, 3)), '\\nx\\n', ('endif', (3, 3)), '\\ny']\n       >>> trim_lex(tokens)\n       [('if x', (1, 3)), 'x\\n', ('endif', (3, 3)), 'y']\n    ";
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_17trim_lex = {"trim_lex", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_17trim_lex, METH_O, __pyx_doc_6Cython_7Tempita_8_tempita_16trim_lex};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_17trim_lex(PyObject *__pyx_self, PyObject *__pyx_v_tokens) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("trim_lex (wrapper)", 0);
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_16trim_lex(__pyx_self, ((PyObject *)__pyx_v_tokens));

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_16trim_lex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens) {
      PyObject *__pyx_v_last_trim = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_v_current = NULL;
      PyObject *__pyx_v_item = NULL;
      PyObject *__pyx_v_prev = NULL;
      PyObject *__pyx_v_next_chunk = NULL;
      PyObject *__pyx_v_prev_ok = NULL;
      PyObject *__pyx_v_m = 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;
      int __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      int __pyx_t_11;
      Py_ssize_t __pyx_t_12;
      PyObject *__pyx_t_13 = NULL;
      __Pyx_RefNannySetupContext("trim_lex", 0);

      /* "Cython/Tempita/_tempita.py":709
 *        [('if x', (1, 3)), 'x\n', ('endif', (3, 3)), 'y']
 *     """
 *     last_trim = None             # <<<<<<<<<<<<<<
 *     for i, current in enumerate(tokens):
 *         if isinstance(current, basestring_):
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_last_trim = Py_None;

      /* "Cython/Tempita/_tempita.py":710
 *     """
 *     last_trim = None
 *     for i, current in enumerate(tokens):             # <<<<<<<<<<<<<<
 *         if isinstance(current, basestring_):
 *             # we don't trim this
 */
      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_1 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_tokens)) || PyTuple_CheckExact(__pyx_v_tokens)) {
        __pyx_t_2 = __pyx_v_tokens; __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_tokens); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __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_ERR(0, 710, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __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_ERR(0, 710, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #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_ERR(0, 710, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_current, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 710, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":711
 *     last_trim = None
 *     for i, current in enumerate(tokens):
 *         if isinstance(current, basestring_):             # <<<<<<<<<<<<<<
 *             # we don't trim this
 *             continue
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyObject_IsInstance(__pyx_v_current, __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 711, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = (__pyx_t_6 != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":713
 *         if isinstance(current, basestring_):
 *             # we don't trim this
 *             continue             # <<<<<<<<<<<<<<
 *         item = current[0]
 *         if not statement_re.search(item) and item not in single_statements:
 */
          goto __pyx_L3_continue;

          /* "Cython/Tempita/_tempita.py":711
 *     last_trim = None
 *     for i, current in enumerate(tokens):
 *         if isinstance(current, basestring_):             # <<<<<<<<<<<<<<
 *             # we don't trim this
 *             continue
 */
        }

        /* "Cython/Tempita/_tempita.py":714
 *             # we don't trim this
 *             continue
 *         item = current[0]             # <<<<<<<<<<<<<<
 *         if not statement_re.search(item) and item not in single_statements:
 *             continue
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_current, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":715
 *             continue
 *         item = current[0]
 *         if not statement_re.search(item) and item not in single_statements:             # <<<<<<<<<<<<<<
 *             continue
 *         if not i:
 */
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_statement_re); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_search); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_item};
            __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
            PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_item};
            __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_GOTREF(__pyx_t_5);
          } else
          #endif
          {
            __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 715, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
            __Pyx_INCREF(__pyx_v_item);
            __Pyx_GIVEREF(__pyx_v_item);
            PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_item);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = ((!__pyx_t_6) != 0);
        if (__pyx_t_11) {
        } else {
          __pyx_t_7 = __pyx_t_11;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_single_statements); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_item, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 715, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = (__pyx_t_11 != 0);
        __pyx_t_7 = __pyx_t_6;
        __pyx_L7_bool_binop_done:;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":716
 *         item = current[0]
 *         if not statement_re.search(item) and item not in single_statements:
 *             continue             # <<<<<<<<<<<<<<
 *         if not i:
 *             prev = ''
 */
          goto __pyx_L3_continue;

          /* "Cython/Tempita/_tempita.py":715
 *             continue
 *         item = current[0]
 *         if not statement_re.search(item) and item not in single_statements:             # <<<<<<<<<<<<<<
 *             continue
 *         if not i:
 */
        }

        /* "Cython/Tempita/_tempita.py":717
 *         if not statement_re.search(item) and item not in single_statements:
 *             continue
 *         if not i:             # <<<<<<<<<<<<<<
 *             prev = ''
 *         else:
 */
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_i); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 717, __pyx_L1_error)
        __pyx_t_6 = ((!__pyx_t_7) != 0);
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":718
 *             continue
 *         if not i:
 *             prev = ''             # <<<<<<<<<<<<<<
 *         else:
 *             prev = tokens[i - 1]
 */
          __Pyx_INCREF(__pyx_kp_s__9);
          __Pyx_XDECREF_SET(__pyx_v_prev, __pyx_kp_s__9);

          /* "Cython/Tempita/_tempita.py":717
 *         if not statement_re.search(item) and item not in single_statements:
 *             continue
 *         if not i:             # <<<<<<<<<<<<<<
 *             prev = ''
 *         else:
 */
          goto __pyx_L9;
        }

        /* "Cython/Tempita/_tempita.py":720
 *             prev = ''
 *         else:
 *             prev = tokens[i - 1]             # <<<<<<<<<<<<<<
 *         if i + 1 >= len(tokens):
 *             next_chunk = ''
 */
        /*else*/ {
          __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_9 = PyObject_GetItem(__pyx_v_tokens, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF_SET(__pyx_v_prev, __pyx_t_9);
          __pyx_t_9 = 0;
        }
        __pyx_L9:;

        /* "Cython/Tempita/_tempita.py":721
 *         else:
 *             prev = tokens[i - 1]
 *         if i + 1 >= len(tokens):             # <<<<<<<<<<<<<<
 *             next_chunk = ''
 *         else:
 */
        __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 721, __pyx_L1_error)
        __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 721, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 721, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":722
 *             prev = tokens[i - 1]
 *         if i + 1 >= len(tokens):
 *             next_chunk = ''             # <<<<<<<<<<<<<<
 *         else:
 *             next_chunk = tokens[i + 1]
 */
          __Pyx_INCREF(__pyx_kp_s__9);
          __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_kp_s__9);

          /* "Cython/Tempita/_tempita.py":721
 *         else:
 *             prev = tokens[i - 1]
 *         if i + 1 >= len(tokens):             # <<<<<<<<<<<<<<
 *             next_chunk = ''
 *         else:
 */
          goto __pyx_L10;
        }

        /* "Cython/Tempita/_tempita.py":724
 *             next_chunk = ''
 *         else:
 *             next_chunk = tokens[i + 1]             # <<<<<<<<<<<<<<
 *         if (not isinstance(next_chunk, basestring_)
 *             or not isinstance(prev, basestring_)):
 */
        /*else*/ {
          __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = PyObject_GetItem(__pyx_v_tokens, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 724, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_5);
          __pyx_t_5 = 0;
        }
        __pyx_L10:;

        /* "Cython/Tempita/_tempita.py":725
 *         else:
 *             next_chunk = tokens[i + 1]
 *         if (not isinstance(next_chunk, basestring_)             # <<<<<<<<<<<<<<
 *             or not isinstance(prev, basestring_)):
 *             continue
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 725, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_7 = PyObject_IsInstance(__pyx_v_next_chunk, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 725, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = ((!(__pyx_t_7 != 0)) != 0);
        if (!__pyx_t_11) {
        } else {
          __pyx_t_6 = __pyx_t_11;
          goto __pyx_L12_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":726
 *             next_chunk = tokens[i + 1]
 *         if (not isinstance(next_chunk, basestring_)
 *             or not isinstance(prev, basestring_)):             # <<<<<<<<<<<<<<
 *             continue
 *         prev_ok = not prev or trail_whitespace_re.search(prev)
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = PyObject_IsInstance(__pyx_v_prev, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 726, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = ((!(__pyx_t_11 != 0)) != 0);
        __pyx_t_6 = __pyx_t_7;
        __pyx_L12_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":725
 *         else:
 *             next_chunk = tokens[i + 1]
 *         if (not isinstance(next_chunk, basestring_)             # <<<<<<<<<<<<<<
 *             or not isinstance(prev, basestring_)):
 *             continue
 */
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":727
 *         if (not isinstance(next_chunk, basestring_)
 *             or not isinstance(prev, basestring_)):
 *             continue             # <<<<<<<<<<<<<<
 *         prev_ok = not prev or trail_whitespace_re.search(prev)
 *         if i == 1 and not prev.strip():
 */
          goto __pyx_L3_continue;

          /* "Cython/Tempita/_tempita.py":725
 *         else:
 *             next_chunk = tokens[i + 1]
 *         if (not isinstance(next_chunk, basestring_)             # <<<<<<<<<<<<<<
 *             or not isinstance(prev, basestring_)):
 *             continue
 */
        }

        /* "Cython/Tempita/_tempita.py":728
 *             or not isinstance(prev, basestring_)):
 *             continue
 *         prev_ok = not prev or trail_whitespace_re.search(prev)             # <<<<<<<<<<<<<<
 *         if i == 1 and not prev.strip():
 *             prev_ok = True
 */
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_prev); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 728, __pyx_L1_error)
        __pyx_t_7 = (!__pyx_t_6);
        if (!__pyx_t_7) {
        } else {
          __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 728, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = __pyx_t_10;
          __pyx_t_10 = 0;
          goto __pyx_L14_bool_binop_done;
        }
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_trail_whitespace_re); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_search); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 728, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (!__pyx_t_9) {
          __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_prev); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 728, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_prev};
            __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 728, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_prev};
            __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 728, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          {
            __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 728, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL;
            __Pyx_INCREF(__pyx_v_prev);
            __Pyx_GIVEREF(__pyx_v_prev);
            PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_prev);
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 728, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_INCREF(__pyx_t_10);
        __pyx_t_5 = __pyx_t_10;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_L14_bool_binop_done:;
        __Pyx_XDECREF_SET(__pyx_v_prev_ok, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":729
 *             continue
 *         prev_ok = not prev or trail_whitespace_re.search(prev)
 *         if i == 1 and not prev.strip():             # <<<<<<<<<<<<<<
 *             prev_ok = True
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 */
        __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L17_bool_binop_done;
        }
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (__pyx_t_8) {
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_11 = ((!__pyx_t_6) != 0);
        __pyx_t_7 = __pyx_t_11;
        __pyx_L17_bool_binop_done:;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":730
 *         prev_ok = not prev or trail_whitespace_re.search(prev)
 *         if i == 1 and not prev.strip():
 *             prev_ok = True             # <<<<<<<<<<<<<<
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 *             prev_ok = 'last'
 */
          __Pyx_INCREF(Py_True);
          __Pyx_DECREF_SET(__pyx_v_prev_ok, Py_True);

          /* "Cython/Tempita/_tempita.py":729
 *             continue
 *         prev_ok = not prev or trail_whitespace_re.search(prev)
 *         if i == 1 and not prev.strip():             # <<<<<<<<<<<<<<
 *             prev_ok = True
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 */
        }

        /* "Cython/Tempita/_tempita.py":731
 *         if i == 1 and not prev.strip():
 *             prev_ok = True
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():             # <<<<<<<<<<<<<<
 *             prev_ok = 'last'
 *         if (prev_ok
 */
        __pyx_t_11 = (__pyx_v_last_trim != Py_None);
        __pyx_t_6 = (__pyx_t_11 != 0);
        if (__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L20_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_last_trim, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_v_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L20_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
          }
        }
        if (__pyx_t_8) {
          __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 731, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 731, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 731, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = ((!__pyx_t_6) != 0);
        __pyx_t_7 = __pyx_t_11;
        __pyx_L20_bool_binop_done:;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":732
 *             prev_ok = True
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 *             prev_ok = 'last'             # <<<<<<<<<<<<<<
 *         if (prev_ok
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 */
          __Pyx_INCREF(__pyx_n_s_last);
          __Pyx_DECREF_SET(__pyx_v_prev_ok, __pyx_n_s_last);

          /* "Cython/Tempita/_tempita.py":731
 *         if i == 1 and not prev.strip():
 *             prev_ok = True
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():             # <<<<<<<<<<<<<<
 *             prev_ok = 'last'
 *         if (prev_ok
 */
        }

        /* "Cython/Tempita/_tempita.py":734
 *             prev_ok = 'last'
 *         if (prev_ok
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)             # <<<<<<<<<<<<<<
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:
 */
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_prev_ok); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
        if (__pyx_t_11) {
        } else {
          __pyx_t_7 = __pyx_t_11;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_next_chunk); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
        __pyx_t_6 = ((!__pyx_t_11) != 0);
        if (!__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L24_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":735
 *         if (prev_ok
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):             # <<<<<<<<<<<<<<
 *             if prev:
 *                 if ((i == 1 and not prev.strip())
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_lead_whitespace_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":734
 *             prev_ok = 'last'
 *         if (prev_ok
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)             # <<<<<<<<<<<<<<
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_search); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 734, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (!__pyx_t_5) {
          __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_next_chunk); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 734, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_next_chunk};
            __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 734, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_next_chunk};
            __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 734, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_10);
          } else
          #endif
          {
            __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 734, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); __pyx_t_5 = NULL;
            __Pyx_INCREF(__pyx_v_next_chunk);
            __Pyx_GIVEREF(__pyx_v_next_chunk);
            PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_next_chunk);
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 734, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (!__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L24_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":735
 *         if (prev_ok
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):             # <<<<<<<<<<<<<<
 *             if prev:
 *                 if ((i == 1 and not prev.strip())
 */
        __pyx_t_12 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 735, __pyx_L1_error)
        __pyx_t_10 = PyInt_FromSsize_t((__pyx_t_12 - 2)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = PyObject_RichCompare(__pyx_v_i, __pyx_t_10, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_6) {
        } else {
          __pyx_t_7 = __pyx_t_6;
          goto __pyx_L24_bool_binop_done;
        }
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_chunk, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
          }
        }
        if (__pyx_t_13) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        } else {
          __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 735, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_11 = ((!__pyx_t_6) != 0);
        __pyx_t_7 = __pyx_t_11;
        __pyx_L24_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":733
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 *             prev_ok = 'last'
 *         if (prev_ok             # <<<<<<<<<<<<<<
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 */
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":736
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:             # <<<<<<<<<<<<<<
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):
 */
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_prev); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
          if (__pyx_t_7) {

            /* "Cython/Tempita/_tempita.py":737
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:
 *                 if ((i == 1 and not prev.strip())             # <<<<<<<<<<<<<<
 *                     or prev_ok == 'last'):
 *                     tokens[i - 1] = ''
 */
            __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (!__pyx_t_11) {
              goto __pyx_L32_next_or;
            } else {
            }
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 737, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_13 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_10, function);
              }
            }
            if (__pyx_t_13) {
              __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            } else {
              __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 737, __pyx_L1_error)
            }
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_6 = ((!__pyx_t_11) != 0);
            if (!__pyx_t_6) {
            } else {
              __pyx_t_7 = __pyx_t_6;
              goto __pyx_L31_bool_binop_done;
            }
            __pyx_L32_next_or:;

            /* "Cython/Tempita/_tempita.py":738
 *             if prev:
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):             # <<<<<<<<<<<<<<
 *                     tokens[i - 1] = ''
 *                 else:
 */
            __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_prev_ok, __pyx_n_s_last, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 738, __pyx_L1_error)
            __pyx_t_7 = __pyx_t_6;
            __pyx_L31_bool_binop_done:;

            /* "Cython/Tempita/_tempita.py":737
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:
 *                 if ((i == 1 and not prev.strip())             # <<<<<<<<<<<<<<
 *                     or prev_ok == 'last'):
 *                     tokens[i - 1] = ''
 */
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":739
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):
 *                     tokens[i - 1] = ''             # <<<<<<<<<<<<<<
 *                 else:
 *                     m = trail_whitespace_re.search(prev)
 */
              __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 739, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_8, __pyx_kp_s__9) < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

              /* "Cython/Tempita/_tempita.py":737
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:
 *                 if ((i == 1 and not prev.strip())             # <<<<<<<<<<<<<<
 *                     or prev_ok == 'last'):
 *                     tokens[i - 1] = ''
 */
              goto __pyx_L30;
            }

            /* "Cython/Tempita/_tempita.py":741
 *                     tokens[i - 1] = ''
 *                 else:
 *                     m = trail_whitespace_re.search(prev)             # <<<<<<<<<<<<<<
 *                     # +1 to leave the leading \n on:
 *                     prev = prev[:m.start() + 1]
 */
            /*else*/ {
              __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_trail_whitespace_re); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 741, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_search); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 741, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_10 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_13, function);
                }
              }
              if (!__pyx_t_10) {
                __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_v_prev); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_8);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_13)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_prev};
                  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_8);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_prev};
                  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_GOTREF(__pyx_t_8);
                } else
                #endif
                {
                  __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL;
                  __Pyx_INCREF(__pyx_v_prev);
                  __Pyx_GIVEREF(__pyx_v_prev);
                  PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_prev);
                  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 741, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "Cython/Tempita/_tempita.py":743
 *                     m = trail_whitespace_re.search(prev)
 *                     # +1 to leave the leading \n on:
 *                     prev = prev[:m.start() + 1]             # <<<<<<<<<<<<<<
 *                     tokens[i - 1] = prev
 *             if next_chunk:
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_start); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 743, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_5 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
                __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
                if (likely(__pyx_t_5)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                  __Pyx_INCREF(__pyx_t_5);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_13, function);
                }
              }
              if (__pyx_t_5) {
                __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              } else {
                __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
              }
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 743, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v_prev, 0, 0, NULL, &__pyx_t_13, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 743, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_prev, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "Cython/Tempita/_tempita.py":744
 *                     # +1 to leave the leading \n on:
 *                     prev = prev[:m.start() + 1]
 *                     tokens[i - 1] = prev             # <<<<<<<<<<<<<<
 *             if next_chunk:
 *                 last_trim = i
 */
              __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 744, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_8, __pyx_v_prev) < 0)) __PYX_ERR(0, 744, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            }
            __pyx_L30:;

            /* "Cython/Tempita/_tempita.py":736
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 *             if prev:             # <<<<<<<<<<<<<<
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):
 */
          }

          /* "Cython/Tempita/_tempita.py":745
 *                     prev = prev[:m.start() + 1]
 *                     tokens[i - 1] = prev
 *             if next_chunk:             # <<<<<<<<<<<<<<
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():
 */
          __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_next_chunk); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 745, __pyx_L1_error)
          if (__pyx_t_7) {

            /* "Cython/Tempita/_tempita.py":746
 *                     tokens[i - 1] = prev
 *             if next_chunk:
 *                 last_trim = i             # <<<<<<<<<<<<<<
 *                 if i == len(tokens) - 2 and not next_chunk.strip():
 *                     tokens[i + 1] = ''
 */
            __Pyx_INCREF(__pyx_v_i);
            __Pyx_DECREF_SET(__pyx_v_last_trim, __pyx_v_i);

            /* "Cython/Tempita/_tempita.py":747
 *             if next_chunk:
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():             # <<<<<<<<<<<<<<
 *                     tokens[i + 1] = ''
 *                 else:
 */
            __pyx_t_12 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 747, __pyx_L1_error)
            __pyx_t_8 = PyInt_FromSsize_t((__pyx_t_12 - 2)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_13 = PyObject_RichCompare(__pyx_v_i, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 747, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (__pyx_t_6) {
            } else {
              __pyx_t_7 = __pyx_t_6;
              goto __pyx_L36_bool_binop_done;
            }
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_chunk, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 747, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_5 = NULL;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
              __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
              if (likely(__pyx_t_5)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
                __Pyx_INCREF(__pyx_t_5);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_8, function);
              }
            }
            if (__pyx_t_5) {
              __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            } else {
              __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 747, __pyx_L1_error)
            }
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 747, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_11 = ((!__pyx_t_6) != 0);
            __pyx_t_7 = __pyx_t_11;
            __pyx_L36_bool_binop_done:;
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":748
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():
 *                     tokens[i + 1] = ''             # <<<<<<<<<<<<<<
 *                 else:
 *                     m = lead_whitespace_re.search(next_chunk)
 */
              __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 748, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_13);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_13, __pyx_kp_s__9) < 0)) __PYX_ERR(0, 748, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

              /* "Cython/Tempita/_tempita.py":747
 *             if next_chunk:
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():             # <<<<<<<<<<<<<<
 *                     tokens[i + 1] = ''
 *                 else:
 */
              goto __pyx_L35;
            }

            /* "Cython/Tempita/_tempita.py":750
 *                     tokens[i + 1] = ''
 *                 else:
 *                     m = lead_whitespace_re.search(next_chunk)             # <<<<<<<<<<<<<<
 *                     next_chunk = next_chunk[m.end():]
 *                     tokens[i + 1] = next_chunk
 */
            /*else*/ {
              __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_lead_whitespace_re); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 750, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_search); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_8 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_8)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_8);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                }
              }
              if (!__pyx_t_8) {
                __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_next_chunk); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_13);
              } else {
                #if CYTHON_FAST_PYCALL
                if (PyFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_next_chunk};
                  __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_GOTREF(__pyx_t_13);
                } else
                #endif
                #if CYTHON_FAST_PYCCALL
                if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
                  PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_next_chunk};
                  __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L1_error)
                  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
                  __Pyx_GOTREF(__pyx_t_13);
                } else
                #endif
                {
                  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 750, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
                  __Pyx_INCREF(__pyx_v_next_chunk);
                  __Pyx_GIVEREF(__pyx_v_next_chunk);
                  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_next_chunk);
                  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
              }
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_13);
              __pyx_t_13 = 0;

              /* "Cython/Tempita/_tempita.py":751
 *                 else:
 *                     m = lead_whitespace_re.search(next_chunk)
 *                     next_chunk = next_chunk[m.end():]             # <<<<<<<<<<<<<<
 *                     tokens[i + 1] = next_chunk
 *     return tokens
 */
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_10 = NULL;
              if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_10)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_10);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                }
              }
              if (__pyx_t_10) {
                __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 751, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              } else {
                __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 751, __pyx_L1_error)
              }
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_next_chunk, 0, 0, &__pyx_t_13, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF_SET(__pyx_v_next_chunk, __pyx_t_5);
              __pyx_t_5 = 0;

              /* "Cython/Tempita/_tempita.py":752
 *                     m = lead_whitespace_re.search(next_chunk)
 *                     next_chunk = next_chunk[m.end():]
 *                     tokens[i + 1] = next_chunk             # <<<<<<<<<<<<<<
 *     return tokens
 * 
 */
              __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_5, __pyx_v_next_chunk) < 0)) __PYX_ERR(0, 752, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
            __pyx_L35:;

            /* "Cython/Tempita/_tempita.py":745
 *                     prev = prev[:m.start() + 1]
 *                     tokens[i - 1] = prev
 *             if next_chunk:             # <<<<<<<<<<<<<<
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():
 */
          }

          /* "Cython/Tempita/_tempita.py":733
 *         if last_trim is not None and last_trim + 2 == i and not prev.strip():
 *             prev_ok = 'last'
 *         if (prev_ok             # <<<<<<<<<<<<<<
 *             and (not next_chunk or lead_whitespace_re.search(next_chunk)
 *                  or (i == len(tokens) - 2 and not next_chunk.strip()))):
 */
        }

        /* "Cython/Tempita/_tempita.py":710
 *     """
 *     last_trim = None
 *     for i, current in enumerate(tokens):             # <<<<<<<<<<<<<<
 *         if isinstance(current, basestring_):
 *             # we don't trim this
 */
        __pyx_L3_continue:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":753
 *                     next_chunk = next_chunk[m.end():]
 *                     tokens[i + 1] = next_chunk
 *     return tokens             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_tokens);
      __pyx_r = __pyx_v_tokens;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":698
 * 
 * 
 * def trim_lex(tokens):             # <<<<<<<<<<<<<<
 *     r"""
 *     Takes a lexed set of tokens, and removes whitespace when there is
 */

      /* 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_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_AddTraceback("Cython.Tempita._tempita.trim_lex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_last_trim);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XDECREF(__pyx_v_current);
      __Pyx_XDECREF(__pyx_v_item);
      __Pyx_XDECREF(__pyx_v_prev);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_prev_ok);
      __Pyx_XDECREF(__pyx_v_m);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":756
 * 
 * 
 * def find_position(string, index, last_index, last_pos):             # <<<<<<<<<<<<<<
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_19find_position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static char __pyx_doc_6Cython_7Tempita_8_tempita_18find_position[] = "Given a string and index, return (line, column)";
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_19find_position = {"find_position", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_19find_position, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6Cython_7Tempita_8_tempita_18find_position};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_19find_position(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_string = 0;
      PyObject *__pyx_v_index = 0;
      PyObject *__pyx_v_last_index = 0;
      PyObject *__pyx_v_last_pos = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("find_position (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string_2,&__pyx_n_s_index,&__pyx_n_s_last_index,&__pyx_n_s_last_pos,0};
        PyObject* values[4] = {0,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  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_string_2)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("find_position", 1, 4, 4, 1); __PYX_ERR(0, 756, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_index)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("find_position", 1, 4, 4, 2); __PYX_ERR(0, 756, __pyx_L3_error)
            }
            case  3:
            if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_last_pos)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("find_position", 1, 4, 4, 3); __PYX_ERR(0, 756, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_position") < 0)) __PYX_ERR(0, 756, __pyx_L3_error)
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
          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);
          values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        }
        __pyx_v_string = values[0];
        __pyx_v_index = values[1];
        __pyx_v_last_index = values[2];
        __pyx_v_last_pos = values[3];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("find_position", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 756, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.find_position", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_18find_position(__pyx_self, __pyx_v_string, __pyx_v_index, __pyx_v_last_index, __pyx_v_last_pos);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_18find_position(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_index, PyObject *__pyx_v_last_index, PyObject *__pyx_v_last_pos) {
      PyObject *__pyx_v_lines = NULL;
      PyObject *__pyx_v_column = 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;
      __Pyx_RefNannySetupContext("find_position", 0);

      /* "Cython/Tempita/_tempita.py":758
 * def find_position(string, index, last_index, last_pos):
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)             # <<<<<<<<<<<<<<
 *     if lines > 0:
 *         column = index - string.rfind('\n', last_index, index)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s__24, __pyx_v_last_index, __pyx_v_index};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
        PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_kp_s__24, __pyx_v_last_index, __pyx_v_index};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (__pyx_t_3) {
          __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
        }
        __Pyx_INCREF(__pyx_kp_s__24);
        __Pyx_GIVEREF(__pyx_kp_s__24);
        PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_kp_s__24);
        __Pyx_INCREF(__pyx_v_last_index);
        __Pyx_GIVEREF(__pyx_v_last_index);
        PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_last_index);
        __Pyx_INCREF(__pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_index);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_lines = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":759
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 *     if lines > 0:             # <<<<<<<<<<<<<<
 *         column = index - string.rfind('\n', last_index, index)
 *     else:
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_lines, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":760
 *     lines = string.count('\n', last_index, index)
 *     if lines > 0:
 *         column = index - string.rfind('\n', last_index, index)             # <<<<<<<<<<<<<<
 *     else:
 *         column = last_pos[1] + (index - last_index)
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_rfind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = NULL;
        __pyx_t_4 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_s__24, __pyx_v_last_index, __pyx_v_index};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_kp_s__24, __pyx_v_last_index, __pyx_v_index};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_kp_s__24);
          __Pyx_GIVEREF(__pyx_kp_s__24);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_4, __pyx_kp_s__24);
          __Pyx_INCREF(__pyx_v_last_index);
          __Pyx_GIVEREF(__pyx_v_last_index);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_4, __pyx_v_last_index);
          __Pyx_INCREF(__pyx_v_index);
          __Pyx_GIVEREF(__pyx_v_index);
          PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_4, __pyx_v_index);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __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_2 = PyNumber_Subtract(__pyx_v_index, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_column = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":759
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 *     if lines > 0:             # <<<<<<<<<<<<<<
 *         column = index - string.rfind('\n', last_index, index)
 *     else:
 */
        goto __pyx_L3;
      }

      /* "Cython/Tempita/_tempita.py":762
 *         column = index - string.rfind('\n', last_index, index)
 *     else:
 *         column = last_pos[1] + (index - last_index)             # <<<<<<<<<<<<<<
 *     return (last_pos[0] + lines, column)
 * 
 */
      /*else*/ {
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_last_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PyNumber_Subtract(__pyx_v_index, __pyx_v_last_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __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_column = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L3:;

      /* "Cython/Tempita/_tempita.py":763
 *     else:
 *         column = last_pos[1] + (index - last_index)
 *     return (last_pos[0] + lines, column)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_last_pos, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_lines); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_INCREF(__pyx_v_column);
      __Pyx_GIVEREF(__pyx_v_column);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_column);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":756
 * 
 * 
 * def find_position(string, index, last_index, last_pos):             # <<<<<<<<<<<<<<
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 */

      /* 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("Cython.Tempita._tempita.find_position", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_lines);
      __Pyx_XDECREF(__pyx_v_column);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":766
 * 
 * 
 * def parse(s, name=None, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parses a string into a kind of AST
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_21parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static char __pyx_doc_6Cython_7Tempita_8_tempita_20parse[] = "\n    Parses a string into a kind of AST\n\n        >>> parse('{{x}}')\n        [('expr', (1, 3), 'x')]\n        >>> parse('foo')\n        ['foo']\n        >>> parse('{{if x}}test{{endif}}')\n        [('cond', (1, 3), ('if', (1, 3), 'x', ['test']))]\n        >>> parse('series->{{for x in y}}x={{x}}{{endfor}}')\n        ['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', (1, 27), 'x')])]\n        >>> parse('{{for x, y in z:}}{{continue}}{{endfor}}')\n        [('for', (1, 3), ('x', 'y'), 'z', [('continue', (1, 21))])]\n        >>> parse('{{py:x=1}}')\n        [('py', (1, 3), 'x=1')]\n        >>> parse('{{if x}}a{{elif y}}b{{else}}c{{endif}}')\n        [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))]\n\n    Some exceptions::\n\n        >>> parse('{{continue}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: continue outside of for loop at line 1 column 3\n        >>> parse('{{if x}}foo')\n        Traceback (most recent call last):\n            ...\n        TemplateError: No {{endif}} at line 1 column 3\n        >>> parse('{{else}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: else outside of an if block at line 1 column 3\n        >>> parse('{{if x}}{{for x in y}}{{endif}}{{endfor}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Unexpected endif at line 1 column 25\n        >>> parse('{{if}}{{endif}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: if with no expression at line 1 column 3\n        >>> parse('{{for x y}}{{endfor}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Bad for (no \"in\") in 'x y' at line 1 column 3\n        >>> parse('{{py:x=1\\ny=2}}')\n        Traceback (most recent call last):\n            ...\n        TemplateError: Multi-line py blocks must start with a newline at line 1 column 3""\n    ";
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_21parse = {"parse", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_21parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6Cython_7Tempita_8_tempita_20parse};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_21parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_s = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_line_offset = 0;
      PyObject *__pyx_v_delimeters = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_2,&__pyx_n_s_name,&__pyx_n_s_line_offset,&__pyx_n_s_delimeters,0};
        PyObject* values[4] = {0,0,0,0};
        values[1] = ((PyObject *)((PyObject *)Py_None));
        values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
        values[3] = ((PyObject *)((PyObject *)Py_None));
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  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_s_2)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
              if (value) { values[1] = value; kw_args--; }
            }
            case  2:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line_offset);
              if (value) { values[2] = value; kw_args--; }
            }
            case  3:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimeters);
              if (value) { values[3] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 766, __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);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_s = values[0];
        __pyx_v_name = values[1];
        __pyx_v_line_offset = values[2];
        __pyx_v_delimeters = values[3];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 766, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_20parse(__pyx_self, __pyx_v_s, __pyx_v_name, __pyx_v_line_offset, __pyx_v_delimeters);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_20parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_name, PyObject *__pyx_v_line_offset, PyObject *__pyx_v_delimeters) {
      PyObject *__pyx_v_tokens = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_next_chunk = 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;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      int __pyx_t_7;
      PyObject *(*__pyx_t_8)(PyObject *);
      int __pyx_t_9;
      __Pyx_RefNannySetupContext("parse", 0);
      __Pyx_INCREF(__pyx_v_delimeters);

      /* "Cython/Tempita/_tempita.py":816
 *         TemplateError: Multi-line py blocks must start with a newline at line 1 column 3
 *     """
 *     if delimeters is None:             # <<<<<<<<<<<<<<
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 */
      __pyx_t_1 = (__pyx_v_delimeters == Py_None);
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":817
 *     """
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                        Template.default_namespace['end_braces'] )
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_start_braces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":818
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )             # <<<<<<<<<<<<<<
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)
 *     result = []
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_end_braces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":817
 *     """
 *     if delimeters is None:
 *         delimeters = ( Template.default_namespace['start_braces'],             # <<<<<<<<<<<<<<
 *                        Template.default_namespace['end_braces'] )
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)
 */
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":816
 *         TemplateError: Multi-line py blocks must start with a newline at line 1 column 3
 *     """
 *     if delimeters is None:             # <<<<<<<<<<<<<<
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 */
      }

      /* "Cython/Tempita/_tempita.py":819
 *         delimeters = ( Template.default_namespace['start_braces'],
 *                        Template.default_namespace['end_braces'] )
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)             # <<<<<<<<<<<<<<
 *     result = []
 *     while tokens:
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_lex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_s);
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_line_offset, __pyx_v_line_offset) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimeters, __pyx_v_delimeters) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_tokens = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":820
 *                        Template.default_namespace['end_braces'] )
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)
 *     result = []             # <<<<<<<<<<<<<<
 *     while tokens:
 *         next_chunk, tokens = parse_expr(tokens, name)
 */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_result = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":821
 *     tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters)
 *     result = []
 *     while tokens:             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name)
 *         result.append(next_chunk)
 */
      while (1) {
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 821, __pyx_L1_error)
        if (!__pyx_t_2) break;

        /* "Cython/Tempita/_tempita.py":822
 *     result = []
 *     while tokens:
 *         next_chunk, tokens = parse_expr(tokens, name)             # <<<<<<<<<<<<<<
 *         result.append(next_chunk)
 *     return result
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_tokens, __pyx_v_name};
          __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_tokens, __pyx_v_name};
          __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_name);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
          PyObject* sequence = __pyx_t_6;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 822, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L7_unpacking_done;
          __pyx_L6_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 822, __pyx_L1_error)
          __pyx_L7_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":823
 *     while tokens:
 *         next_chunk, tokens = parse_expr(tokens, name)
 *         result.append(next_chunk)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_next_chunk); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 823, __pyx_L1_error)
      }

      /* "Cython/Tempita/_tempita.py":824
 *         next_chunk, tokens = parse_expr(tokens, name)
 *         result.append(next_chunk)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":766
 * 
 * 
 * def parse(s, name=None, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parses a string into a kind of AST
 */

      /* 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_6);
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_tokens);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_delimeters);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":827
 * 
 * 
 * def parse_expr(tokens, name, context=()):             # <<<<<<<<<<<<<<
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_23parse_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_23parse_expr = {"parse_expr", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_23parse_expr, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_23parse_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_expr (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,0};
        PyObject* values[3] = {0,0,0};
        values[2] = ((PyObject *)((PyObject*)__pyx_empty_tuple));
        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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_expr", 0, 2, 3, 1); __PYX_ERR(0, 827, __pyx_L3_error)
            }
            case  2:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context);
              if (value) { values[2] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_expr") < 0)) __PYX_ERR(0, 827, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_expr", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 827, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_22parse_expr(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_22parse_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_expr = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      PyObject *__pyx_t_6 = NULL;
      PyObject *(*__pyx_t_7)(PyObject *);
      int __pyx_t_8;
      __Pyx_RefNannySetupContext("parse_expr", 0);

      /* "Cython/Tempita/_tempita.py":828
 * 
 * def parse_expr(tokens, name, context=()):
 *     if isinstance(tokens[0], basestring_):             # <<<<<<<<<<<<<<
 *         return tokens[0], tokens[1:]
 *     expr, pos = tokens[0]
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(0, 828, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":829
 * def parse_expr(tokens, name, context=()):
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]             # <<<<<<<<<<<<<<
 *     expr, pos = tokens[0]
 *     expr = expr.strip()
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__25, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":828
 * 
 * def parse_expr(tokens, name, context=()):
 *     if isinstance(tokens[0], basestring_):             # <<<<<<<<<<<<<<
 *         return tokens[0], tokens[1:]
 *     expr, pos = tokens[0]
 */
      }

      /* "Cython/Tempita/_tempita.py":830
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 *     expr, pos = tokens[0]             # <<<<<<<<<<<<<<
 *     expr = expr.strip()
 *     if expr.startswith('py:'):
 */
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
        PyObject* sequence = __pyx_t_5;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 830, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 830, __pyx_L1_error)
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L5_unpacking_done;
        __pyx_L4_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 830, __pyx_L1_error)
        __pyx_L5_unpacking_done:;
      }
      __pyx_v_expr = __pyx_t_1;
      __pyx_t_1 = 0;
      __pyx_v_pos = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":831
 *         return tokens[0], tokens[1:]
 *     expr, pos = tokens[0]
 *     expr = expr.strip()             # <<<<<<<<<<<<<<
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_1) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":832
 *     expr, pos = tokens[0]
 *     expr = expr.strip()
 *     if expr.startswith('py:'):             # <<<<<<<<<<<<<<
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":833
 *     expr = expr.strip()
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')             # <<<<<<<<<<<<<<
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')
 */
        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_expr, 3, 0, NULL, NULL, &__pyx_slice__27, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":834
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):             # <<<<<<<<<<<<<<
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!__pyx_t_3) {
        } else {
          __pyx_t_4 = __pyx_t_3;
          goto __pyx_L8_bool_binop_done;
        }
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_4 = __pyx_t_3;
        __pyx_L8_bool_binop_done:;
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":835
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')             # <<<<<<<<<<<<<<
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 835, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "Cython/Tempita/_tempita.py":836
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:             # <<<<<<<<<<<<<<
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')
 */
          __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__31, __pyx_v_expr, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
          __pyx_t_3 = (__pyx_t_4 != 0);
          if (__pyx_t_3) {

            /* "Cython/Tempita/_tempita.py":837
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')             # <<<<<<<<<<<<<<
 *                 expr = expr.replace('\r', '')
 *             expr += '\n'
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "Cython/Tempita/_tempita.py":838
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')             # <<<<<<<<<<<<<<
 *             expr += '\n'
 *         else:
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 838, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_5);
            __pyx_t_5 = 0;

            /* "Cython/Tempita/_tempita.py":836
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:             # <<<<<<<<<<<<<<
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')
 */
          }

          /* "Cython/Tempita/_tempita.py":839
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')
 *             expr += '\n'             # <<<<<<<<<<<<<<
 *         else:
 *             if '\n' in expr:
 */
          __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_kp_s__24); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "Cython/Tempita/_tempita.py":834
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):             # <<<<<<<<<<<<<<
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 */
          goto __pyx_L7;
        }

        /* "Cython/Tempita/_tempita.py":841
 *             expr += '\n'
 *         else:
 *             if '\n' in expr:             # <<<<<<<<<<<<<<
 *                 raise TemplateError(
 *                     'Multi-line py blocks must start with a newline',
 */
        /*else*/ {
          __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__24, __pyx_v_expr, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
          __pyx_t_4 = (__pyx_t_3 != 0);
          if (__pyx_t_4) {

            /* "Cython/Tempita/_tempita.py":842
 *         else:
 *             if '\n' in expr:
 *                 raise TemplateError(             # <<<<<<<<<<<<<<
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 */
            __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 842, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);

            /* "Cython/Tempita/_tempita.py":844
 *                 raise TemplateError(
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)             # <<<<<<<<<<<<<<
 *         return ('py', pos, expr), tokens[1:]
 *     elif expr in ('continue', 'break'):
 */
            __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 844, __pyx_L1_error)

            /* "Cython/Tempita/_tempita.py":842
 *         else:
 *             if '\n' in expr:
 *                 raise TemplateError(             # <<<<<<<<<<<<<<
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 */
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__37, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __PYX_ERR(0, 842, __pyx_L1_error)

            /* "Cython/Tempita/_tempita.py":841
 *             expr += '\n'
 *         else:
 *             if '\n' in expr:             # <<<<<<<<<<<<<<
 *                 raise TemplateError(
 *                     'Multi-line py blocks must start with a newline',
 */
          }
        }
        __pyx_L7:;

        /* "Cython/Tempita/_tempita.py":845
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 *         return ('py', pos, expr), tokens[1:]             # <<<<<<<<<<<<<<
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_py);
        __Pyx_GIVEREF(__pyx_n_s_py);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_py);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_INCREF(__pyx_v_expr);
        __Pyx_GIVEREF(__pyx_v_expr);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_expr);
        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__38, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 845, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
        __pyx_t_1 = 0;
        __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":832
 *     expr, pos = tokens[0]
 *     expr = expr.strip()
 *     if expr.startswith('py:'):             # <<<<<<<<<<<<<<
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):
 */
      }

      /* "Cython/Tempita/_tempita.py":846
 *                     position=pos, name=name)
 *         return ('py', pos, expr), tokens[1:]
 *     elif expr in ('continue', 'break'):             # <<<<<<<<<<<<<<
 *         if 'for' not in context:
 *             raise TemplateError(
 */
      __Pyx_INCREF(__pyx_v_expr);
      __pyx_t_5 = __pyx_v_expr;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_continue, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
      if (!__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L12_bool_binop_done;
      }
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_break, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_3;
      __pyx_L12_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":847
 *         return ('py', pos, expr), tokens[1:]
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'continue outside of for loop',
 */
        __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_for, __pyx_v_context, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 847, __pyx_L1_error)
        __pyx_t_4 = (__pyx_t_3 != 0);
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":848
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);

          /* "Cython/Tempita/_tempita.py":850
 *             raise TemplateError(
 *                 'continue outside of for loop',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):
 */
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 850, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":848
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 */
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__39, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 848, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":847
 *         return ('py', pos, expr), tokens[1:]
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'continue outside of for loop',
 */
        }

        /* "Cython/Tempita/_tempita.py":851
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 *         return (expr, pos), tokens[1:]             # <<<<<<<<<<<<<<
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_expr);
        __Pyx_GIVEREF(__pyx_v_expr);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_expr);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__40, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
        __pyx_t_1 = 0;
        __pyx_t_2 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":846
 *                     position=pos, name=name)
 *         return ('py', pos, expr), tokens[1:]
 *     elif expr in ('continue', 'break'):             # <<<<<<<<<<<<<<
 *         if 'for' not in context:
 *             raise TemplateError(
 */
      }

      /* "Cython/Tempita/_tempita.py":852
 *                 position=pos, name=name)
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):             # <<<<<<<<<<<<<<
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 852, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":853
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)             # <<<<<<<<<<<<<<
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_cond); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_1) {
            __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":852
 *                 position=pos, name=name)
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):             # <<<<<<<<<<<<<<
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')
 */
      }

      /* "Cython/Tempita/_tempita.py":854
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')             # <<<<<<<<<<<<<<
 *           or expr == 'else'):
 *         raise TemplateError(
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 854, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (!__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L15_bool_binop_done;
      }

      /* "Cython/Tempita/_tempita.py":855
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             '%s outside of an if block' % expr.split()[0],
 */
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_expr, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 855, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_3;
      __pyx_L15_bool_binop_done:;

      /* "Cython/Tempita/_tempita.py":854
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')             # <<<<<<<<<<<<<<
 *           or expr == 'else'):
 *         raise TemplateError(
 */
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":856
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":857
 *           or expr == 'else'):
 *         raise TemplateError(
 *             '%s outside of an if block' % expr.split()[0],             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_split); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 857, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_outside_of_an_if_block, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":856
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 */
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":858
 *         raise TemplateError(
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(
 */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 858, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 858, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 858, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":856
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 856, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":854
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')             # <<<<<<<<<<<<<<
 *           or expr == 'else'):
 *         raise TemplateError(
 */
      }

      /* "Cython/Tempita/_tempita.py":859
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             '%s with no expression' % expr,
 */
      __Pyx_INCREF(__pyx_v_expr);
      __pyx_t_1 = __pyx_v_expr;
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_if_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
      if (!__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_elif_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
      if (!__pyx_t_3) {
      } else {
        __pyx_t_4 = __pyx_t_3;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_for, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 859, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_3;
      __pyx_L17_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = (__pyx_t_4 != 0);
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":860
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":861
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(
 *             '%s with no expression' % expr,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 */
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_with_no_expression, __pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":860
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":862
 *         raise TemplateError(
 *             '%s with no expression' % expr,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(
 */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 862, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 862, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":860
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 860, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":859
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             '%s with no expression' % expr,
 */
      }

      /* "Cython/Tempita/_tempita.py":863
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'Unexpected %s' % expr,
 */
      __Pyx_INCREF(__pyx_v_expr);
      __pyx_t_5 = __pyx_v_expr;
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 863, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_endfor, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 863, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_enddef, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 863, __pyx_L1_error)
      __pyx_t_3 = __pyx_t_4;
      __pyx_L20_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":864
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":865
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(
 *             'Unexpected %s' % expr,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     elif expr.startswith('for '):
 */
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_s, __pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":864
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":866
 *         raise TemplateError(
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)
 */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 866, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":864
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 864, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":863
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'Unexpected %s' % expr,
 */
      }

      /* "Cython/Tempita/_tempita.py":867
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 *     elif expr.startswith('for '):             # <<<<<<<<<<<<<<
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 867, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":868
 *             position=pos, name=name)
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('default '):
 *         return parse_default(tokens, name, context)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_for); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 868, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":867
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 *     elif expr.startswith('for '):             # <<<<<<<<<<<<<<
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):
 */
      }

      /* "Cython/Tempita/_tempita.py":869
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):             # <<<<<<<<<<<<<<
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 869, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":870
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):
 *         return parse_default(tokens, name, context)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('inherit '):
 *         return parse_inherit(tokens, name, context)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __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;

        /* "Cython/Tempita/_tempita.py":869
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):             # <<<<<<<<<<<<<<
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):
 */
      }

      /* "Cython/Tempita/_tempita.py":871
 *     elif expr.startswith('default '):
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):             # <<<<<<<<<<<<<<
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 871, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":872
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):
 *         return parse_inherit(tokens, name, context)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('def '):
 *         return parse_def(tokens, name, context)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_inherit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 872, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_5 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 872, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (__pyx_t_6) {
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 872, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":871
 *     elif expr.startswith('default '):
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):             # <<<<<<<<<<<<<<
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):
 */
      }

      /* "Cython/Tempita/_tempita.py":873
 *     elif expr.startswith('inherit '):
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):             # <<<<<<<<<<<<<<
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":874
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):
 *         return parse_def(tokens, name, context)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('#'):
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_def); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 874, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __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;

        /* "Cython/Tempita/_tempita.py":873
 *     elif expr.startswith('inherit '):
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):             # <<<<<<<<<<<<<<
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):
 */
      }

      /* "Cython/Tempita/_tempita.py":875
 *     elif expr.startswith('def '):
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):             # <<<<<<<<<<<<<<
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 *     return ('expr', pos, tokens[0][0]), tokens[1:]
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 875, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":876
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):
 *         return ('comment', pos, tokens[0][0]), tokens[1:]             # <<<<<<<<<<<<<<
 *     return ('expr', pos, tokens[0][0]), tokens[1:]
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_n_s_comment);
        __Pyx_GIVEREF(__pyx_n_s_comment);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_comment);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__49, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 876, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":875
 *     elif expr.startswith('def '):
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):             # <<<<<<<<<<<<<<
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 *     return ('expr', pos, tokens[0][0]), tokens[1:]
 */
      }

      /* "Cython/Tempita/_tempita.py":877
 *     elif expr.startswith('#'):
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 *     return ('expr', pos, tokens[0][0]), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_n_s_expr);
      __Pyx_GIVEREF(__pyx_n_s_expr);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_expr);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__50, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_6 = 0;
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":827
 * 
 * 
 * def parse_expr(tokens, name, context=()):             # <<<<<<<<<<<<<<
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 */

      /* 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("Cython.Tempita._tempita.parse_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_expr);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":880
 * 
 * 
 * def parse_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     start = tokens[0][1]
 *     pieces = []
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_25parse_cond(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_25parse_cond = {"parse_cond", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_25parse_cond, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_25parse_cond(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_cond (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_cond", 1, 3, 3, 1); __PYX_ERR(0, 880, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_cond", 1, 3, 3, 2); __PYX_ERR(0, 880, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cond") < 0)) __PYX_ERR(0, 880, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_cond", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 880, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_24parse_cond(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_24parse_cond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_start = NULL;
      PyObject *__pyx_v_pieces = NULL;
      PyObject *__pyx_v_next_chunk = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      PyObject *__pyx_t_2 = NULL;
      int __pyx_t_3;
      int __pyx_t_4;
      PyObject *__pyx_t_5 = NULL;
      int __pyx_t_6;
      int __pyx_t_7;
      PyObject *__pyx_t_8 = NULL;
      PyObject *(*__pyx_t_9)(PyObject *);
      int __pyx_t_10;
      __Pyx_RefNannySetupContext("parse_cond", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":881
 * 
 * def parse_cond(tokens, name, context):
 *     start = tokens[0][1]             # <<<<<<<<<<<<<<
 *     pieces = []
 *     context = context + ('if',)
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_start = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":882
 * def parse_cond(tokens, name, context):
 *     start = tokens[0][1]
 *     pieces = []             # <<<<<<<<<<<<<<
 *     context = context + ('if',)
 *     while 1:
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_pieces = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":883
 *     start = tokens[0][1]
 *     pieces = []
 *     context = context + ('if',)             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      __pyx_t_2 = PyNumber_Add(__pyx_v_context, __pyx_tuple__51); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":884
 *     pieces = []
 *     context = context + ('if',)
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":885
 *     context = context + ('if',)
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'Missing {{endif}}',
 */
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 885, __pyx_L1_error)
        __pyx_t_4 = ((!__pyx_t_3) != 0);
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":886
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 */
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "Cython/Tempita/_tempita.py":888
 *             raise TemplateError(
 *                 'Missing {{endif}}',
 *                 position=start, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endif'):
 */
          __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_start) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 888, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":886
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 */
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__52, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 886, __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_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __PYX_ERR(0, 886, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":885
 *     context = context + ('if',)
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'Missing {{endif}}',
 */
        }

        /* "Cython/Tempita/_tempita.py":889
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = PyTuple_Check(__pyx_t_5); 
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = (__pyx_t_3 != 0);
        if (__pyx_t_6) {
        } else {
          __pyx_t_4 = __pyx_t_6;
          goto __pyx_L7_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":890
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endif'):             # <<<<<<<<<<<<<<
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_4 = __pyx_t_6;
        __pyx_L7_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":889
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 */
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":891
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)
 *         pieces.append(next_chunk)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_n_s_cond);
          __Pyx_GIVEREF(__pyx_n_s_cond);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_cond);
          __Pyx_INCREF(__pyx_v_start);
          __Pyx_GIVEREF(__pyx_v_start);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
          __pyx_t_5 = PyList_AsTuple(__pyx_v_pieces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__53, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
          __pyx_t_2 = 0;
          __pyx_t_5 = 0;
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "Cython/Tempita/_tempita.py":889
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 */
        }

        /* "Cython/Tempita/_tempita.py":892
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)             # <<<<<<<<<<<<<<
 *         pieces.append(next_chunk)
 * 
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_one_cond); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_context);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 892, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L9_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_2), 2) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L10_unpacking_done;
          __pyx_L9_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 892, __pyx_L1_error)
          __pyx_L10_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":893
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)
 *         pieces.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_v_next_chunk); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 893, __pyx_L1_error)
      }

      /* "Cython/Tempita/_tempita.py":880
 * 
 * 
 * def parse_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     start = tokens[0][1]
 *     pieces = []
 */

      /* 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_5);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_start);
      __Pyx_XDECREF(__pyx_v_pieces);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_tokens);
      __Pyx_XDECREF(__pyx_v_context);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":896
 * 
 * 
 * def parse_one_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_27parse_one_cond(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_27parse_one_cond = {"parse_one_cond", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_27parse_one_cond, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_27parse_one_cond(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_one_cond (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_one_cond", 1, 3, 3, 1); __PYX_ERR(0, 896, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_one_cond", 1, 3, 3, 2); __PYX_ERR(0, 896, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_one_cond") < 0)) __PYX_ERR(0, 896, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_one_cond", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 896, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_one_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_26parse_one_cond(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_26parse_one_cond(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_first = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_v_content = NULL;
      PyObject *__pyx_v_part = NULL;
      PyObject *__pyx_v_next_chunk = 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)(PyObject *);
      int __pyx_t_7;
      int __pyx_t_8;
      int __pyx_t_9;
      int __pyx_t_10;
      int __pyx_t_11;
      __Pyx_RefNannySetupContext("parse_one_cond", 0);
      __Pyx_INCREF(__pyx_v_tokens);

      /* "Cython/Tempita/_tempita.py":897
 * 
 * def parse_one_cond(tokens, name, context):
 *     (first, pos), tokens = tokens[0], tokens[1:]             # <<<<<<<<<<<<<<
 *     content = []
 *     if first.endswith(':'):
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__54, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 897, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 897, __pyx_L1_error)
        __pyx_t_6 = NULL;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_6 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 897, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_first = __pyx_t_3;
      __pyx_t_3 = 0;
      __pyx_v_pos = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":898
 * def parse_one_cond(tokens, name, context):
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []             # <<<<<<<<<<<<<<
 *     if first.endswith(':'):
 *         first = first[:-1]
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_content = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":899
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if first.startswith('if '):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_endswith); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 899, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":900
 *     content = []
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, -1L, NULL, NULL, &__pyx_slice__57, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":899
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if first.startswith('if '):
 */
      }

      /* "Cython/Tempita/_tempita.py":901
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if first.startswith('if '):             # <<<<<<<<<<<<<<
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 901, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":902
 *         first = first[:-1]
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)             # <<<<<<<<<<<<<<
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 3, 0, NULL, NULL, &__pyx_slice__59, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_n_s_if_2);
        __Pyx_GIVEREF(__pyx_n_s_if_2);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_if_2);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
        __Pyx_INCREF(__pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_content);
        __pyx_t_2 = 0;
        __pyx_v_part = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":901
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if first.startswith('if '):             # <<<<<<<<<<<<<<
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):
 */
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":903
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):             # <<<<<<<<<<<<<<
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":904
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)             # <<<<<<<<<<<<<<
 *     elif first == 'else':
 *         part = ('else', pos, None, content)
 */
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_first, 5, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (__pyx_t_4) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_elif_2);
        __Pyx_GIVEREF(__pyx_n_s_elif_2);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_elif_2);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
        __Pyx_INCREF(__pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_content);
        __pyx_t_2 = 0;
        __pyx_v_part = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":903
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):             # <<<<<<<<<<<<<<
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':
 */
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":905
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':             # <<<<<<<<<<<<<<
 *         part = ('else', pos, None, content)
 *     else:
 */
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_first, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 905, __pyx_L1_error)
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":906
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':
 *         part = ('else', pos, None, content)             # <<<<<<<<<<<<<<
 *     else:
 *         assert 0, "Unexpected token %r at %s" % (first, pos)
 */
        __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_else);
        __Pyx_GIVEREF(__pyx_n_s_else);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_else);
        __Pyx_INCREF(__pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
        __Pyx_INCREF(__pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_content);
        __pyx_v_part = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":905
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':             # <<<<<<<<<<<<<<
 *         part = ('else', pos, None, content)
 *     else:
 */
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":908
 *         part = ('else', pos, None, content)
 *     else:
 *         assert 0, "Unexpected token %r at %s" % (first, pos)             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      /*else*/ {
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(!Py_OptimizeFlag)) {
          if (unlikely(!0)) {
            __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_first);
            __Pyx_GIVEREF(__pyx_v_first);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_first);
            __Pyx_INCREF(__pyx_v_pos);
            __Pyx_GIVEREF(__pyx_v_pos);
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
            __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_token_r_at_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            PyErr_SetObject(PyExc_AssertionError, __pyx_t_2);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __PYX_ERR(0, 908, __pyx_L1_error)
          }
        }
        #endif
      }
      __pyx_L6:;

      /* "Cython/Tempita/_tempita.py":909
 *     else:
 *         assert 0, "Unexpected token %r at %s" % (first, pos)
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":910
 *         assert 0, "Unexpected token %r at %s" % (first, pos)
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'No {{endif}}',
 */
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 910, __pyx_L1_error)
        __pyx_t_8 = ((!__pyx_t_7) != 0);
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":911
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 */
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "Cython/Tempita/_tempita.py":913
 *             raise TemplateError(
 *                 'No {{endif}}',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and (tokens[0][0] == 'endif'
 */
          __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 913, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 913, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 913, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":911
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__62, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 911, __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_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 911, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":910
 *         assert 0, "Unexpected token %r at %s" % (first, pos)
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'No {{endif}}',
 */
        }

        /* "Cython/Tempita/_tempita.py":914
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyTuple_Check(__pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = (__pyx_t_7 != 0);
        if (__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L11_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":915
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)
 *             and (tokens[0][0] == 'endif'             # <<<<<<<<<<<<<<
 *                  or tokens[0][0].startswith('elif ')
 *                  or tokens[0][0] == 'else')):
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L11_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":916
 *         if (isinstance(tokens[0], tuple)
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')             # <<<<<<<<<<<<<<
 *                  or tokens[0][0] == 'else')):
 *             return part, tokens
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 916, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L11_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":917
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')
 *                  or tokens[0][0] == 'else')):             # <<<<<<<<<<<<<<
 *             return part, tokens
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 917, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = __pyx_t_9;
        __pyx_L11_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":914
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')
 */
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":918
 *                  or tokens[0][0].startswith('elif ')
 *                  or tokens[0][0] == 'else')):
 *             return part, tokens             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)
 */
          __Pyx_XDECREF(__pyx_r);
          if (unlikely(!__pyx_v_part)) { __Pyx_RaiseUnboundLocalError("part"); __PYX_ERR(0, 918, __pyx_L1_error) }
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_v_part);
          __Pyx_GIVEREF(__pyx_v_part);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_part);
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tokens);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "Cython/Tempita/_tempita.py":914
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')
 */
        }

        /* "Cython/Tempita/_tempita.py":919
 *                  or tokens[0][0] == 'else')):
 *             return part, tokens
 *         next_chunk, tokens = parse_expr(tokens, name, context)             # <<<<<<<<<<<<<<
 *         content.append(next_chunk)
 * 
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_10, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_10, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_10, __pyx_v_context);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 919, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 919, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_2), 2) < 0) __PYX_ERR(0, 919, __pyx_L1_error)
          __pyx_t_6 = NULL;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L16_unpacking_done;
          __pyx_L15_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_6 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 919, __pyx_L1_error)
          __pyx_L16_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":920
 *             return part, tokens
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_content, __pyx_v_next_chunk); if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 920, __pyx_L1_error)
      }

      /* "Cython/Tempita/_tempita.py":896
 * 
 * 
 * def parse_one_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 */

      /* 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("Cython.Tempita._tempita.parse_one_cond", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_first);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XDECREF(__pyx_v_content);
      __Pyx_XDECREF(__pyx_v_part);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_tokens);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":923
 * 
 * 
 * def parse_for(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_29parse_for(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_29parse_for = {"parse_for", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_29parse_for, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_29parse_for(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_for (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_for", 1, 3, 3, 1); __PYX_ERR(0, 923, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_for", 1, 3, 3, 2); __PYX_ERR(0, 923, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_for") < 0)) __PYX_ERR(0, 923, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_for", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 923, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_28parse_for(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_28parse_for(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_first = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_v_content = NULL;
      PyObject *__pyx_v_match = NULL;
      PyObject *__pyx_v_vars = NULL;
      PyObject *__pyx_v_expr = NULL;
      PyObject *__pyx_v_next_chunk = NULL;
      PyObject *__pyx_v_v = 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)(PyObject *);
      int __pyx_t_6;
      int __pyx_t_7;
      Py_ssize_t __pyx_t_8;
      PyObject *(*__pyx_t_9)(PyObject *);
      PyObject *__pyx_t_10 = NULL;
      int __pyx_t_11;
      int __pyx_t_12;
      int __pyx_t_13;
      __Pyx_RefNannySetupContext("parse_for", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":924
 * 
 * def parse_for(tokens, name, context):
 *     first, pos = tokens[0]             # <<<<<<<<<<<<<<
 *     tokens = tokens[1:]
 *     context = ('for',) + context
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 924, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 924, __pyx_L1_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 924, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_first = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_pos = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":925
 * def parse_for(tokens, name, context):
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]             # <<<<<<<<<<<<<<
 *     context = ('for',) + context
 *     content = []
 */
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__64, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":926
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 *     context = ('for',) + context             # <<<<<<<<<<<<<<
 *     content = []
 *     assert first.startswith('for ')
 */
      __pyx_t_1 = PyNumber_Add(__pyx_tuple__65, __pyx_v_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":927
 *     tokens = tokens[1:]
 *     context = ('for',) + context
 *     content = []             # <<<<<<<<<<<<<<
 *     assert first.startswith('for ')
 *     if first.endswith(':'):
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 927, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_content = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":928
 *     context = ('for',) + context
 *     content = []
 *     assert first.startswith('for ')             # <<<<<<<<<<<<<<
 *     if first.endswith(':'):
 *         first = first[:-1]
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 928, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 928, __pyx_L1_error)
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":929
 *     content = []
 *     assert first.startswith('for ')
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     first = first[3:].strip()
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __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_ERR(0, 929, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":930
 *     assert first.startswith('for ')
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     first = first[3:].strip()
 *     match = in_re.search(first)
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, -1L, NULL, NULL, &__pyx_slice__68, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":929
 *     content = []
 *     assert first.startswith('for ')
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     first = first[3:].strip()
 */
      }

      /* "Cython/Tempita/_tempita.py":931
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     first = first[3:].strip()             # <<<<<<<<<<<<<<
 *     match = in_re.search(first)
 *     if not match:
 */
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_first, 3, 0, NULL, NULL, &__pyx_slice__69, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 931, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":932
 *         first = first[:-1]
 *     first = first[3:].strip()
 *     match = in_re.search(first)             # <<<<<<<<<<<<<<
 *     if not match:
 *         raise TemplateError(
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_in_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_first};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_first};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 932, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_first);
          __Pyx_GIVEREF(__pyx_v_first);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_first);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_match = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":933
 *     first = first[3:].strip()
 *     match = in_re.search(first)
 *     if not match:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,
 */
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
      __pyx_t_7 = ((!__pyx_t_6) != 0);
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":934
 *     match = in_re.search(first)
 *     if not match:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":935
 *     if not match:
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     vars = first[:match.start()]
 */
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Bad_for_no_in_in_r, __pyx_v_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":934
 *     match = in_re.search(first)
 *     if not match:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 934, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":936
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     vars = first[:match.start()]
 *     if '(' in vars:
 */
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 936, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 936, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":934
 *     match = in_re.search(first)
 *     if not match:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 934, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":933
 *     first = first[3:].strip()
 *     match = in_re.search(first)
 *     if not match:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,
 */
      }

      /* "Cython/Tempita/_tempita.py":937
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 *     vars = first[:match.start()]             # <<<<<<<<<<<<<<
 *     if '(' in vars:
 *         raise TemplateError(
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_vars = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":938
 *             position=pos, name=name)
 *     vars = first[:match.start()]
 *     if '(' in vars:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'You cannot have () in the variable section of a for loop (%r)'
 */
      __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__70, __pyx_v_vars, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 938, __pyx_L1_error)
      __pyx_t_6 = (__pyx_t_7 != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":939
 *     vars = first[:match.start()]
 *     if '(' in vars:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":941
 *         raise TemplateError(
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)             # <<<<<<<<<<<<<<
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')
 */
        __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_You_cannot_have_in_the_variable, __pyx_v_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":939
 *     vars = first[:match.start()]
 *     if '(' in vars:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)
 */
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":941
 *         raise TemplateError(
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)             # <<<<<<<<<<<<<<
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')
 */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 941, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 941, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":939
 *     vars = first[:match.start()]
 *     if '(' in vars:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 939, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":938
 *             position=pos, name=name)
 *     vars = first[:match.start()]
 *     if '(' in vars:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             'You cannot have () in the variable section of a for loop (%r)'
 */
      }

      /* "Cython/Tempita/_tempita.py":942
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)
 *     vars = tuple([             # <<<<<<<<<<<<<<
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "Cython/Tempita/_tempita.py":943
 *             % vars, position=pos, name=name)
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')             # <<<<<<<<<<<<<<
 *         if v.strip()])
 *     expr = first[match.end():]
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, NULL, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 943, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 943, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 943, __pyx_L1_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_9(__pyx_t_2);
          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_ERR(0, 943, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":944
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])             # <<<<<<<<<<<<<<
 *     expr = first[match.end():]
 *     while 1:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
          }
        }
        if (__pyx_t_10) {
          __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        } else {
          __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 944, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":943
 *             % vars, position=pos, name=name)
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')             # <<<<<<<<<<<<<<
 *         if v.strip()])
 *     expr = first[match.end():]
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = NULL;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
            }
          }
          if (__pyx_t_10) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else {
            __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 942, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":944
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])             # <<<<<<<<<<<<<<
 *     expr = first[match.end():]
 *     while 1:
 */
        }

        /* "Cython/Tempita/_tempita.py":943
 *             % vars, position=pos, name=name)
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')             # <<<<<<<<<<<<<<
 *         if v.strip()])
 *     expr = first[match.end():]
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":942
 *             'You cannot have () in the variable section of a for loop (%r)'
 *             % vars, position=pos, name=name)
 *     vars = tuple([             # <<<<<<<<<<<<<<
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])
 */
      __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_vars, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":945
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])
 *     expr = first[match.end():]             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, &__pyx_t_2, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_expr = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":946
 *         if v.strip()])
 *     expr = first[match.end():]
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":947
 *     expr = first[match.end():]
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'No {{endfor}}',
 */
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 947, __pyx_L1_error)
        __pyx_t_7 = ((!__pyx_t_6) != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":948
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 */
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);

          /* "Cython/Tempita/_tempita.py":950
 *             raise TemplateError(
 *                 'No {{endfor}}',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endfor'):
 */
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 950, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 950, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":948
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__73, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __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_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 948, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":947
 *     expr = first[match.end():]
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'No {{endfor}}',
 */
        }

        /* "Cython/Tempita/_tempita.py":951
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyTuple_Check(__pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = (__pyx_t_6 != 0);
        if (__pyx_t_11) {
        } else {
          __pyx_t_7 = __pyx_t_11;
          goto __pyx_L15_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":952
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endfor'):             # <<<<<<<<<<<<<<
 *             return ('for', pos, vars, expr, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 */
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_endfor, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 952, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __pyx_t_11;
        __pyx_L15_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":951
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]
 */
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":953
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_n_s_for);
          __Pyx_GIVEREF(__pyx_n_s_for);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_for);
          __Pyx_INCREF(__pyx_v_pos);
          __Pyx_GIVEREF(__pyx_v_pos);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
          __Pyx_INCREF(__pyx_v_vars);
          __Pyx_GIVEREF(__pyx_v_vars);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vars);
          __Pyx_INCREF(__pyx_v_expr);
          __Pyx_GIVEREF(__pyx_v_expr);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_expr);
          __Pyx_INCREF(__pyx_v_content);
          __Pyx_GIVEREF(__pyx_v_content);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_content);
          __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__74, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
          __pyx_t_2 = 0;
          __pyx_t_4 = 0;
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;

          /* "Cython/Tempita/_tempita.py":951
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]
 */
        }

        /* "Cython/Tempita/_tempita.py":954
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)             # <<<<<<<<<<<<<<
 *         content.append(next_chunk)
 * 
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = NULL;
        __pyx_t_12 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_12 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_3 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_12, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_12, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_12, __pyx_v_context);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 954, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L17_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_2), 2) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L18_unpacking_done;
          __pyx_L17_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 954, __pyx_L1_error)
          __pyx_L18_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":955
 *             return ('for', pos, vars, expr, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_content, __pyx_v_next_chunk); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 955, __pyx_L1_error)
      }

      /* "Cython/Tempita/_tempita.py":923
 * 
 * 
 * def parse_for(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     tokens = tokens[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_10);
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_for", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_first);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XDECREF(__pyx_v_content);
      __Pyx_XDECREF(__pyx_v_match);
      __Pyx_XDECREF(__pyx_v_vars);
      __Pyx_XDECREF(__pyx_v_expr);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_v);
      __Pyx_XDECREF(__pyx_v_tokens);
      __Pyx_XDECREF(__pyx_v_context);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":958
 * 
 * 
 * def parse_default(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_31parse_default(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_31parse_default = {"parse_default", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_31parse_default, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_31parse_default(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      CYTHON_UNUSED PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_default (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_default", 1, 3, 3, 1); __PYX_ERR(0, 958, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_default", 1, 3, 3, 2); __PYX_ERR(0, 958, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_default") < 0)) __PYX_ERR(0, 958, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_default", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 958, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_30parse_default(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_30parse_default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_context) {
      PyObject *__pyx_v_first = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_v_parts = NULL;
      PyObject *__pyx_v_var = NULL;
      PyObject *__pyx_v_expr = 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)(PyObject *);
      int __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      int __pyx_t_8;
      __Pyx_RefNannySetupContext("parse_default", 0);

      /* "Cython/Tempita/_tempita.py":959
 * 
 * def parse_default(tokens, name, context):
 *     first, pos = tokens[0]             # <<<<<<<<<<<<<<
 *     assert first.startswith('default ')
 *     first = first.split(None, 1)[1]
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 959, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 959, __pyx_L1_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 959, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_first = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_pos = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":960
 * def parse_default(tokens, name, context):
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')             # <<<<<<<<<<<<<<
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 960, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 960, __pyx_L1_error)
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":961
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 *     first = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":962
 *     assert first.startswith('default ')
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)             # <<<<<<<<<<<<<<
 *     if len(parts) == 1:
 *         raise TemplateError(
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_parts = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":963
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 */
      __pyx_t_7 = PyObject_Length(__pyx_v_parts); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 963, __pyx_L1_error)
      __pyx_t_6 = ((__pyx_t_7 == 1) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":964
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":965
 *     if len(parts) == 1:
 *         raise TemplateError(
 *             "Expression must be {{default var=value}}; no = found in %r" % first,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     var = parts[0].strip()
 */
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Expression_must_be_default_var_v, __pyx_v_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":964
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)
 */
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":966
 *         raise TemplateError(
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     var = parts[0].strip()
 *     if ',' in var:
 */
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 966, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 966, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":964
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 964, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":963
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 */
      }

      /* "Cython/Tempita/_tempita.py":967
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)
 *     var = parts[0].strip()             # <<<<<<<<<<<<<<
 *     if ',' in var:
 *         raise TemplateError(
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_parts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_var = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":968
 *             position=pos, name=name)
 *     var = parts[0].strip()
 *     if ',' in var:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "{{default x, y = ...}} is not supported",
 */
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__71, __pyx_v_var, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
      __pyx_t_8 = (__pyx_t_6 != 0);
      if (__pyx_t_8) {

        /* "Cython/Tempita/_tempita.py":969
 *     var = parts[0].strip()
 *     if ',' in var:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "Cython/Tempita/_tempita.py":971
 *         raise TemplateError(
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     if not var_re.search(var):
 *         raise TemplateError(
 */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 971, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":969
 *     var = parts[0].strip()
 *     if ',' in var:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__79, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 969, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":968
 *             position=pos, name=name)
 *     var = parts[0].strip()
 *     if ',' in var:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "{{default x, y = ...}} is not supported",
 */
      }

      /* "Cython/Tempita/_tempita.py":972
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 *     if not var_re.search(var):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "Not a valid variable name for {{default}}: %r"
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_var_re); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_search); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_var); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_var};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_var};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_var);
          __Pyx_GIVEREF(__pyx_v_var);
          PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_var);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __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_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 972, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = ((!__pyx_t_8) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":973
 *             position=pos, name=name)
 *     if not var_re.search(var):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":975
 *         raise TemplateError(
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)             # <<<<<<<<<<<<<<
 *     expr = parts[1].strip()
 *     return ('default', pos, var, expr), tokens[1:]
 */
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Not_a_valid_variable_name_for_de, __pyx_v_var); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 975, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "Cython/Tempita/_tempita.py":973
 *             position=pos, name=name)
 *     if not var_re.search(var):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)
 */
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":975
 *         raise TemplateError(
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)             # <<<<<<<<<<<<<<
 *     expr = parts[1].strip()
 *     return ('default', pos, var, expr), tokens[1:]
 */
        __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 975, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 975, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 975, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":973
 *             position=pos, name=name)
 *     if not var_re.search(var):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 973, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":972
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 *     if not var_re.search(var):             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "Not a valid variable name for {{default}}: %r"
 */
      }

      /* "Cython/Tempita/_tempita.py":976
 *             "Not a valid variable name for {{default}}: %r"
 *             % var, position=pos, name=name)
 *     expr = parts[1].strip()             # <<<<<<<<<<<<<<
 *     return ('default', pos, var, expr), tokens[1:]
 * 
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_parts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_expr = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":977
 *             % var, position=pos, name=name)
 *     expr = parts[1].strip()
 *     return ('default', pos, var, expr), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_n_s_default);
      __Pyx_GIVEREF(__pyx_n_s_default);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_default);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
      __Pyx_INCREF(__pyx_v_var);
      __Pyx_GIVEREF(__pyx_v_var);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_var);
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_expr);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__80, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
      __pyx_t_2 = 0;
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":958
 * 
 * 
 * def parse_default(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 */

      /* 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("Cython.Tempita._tempita.parse_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_first);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XDECREF(__pyx_v_parts);
      __Pyx_XDECREF(__pyx_v_var);
      __Pyx_XDECREF(__pyx_v_expr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":980
 * 
 * 
 * def parse_inherit(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_33parse_inherit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_33parse_inherit = {"parse_inherit", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_33parse_inherit, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_33parse_inherit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      CYTHON_UNUSED PyObject *__pyx_v_name = 0;
      CYTHON_UNUSED PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_inherit (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_inherit", 1, 3, 3, 1); __PYX_ERR(0, 980, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_inherit", 1, 3, 3, 2); __PYX_ERR(0, 980, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_inherit") < 0)) __PYX_ERR(0, 980, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_inherit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 980, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_32parse_inherit(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_32parse_inherit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, CYTHON_UNUSED PyObject *__pyx_v_name, CYTHON_UNUSED PyObject *__pyx_v_context) {
      PyObject *__pyx_v_first = NULL;
      PyObject *__pyx_v_pos = NULL;
      PyObject *__pyx_v_expr = 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)(PyObject *);
      int __pyx_t_6;
      __Pyx_RefNannySetupContext("parse_inherit", 0);

      /* "Cython/Tempita/_tempita.py":981
 * 
 * def parse_inherit(tokens, name, context):
 *     first, pos = tokens[0]             # <<<<<<<<<<<<<<
 *     assert first.startswith('inherit ')
 *     expr = first.split(None, 1)[1]
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 981, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 981, __pyx_L1_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 981, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_first = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_pos = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":982
 * def parse_inherit(tokens, name, context):
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')             # <<<<<<<<<<<<<<
 *     expr = first.split(None, 1)[1]
 *     return ('inherit', pos, expr), tokens[1:]
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 982, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 982, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 982, __pyx_L1_error)
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":983
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 *     expr = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     return ('inherit', pos, expr), tokens[1:]
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_expr = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":984
 *     assert first.startswith('inherit ')
 *     expr = first.split(None, 1)[1]
 *     return ('inherit', pos, expr), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_inherit_2);
      __Pyx_GIVEREF(__pyx_n_s_inherit_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_inherit_2);
      __Pyx_INCREF(__pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_pos);
      __Pyx_INCREF(__pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_expr);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__83, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_3 = 0;
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":980
 * 
 * 
 * def parse_inherit(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 */

      /* 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("Cython.Tempita._tempita.parse_inherit", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_first);
      __Pyx_XDECREF(__pyx_v_pos);
      __Pyx_XDECREF(__pyx_v_expr);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":987
 * 
 * 
 * def parse_def(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_35parse_def(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_35parse_def = {"parse_def", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_35parse_def, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_35parse_def(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_tokens = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_context = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_def (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tokens,&__pyx_n_s_name,&__pyx_n_s_context,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_tokens)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_def", 1, 3, 3, 1); __PYX_ERR(0, 987, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_context)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_def", 1, 3, 3, 2); __PYX_ERR(0, 987, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_def") < 0)) __PYX_ERR(0, 987, __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_tokens = values[0];
        __pyx_v_name = values[1];
        __pyx_v_context = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_def", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 987, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_def", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_34parse_def(__pyx_self, __pyx_v_tokens, __pyx_v_name, __pyx_v_context);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_34parse_def(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_tokens, PyObject *__pyx_v_name, PyObject *__pyx_v_context) {
      PyObject *__pyx_v_first = NULL;
      PyObject *__pyx_v_start = NULL;
      PyObject *__pyx_v_func_name = NULL;
      PyObject *__pyx_v_sig = NULL;
      PyObject *__pyx_v_sig_text = NULL;
      PyObject *__pyx_v_content = NULL;
      PyObject *__pyx_v_next_chunk = 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)(PyObject *);
      int __pyx_t_6;
      int __pyx_t_7;
      int __pyx_t_8;
      int __pyx_t_9;
      int __pyx_t_10;
      __Pyx_RefNannySetupContext("parse_def", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":988
 * 
 * def parse_def(tokens, name, context):
 *     first, start = tokens[0]             # <<<<<<<<<<<<<<
 *     tokens = tokens[1:]
 *     assert first.startswith('def ')
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 988, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 988, __pyx_L1_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 988, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_first = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_start = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":989
 * def parse_def(tokens, name, context):
 *     first, start = tokens[0]
 *     tokens = tokens[1:]             # <<<<<<<<<<<<<<
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]
 */
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__84, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":990
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 *     assert first.startswith('def ')             # <<<<<<<<<<<<<<
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__85, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 990, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 990, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          __PYX_ERR(0, 990, __pyx_L1_error)
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":991
 *     tokens = tokens[1:]
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     if first.endswith(':'):
 *         first = first[:-1]
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":992
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if '(' not in first:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __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_ERR(0, 992, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":993
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     if '(' not in first:
 *         func_name = first
 */
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, -1L, NULL, NULL, &__pyx_slice__88, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":992
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if '(' not in first:
 */
      }

      /* "Cython/Tempita/_tempita.py":994
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if '(' not in first:             # <<<<<<<<<<<<<<
 *         func_name = first
 *         sig = ((), None, None, {})
 */
      __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__70, __pyx_v_first, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 994, __pyx_L1_error)
      __pyx_t_7 = (__pyx_t_6 != 0);
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":995
 *         first = first[:-1]
 *     if '(' not in first:
 *         func_name = first             # <<<<<<<<<<<<<<
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):
 */
        __Pyx_INCREF(__pyx_v_first);
        __pyx_v_func_name = __pyx_v_first;

        /* "Cython/Tempita/_tempita.py":996
 *     if '(' not in first:
 *         func_name = first
 *         sig = ((), None, None, {})             # <<<<<<<<<<<<<<
 *     elif not first.endswith(')'):
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 */
        __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 996, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_empty_tuple);
        __Pyx_GIVEREF(__pyx_empty_tuple);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_empty_tuple);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_v_sig = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":994
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if '(' not in first:             # <<<<<<<<<<<<<<
 *         func_name = first
 *         sig = ((), None, None, {})
 */
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":997
 *         func_name = first
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):             # <<<<<<<<<<<<<<
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 *                             position=start, name=name)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 997, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = ((!__pyx_t_7) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":998
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,             # <<<<<<<<<<<<<<
 *                             position=start, name=name)
 *     else:
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Function_definition_doesn_t_end, __pyx_v_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":999
 *     elif not first.endswith(')'):
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 *                             position=start, name=name)             # <<<<<<<<<<<<<<
 *     else:
 *         first = first[:-1]
 */
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_start) < 0) __PYX_ERR(0, 999, __pyx_L1_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 999, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":998
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,             # <<<<<<<<<<<<<<
 *                             position=start, name=name)
 *     else:
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 998, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 998, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":997
 *         func_name = first
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):             # <<<<<<<<<<<<<<
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 *                             position=start, name=name)
 */
      }

      /* "Cython/Tempita/_tempita.py":1001
 *                             position=start, name=name)
 *     else:
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 */
      /*else*/ {
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, -1L, NULL, NULL, &__pyx_slice__91, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1001, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1002
 *     else:
 *         first = first[:-1]
 *         func_name, sig_text = first.split('(', 1)             # <<<<<<<<<<<<<<
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1002, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
          PyObject* sequence = __pyx_t_3;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 1002, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1002, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1002, __pyx_L1_error)
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1002, __pyx_L1_error)
          __pyx_L8_unpacking_done:;
        }
        __pyx_v_func_name = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_v_sig_text = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":1003
 *         first = first[:-1]
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)             # <<<<<<<<<<<<<<
 *     context = context + ('def',)
 *     content = []
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_signature_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_sig_text, __pyx_v_name, __pyx_v_start};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
          PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_sig_text, __pyx_v_name, __pyx_v_start};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        {
          __pyx_t_1 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__pyx_t_4) {
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
          }
          __Pyx_INCREF(__pyx_v_sig_text);
          __Pyx_GIVEREF(__pyx_v_sig_text);
          PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_v_sig_text);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_start);
          __Pyx_GIVEREF(__pyx_v_start);
          PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_8, __pyx_v_start);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1003, __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_sig = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L6:;

      /* "Cython/Tempita/_tempita.py":1004
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)             # <<<<<<<<<<<<<<
 *     content = []
 *     while 1:
 */
      __pyx_t_3 = PyNumber_Add(__pyx_v_context, __pyx_tuple__93); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1004, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1005
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)
 *     content = []             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_content = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1006
 *     context = context + ('def',)
 *     content = []
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":1007
 *     content = []
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'Missing {{enddef}}',
 */
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1007, __pyx_L1_error)
        __pyx_t_7 = ((!__pyx_t_6) != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1008
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 */
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);

          /* "Cython/Tempita/_tempita.py":1010
 *             raise TemplateError(
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'enddef'):
 */
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_start) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 1010, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1008
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 */
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__94, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __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_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 1008, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1007
 *     content = []
 *     while 1:
 *         if not tokens:             # <<<<<<<<<<<<<<
 *             raise TemplateError(
 *                 'Missing {{enddef}}',
 */
        }

        /* "Cython/Tempita/_tempita.py":1011
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyTuple_Check(__pyx_t_1); 
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = (__pyx_t_6 != 0);
        if (__pyx_t_9) {
        } else {
          __pyx_t_7 = __pyx_t_9;
          goto __pyx_L13_bool_binop_done;
        }

        /* "Cython/Tempita/_tempita.py":1012
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'enddef'):             # <<<<<<<<<<<<<<
 *             return ('def', start, func_name, sig, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 */
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_enddef, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1012, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __pyx_t_9;
        __pyx_L13_bool_binop_done:;

        /* "Cython/Tempita/_tempita.py":1011
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]
 */
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1013
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_n_s_def);
          __Pyx_GIVEREF(__pyx_n_s_def);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_def);
          __Pyx_INCREF(__pyx_v_start);
          __Pyx_GIVEREF(__pyx_v_start);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start);
          __Pyx_INCREF(__pyx_v_func_name);
          __Pyx_GIVEREF(__pyx_v_func_name);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_func_name);
          __Pyx_INCREF(__pyx_v_sig);
          __Pyx_GIVEREF(__pyx_v_sig);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_sig);
          __Pyx_INCREF(__pyx_v_content);
          __Pyx_GIVEREF(__pyx_v_content);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_content);
          __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__95, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
          __pyx_t_2 = 0;
          __pyx_t_1 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;

          /* "Cython/Tempita/_tempita.py":1011
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 *         if (isinstance(tokens[0], tuple)             # <<<<<<<<<<<<<<
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]
 */
        }

        /* "Cython/Tempita/_tempita.py":1014
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)             # <<<<<<<<<<<<<<
 *         content.append(next_chunk)
 * 
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        __pyx_t_8 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_tokens, __pyx_v_name, __pyx_v_context};
          __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_2) {
            __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
          }
          __Pyx_INCREF(__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_v_tokens);
          __Pyx_INCREF(__pyx_v_name);
          __Pyx_GIVEREF(__pyx_v_name);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_v_name);
          __Pyx_INCREF(__pyx_v_context);
          __Pyx_GIVEREF(__pyx_v_context);
          PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_8, __pyx_v_context);
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
          PyObject* sequence = __pyx_t_3;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 1014, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
          index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1014, __pyx_L1_error)
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L16_unpacking_done;
          __pyx_L15_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1014, __pyx_L1_error)
          __pyx_L16_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1015
 *             return ('def', start, func_name, sig, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_content, __pyx_v_next_chunk); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1015, __pyx_L1_error)
      }

      /* "Cython/Tempita/_tempita.py":987
 * 
 * 
 * def parse_def(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, start = tokens[0]
 *     tokens = tokens[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("Cython.Tempita._tempita.parse_def", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_first);
      __Pyx_XDECREF(__pyx_v_start);
      __Pyx_XDECREF(__pyx_v_func_name);
      __Pyx_XDECREF(__pyx_v_sig);
      __Pyx_XDECREF(__pyx_v_sig_text);
      __Pyx_XDECREF(__pyx_v_content);
      __Pyx_XDECREF(__pyx_v_next_chunk);
      __Pyx_XDECREF(__pyx_v_tokens);
      __Pyx_XDECREF(__pyx_v_context);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_37parse_signature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_37parse_signature = {"parse_signature", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_37parse_signature, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_37parse_signature(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_sig_text = 0;
      PyObject *__pyx_v_name = 0;
      PyObject *__pyx_v_pos = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_signature (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sig_text,&__pyx_n_s_name,&__pyx_n_s_pos,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_sig_text)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_signature", 1, 3, 3, 1); __PYX_ERR(0, 1018, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("parse_signature", 1, 3, 3, 2); __PYX_ERR(0, 1018, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_signature") < 0)) __PYX_ERR(0, 1018, __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_sig_text = values[0];
        __pyx_v_name = values[1];
        __pyx_v_pos = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("parse_signature", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1018, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_36parse_signature(__pyx_self, __pyx_v_sig_text, __pyx_v_name, __pyx_v_pos);

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

    /* "Cython/Tempita/_tempita.py":1025
 *     defaults = {}
 * 
 *     def get_token(pos=False):             # <<<<<<<<<<<<<<
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_15parse_signature_1get_token(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_15parse_signature_1get_token = {"get_token", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_15parse_signature_1get_token, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_15parse_signature_1get_token(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_pos = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_token (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,0};
        PyObject* values[1] = {0};
        values[0] = ((PyObject *)((PyObject *)Py_False));
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pos);
              if (value) { values[0] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_token") < 0)) __PYX_ERR(0, 1025, __pyx_L3_error)
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_pos = values[0];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get_token", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1025, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_signature.get_token", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_15parse_signature_get_token(__pyx_self, __pyx_v_pos);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_15parse_signature_get_token(PyObject *__pyx_self, PyObject *__pyx_v_pos) {
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *__pyx_cur_scope;
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *__pyx_outer_scope;
      PyObject *__pyx_v_tok_type = NULL;
      PyObject *__pyx_v_tok_string = NULL;
      PyObject *__pyx_v_srow = NULL;
      PyObject *__pyx_v_scol = NULL;
      PyObject *__pyx_v_erow = NULL;
      PyObject *__pyx_v_ecol = NULL;
      CYTHON_UNUSED PyObject *__pyx_v_line = 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;
      PyObject *__pyx_t_7 = NULL;
      PyObject *__pyx_t_8 = NULL;
      PyObject *__pyx_t_9 = NULL;
      PyObject *__pyx_t_10 = NULL;
      PyObject *(*__pyx_t_11)(PyObject *);
      PyObject *__pyx_t_12 = NULL;
      PyObject *__pyx_t_13 = NULL;
      int __pyx_t_14;
      int __pyx_t_15;
      __Pyx_RefNannySetupContext("get_token", 0);
      __pyx_outer_scope = (struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *) __Pyx_CyFunction_GetClosure(__pyx_self);
      __pyx_cur_scope = __pyx_outer_scope;

      /* "Cython/Tempita/_tempita.py":1026
 * 
 *     def get_token(pos=False):
 *         try:             # <<<<<<<<<<<<<<
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __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:*/ {

          /* "Cython/Tempita/_tempita.py":1027
 *     def get_token(pos=False):
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             return tokenize.ENDMARKER, ''
 */
          __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_next); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1027, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          if (unlikely(!__pyx_cur_scope->__pyx_v_tokens)) { __Pyx_RaiseClosureNameError("tokens"); __PYX_ERR(0, 1027, __pyx_L3_error) }
          __pyx_t_6 = NULL;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
            }
          }
          if (!__pyx_t_6) {
            __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_tokens); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          } else {
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_tokens};
              __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
              PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_tokens};
              __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_GOTREF(__pyx_t_4);
            } else
            #endif
            {
              __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1027, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
              __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tokens);
              __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tokens);
              PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_tokens);
              __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1027, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            }
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
            PyObject* sequence = __pyx_t_4;
            #if !CYTHON_COMPILING_IN_PYPY
            Py_ssize_t size = Py_SIZE(sequence);
            #else
            Py_ssize_t size = PySequence_Size(sequence);
            #endif
            if (unlikely(size != 5)) {
              if (size > 5) __Pyx_RaiseTooManyValuesError(5);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 1027, __pyx_L3_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
              __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
              __pyx_t_9 = PyTuple_GET_ITEM(sequence, 4); 
            } else {
              __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
              __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
              __pyx_t_9 = PyList_GET_ITEM(sequence, 4); 
            }
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_7,&__pyx_t_6,&__pyx_t_8,&__pyx_t_9};
              for (i=0; i < 5; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1027, __pyx_L3_error)
                __Pyx_GOTREF(item);
                *(temps[i]) = item;
              }
            }
            #endif
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else {
            Py_ssize_t index = -1;
            PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_7,&__pyx_t_6,&__pyx_t_8,&__pyx_t_9};
            __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
            for (index=0; index < 5; index++) {
              PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L11_unpacking_failed;
              __Pyx_GOTREF(item);
              *(temps[index]) = item;
            }
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 5) < 0) __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_t_11 = NULL;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            goto __pyx_L12_unpacking_done;
            __pyx_L11_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_11 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_L12_unpacking_done:;
          }
          __pyx_v_tok_type = __pyx_t_5;
          __pyx_t_5 = 0;
          __pyx_v_tok_string = __pyx_t_7;
          __pyx_t_7 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
            PyObject* sequence = __pyx_t_6;
            #if !CYTHON_COMPILING_IN_PYPY
            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_ERR(0, 1027, __pyx_L3_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_12 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_12);
            #else
            __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_12);
            #endif
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_13 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext;
            index = 0; __pyx_t_10 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_10);
            index = 1; __pyx_t_12 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L13_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_12);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_t_11 = NULL;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L14_unpacking_done;
            __pyx_L13_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_11 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_L14_unpacking_done:;
          }
          __pyx_v_srow = __pyx_t_10;
          __pyx_t_10 = 0;
          __pyx_v_scol = __pyx_t_12;
          __pyx_t_12 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
            PyObject* sequence = __pyx_t_8;
            #if !CYTHON_COMPILING_IN_PYPY
            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_ERR(0, 1027, __pyx_L3_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_10);
            #else
            __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_10);
            #endif
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_13 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1027, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_11 = Py_TYPE(__pyx_t_13)->tp_iternext;
            index = 0; __pyx_t_12 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L15_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_12);
            index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_13); if (unlikely(!__pyx_t_10)) goto __pyx_L15_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_10);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_t_11 = NULL;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L16_unpacking_done;
            __pyx_L15_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_11 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1027, __pyx_L3_error)
            __pyx_L16_unpacking_done:;
          }
          __pyx_v_erow = __pyx_t_12;
          __pyx_t_12 = 0;
          __pyx_v_ecol = __pyx_t_10;
          __pyx_t_10 = 0;
          __pyx_v_line = __pyx_t_9;
          __pyx_t_9 = 0;

          /* "Cython/Tempita/_tempita.py":1026
 * 
 *     def get_token(pos=False):
 *         try:             # <<<<<<<<<<<<<<
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:
 */
        }
        __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_PyThreadState_assign
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1028
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:             # <<<<<<<<<<<<<<
 *             return tokenize.ENDMARKER, ''
 *         if pos:
 */
        __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration);
        if (__pyx_t_14) {
          __Pyx_AddTraceback("Cython.Tempita._tempita.parse_signature.get_token", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 1028, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GOTREF(__pyx_t_8);

          /* "Cython/Tempita/_tempita.py":1029
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:
 *             return tokenize.ENDMARKER, ''             # <<<<<<<<<<<<<<
 *         if pos:
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1029, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1029, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
          __Pyx_INCREF(__pyx_kp_s__9);
          __Pyx_GIVEREF(__pyx_kp_s__9);
          PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s__9);
          __pyx_t_7 = 0;
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;
        __pyx_L5_except_error:;

        /* "Cython/Tempita/_tempita.py":1026
 * 
 *     def get_token(pos=False):
 *         try:             # <<<<<<<<<<<<<<
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:
 */
        __Pyx_PyThreadState_assign
        __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_L6_except_return:;
        __Pyx_PyThreadState_assign
        __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_L10_try_end:;
      }

      /* "Cython/Tempita/_tempita.py":1030
 *         except StopIteration:
 *             return tokenize.ENDMARKER, ''
 *         if pos:             # <<<<<<<<<<<<<<
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)
 *         else:
 */
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_pos); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1030, __pyx_L1_error)
      if (__pyx_t_15) {

        /* "Cython/Tempita/_tempita.py":1031
 *             return tokenize.ENDMARKER, ''
 *         if pos:
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)             # <<<<<<<<<<<<<<
 *         else:
 *             return tok_type, tok_string
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_srow);
        __Pyx_GIVEREF(__pyx_v_srow);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_srow);
        __Pyx_INCREF(__pyx_v_scol);
        __Pyx_GIVEREF(__pyx_v_scol);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_scol);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_erow);
        __Pyx_GIVEREF(__pyx_v_erow);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_erow);
        __Pyx_INCREF(__pyx_v_ecol);
        __Pyx_GIVEREF(__pyx_v_ecol);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ecol);
        __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_tok_type);
        __Pyx_GIVEREF(__pyx_v_tok_type);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tok_type);
        __Pyx_INCREF(__pyx_v_tok_string);
        __Pyx_GIVEREF(__pyx_v_tok_string);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tok_string);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "Cython/Tempita/_tempita.py":1030
 *         except StopIteration:
 *             return tokenize.ENDMARKER, ''
 *         if pos:             # <<<<<<<<<<<<<<
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)
 *         else:
 */
      }

      /* "Cython/Tempita/_tempita.py":1033
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)
 *         else:
 *             return tok_type, tok_string             # <<<<<<<<<<<<<<
 *     while 1:
 *         var_arg_type = None
 */
      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_tok_type);
        __Pyx_GIVEREF(__pyx_v_tok_type);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tok_type);
        __Pyx_INCREF(__pyx_v_tok_string);
        __Pyx_GIVEREF(__pyx_v_tok_string);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tok_string);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":1025
 *     defaults = {}
 * 
 *     def get_token(pos=False):             # <<<<<<<<<<<<<<
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 */

      /* 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_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_signature.get_token", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_tok_type);
      __Pyx_XDECREF(__pyx_v_tok_string);
      __Pyx_XDECREF(__pyx_v_srow);
      __Pyx_XDECREF(__pyx_v_scol);
      __Pyx_XDECREF(__pyx_v_erow);
      __Pyx_XDECREF(__pyx_v_ecol);
      __Pyx_XDECREF(__pyx_v_line);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_36parse_signature(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sig_text, PyObject *__pyx_v_name, PyObject *__pyx_v_pos) {
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *__pyx_cur_scope;
      PyObject *__pyx_v_sig_args = NULL;
      PyObject *__pyx_v_var_arg = NULL;
      PyObject *__pyx_v_var_kw = NULL;
      PyObject *__pyx_v_defaults = NULL;
      PyObject *__pyx_v_get_token = 0;
      PyObject *__pyx_v_var_arg_type = NULL;
      PyObject *__pyx_v_tok_type = NULL;
      PyObject *__pyx_v_tok_string = NULL;
      PyObject *__pyx_v_var_name = NULL;
      PyObject *__pyx_v_nest_type = NULL;
      PyObject *__pyx_v_unnest_type = NULL;
      PyObject *__pyx_v_nest_count = NULL;
      PyObject *__pyx_v_start_pos = NULL;
      PyObject *__pyx_v_end_pos = NULL;
      PyObject *__pyx_v_parts = NULL;
      PyObject *__pyx_v_s = NULL;
      PyObject *__pyx_v_e = NULL;
      PyObject *__pyx_v_default_expr = 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;
      PyObject *(*__pyx_t_7)(PyObject *);
      int __pyx_t_8;
      int __pyx_t_9;
      int __pyx_t_10;
      int __pyx_t_11;
      int __pyx_t_12;
      __Pyx_RefNannySetupContext("parse_signature", 0);
      __pyx_cur_scope = (struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)__pyx_tp_new_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(__pyx_ptype_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature, __pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(0, 1018, __pyx_L1_error)
      } else {
        __Pyx_GOTREF(__pyx_cur_scope);
      }

      /* "Cython/Tempita/_tempita.py":1019
 * 
 * def parse_signature(sig_text, name, pos):
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)             # <<<<<<<<<<<<<<
 *     sig_args = []
 *     var_arg = None
 */
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_sig_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_sig_text};
          __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_sig_text};
          __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_sig_text);
          __Pyx_GIVEREF(__pyx_v_sig_text);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_sig_text);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_readline); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1019, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_2) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
          PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_v_tokens = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1020
 * def parse_signature(sig_text, name, pos):
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []             # <<<<<<<<<<<<<<
 *     var_arg = None
 *     var_kw = None
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_sig_args = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1021
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 *     var_arg = None             # <<<<<<<<<<<<<<
 *     var_kw = None
 *     defaults = {}
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_var_arg = Py_None;

      /* "Cython/Tempita/_tempita.py":1022
 *     sig_args = []
 *     var_arg = None
 *     var_kw = None             # <<<<<<<<<<<<<<
 *     defaults = {}
 * 
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_var_kw = Py_None;

      /* "Cython/Tempita/_tempita.py":1023
 *     var_arg = None
 *     var_kw = None
 *     defaults = {}             # <<<<<<<<<<<<<<
 * 
 *     def get_token(pos=False):
 */
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_defaults = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1025
 *     defaults = {}
 * 
 *     def get_token(pos=False):             # <<<<<<<<<<<<<<
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 */
      __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_15parse_signature_1get_token, 0, __pyx_n_s_parse_signature_locals_get_token, ((PyObject*)__pyx_cur_scope), __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__98);
      __pyx_v_get_token = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1034
 *         else:
 *             return tok_type, tok_string
 *     while 1:             # <<<<<<<<<<<<<<
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":1035
 *             return tok_type, tok_string
 *     while 1:
 *         var_arg_type = None             # <<<<<<<<<<<<<<
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER:
 */
        __Pyx_INCREF(Py_None);
        __Pyx_XDECREF_SET(__pyx_v_var_arg_type, Py_None);

        /* "Cython/Tempita/_tempita.py":1036
 *     while 1:
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()             # <<<<<<<<<<<<<<
 *         if tok_type == tokenize.ENDMARKER:
 *             break
 */
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_v_get_token); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 1036, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1036, __pyx_L1_error)
          __pyx_t_7 = NULL;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L6_unpacking_done;
          __pyx_L5_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1036, __pyx_L1_error)
          __pyx_L6_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_tok_type, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tok_string, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1037
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER:             # <<<<<<<<<<<<<<
 *             break
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1037, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1037, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1038
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER:
 *             break             # <<<<<<<<<<<<<<
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):
 *             var_arg_type = tok_string
 */
          goto __pyx_L4_break;

          /* "Cython/Tempita/_tempita.py":1037
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER:             # <<<<<<<<<<<<<<
 *             break
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):
 */
        }

        /* "Cython/Tempita/_tempita.py":1039
 *         if tok_type == tokenize.ENDMARKER:
 *             break
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):             # <<<<<<<<<<<<<<
 *             var_arg_type = tok_string
 *             tok_type, tok_string = get_token()
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__99, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error)
        if (!__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L9_bool_binop_done;
        }
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__100, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __pyx_t_8 = __pyx_t_9;
        __pyx_L9_bool_binop_done:;
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1040
 *             break
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):
 *             var_arg_type = tok_string             # <<<<<<<<<<<<<<
 *             tok_type, tok_string = get_token()
 *         if tok_type != tokenize.NAME:
 */
          __Pyx_INCREF(__pyx_v_tok_string);
          __Pyx_DECREF_SET(__pyx_v_var_arg_type, __pyx_v_tok_string);

          /* "Cython/Tempita/_tempita.py":1041
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):
 *             var_arg_type = tok_string
 *             tok_type, tok_string = get_token()             # <<<<<<<<<<<<<<
 *         if tok_type != tokenize.NAME:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 */
          __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_v_get_token); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
            PyObject* sequence = __pyx_t_1;
            #if !CYTHON_COMPILING_IN_PYPY
            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_ERR(0, 1041, __pyx_L1_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_3);
            #else
            __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1041, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1041, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;
            index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_6);
            index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L12_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_3);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1041, __pyx_L1_error)
            __pyx_t_7 = NULL;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L13_unpacking_done;
            __pyx_L12_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_7 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 1041, __pyx_L1_error)
            __pyx_L13_unpacking_done:;
          }
          __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "Cython/Tempita/_tempita.py":1039
 *         if tok_type == tokenize.ENDMARKER:
 *             break
 *         if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'):             # <<<<<<<<<<<<<<
 *             var_arg_type = tok_string
 *             tok_type, tok_string = get_token()
 */
        }

        /* "Cython/Tempita/_tempita.py":1042
 *             var_arg_type = tok_string
 *             tok_type, tok_string = get_token()
 *         if tok_type != tokenize.NAME:             # <<<<<<<<<<<<<<
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_NAME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1042, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1043
 *             tok_type, tok_string = get_token()
 *         if tok_type != tokenize.NAME:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                 position=pos, name=name)
 *         var_name = tok_string
 */
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1043, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "Cython/Tempita/_tempita.py":1044
 *         if tok_type != tokenize.NAME:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         var_name = tok_string
 *         tok_type, tok_string = get_token()
 */
          __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1043
 *             tok_type, tok_string = get_token()
 *         if tok_type != tokenize.NAME:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                 position=pos, name=name)
 *         var_name = tok_string
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __PYX_ERR(0, 1043, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1042
 *             var_arg_type = tok_string
 *             tok_type, tok_string = get_token()
 *         if tok_type != tokenize.NAME:             # <<<<<<<<<<<<<<
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 */
        }

        /* "Cython/Tempita/_tempita.py":1045
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 *         var_name = tok_string             # <<<<<<<<<<<<<<
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):
 */
        __Pyx_INCREF(__pyx_v_tok_string);
        __Pyx_XDECREF_SET(__pyx_v_var_name, __pyx_v_tok_string);

        /* "Cython/Tempita/_tempita.py":1046
 *                                 position=pos, name=name)
 *         var_name = tok_string
 *         tok_type, tok_string = get_token()             # <<<<<<<<<<<<<<
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):
 *             if var_arg_type == '*':
 */
        __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_v_get_token); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 1046, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
          __pyx_t_7 = NULL;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L16_unpacking_done;
          __pyx_L15_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_7 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1046, __pyx_L1_error)
          __pyx_L16_unpacking_done:;
        }
        __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1047
 *         var_name = tok_string
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):             # <<<<<<<<<<<<<<
 *             if var_arg_type == '*':
 *                 var_arg = var_name
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (!__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_OP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_9) {
        } else {
          __pyx_t_8 = __pyx_t_9;
          goto __pyx_L18_bool_binop_done;
        }
        __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__71, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1047, __pyx_L1_error)
        __pyx_t_8 = __pyx_t_9;
        __pyx_L18_bool_binop_done:;
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1048
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):
 *             if var_arg_type == '*':             # <<<<<<<<<<<<<<
 *                 var_arg = var_name
 *             elif var_arg_type == '**':
 */
          __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_var_arg_type, __pyx_kp_s__99, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1048, __pyx_L1_error)
          if (__pyx_t_8) {

            /* "Cython/Tempita/_tempita.py":1049
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):
 *             if var_arg_type == '*':
 *                 var_arg = var_name             # <<<<<<<<<<<<<<
 *             elif var_arg_type == '**':
 *                 var_kw = var_name
 */
            __Pyx_INCREF(__pyx_v_var_name);
            __Pyx_DECREF_SET(__pyx_v_var_arg, __pyx_v_var_name);

            /* "Cython/Tempita/_tempita.py":1048
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):
 *             if var_arg_type == '*':             # <<<<<<<<<<<<<<
 *                 var_arg = var_name
 *             elif var_arg_type == '**':
 */
            goto __pyx_L21;
          }

          /* "Cython/Tempita/_tempita.py":1050
 *             if var_arg_type == '*':
 *                 var_arg = var_name
 *             elif var_arg_type == '**':             # <<<<<<<<<<<<<<
 *                 var_kw = var_name
 *             else:
 */
          __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_var_arg_type, __pyx_kp_s__100, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1050, __pyx_L1_error)
          if (__pyx_t_8) {

            /* "Cython/Tempita/_tempita.py":1051
 *                 var_arg = var_name
 *             elif var_arg_type == '**':
 *                 var_kw = var_name             # <<<<<<<<<<<<<<
 *             else:
 *                 sig_args.append(var_name)
 */
            __Pyx_INCREF(__pyx_v_var_name);
            __Pyx_DECREF_SET(__pyx_v_var_kw, __pyx_v_var_name);

            /* "Cython/Tempita/_tempita.py":1050
 *             if var_arg_type == '*':
 *                 var_arg = var_name
 *             elif var_arg_type == '**':             # <<<<<<<<<<<<<<
 *                 var_kw = var_name
 *             else:
 */
            goto __pyx_L21;
          }

          /* "Cython/Tempita/_tempita.py":1053
 *                 var_kw = var_name
 *             else:
 *                 sig_args.append(var_name)             # <<<<<<<<<<<<<<
 *             if tok_type == tokenize.ENDMARKER:
 *                 break
 */
          /*else*/ {
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_sig_args, __pyx_v_var_name); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1053, __pyx_L1_error)
          }
          __pyx_L21:;

          /* "Cython/Tempita/_tempita.py":1054
 *             else:
 *                 sig_args.append(var_name)
 *             if tok_type == tokenize.ENDMARKER:             # <<<<<<<<<<<<<<
 *                 break
 *             continue
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1054, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1054, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_8) {

            /* "Cython/Tempita/_tempita.py":1055
 *                 sig_args.append(var_name)
 *             if tok_type == tokenize.ENDMARKER:
 *                 break             # <<<<<<<<<<<<<<
 *             continue
 *         if var_arg_type is not None:
 */
            goto __pyx_L4_break;

            /* "Cython/Tempita/_tempita.py":1054
 *             else:
 *                 sig_args.append(var_name)
 *             if tok_type == tokenize.ENDMARKER:             # <<<<<<<<<<<<<<
 *                 break
 *             continue
 */
          }

          /* "Cython/Tempita/_tempita.py":1056
 *             if tok_type == tokenize.ENDMARKER:
 *                 break
 *             continue             # <<<<<<<<<<<<<<
 *         if var_arg_type is not None:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 */
          goto __pyx_L3_continue;

          /* "Cython/Tempita/_tempita.py":1047
 *         var_name = tok_string
 *         tok_type, tok_string = get_token()
 *         if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','):             # <<<<<<<<<<<<<<
 *             if var_arg_type == '*':
 *                 var_arg = var_name
 */
        }

        /* "Cython/Tempita/_tempita.py":1057
 *                 break
 *             continue
 *         if var_arg_type is not None:             # <<<<<<<<<<<<<<
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 */
        __pyx_t_8 = (__pyx_v_var_arg_type != Py_None);
        __pyx_t_9 = (__pyx_t_8 != 0);
        if (__pyx_t_9) {

          /* "Cython/Tempita/_tempita.py":1058
 *             continue
 *         if var_arg_type is not None:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                 position=pos, name=name)
 *         if tok_type == tokenize.OP and tok_string == '=':
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "Cython/Tempita/_tempita.py":1059
 *         if var_arg_type is not None:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         if tok_type == tokenize.OP and tok_string == '=':
 *             nest_type = None
 */
          __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1059, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 1059, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1058
 *             continue
 *         if var_arg_type is not None:
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                 position=pos, name=name)
 *         if tok_type == tokenize.OP and tok_string == '=':
 */
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 1058, __pyx_L1_error)

          /* "Cython/Tempita/_tempita.py":1057
 *                 break
 *             continue
 *         if var_arg_type is not None:             # <<<<<<<<<<<<<<
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 */
        }

        /* "Cython/Tempita/_tempita.py":1060
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 *         if tok_type == tokenize.OP and tok_string == '=':             # <<<<<<<<<<<<<<
 *             nest_type = None
 *             unnest_type = None
 */
        __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_8) {
        } else {
          __pyx_t_9 = __pyx_t_8;
          goto __pyx_L25_bool_binop_done;
        }
        __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__77, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1060, __pyx_L1_error)
        __pyx_t_9 = __pyx_t_8;
        __pyx_L25_bool_binop_done:;
        if (__pyx_t_9) {

          /* "Cython/Tempita/_tempita.py":1061
 *                                 position=pos, name=name)
 *         if tok_type == tokenize.OP and tok_string == '=':
 *             nest_type = None             # <<<<<<<<<<<<<<
 *             unnest_type = None
 *             nest_count = 0
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_nest_type, Py_None);

          /* "Cython/Tempita/_tempita.py":1062
 *         if tok_type == tokenize.OP and tok_string == '=':
 *             nest_type = None
 *             unnest_type = None             # <<<<<<<<<<<<<<
 *             nest_count = 0
 *             start_pos = end_pos = None
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_unnest_type, Py_None);

          /* "Cython/Tempita/_tempita.py":1063
 *             nest_type = None
 *             unnest_type = None
 *             nest_count = 0             # <<<<<<<<<<<<<<
 *             start_pos = end_pos = None
 *             parts = []
 */
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_XDECREF_SET(__pyx_v_nest_count, __pyx_int_0);

          /* "Cython/Tempita/_tempita.py":1064
 *             unnest_type = None
 *             nest_count = 0
 *             start_pos = end_pos = None             # <<<<<<<<<<<<<<
 *             parts = []
 *             while 1:
 */
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_start_pos, Py_None);
          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_end_pos, Py_None);

          /* "Cython/Tempita/_tempita.py":1065
 *             nest_count = 0
 *             start_pos = end_pos = None
 *             parts = []             # <<<<<<<<<<<<<<
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)
 */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_XDECREF_SET(__pyx_v_parts, ((PyObject*)__pyx_t_1));
          __pyx_t_1 = 0;

          /* "Cython/Tempita/_tempita.py":1066
 *             start_pos = end_pos = None
 *             parts = []
 *             while 1:             # <<<<<<<<<<<<<<
 *                 tok_type, tok_string, s, e = get_token(True)
 *                 if start_pos is None:
 */
          while (1) {

            /* "Cython/Tempita/_tempita.py":1067
 *             parts = []
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)             # <<<<<<<<<<<<<<
 *                 if start_pos is None:
 *                     start_pos = s
 */
            __pyx_t_1 = __pyx_pf_6Cython_7Tempita_8_tempita_15parse_signature_get_token(__pyx_v_get_token, Py_True); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
              PyObject* sequence = __pyx_t_1;
              #if !CYTHON_COMPILING_IN_PYPY
              Py_ssize_t size = Py_SIZE(sequence);
              #else
              Py_ssize_t size = PySequence_Size(sequence);
              #endif
              if (unlikely(size != 4)) {
                if (size > 4) __Pyx_RaiseTooManyValuesError(4);
                else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                __PYX_ERR(0, 1067, __pyx_L1_error)
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
                __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
                __pyx_t_2 = PyTuple_GET_ITEM(sequence, 3); 
              } else {
                __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
                __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
                __pyx_t_2 = PyList_GET_ITEM(sequence, 3); 
              }
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2};
                for (i=0; i < 4; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1067, __pyx_L1_error)
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            } else {
              Py_ssize_t index = -1;
              PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_3,&__pyx_t_4,&__pyx_t_2};
              __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1067, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
              for (index=0; index < 4; index++) {
                PyObject* item = __pyx_t_7(__pyx_t_5); if (unlikely(!item)) goto __pyx_L29_unpacking_failed;
                __Pyx_GOTREF(item);
                *(temps[index]) = item;
              }
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 4) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
              __pyx_t_7 = NULL;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              goto __pyx_L30_unpacking_done;
              __pyx_L29_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_7 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              __PYX_ERR(0, 1067, __pyx_L1_error)
              __pyx_L30_unpacking_done:;
            }
            __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_6);
            __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_3);
            __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "Cython/Tempita/_tempita.py":1068
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)
 *                 if start_pos is None:             # <<<<<<<<<<<<<<
 *                     start_pos = s
 *                 end_pos = e
 */
            __pyx_t_9 = (__pyx_v_start_pos == Py_None);
            __pyx_t_8 = (__pyx_t_9 != 0);
            if (__pyx_t_8) {

              /* "Cython/Tempita/_tempita.py":1069
 *                 tok_type, tok_string, s, e = get_token(True)
 *                 if start_pos is None:
 *                     start_pos = s             # <<<<<<<<<<<<<<
 *                 end_pos = e
 *                 if tok_type == tokenize.ENDMARKER and nest_count:
 */
              __Pyx_INCREF(__pyx_v_s);
              __Pyx_DECREF_SET(__pyx_v_start_pos, __pyx_v_s);

              /* "Cython/Tempita/_tempita.py":1068
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)
 *                 if start_pos is None:             # <<<<<<<<<<<<<<
 *                     start_pos = s
 *                 end_pos = e
 */
            }

            /* "Cython/Tempita/_tempita.py":1070
 *                 if start_pos is None:
 *                     start_pos = s
 *                 end_pos = e             # <<<<<<<<<<<<<<
 *                 if tok_type == tokenize.ENDMARKER and nest_count:
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 */
            __Pyx_INCREF(__pyx_v_e);
            __Pyx_DECREF_SET(__pyx_v_end_pos, __pyx_v_e);

            /* "Cython/Tempita/_tempita.py":1071
 *                     start_pos = s
 *                 end_pos = e
 *                 if tok_type == tokenize.ENDMARKER and nest_count:             # <<<<<<<<<<<<<<
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)
 */
            __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1071, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (__pyx_t_9) {
            } else {
              __pyx_t_8 = __pyx_t_9;
              goto __pyx_L33_bool_binop_done;
            }
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1071, __pyx_L1_error)
            __pyx_t_8 = __pyx_t_9;
            __pyx_L33_bool_binop_done:;
            if (__pyx_t_8) {

              /* "Cython/Tempita/_tempita.py":1072
 *                 end_pos = e
 *                 if tok_type == tokenize.ENDMARKER and nest_count:
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                         position=pos, name=name)
 *                 if (not nest_count and
 */
              __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1072, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1072, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_GIVEREF(__pyx_t_2);
              PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "Cython/Tempita/_tempita.py":1073
 *                 if tok_type == tokenize.ENDMARKER and nest_count:
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)             # <<<<<<<<<<<<<<
 *                 if (not nest_count and
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 */
              __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)
              if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)

              /* "Cython/Tempita/_tempita.py":1072
 *                 end_pos = e
 *                 if tok_type == tokenize.ENDMARKER and nest_count:
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,             # <<<<<<<<<<<<<<
 *                                         position=pos, name=name)
 *                 if (not nest_count and
 */
              __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1072, __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_Raise(__pyx_t_3, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __PYX_ERR(0, 1072, __pyx_L1_error)

              /* "Cython/Tempita/_tempita.py":1071
 *                     start_pos = s
 *                 end_pos = e
 *                 if tok_type == tokenize.ENDMARKER and nest_count:             # <<<<<<<<<<<<<<
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)
 */
            }

            /* "Cython/Tempita/_tempita.py":1074
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)
 *                 if (not nest_count and             # <<<<<<<<<<<<<<
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 */
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1074, __pyx_L1_error)
            __pyx_t_11 = ((!__pyx_t_9) != 0);
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L36_bool_binop_done;
            }

            /* "Cython/Tempita/_tempita.py":1075
 *                                         position=pos, name=name)
 *                 if (not nest_count and
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):             # <<<<<<<<<<<<<<
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 *                     defaults[var_name] = default_expr
 */
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (!__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L36_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L36_bool_binop_done;
            }
            __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__71, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1075, __pyx_L1_error)
            __pyx_t_8 = __pyx_t_11;
            __pyx_L36_bool_binop_done:;

            /* "Cython/Tempita/_tempita.py":1074
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)
 *                 if (not nest_count and             # <<<<<<<<<<<<<<
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 */
            if (__pyx_t_8) {

              /* "Cython/Tempita/_tempita.py":1076
 *                 if (not nest_count and
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)             # <<<<<<<<<<<<<<
 *                     defaults[var_name] = default_expr
 *                     sig_args.append(var_name)
 */
              __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isolate_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_4 = NULL;
              __pyx_t_12 = 0;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_12 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_2)) {
                PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_sig_text, __pyx_v_start_pos, __pyx_v_end_pos};
                __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              #if CYTHON_FAST_PYCCALL
              if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
                PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_sig_text, __pyx_v_start_pos, __pyx_v_end_pos};
                __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error)
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                __Pyx_GOTREF(__pyx_t_3);
              } else
              #endif
              {
                __pyx_t_1 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_1);
                if (__pyx_t_4) {
                  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
                }
                __Pyx_INCREF(__pyx_v_sig_text);
                __Pyx_GIVEREF(__pyx_v_sig_text);
                PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_12, __pyx_v_sig_text);
                __Pyx_INCREF(__pyx_v_start_pos);
                __Pyx_GIVEREF(__pyx_v_start_pos);
                PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_12, __pyx_v_start_pos);
                __Pyx_INCREF(__pyx_v_end_pos);
                __Pyx_GIVEREF(__pyx_v_end_pos);
                PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_12, __pyx_v_end_pos);
                __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __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_XDECREF_SET(__pyx_v_default_expr, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "Cython/Tempita/_tempita.py":1077
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 *                     defaults[var_name] = default_expr             # <<<<<<<<<<<<<<
 *                     sig_args.append(var_name)
 *                     break
 */
              if (unlikely(PyDict_SetItem(__pyx_v_defaults, __pyx_v_var_name, __pyx_v_default_expr) < 0)) __PYX_ERR(0, 1077, __pyx_L1_error)

              /* "Cython/Tempita/_tempita.py":1078
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 *                     defaults[var_name] = default_expr
 *                     sig_args.append(var_name)             # <<<<<<<<<<<<<<
 *                     break
 *                 parts.append((tok_type, tok_string))
 */
              __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_sig_args, __pyx_v_var_name); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1078, __pyx_L1_error)

              /* "Cython/Tempita/_tempita.py":1079
 *                     defaults[var_name] = default_expr
 *                     sig_args.append(var_name)
 *                     break             # <<<<<<<<<<<<<<
 *                 parts.append((tok_type, tok_string))
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:
 */
              goto __pyx_L28_break;

              /* "Cython/Tempita/_tempita.py":1074
 *                     raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                         position=pos, name=name)
 *                 if (not nest_count and             # <<<<<<<<<<<<<<
 *                     (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))):
 *                     default_expr = isolate_expression(sig_text, start_pos, end_pos)
 */
            }

            /* "Cython/Tempita/_tempita.py":1080
 *                     sig_args.append(var_name)
 *                     break
 *                 parts.append((tok_type, tok_string))             # <<<<<<<<<<<<<<
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:
 *                     nest_count += 1
 */
            __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1080, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_v_tok_type);
            __Pyx_GIVEREF(__pyx_v_tok_type);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tok_type);
            __Pyx_INCREF(__pyx_v_tok_string);
            __Pyx_GIVEREF(__pyx_v_tok_string);
            PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_tok_string);
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_3); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1080, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "Cython/Tempita/_tempita.py":1081
 *                     break
 *                 parts.append((tok_type, tok_string))
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:             # <<<<<<<<<<<<<<
 *                     nest_count += 1
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 */
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L41_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L41_bool_binop_done;
            }
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_string, __pyx_v_nest_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_8 = __pyx_t_11;
            __pyx_L41_bool_binop_done:;
            if (__pyx_t_8) {

              /* "Cython/Tempita/_tempita.py":1082
 *                 parts.append((tok_type, tok_string))
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:
 *                     nest_count += 1             # <<<<<<<<<<<<<<
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 *                     nest_count -= 1
 */
              __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_nest_count, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF_SET(__pyx_v_nest_count, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "Cython/Tempita/_tempita.py":1081
 *                     break
 *                 parts.append((tok_type, tok_string))
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:             # <<<<<<<<<<<<<<
 *                     nest_count += 1
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 */
              goto __pyx_L40;
            }

            /* "Cython/Tempita/_tempita.py":1083
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:
 *                     nest_count += 1
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:             # <<<<<<<<<<<<<<
 *                     nest_count -= 1
 *                     if not nest_count:
 */
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L44_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_11) {
            } else {
              __pyx_t_8 = __pyx_t_11;
              goto __pyx_L44_bool_binop_done;
            }
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_string, __pyx_v_unnest_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_8 = __pyx_t_11;
            __pyx_L44_bool_binop_done:;
            if (__pyx_t_8) {

              /* "Cython/Tempita/_tempita.py":1084
 *                     nest_count += 1
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 *                     nest_count -= 1             # <<<<<<<<<<<<<<
 *                     if not nest_count:
 *                         nest_type = unnest_type = None
 */
              __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_nest_count, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1084, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF_SET(__pyx_v_nest_count, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "Cython/Tempita/_tempita.py":1085
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 *                     nest_count -= 1
 *                     if not nest_count:             # <<<<<<<<<<<<<<
 *                         nest_type = unnest_type = None
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):
 */
              __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1085, __pyx_L1_error)
              __pyx_t_11 = ((!__pyx_t_8) != 0);
              if (__pyx_t_11) {

                /* "Cython/Tempita/_tempita.py":1086
 *                     nest_count -= 1
 *                     if not nest_count:
 *                         nest_type = unnest_type = None             # <<<<<<<<<<<<<<
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):
 *                     nest_type = tok_string
 */
                __Pyx_INCREF(Py_None);
                __Pyx_DECREF_SET(__pyx_v_nest_type, Py_None);
                __Pyx_INCREF(Py_None);
                __Pyx_DECREF_SET(__pyx_v_unnest_type, Py_None);

                /* "Cython/Tempita/_tempita.py":1085
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:
 *                     nest_count -= 1
 *                     if not nest_count:             # <<<<<<<<<<<<<<
 *                         nest_type = unnest_type = None
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):
 */
              }

              /* "Cython/Tempita/_tempita.py":1083
 *                 if nest_count and tok_type == tokenize.OP and tok_string == nest_type:
 *                     nest_count += 1
 *                 elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type:             # <<<<<<<<<<<<<<
 *                     nest_count -= 1
 *                     if not nest_count:
 */
              goto __pyx_L40;
            }

            /* "Cython/Tempita/_tempita.py":1087
 *                     if not nest_count:
 *                         nest_type = unnest_type = None
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):             # <<<<<<<<<<<<<<
 *                     nest_type = tok_string
 *                     nest_count = 1
 */
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __pyx_t_9 = ((!__pyx_t_8) != 0);
            if (__pyx_t_9) {
            } else {
              __pyx_t_11 = __pyx_t_9;
              goto __pyx_L48_bool_binop_done;
            }
            __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_OP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_9) {
            } else {
              __pyx_t_11 = __pyx_t_9;
              goto __pyx_L48_bool_binop_done;
            }
            __Pyx_INCREF(__pyx_v_tok_string);
            __pyx_t_3 = __pyx_v_tok_string;
            __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__70, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
            if (!__pyx_t_8) {
            } else {
              __pyx_t_9 = __pyx_t_8;
              goto __pyx_L51_bool_binop_done;
            }
            __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__101, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
            if (!__pyx_t_8) {
            } else {
              __pyx_t_9 = __pyx_t_8;
              goto __pyx_L51_bool_binop_done;
            }
            __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__102, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
            __pyx_t_9 = __pyx_t_8;
            __pyx_L51_bool_binop_done:;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_8 = (__pyx_t_9 != 0);
            __pyx_t_11 = __pyx_t_8;
            __pyx_L48_bool_binop_done:;
            if (__pyx_t_11) {

              /* "Cython/Tempita/_tempita.py":1088
 *                         nest_type = unnest_type = None
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):
 *                     nest_type = tok_string             # <<<<<<<<<<<<<<
 *                     nest_count = 1
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]
 */
              __Pyx_INCREF(__pyx_v_tok_string);
              __Pyx_DECREF_SET(__pyx_v_nest_type, __pyx_v_tok_string);

              /* "Cython/Tempita/_tempita.py":1089
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):
 *                     nest_type = tok_string
 *                     nest_count = 1             # <<<<<<<<<<<<<<
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]
 *     return sig_args, var_arg, var_kw, defaults
 */
              __Pyx_INCREF(__pyx_int_1);
              __Pyx_DECREF_SET(__pyx_v_nest_count, __pyx_int_1);

              /* "Cython/Tempita/_tempita.py":1090
 *                     nest_type = tok_string
 *                     nest_count = 1
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]             # <<<<<<<<<<<<<<
 *     return sig_args, var_arg, var_kw, defaults
 * 
 */
              __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s__70, __pyx_kp_s__89) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
              if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s__101, __pyx_kp_s__103) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
              if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s__102, __pyx_kp_s__104) < 0) __PYX_ERR(0, 1090, __pyx_L1_error)
              __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_t_3, __pyx_v_nest_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1090, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF_SET(__pyx_v_unnest_type, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "Cython/Tempita/_tempita.py":1087
 *                     if not nest_count:
 *                         nest_type = unnest_type = None
 *                 elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'):             # <<<<<<<<<<<<<<
 *                     nest_type = tok_string
 *                     nest_count = 1
 */
            }
            __pyx_L40:;
          }
          __pyx_L28_break:;

          /* "Cython/Tempita/_tempita.py":1060
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 *         if tok_type == tokenize.OP and tok_string == '=':             # <<<<<<<<<<<<<<
 *             nest_type = None
 *             unnest_type = None
 */
        }
        __pyx_L3_continue:;
      }
      __pyx_L4_break:;

      /* "Cython/Tempita/_tempita.py":1091
 *                     nest_count = 1
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]
 *     return sig_args, var_arg, var_kw, defaults             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_sig_args);
      __Pyx_GIVEREF(__pyx_v_sig_args);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sig_args);
      __Pyx_INCREF(__pyx_v_var_arg);
      __Pyx_GIVEREF(__pyx_v_var_arg);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_var_arg);
      __Pyx_INCREF(__pyx_v_var_kw);
      __Pyx_GIVEREF(__pyx_v_var_kw);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_var_kw);
      __Pyx_INCREF(__pyx_v_defaults);
      __Pyx_GIVEREF(__pyx_v_defaults);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_defaults);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("Cython.Tempita._tempita.parse_signature", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_sig_args);
      __Pyx_XDECREF(__pyx_v_var_arg);
      __Pyx_XDECREF(__pyx_v_var_kw);
      __Pyx_XDECREF(__pyx_v_defaults);
      __Pyx_XDECREF(__pyx_v_get_token);
      __Pyx_XDECREF(__pyx_v_var_arg_type);
      __Pyx_XDECREF(__pyx_v_tok_type);
      __Pyx_XDECREF(__pyx_v_tok_string);
      __Pyx_XDECREF(__pyx_v_var_name);
      __Pyx_XDECREF(__pyx_v_nest_type);
      __Pyx_XDECREF(__pyx_v_unnest_type);
      __Pyx_XDECREF(__pyx_v_nest_count);
      __Pyx_XDECREF(__pyx_v_start_pos);
      __Pyx_XDECREF(__pyx_v_end_pos);
      __Pyx_XDECREF(__pyx_v_parts);
      __Pyx_XDECREF(__pyx_v_s);
      __Pyx_XDECREF(__pyx_v_e);
      __Pyx_XDECREF(__pyx_v_default_expr);
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":1094
 * 
 * 
 * def isolate_expression(string, start_pos, end_pos):             # <<<<<<<<<<<<<<
 *     srow, scol = start_pos
 *     srow -= 1
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_39isolate_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_39isolate_expression = {"isolate_expression", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_39isolate_expression, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_39isolate_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_string = 0;
      PyObject *__pyx_v_start_pos = 0;
      PyObject *__pyx_v_end_pos = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("isolate_expression (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string_2,&__pyx_n_s_start_pos,&__pyx_n_s_end_pos,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_string_2)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start_pos)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("isolate_expression", 1, 3, 3, 1); __PYX_ERR(0, 1094, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_end_pos)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("isolate_expression", 1, 3, 3, 2); __PYX_ERR(0, 1094, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isolate_expression") < 0)) __PYX_ERR(0, 1094, __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_string = values[0];
        __pyx_v_start_pos = values[1];
        __pyx_v_end_pos = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("isolate_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1094, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.isolate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_38isolate_expression(__pyx_self, __pyx_v_string, __pyx_v_start_pos, __pyx_v_end_pos);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_38isolate_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_start_pos, PyObject *__pyx_v_end_pos) {
      PyObject *__pyx_v_srow = NULL;
      PyObject *__pyx_v_scol = NULL;
      PyObject *__pyx_v_erow = NULL;
      PyObject *__pyx_v_ecol = NULL;
      PyObject *__pyx_v_lines = NULL;
      PyObject *__pyx_v_parts = 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)(PyObject *);
      int __pyx_t_5;
      int __pyx_t_6;
      Py_ssize_t __pyx_t_7;
      __Pyx_RefNannySetupContext("isolate_expression", 0);

      /* "Cython/Tempita/_tempita.py":1095
 * 
 * def isolate_expression(string, start_pos, end_pos):
 *     srow, scol = start_pos             # <<<<<<<<<<<<<<
 *     srow -= 1
 *     erow, ecol = end_pos
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_start_pos))) || (PyList_CheckExact(__pyx_v_start_pos))) {
        PyObject* sequence = __pyx_v_start_pos;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 1095, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_start_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1095, __pyx_L1_error)
        __pyx_t_4 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1095, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_v_srow = __pyx_t_1;
      __pyx_t_1 = 0;
      __pyx_v_scol = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":1096
 * def isolate_expression(string, start_pos, end_pos):
 *     srow, scol = start_pos
 *     srow -= 1             # <<<<<<<<<<<<<<
 *     erow, ecol = end_pos
 *     erow -= 1
 */
      __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_srow, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1096, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_srow, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":1097
 *     srow, scol = start_pos
 *     srow -= 1
 *     erow, ecol = end_pos             # <<<<<<<<<<<<<<
 *     erow -= 1
 *     lines = string.splitlines(True)
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_end_pos))) || (PyList_CheckExact(__pyx_v_end_pos))) {
        PyObject* sequence = __pyx_v_end_pos;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 1097, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_end_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1097, __pyx_L1_error)
        __pyx_t_4 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L6_unpacking_done;
        __pyx_L5_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1097, __pyx_L1_error)
        __pyx_L6_unpacking_done:;
      }
      __pyx_v_erow = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_ecol = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1098
 *     srow -= 1
 *     erow, ecol = end_pos
 *     erow -= 1             # <<<<<<<<<<<<<<
 *     lines = string.splitlines(True)
 *     if srow == erow:
 */
      __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_erow, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_erow, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1099
 *     erow, ecol = end_pos
 *     erow -= 1
 *     lines = string.splitlines(True)             # <<<<<<<<<<<<<<
 *     if srow == erow:
 *         return lines[srow][scol:ecol]
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_splitlines); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_lines = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":1100
 *     erow -= 1
 *     lines = string.splitlines(True)
 *     if srow == erow:             # <<<<<<<<<<<<<<
 *         return lines[srow][scol:ecol]
 *     parts = [lines[srow][scol:]]
 */
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_srow, __pyx_v_erow, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1100, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1100, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":1101
 *     lines = string.splitlines(True)
 *     if srow == erow:
 *         return lines[srow][scol:ecol]             # <<<<<<<<<<<<<<
 *     parts = [lines[srow][scol:]]
 *     parts.extend(lines[srow+1:erow])
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyObject_GetItem(__pyx_v_lines, __pyx_v_srow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 0, &__pyx_v_scol, &__pyx_v_ecol, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __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;

        /* "Cython/Tempita/_tempita.py":1100
 *     erow -= 1
 *     lines = string.splitlines(True)
 *     if srow == erow:             # <<<<<<<<<<<<<<
 *         return lines[srow][scol:ecol]
 *     parts = [lines[srow][scol:]]
 */
      }

      /* "Cython/Tempita/_tempita.py":1102
 *     if srow == erow:
 *         return lines[srow][scol:ecol]
 *     parts = [lines[srow][scol:]]             # <<<<<<<<<<<<<<
 *     parts.extend(lines[srow+1:erow])
 *     if erow < len(lines):
 */
      __pyx_t_1 = PyObject_GetItem(__pyx_v_lines, __pyx_v_srow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_v_scol, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_v_parts = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1103
 *         return lines[srow][scol:ecol]
 *     parts = [lines[srow][scol:]]
 *     parts.extend(lines[srow+1:erow])             # <<<<<<<<<<<<<<
 *     if erow < len(lines):
 *         # It'll sometimes give (end_row_past_finish, 0)
 */
      __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_srow, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_lines, 0, 0, &__pyx_t_1, &__pyx_v_erow, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 1103, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":1104
 *     parts = [lines[srow][scol:]]
 *     parts.extend(lines[srow+1:erow])
 *     if erow < len(lines):             # <<<<<<<<<<<<<<
 *         # It'll sometimes give (end_row_past_finish, 0)
 *         parts.append(lines[erow][:ecol])
 */
      __pyx_t_7 = PyObject_Length(__pyx_v_lines); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_erow, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __pyx_L1_error)
      __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_ERR(0, 1104, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":1106
 *     if erow < len(lines):
 *         # It'll sometimes give (end_row_past_finish, 0)
 *         parts.append(lines[erow][:ecol])             # <<<<<<<<<<<<<<
 *     return ''.join(parts)
 * 
 */
        __pyx_t_1 = PyObject_GetItem(__pyx_v_lines, __pyx_v_erow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, NULL, &__pyx_v_ecol, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 1106, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":1104
 *     parts = [lines[srow][scol:]]
 *     parts.extend(lines[srow+1:erow])
 *     if erow < len(lines):             # <<<<<<<<<<<<<<
 *         # It'll sometimes give (end_row_past_finish, 0)
 *         parts.append(lines[erow][:ecol])
 */
      }

      /* "Cython/Tempita/_tempita.py":1107
 *         # It'll sometimes give (end_row_past_finish, 0)
 *         parts.append(lines[erow][:ecol])
 *     return ''.join(parts)             # <<<<<<<<<<<<<<
 * 
 * _fill_command_usage = """\
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_parts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":1094
 * 
 * 
 * def isolate_expression(string, start_pos, end_pos):             # <<<<<<<<<<<<<<
 *     srow, scol = start_pos
 *     srow -= 1
 */

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("Cython.Tempita._tempita.isolate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_srow);
      __Pyx_XDECREF(__pyx_v_scol);
      __Pyx_XDECREF(__pyx_v_erow);
      __Pyx_XDECREF(__pyx_v_ecol);
      __Pyx_XDECREF(__pyx_v_lines);
      __Pyx_XDECREF(__pyx_v_parts);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* "Cython/Tempita/_tempita.py":1117
 * 
 * 
 * def fill_command(args=None):             # <<<<<<<<<<<<<<
 *     import sys
 *     import optparse
 */

    /* Python wrapper */
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_41fill_command(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyMethodDef __pyx_mdef_6Cython_7Tempita_8_tempita_41fill_command = {"fill_command", (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_41fill_command, METH_VARARGS|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_6Cython_7Tempita_8_tempita_41fill_command(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_args = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("fill_command (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0};
        PyObject* values[1] = {0};
        values[0] = ((PyObject *)((PyObject *)Py_None));
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (kw_args > 0) {
              PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
              if (value) { values[0] = value; kw_args--; }
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fill_command") < 0)) __PYX_ERR(0, 1117, __pyx_L3_error)
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_args = values[0];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("fill_command", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1117, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("Cython.Tempita._tempita.fill_command", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6Cython_7Tempita_8_tempita_40fill_command(__pyx_self, __pyx_v_args);

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

    static PyObject *__pyx_pf_6Cython_7Tempita_8_tempita_40fill_command(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
      PyObject *__pyx_v_sys = NULL;
      PyObject *__pyx_v_optparse = NULL;
      PyObject *__pyx_v_pkg_resources = NULL;
      PyObject *__pyx_v_os = NULL;
      PyObject *__pyx_v_dist = NULL;
      PyObject *__pyx_v_parser = NULL;
      PyObject *__pyx_v_options = NULL;
      PyObject *__pyx_v_template_name = NULL;
      PyObject *__pyx_v_vars = NULL;
      PyObject *__pyx_v_value = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_template_content = NULL;
      PyObject *__pyx_v_f = NULL;
      PyObject *__pyx_v_TemplateClass = NULL;
      PyObject *__pyx_v_template = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      PyObject *__pyx_t_1 = NULL;
      int __pyx_t_2;
      int __pyx_t_3;
      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)(PyObject *);
      Py_ssize_t __pyx_t_10;
      PyObject *(*__pyx_t_11)(PyObject *);
      __Pyx_RefNannySetupContext("fill_command", 0);
      __Pyx_INCREF(__pyx_v_args);

      /* "Cython/Tempita/_tempita.py":1118
 * 
 * def fill_command(args=None):
 *     import sys             # <<<<<<<<<<<<<<
 *     import optparse
 *     import pkg_resources
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_sys = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1119
 * def fill_command(args=None):
 *     import sys
 *     import optparse             # <<<<<<<<<<<<<<
 *     import pkg_resources
 *     import os
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_optparse, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_optparse = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1120
 *     import sys
 *     import optparse
 *     import pkg_resources             # <<<<<<<<<<<<<<
 *     import os
 *     if args is None:
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_pkg_resources, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_pkg_resources = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1121
 *     import optparse
 *     import pkg_resources
 *     import os             # <<<<<<<<<<<<<<
 *     if args is None:
 *         args = sys.argv[1:]
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_os = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1122
 *     import pkg_resources
 *     import os
 *     if args is None:             # <<<<<<<<<<<<<<
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')
 */
      __pyx_t_2 = (__pyx_v_args == Py_None);
      __pyx_t_3 = (__pyx_t_2 != 0);
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":1123
 *     import os
 *     if args is None:
 *         args = sys.argv[1:]             # <<<<<<<<<<<<<<
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_argv); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_1, 1, 0, NULL, NULL, &__pyx_slice__106, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1122
 *     import pkg_resources
 *     import os
 *     if args is None:             # <<<<<<<<<<<<<<
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')
 */
      }

      /* "Cython/Tempita/_tempita.py":1124
 *     if args is None:
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')             # <<<<<<<<<<<<<<
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pkg_resources, __pyx_n_s_get_distribution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_dist = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1125
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(             # <<<<<<<<<<<<<<
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_optparse, __pyx_n_s_OptionParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "Cython/Tempita/_tempita.py":1126
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),             # <<<<<<<<<<<<<<
 *         usage=_fill_command_usage)
 *     parser.add_option(
 */
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_7) {
        __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_dist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_dist};
          __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_dist};
          __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GOTREF(__pyx_t_5);
        } else
        #endif
        {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_dist);
          __Pyx_GIVEREF(__pyx_v_dist);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_dist);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_version, __pyx_t_5) < 0) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":1127
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)             # <<<<<<<<<<<<<<
 *     parser.add_option(
 *         '-o', '--output',
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_fill_command_usage); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_usage, __pyx_t_5) < 0) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":1125
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(             # <<<<<<<<<<<<<<
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __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_v_parser = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":1128
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '-o', '--output',
 *         dest='output',
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_option); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "Cython/Tempita/_tempita.py":1130
 *     parser.add_option(
 *         '-o', '--output',
 *         dest='output',             # <<<<<<<<<<<<<<
 *         metavar="FILENAME",
 *         help="File to write output to (default stdout)")
 */
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dest, __pyx_n_s_output_2) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_metavar, __pyx_n_s_FILENAME) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_help, __pyx_kp_s_File_to_write_output_to_default) < 0) __PYX_ERR(0, 1130, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":1128
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '-o', '--output',
 *         dest='output',
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__108, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1133
 *         metavar="FILENAME",
 *         help="File to write output to (default stdout)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--html',
 *         dest='use_html',
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_option); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "Cython/Tempita/_tempita.py":1135
 *     parser.add_option(
 *         '--html',
 *         dest='use_html',             # <<<<<<<<<<<<<<
 *         action='store_true',
 *         help="Use HTML style filling (including automatic HTML quoting)")
 */
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dest, __pyx_n_s_use_html) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_action, __pyx_n_s_store_true) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_help, __pyx_kp_s_Use_HTML_style_filling_including) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":1133
 *         metavar="FILENAME",
 *         help="File to write output to (default stdout)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--html',
 *         dest='use_html',
 */
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__109, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1133, __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;

      /* "Cython/Tempita/_tempita.py":1138
 *         action='store_true',
 *         help="Use HTML style filling (including automatic HTML quoting)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--env',
 *         dest='use_env',
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_option); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "Cython/Tempita/_tempita.py":1140
 *     parser.add_option(
 *         '--env',
 *         dest='use_env',             # <<<<<<<<<<<<<<
 *         action='store_true',
 *         help="Put the environment in as top-level variables")
 */
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dest, __pyx_n_s_use_env) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_action, __pyx_n_s_store_true) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_help, __pyx_kp_s_Put_the_environment_in_as_top_le) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)

      /* "Cython/Tempita/_tempita.py":1138
 *         action='store_true',
 *         help="Use HTML style filling (including automatic HTML quoting)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--env',
 *         dest='use_env',
 */
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__110, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1143
 *         action='store_true',
 *         help="Put the environment in as top-level variables")
 *     options, args = parser.parse_args(args)             # <<<<<<<<<<<<<<
 *     if len(args) < 1:
 *         print('You must give a template filename')
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_parse_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_args};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
          PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_args};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_args);
          __Pyx_GIVEREF(__pyx_v_args);
          PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_args);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if !CYTHON_COMPILING_IN_PYPY
        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_ERR(0, 1143, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
        __pyx_t_9 = NULL;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L5_unpacking_done;
        __pyx_L4_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_9 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1143, __pyx_L1_error)
        __pyx_L5_unpacking_done:;
      }
      __pyx_v_options = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":1144
 *         help="Put the environment in as top-level variables")
 *     options, args = parser.parse_args(args)
 *     if len(args) < 1:             # <<<<<<<<<<<<<<
 *         print('You must give a template filename')
 *         sys.exit(2)
 */
      __pyx_t_10 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1144, __pyx_L1_error)
      __pyx_t_3 = ((__pyx_t_10 < 1) != 0);
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":1145
 *     options, args = parser.parse_args(args)
 *     if len(args) < 1:
 *         print('You must give a template filename')             # <<<<<<<<<<<<<<
 *         sys.exit(2)
 *     template_name = args[0]
 */
        if (__Pyx_PrintOne(0, __pyx_kp_s_You_must_give_a_template_filenam) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":1146
 *     if len(args) < 1:
 *         print('You must give a template filename')
 *         sys.exit(2)             # <<<<<<<<<<<<<<
 *     template_name = args[0]
 *     args = args[1:]
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1144
 *         help="Put the environment in as top-level variables")
 *     options, args = parser.parse_args(args)
 *     if len(args) < 1:             # <<<<<<<<<<<<<<
 *         print('You must give a template filename')
 *         sys.exit(2)
 */
      }

      /* "Cython/Tempita/_tempita.py":1147
 *         print('You must give a template filename')
 *         sys.exit(2)
 *     template_name = args[0]             # <<<<<<<<<<<<<<
 *     args = args[1:]
 *     vars = {}
 */
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_template_name = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":1148
 *         sys.exit(2)
 *     template_name = args[0]
 *     args = args[1:]             # <<<<<<<<<<<<<<
 *     vars = {}
 *     if options.use_env:
 */
      __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_args, 1, 0, NULL, NULL, &__pyx_slice__112, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":1149
 *     template_name = args[0]
 *     args = args[1:]
 *     vars = {}             # <<<<<<<<<<<<<<
 *     if options.use_env:
 *         vars.update(os.environ)
 */
      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_vars = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":1150
 *     args = args[1:]
 *     vars = {}
 *     if options.use_env:             # <<<<<<<<<<<<<<
 *         vars.update(os.environ)
 *     for value in args:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_use_env); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1150, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":1151
 *     vars = {}
 *     if options.use_env:
 *         vars.update(os.environ)             # <<<<<<<<<<<<<<
 *     for value in args:
 *         if '=' not in value:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_vars, __pyx_n_s_update); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_environ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        if (!__pyx_t_5) {
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_6);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
            __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
            PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
            __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          } else
          #endif
          {
            __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1151, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
            __Pyx_GIVEREF(__pyx_t_4);
            PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1151, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1150
 *     args = args[1:]
 *     vars = {}
 *     if options.use_env:             # <<<<<<<<<<<<<<
 *         vars.update(os.environ)
 *     for value in args:
 */
      }

      /* "Cython/Tempita/_tempita.py":1152
 *     if options.use_env:
 *         vars.update(os.environ)
 *     for value in args:             # <<<<<<<<<<<<<<
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 */
      if (likely(PyList_CheckExact(__pyx_v_args)) || PyTuple_CheckExact(__pyx_v_args)) {
        __pyx_t_6 = __pyx_v_args; __Pyx_INCREF(__pyx_t_6); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1152, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error)
            #else
            __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_11(__pyx_t_6);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 1152, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":1153
 *         vars.update(os.environ)
 *     for value in args:
 *         if '=' not in value:             # <<<<<<<<<<<<<<
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)
 */
        __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__77, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error)
        __pyx_t_2 = (__pyx_t_3 != 0);
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":1154
 *     for value in args:
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)             # <<<<<<<<<<<<<<
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 */
          __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Bad_argument_r, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 1154, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "Cython/Tempita/_tempita.py":1155
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)             # <<<<<<<<<<<<<<
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 */
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

          /* "Cython/Tempita/_tempita.py":1153
 *         vars.update(os.environ)
 *     for value in args:
 *         if '=' not in value:             # <<<<<<<<<<<<<<
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)
 */
        }

        /* "Cython/Tempita/_tempita.py":1156
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)
 *         name, value = value.split('=', 1)             # <<<<<<<<<<<<<<
 *         if name.startswith('py:'):
 *             name = name[:3]
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if !CYTHON_COMPILING_IN_PYPY
          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_ERR(0, 1156, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext;
          index = 0; __pyx_t_8 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1156, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L12_unpacking_done;
          __pyx_L11_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 1156, __pyx_L1_error)
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1157
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):             # <<<<<<<<<<<<<<
 *             name = name[:3]
 *             value = eval(value)
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1157, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":1158
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 *             name = name[:3]             # <<<<<<<<<<<<<<
 *             value = eval(value)
 *         vars[name] = value
 */
          __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, 3, NULL, NULL, &__pyx_slice__116, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":1159
 *         if name.startswith('py:'):
 *             name = name[:3]
 *             value = eval(value)             # <<<<<<<<<<<<<<
 *         vars[name] = value
 *     if template_name == '-':
 */
          __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (__pyx_v_TemplateClass) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_TemplateClass, __pyx_v_TemplateClass) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_args) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_args, __pyx_v_args) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_dist) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dist, __pyx_v_dist) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_f) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_f, __pyx_v_f) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_name) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_options) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_options, __pyx_v_options) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_optparse) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_optparse, __pyx_v_optparse) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_os) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_os, __pyx_v_os) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_parser) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parser, __pyx_v_parser) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_pkg_resources) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pkg_resources, __pyx_v_pkg_resources) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_result) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_result, __pyx_v_result) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_sys) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_sys, __pyx_v_sys) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_template) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_template, __pyx_v_template) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_template_content) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_template_content, __pyx_v_template_content) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_template_name) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_template_name_2, __pyx_v_template_name) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_value) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          if (__pyx_v_vars) {
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vars, __pyx_v_vars) < 0) __PYX_ERR(0, 1159, __pyx_L1_error)
          }
          __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_value);
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1);
          __pyx_t_4 = 0;
          __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "Cython/Tempita/_tempita.py":1157
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):             # <<<<<<<<<<<<<<
 *             name = name[:3]
 *             value = eval(value)
 */
        }

        /* "Cython/Tempita/_tempita.py":1160
 *             name = name[:3]
 *             value = eval(value)
 *         vars[name] = value             # <<<<<<<<<<<<<<
 *     if template_name == '-':
 *         template_content = sys.stdin.read()
 */
        if (unlikely(PyDict_SetItem(__pyx_v_vars, __pyx_v_name, __pyx_v_value) < 0)) __PYX_ERR(0, 1160, __pyx_L1_error)

        /* "Cython/Tempita/_tempita.py":1152
 *     if options.use_env:
 *         vars.update(os.environ)
 *     for value in args:             # <<<<<<<<<<<<<<
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":1161
 *             value = eval(value)
 *         vars[name] = value
 *     if template_name == '-':             # <<<<<<<<<<<<<<
 *         template_content = sys.stdin.read()
 *         template_name = '<stdin>'
 */
      __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_template_name, __pyx_kp_s__117, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1161, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1162
 *         vars[name] = value
 *     if template_name == '-':
 *         template_content = sys.stdin.read()             # <<<<<<<<<<<<<<
 *         template_name = '<stdin>'
 *     else:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_stdin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1162, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1162, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_v_template_content = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1163
 *     if template_name == '-':
 *         template_content = sys.stdin.read()
 *         template_name = '<stdin>'             # <<<<<<<<<<<<<<
 *     else:
 *         f = open(template_name, 'rb')
 */
        __Pyx_INCREF(__pyx_kp_s_stdin_2);
        __Pyx_DECREF_SET(__pyx_v_template_name, __pyx_kp_s_stdin_2);

        /* "Cython/Tempita/_tempita.py":1161
 *             value = eval(value)
 *         vars[name] = value
 *     if template_name == '-':             # <<<<<<<<<<<<<<
 *         template_content = sys.stdin.read()
 *         template_name = '<stdin>'
 */
        goto __pyx_L14;
      }

      /* "Cython/Tempita/_tempita.py":1165
 *         template_name = '<stdin>'
 *     else:
 *         f = open(template_name, 'rb')             # <<<<<<<<<<<<<<
 *         template_content = f.read()
 *         f.close()
 */
      /*else*/ {
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_template_name);
        __Pyx_GIVEREF(__pyx_v_template_name);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_template_name);
        __Pyx_INCREF(__pyx_n_s_rb);
        __Pyx_GIVEREF(__pyx_n_s_rb);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_rb);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1165, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_f = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":1166
 *     else:
 *         f = open(template_name, 'rb')
 *         template_content = f.read()             # <<<<<<<<<<<<<<
 *         f.close()
 *     if options.use_html:
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1166, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_template_content = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":1167
 *         f = open(template_name, 'rb')
 *         template_content = f.read()
 *         f.close()             # <<<<<<<<<<<<<<
 *     if options.use_html:
 *         TemplateClass = HTMLTemplate
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (__pyx_t_1) {
          __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1167, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1167, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L14:;

      /* "Cython/Tempita/_tempita.py":1168
 *         template_content = f.read()
 *         f.close()
 *     if options.use_html:             # <<<<<<<<<<<<<<
 *         TemplateClass = HTMLTemplate
 *     else:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_use_html); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1168, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1169
 *         f.close()
 *     if options.use_html:
 *         TemplateClass = HTMLTemplate             # <<<<<<<<<<<<<<
 *     else:
 *         TemplateClass = Template
 */
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTMLTemplate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_v_TemplateClass = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":1168
 *         template_content = f.read()
 *         f.close()
 *     if options.use_html:             # <<<<<<<<<<<<<<
 *         TemplateClass = HTMLTemplate
 *     else:
 */
        goto __pyx_L15;
      }

      /* "Cython/Tempita/_tempita.py":1171
 *         TemplateClass = HTMLTemplate
 *     else:
 *         TemplateClass = Template             # <<<<<<<<<<<<<<
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)
 */
      /*else*/ {
        __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1171, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_v_TemplateClass = __pyx_t_8;
        __pyx_t_8 = 0;
      }
      __pyx_L15:;

      /* "Cython/Tempita/_tempita.py":1172
 *     else:
 *         TemplateClass = Template
 *     template = TemplateClass(template_content, name=template_name)             # <<<<<<<<<<<<<<
 *     result = template.substitute(vars)
 *     if options.output:
 */
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_template_content);
      __Pyx_GIVEREF(__pyx_v_template_content);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_template_content);
      __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_name, __pyx_v_template_name) < 0) __PYX_ERR(0, 1172, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_TemplateClass, __pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_template = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1173
 *         TemplateClass = Template
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)             # <<<<<<<<<<<<<<
 *     if options.output:
 *         f = open(options.output, 'wb')
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_substitute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (!__pyx_t_8) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      } else {
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_vars};
          __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
          PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_vars};
          __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_v_vars);
          __Pyx_GIVEREF(__pyx_v_vars);
          PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_vars);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1174
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)
 *     if options.output:             # <<<<<<<<<<<<<<
 *         f = open(options.output, 'wb')
 *         f.write(result)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_output_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1175
 *     result = template.substitute(vars)
 *     if options.output:
 *         f = open(options.output, 'wb')             # <<<<<<<<<<<<<<
 *         f.write(result)
 *         f.close()
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_output_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_wb);
        __Pyx_GIVEREF(__pyx_n_s_wb);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_wb);
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":1176
 *     if options.output:
 *         f = open(options.output, 'wb')
 *         f.write(result)             # <<<<<<<<<<<<<<
 *         f.close()
 *     else:
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_4) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_result};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
            PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_result};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1176, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
            __Pyx_INCREF(__pyx_v_result);
            __Pyx_GIVEREF(__pyx_v_result);
            PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_result);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":1177
 *         f = open(options.output, 'wb')
 *         f.write(result)
 *         f.close()             # <<<<<<<<<<<<<<
 *     else:
 *         sys.stdout.write(result)
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (__pyx_t_8) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        } else {
          __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error)
        }
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":1174
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)
 *     if options.output:             # <<<<<<<<<<<<<<
 *         f = open(options.output, 'wb')
 *         f.write(result)
 */
        goto __pyx_L16;
      }

      /* "Cython/Tempita/_tempita.py":1179
 *         f.close()
 *     else:
 *         sys.stdout.write(result)             # <<<<<<<<<<<<<<
 * 
 * if __name__ == '__main__':
 */
      /*else*/ {
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_stdout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
          }
        }
        if (!__pyx_t_6) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          #if CYTHON_FAST_PYCALL
          if (PyFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result};
            __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          #if CYTHON_FAST_PYCCALL
          if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
            PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_result};
            __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_GOTREF(__pyx_t_1);
          } else
          #endif
          {
            __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
            __Pyx_INCREF(__pyx_v_result);
            __Pyx_GIVEREF(__pyx_v_result);
            PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_result);
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L16:;

      /* "Cython/Tempita/_tempita.py":1117
 * 
 * 
 * def fill_command(args=None):             # <<<<<<<<<<<<<<
 *     import sys
 *     import optparse
 */

      /* 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_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("Cython.Tempita._tempita.fill_command", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_sys);
      __Pyx_XDECREF(__pyx_v_optparse);
      __Pyx_XDECREF(__pyx_v_pkg_resources);
      __Pyx_XDECREF(__pyx_v_os);
      __Pyx_XDECREF(__pyx_v_dist);
      __Pyx_XDECREF(__pyx_v_parser);
      __Pyx_XDECREF(__pyx_v_options);
      __Pyx_XDECREF(__pyx_v_template_name);
      __Pyx_XDECREF(__pyx_v_vars);
      __Pyx_XDECREF(__pyx_v_value);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_template_content);
      __Pyx_XDECREF(__pyx_v_f);
      __Pyx_XDECREF(__pyx_v_TemplateClass);
      __Pyx_XDECREF(__pyx_v_template);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_args);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *__pyx_freelist_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature[8];
    static int __pyx_freecount_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature = 0;

    static PyObject *__pyx_tp_new_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
      PyObject *o;
      if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature)))) {
        o = (PyObject*)__pyx_freelist_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature[--__pyx_freecount_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature];
        memset(o, 0, sizeof(struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature));
        (void) PyObject_INIT(o, t);
        PyObject_GC_Track(o);
      } else {
        o = (*t->tp_alloc)(t, 0);
        if (unlikely(!o)) return 0;
      }
      return o;
    }

    static void __pyx_tp_dealloc_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(PyObject *o) {
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *p = (struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)o;
      PyObject_GC_UnTrack(o);
      Py_CLEAR(p->__pyx_v_tokens);
      if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature)))) {
        __pyx_freelist_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature[__pyx_freecount_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature++] = ((struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)o);
      } else {
        (*Py_TYPE(o)->tp_free)(o);
      }
    }

    static int __pyx_tp_traverse_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(PyObject *o, visitproc v, void *a) {
      int e;
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *p = (struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)o;
      if (p->__pyx_v_tokens) {
        e = (*v)(p->__pyx_v_tokens, a); if (e) return e;
      }
      return 0;
    }

    static int __pyx_tp_clear_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature(PyObject *o) {
      PyObject* tmp;
      struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *p = (struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature *)o;
      tmp = ((PyObject*)p->__pyx_v_tokens);
      p->__pyx_v_tokens = Py_None; Py_INCREF(Py_None);
      Py_XDECREF(tmp);
      return 0;
    }

    static PyTypeObject __pyx_type_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature = {
      PyVarObject_HEAD_INIT(0, 0)
      "Cython.Tempita._tempita.__pyx_scope_struct__parse_signature", /*tp_name*/
      sizeof(struct __pyx_obj_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature), /*tp_basicsize*/
      0, /*tp_itemsize*/
      __pyx_tp_dealloc_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature, /*tp_dealloc*/
      0, /*tp_print*/
      0, /*tp_getattr*/
      0, /*tp_setattr*/
      #if PY_MAJOR_VERSION < 3
      0, /*tp_compare*/
      #endif
      #if PY_MAJOR_VERSION >= 3
      0, /*tp_as_async*/
      #endif
      0, /*tp_repr*/
      0, /*tp_as_number*/
      0, /*tp_as_sequence*/
      0, /*tp_as_mapping*/
      0, /*tp_hash*/
      0, /*tp_call*/
      0, /*tp_str*/
      0, /*tp_getattro*/
      0, /*tp_setattro*/
      0, /*tp_as_buffer*/
      Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
      0, /*tp_doc*/
      __pyx_tp_traverse_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature, /*tp_traverse*/
      __pyx_tp_clear_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature, /*tp_clear*/
      0, /*tp_richcompare*/
      0, /*tp_weaklistoffset*/
      0, /*tp_iter*/
      0, /*tp_iternext*/
      0, /*tp_methods*/
      0, /*tp_members*/
      0, /*tp_getset*/
      0, /*tp_base*/
      0, /*tp_dict*/
      0, /*tp_descr_get*/
      0, /*tp_descr_set*/
      0, /*tp_dictoffset*/
      0, /*tp_init*/
      0, /*tp_alloc*/
      __pyx_tp_new_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature, /*tp_new*/
      0, /*tp_free*/
      0, /*tp_is_gc*/
      0, /*tp_bases*/
      0, /*tp_mro*/
      0, /*tp_cache*/
      0, /*tp_subclasses*/
      0, /*tp_weaklist*/
      0, /*tp_del*/
      0, /*tp_version_tag*/
      #if PY_VERSION_HEX >= 0x030400a1
      0, /*tp_finalize*/
      #endif
    };

    static PyMethodDef __pyx_methods[] = {
      {0, 0, 0, 0}
    };

    #if PY_MAJOR_VERSION >= 3
    static struct PyModuleDef __pyx_moduledef = {
      #if PY_VERSION_HEX < 0x03020000
        { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
      #else
        PyModuleDef_HEAD_INIT,
      #endif
        "_tempita",
        __pyx_k_A_small_templating_language_Thi, /* m_doc */
        -1, /* m_size */
        __pyx_methods /* m_methods */,
        NULL, /* m_reload */
        NULL, /* m_traverse */
        NULL, /* m_clear */
        NULL /* m_free */
    };
    #endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Bad_argument_r, __pyx_k_Bad_argument_r, sizeof(__pyx_k_Bad_argument_r), 0, 0, 1, 0},
  {&__pyx_kp_s_Bad_for_no_in_in_r, __pyx_k_Bad_for_no_in_in_r, sizeof(__pyx_k_Bad_for_no_in_in_r), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_decode_bytes_value_r_into, __pyx_k_Cannot_decode_bytes_value_r_into, sizeof(__pyx_k_Cannot_decode_bytes_value_r_into), 0, 0, 1, 0},
  {&__pyx_kp_s_Cannot_encode_unicode_value_r_in, __pyx_k_Cannot_encode_unicode_value_r_in, sizeof(__pyx_k_Cannot_encode_unicode_value_r_in), 0, 0, 1, 0},
  {&__pyx_n_s_Cython_Tempita__tempita, __pyx_k_Cython_Tempita__tempita, sizeof(__pyx_k_Cython_Tempita__tempita), 0, 0, 1, 1},
  {&__pyx_n_s_ENDMARKER, __pyx_k_ENDMARKER, sizeof(__pyx_k_ENDMARKER), 0, 0, 1, 1},
  {&__pyx_n_s_Empty, __pyx_k_Empty, sizeof(__pyx_k_Empty), 0, 0, 1, 1},
  {&__pyx_n_s_Empty_2, __pyx_k_Empty_2, sizeof(__pyx_k_Empty_2), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___bool, __pyx_k_Empty___bool, sizeof(__pyx_k_Empty___bool), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___call, __pyx_k_Empty___call, sizeof(__pyx_k_Empty___call), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___iter, __pyx_k_Empty___iter, sizeof(__pyx_k_Empty___iter), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___repr, __pyx_k_Empty___repr, sizeof(__pyx_k_Empty___repr), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___str, __pyx_k_Empty___str, sizeof(__pyx_k_Empty___str), 0, 0, 1, 1},
  {&__pyx_n_s_Empty___unicode, __pyx_k_Empty___unicode, sizeof(__pyx_k_Empty___unicode), 0, 0, 1, 1},
  {&__pyx_kp_s_Exception_raised_while_parsing_a, __pyx_k_Exception_raised_while_parsing_a, sizeof(__pyx_k_Exception_raised_while_parsing_a), 0, 0, 1, 0},
  {&__pyx_kp_s_Expression_must_be_default_var_v, __pyx_k_Expression_must_be_default_var_v, sizeof(__pyx_k_Expression_must_be_default_var_v), 0, 0, 1, 0},
  {&__pyx_kp_s_Extra_position_arguments_s, __pyx_k_Extra_position_arguments_s, sizeof(__pyx_k_Extra_position_arguments_s), 0, 0, 1, 0},
  {&__pyx_n_s_FILENAME, __pyx_k_FILENAME, sizeof(__pyx_k_FILENAME), 0, 0, 1, 1},
  {&__pyx_kp_s_File_to_write_output_to_default, __pyx_k_File_to_write_output_to_default, sizeof(__pyx_k_File_to_write_output_to_default), 0, 0, 1, 0},
  {&__pyx_kp_s_Function_definition_doesn_t_end, __pyx_k_Function_definition_doesn_t_end, sizeof(__pyx_k_Function_definition_doesn_t_end), 0, 0, 1, 0},
  {&__pyx_n_s_HTMLTemplate, __pyx_k_HTMLTemplate, sizeof(__pyx_k_HTMLTemplate), 0, 0, 1, 1},
  {&__pyx_n_s_HTMLTemplate__repr, __pyx_k_HTMLTemplate__repr, sizeof(__pyx_k_HTMLTemplate__repr), 0, 0, 1, 1},
  {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
  {&__pyx_kp_s_If_you_pass_in_a_single_argument, __pyx_k_If_you_pass_in_a_single_argument, sizeof(__pyx_k_If_you_pass_in_a_single_argument), 0, 0, 1, 0},
  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_signature_s, __pyx_k_Invalid_signature_s, sizeof(__pyx_k_Invalid_signature_s), 0, 0, 1, 0},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_kp_u_Lex_a_string_into_chunks_lex_he, __pyx_k_Lex_a_string_into_chunks_lex_he, sizeof(__pyx_k_Lex_a_string_into_chunks_lex_he), 0, 1, 0, 0},
  {&__pyx_kp_s_Missing_argument_s, __pyx_k_Missing_argument_s, sizeof(__pyx_k_Missing_argument_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Missing_enddef, __pyx_k_Missing_enddef, sizeof(__pyx_k_Missing_enddef), 0, 0, 1, 0},
  {&__pyx_kp_s_Missing_endif, __pyx_k_Missing_endif, sizeof(__pyx_k_Missing_endif), 0, 0, 1, 0},
  {&__pyx_kp_s_Multi_line_py_blocks_must_start, __pyx_k_Multi_line_py_blocks_must_start, sizeof(__pyx_k_Multi_line_py_blocks_must_start), 0, 0, 1, 0},
  {&__pyx_n_s_NAME, __pyx_k_NAME, sizeof(__pyx_k_NAME), 0, 0, 1, 1},
  {&__pyx_kp_s_Need_i_items_to_unpack_got_i_ite, __pyx_k_Need_i_items_to_unpack_got_i_ite, sizeof(__pyx_k_Need_i_items_to_unpack_got_i_ite), 0, 0, 1, 0},
  {&__pyx_kp_s_No_endfor, __pyx_k_No_endfor, sizeof(__pyx_k_No_endfor), 0, 0, 1, 0},
  {&__pyx_kp_s_No_endif, __pyx_k_No_endif, sizeof(__pyx_k_No_endif), 0, 0, 1, 0},
  {&__pyx_kp_s_No_s_to_finish_last_expression, __pyx_k_No_s_to_finish_last_expression, sizeof(__pyx_k_No_s_to_finish_last_expression), 0, 0, 1, 0},
  {&__pyx_kp_s_Not_a_valid_variable_name_for_de, __pyx_k_Not_a_valid_variable_name_for_de, sizeof(__pyx_k_Not_a_valid_variable_name_for_de), 0, 0, 1, 0},
  {&__pyx_n_s_OP, __pyx_k_OP, sizeof(__pyx_k_OP), 0, 0, 1, 1},
  {&__pyx_n_s_OptionParser, __pyx_k_OptionParser, sizeof(__pyx_k_OptionParser), 0, 0, 1, 1},
  {&__pyx_kp_u_Parses_a_string_into_a_kind_of, __pyx_k_Parses_a_string_into_a_kind_of, sizeof(__pyx_k_Parses_a_string_into_a_kind_of), 0, 1, 0, 0},
  {&__pyx_n_s_Paste, __pyx_k_Paste, sizeof(__pyx_k_Paste), 0, 0, 1, 1},
  {&__pyx_kp_s_Put_the_environment_in_as_top_le, __pyx_k_Put_the_environment_in_as_top_le, sizeof(__pyx_k_Put_the_environment_in_as_top_le), 0, 0, 1, 0},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_StringIO, __pyx_k_StringIO, sizeof(__pyx_k_StringIO), 0, 0, 1, 1},
  {&__pyx_n_s_SyntaxError, __pyx_k_SyntaxError, sizeof(__pyx_k_SyntaxError), 0, 0, 1, 1},
  {&__pyx_kp_u_Takes_a_lexed_set_of_tokens_and, __pyx_k_Takes_a_lexed_set_of_tokens_and, sizeof(__pyx_k_Takes_a_lexed_set_of_tokens_and), 0, 1, 0, 0},
  {&__pyx_n_s_Template, __pyx_k_Template, sizeof(__pyx_k_Template), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateBreak, __pyx_k_TemplateBreak, sizeof(__pyx_k_TemplateBreak), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateClass, __pyx_k_TemplateClass, sizeof(__pyx_k_TemplateClass), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateContinue, __pyx_k_TemplateContinue, sizeof(__pyx_k_TemplateContinue), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef, __pyx_k_TemplateDef, sizeof(__pyx_k_TemplateDef), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef___call, __pyx_k_TemplateDef___call, sizeof(__pyx_k_TemplateDef___call), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef___get, __pyx_k_TemplateDef___get, sizeof(__pyx_k_TemplateDef___get), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef___init, __pyx_k_TemplateDef___init, sizeof(__pyx_k_TemplateDef___init), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef___repr, __pyx_k_TemplateDef___repr, sizeof(__pyx_k_TemplateDef___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef___str, __pyx_k_TemplateDef___str, sizeof(__pyx_k_TemplateDef___str), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateDef__parse_signature, __pyx_k_TemplateDef__parse_signature, sizeof(__pyx_k_TemplateDef__parse_signature), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateError, __pyx_k_TemplateError, sizeof(__pyx_k_TemplateError), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateError___init, __pyx_k_TemplateError___init, sizeof(__pyx_k_TemplateError___init), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateError___str, __pyx_k_TemplateError___str, sizeof(__pyx_k_TemplateError___str), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObject, __pyx_k_TemplateObject, sizeof(__pyx_k_TemplateObject), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObjectGetter, __pyx_k_TemplateObjectGetter, sizeof(__pyx_k_TemplateObjectGetter), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObjectGetter___getattr, __pyx_k_TemplateObjectGetter___getattr, sizeof(__pyx_k_TemplateObjectGetter___getattr), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObjectGetter___init, __pyx_k_TemplateObjectGetter___init, sizeof(__pyx_k_TemplateObjectGetter___init), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObjectGetter___repr, __pyx_k_TemplateObjectGetter___repr, sizeof(__pyx_k_TemplateObjectGetter___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObjectGetter__template, __pyx_k_TemplateObjectGetter__template, sizeof(__pyx_k_TemplateObjectGetter__template), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObject___init, __pyx_k_TemplateObject___init, sizeof(__pyx_k_TemplateObject___init), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObject___repr, __pyx_k_TemplateObject___repr, sizeof(__pyx_k_TemplateObject___repr), 0, 0, 1, 1},
  {&__pyx_n_s_TemplateObject__name, __pyx_k_TemplateObject__name, sizeof(__pyx_k_TemplateObject__name), 0, 0, 1, 1},
  {&__pyx_n_s_Template___init, __pyx_k_Template___init, sizeof(__pyx_k_Template___init), 0, 0, 1, 1},
  {&__pyx_n_s_Template___repr, __pyx_k_Template___repr, sizeof(__pyx_k_Template___repr), 0, 0, 1, 1},
  {&__pyx_n_s_Template__add_line_info, __pyx_k_Template__add_line_info, sizeof(__pyx_k_Template__add_line_info), 0, 0, 1, 1},
  {&__pyx_n_s_Template__eval, __pyx_k_Template__eval, sizeof(__pyx_k_Template__eval), 0, 0, 1, 1},
  {&__pyx_n_s_Template__exec, __pyx_k_Template__exec, sizeof(__pyx_k_Template__exec), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret, __pyx_k_Template__interpret, sizeof(__pyx_k_Template__interpret), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret_code, __pyx_k_Template__interpret_code, sizeof(__pyx_k_Template__interpret_code), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret_codes, __pyx_k_Template__interpret_codes, sizeof(__pyx_k_Template__interpret_codes), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret_for, __pyx_k_Template__interpret_for, sizeof(__pyx_k_Template__interpret_for), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret_if, __pyx_k_Template__interpret_if, sizeof(__pyx_k_Template__interpret_if), 0, 0, 1, 1},
  {&__pyx_n_s_Template__interpret_inherit, __pyx_k_Template__interpret_inherit, sizeof(__pyx_k_Template__interpret_inherit), 0, 0, 1, 1},
  {&__pyx_n_s_Template__repr, __pyx_k_Template__repr, sizeof(__pyx_k_Template__repr), 0, 0, 1, 1},
  {&__pyx_n_s_Template_from_filename, __pyx_k_Template_from_filename, sizeof(__pyx_k_Template_from_filename), 0, 0, 1, 1},
  {&__pyx_n_s_Template_substitute, __pyx_k_Template_substitute, sizeof(__pyx_k_Template_substitute), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unexpected_argument_s, __pyx_k_Unexpected_argument_s, sizeof(__pyx_k_Unexpected_argument_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Unexpected_s, __pyx_k_Unexpected_s, sizeof(__pyx_k_Unexpected_s), 0, 0, 1, 0},
  {&__pyx_kp_s_Unexpected_token_r_at_s, __pyx_k_Unexpected_token_r_at_s, sizeof(__pyx_k_Unexpected_token_r_at_s), 0, 0, 1, 0},
  {&__pyx_n_s_UnicodeDecodeError, __pyx_k_UnicodeDecodeError, sizeof(__pyx_k_UnicodeDecodeError), 0, 0, 1, 1},
  {&__pyx_n_s_UnicodeEncodeError, __pyx_k_UnicodeEncodeError, sizeof(__pyx_k_UnicodeEncodeError), 0, 0, 1, 1},
  {&__pyx_kp_s_Unknown_code_r, __pyx_k_Unknown_code_r, sizeof(__pyx_k_Unknown_code_r), 0, 0, 1, 0},
  {&__pyx_kp_s_Use_HTML_style_filling_including, __pyx_k_Use_HTML_style_filling_including, sizeof(__pyx_k_Use_HTML_style_filling_including), 0, 0, 1, 0},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s_You_can_only_give_one_positional, __pyx_k_You_can_only_give_one_positional, sizeof(__pyx_k_You_can_only_give_one_positional), 0, 0, 1, 0},
  {&__pyx_kp_s_You_can_only_give_positional_or, __pyx_k_You_can_only_give_positional_or, sizeof(__pyx_k_You_can_only_give_positional_or), 0, 0, 1, 0},
  {&__pyx_kp_s_You_cannot_have_in_the_variable, __pyx_k_You_cannot_have_in_the_variable, sizeof(__pyx_k_You_cannot_have_in_the_variable), 0, 0, 1, 0},
  {&__pyx_kp_s_You_cannot_use_inheritance_witho, __pyx_k_You_cannot_use_inheritance_witho, sizeof(__pyx_k_You_cannot_use_inheritance_witho), 0, 0, 1, 0},
  {&__pyx_kp_s_You_must_give_a_template_filenam, __pyx_k_You_must_give_a_template_filenam, sizeof(__pyx_k_You_must_give_a_template_filenam), 0, 0, 1, 0},
  {&__pyx_kp_s__100, __pyx_k__100, sizeof(__pyx_k__100), 0, 0, 1, 0},
  {&__pyx_kp_s__101, __pyx_k__101, sizeof(__pyx_k__101), 0, 0, 1, 0},
  {&__pyx_kp_s__102, __pyx_k__102, sizeof(__pyx_k__102), 0, 0, 1, 0},
  {&__pyx_kp_s__103, __pyx_k__103, sizeof(__pyx_k__103), 0, 0, 1, 0},
  {&__pyx_kp_s__104, __pyx_k__104, sizeof(__pyx_k__104), 0, 0, 1, 0},
  {&__pyx_kp_s__117, __pyx_k__117, sizeof(__pyx_k__117), 0, 0, 1, 0},
  {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
  {&__pyx_kp_s__126, __pyx_k__126, sizeof(__pyx_k__126), 0, 0, 1, 0},
  {&__pyx_kp_s__127, __pyx_k__127, sizeof(__pyx_k__127), 0, 0, 1, 0},
  {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1},
  {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0},
  {&__pyx_kp_s__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 1, 0},
  {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
  {&__pyx_kp_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 0},
  {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
  {&__pyx_kp_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 0},
  {&__pyx_kp_s__55, __pyx_k__55, sizeof(__pyx_k__55), 0, 0, 1, 0},
  {&__pyx_kp_s__70, __pyx_k__70, sizeof(__pyx_k__70), 0, 0, 1, 0},
  {&__pyx_kp_s__71, __pyx_k__71, sizeof(__pyx_k__71), 0, 0, 1, 0},
  {&__pyx_kp_s__77, __pyx_k__77, sizeof(__pyx_k__77), 0, 0, 1, 0},
  {&__pyx_kp_s__89, __pyx_k__89, sizeof(__pyx_k__89), 0, 0, 1, 0},
  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
  {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
  {&__pyx_kp_s__99, __pyx_k__99, sizeof(__pyx_k__99), 0, 0, 1, 0},
  {&__pyx_kp_s_a_z__a_z0_9, __pyx_k_a_z__a_z0_9, sizeof(__pyx_k_a_z__a_z0_9), 0, 0, 1, 0},
  {&__pyx_n_s_action, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1},
  {&__pyx_n_s_add_line_info, __pyx_k_add_line_info, sizeof(__pyx_k_add_line_info), 0, 0, 1, 1},
  {&__pyx_n_s_add_option, __pyx_k_add_option, sizeof(__pyx_k_add_option), 0, 0, 1, 1},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_arg0, __pyx_k_arg0, sizeof(__pyx_k_arg0), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_argv, __pyx_k_argv, sizeof(__pyx_k_argv), 0, 0, 1, 1},
  {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
  {&__pyx_n_s_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 0, 0, 1, 1},
  {&__pyx_n_s_body, __pyx_k_body, sizeof(__pyx_k_body), 0, 0, 1, 1},
  {&__pyx_n_s_body_2, __pyx_k_body_2, sizeof(__pyx_k_body_2), 0, 0, 1, 1},
  {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
  {&__pyx_n_s_bound_self, __pyx_k_bound_self, sizeof(__pyx_k_bound_self), 0, 0, 1, 1},
  {&__pyx_n_s_bound_self_2, __pyx_k_bound_self_2, sizeof(__pyx_k_bound_self_2), 0, 0, 1, 1},
  {&__pyx_n_s_break, __pyx_k_break, sizeof(__pyx_k_break), 0, 0, 1, 1},
  {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
  {&__pyx_n_s_bunch, __pyx_k_bunch, sizeof(__pyx_k_bunch), 0, 0, 1, 1},
  {&__pyx_n_s_bunch___getattr, __pyx_k_bunch___getattr, sizeof(__pyx_k_bunch___getattr), 0, 0, 1, 1},
  {&__pyx_n_s_bunch___getitem, __pyx_k_bunch___getitem, sizeof(__pyx_k_bunch___getitem), 0, 0, 1, 1},
  {&__pyx_n_s_bunch___init, __pyx_k_bunch___init, sizeof(__pyx_k_bunch___init), 0, 0, 1, 1},
  {&__pyx_n_s_bunch___repr, __pyx_k_bunch___repr, sizeof(__pyx_k_bunch___repr), 0, 0, 1, 1},
  {&__pyx_n_s_bunch___setattr, __pyx_k_bunch___setattr, sizeof(__pyx_k_bunch___setattr), 0, 0, 1, 1},
  {&__pyx_n_s_bytes, __pyx_k_bytes, sizeof(__pyx_k_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
  {&__pyx_n_s_caller, __pyx_k_caller, sizeof(__pyx_k_caller), 0, 0, 1, 1},
  {&__pyx_n_s_cgi, __pyx_k_cgi, sizeof(__pyx_k_cgi), 0, 0, 1, 1},
  {&__pyx_n_s_chunks, __pyx_k_chunks, sizeof(__pyx_k_chunks), 0, 0, 1, 1},
  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  {&__pyx_n_s_codes, __pyx_k_codes, sizeof(__pyx_k_codes), 0, 0, 1, 1},
  {&__pyx_n_s_coerce_text, __pyx_k_coerce_text, sizeof(__pyx_k_coerce_text), 0, 0, 1, 1},
  {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1},
  {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
  {&__pyx_n_s_compat3, __pyx_k_compat3, sizeof(__pyx_k_compat3), 0, 0, 1, 1},
  {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
  {&__pyx_n_s_cond, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {&__pyx_n_s_content, __pyx_k_content, sizeof(__pyx_k_content), 0, 0, 1, 1},
  {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
  {&__pyx_n_s_continue, __pyx_k_continue, sizeof(__pyx_k_continue), 0, 0, 1, 1},
  {&__pyx_kp_s_continue_outside_of_for_loop, __pyx_k_continue_outside_of_for_loop, sizeof(__pyx_k_continue_outside_of_for_loop), 0, 0, 1, 0},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  {&__pyx_n_s_current, __pyx_k_current, sizeof(__pyx_k_current), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_def, __pyx_k_def, sizeof(__pyx_k_def), 0, 0, 1, 1},
  {&__pyx_kp_s_def_2, __pyx_k_def_2, sizeof(__pyx_k_def_2), 0, 0, 1, 0},
  {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1},
  {&__pyx_kp_s_default_2, __pyx_k_default_2, sizeof(__pyx_k_default_2), 0, 0, 1, 0},
  {&__pyx_n_s_default_encoding, __pyx_k_default_encoding, sizeof(__pyx_k_default_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_default_expr, __pyx_k_default_expr, sizeof(__pyx_k_default_expr), 0, 0, 1, 1},
  {&__pyx_n_s_default_inherit, __pyx_k_default_inherit, sizeof(__pyx_k_default_inherit), 0, 0, 1, 1},
  {&__pyx_n_s_default_namespace, __pyx_k_default_namespace, sizeof(__pyx_k_default_namespace), 0, 0, 1, 1},
  {&__pyx_kp_s_default_x_y_is_not_supported, __pyx_k_default_x_y_is_not_supported, sizeof(__pyx_k_default_x_y_is_not_supported), 0, 0, 1, 0},
  {&__pyx_n_s_defaults, __pyx_k_defaults, sizeof(__pyx_k_defaults), 0, 0, 1, 1},
  {&__pyx_n_s_defs, __pyx_k_defs, sizeof(__pyx_k_defs), 0, 0, 1, 1},
  {&__pyx_n_s_delimeters, __pyx_k_delimeters, sizeof(__pyx_k_delimeters), 0, 0, 1, 1},
  {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1},
  {&__pyx_n_s_dirname, __pyx_k_dirname, sizeof(__pyx_k_dirname), 0, 0, 1, 1},
  {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 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_ecol, __pyx_k_ecol, sizeof(__pyx_k_ecol), 0, 0, 1, 1},
  {&__pyx_kp_s_elif, __pyx_k_elif, sizeof(__pyx_k_elif), 0, 0, 1, 0},
  {&__pyx_n_s_elif_2, __pyx_k_elif_2, sizeof(__pyx_k_elif_2), 0, 0, 1, 1},
  {&__pyx_n_s_else, __pyx_k_else, sizeof(__pyx_k_else), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_end_braces, __pyx_k_end_braces, sizeof(__pyx_k_end_braces), 0, 0, 1, 1},
  {&__pyx_n_s_end_pos, __pyx_k_end_pos, sizeof(__pyx_k_end_pos), 0, 0, 1, 1},
  {&__pyx_n_s_enddef, __pyx_k_enddef, sizeof(__pyx_k_enddef), 0, 0, 1, 1},
  {&__pyx_n_s_endfor, __pyx_k_endfor, sizeof(__pyx_k_endfor), 0, 0, 1, 1},
  {&__pyx_n_s_endif, __pyx_k_endif, sizeof(__pyx_k_endif), 0, 0, 1, 1},
  {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1},
  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
  {&__pyx_kp_s_env, __pyx_k_env, sizeof(__pyx_k_env), 0, 0, 1, 0},
  {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1},
  {&__pyx_n_s_erow, __pyx_k_erow, sizeof(__pyx_k_erow), 0, 0, 1, 1},
  {&__pyx_n_s_escape, __pyx_k_escape, sizeof(__pyx_k_escape), 0, 0, 1, 1},
  {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1},
  {&__pyx_n_s_eval_2, __pyx_k_eval_2, sizeof(__pyx_k_eval_2), 0, 0, 1, 1},
  {&__pyx_n_s_exec, __pyx_k_exec, sizeof(__pyx_k_exec), 0, 0, 1, 1},
  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
  {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1},
  {&__pyx_n_s_extra_kw, __pyx_k_extra_kw, sizeof(__pyx_k_extra_kw), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_f_globals, __pyx_k_f_globals, sizeof(__pyx_k_f_globals), 0, 0, 1, 1},
  {&__pyx_n_s_f_lineno, __pyx_k_f_lineno, sizeof(__pyx_k_f_lineno), 0, 0, 1, 1},
  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
  {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1},
  {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
  {&__pyx_n_s_fill_command, __pyx_k_fill_command, sizeof(__pyx_k_fill_command), 0, 0, 1, 1},
  {&__pyx_n_s_fill_command_usage, __pyx_k_fill_command_usage, sizeof(__pyx_k_fill_command_usage), 0, 0, 1, 1},
  {&__pyx_n_s_find_position, __pyx_k_find_position, sizeof(__pyx_k_find_position), 0, 0, 1, 1},
  {&__pyx_n_s_finditer, __pyx_k_finditer, sizeof(__pyx_k_finditer), 0, 0, 1, 1},
  {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
  {&__pyx_n_s_for, __pyx_k_for, sizeof(__pyx_k_for), 0, 0, 1, 1},
  {&__pyx_kp_s_for_2, __pyx_k_for_2, sizeof(__pyx_k_for_2), 0, 0, 1, 0},
  {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
  {&__pyx_n_s_from_filename, __pyx_k_from_filename, sizeof(__pyx_k_from_filename), 0, 0, 1, 1},
  {&__pyx_n_s_from_template, __pyx_k_from_template, sizeof(__pyx_k_from_template), 0, 0, 1, 1},
  {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
  {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1},
  {&__pyx_n_s_func_name_2, __pyx_k_func_name_2, sizeof(__pyx_k_func_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_func_signature, __pyx_k_func_signature, sizeof(__pyx_k_func_signature), 0, 0, 1, 1},
  {&__pyx_n_s_func_signature_2, __pyx_k_func_signature_2, sizeof(__pyx_k_func_signature_2), 0, 0, 1, 1},
  {&__pyx_n_s_generate_tokens, __pyx_k_generate_tokens, sizeof(__pyx_k_generate_tokens), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_distribution, __pyx_k_get_distribution, sizeof(__pyx_k_get_distribution), 0, 0, 1, 1},
  {&__pyx_n_s_get_file_template, __pyx_k_get_file_template, sizeof(__pyx_k_get_file_template), 0, 0, 1, 1},
  {&__pyx_n_s_get_template, __pyx_k_get_template, sizeof(__pyx_k_get_template), 0, 0, 1, 1},
  {&__pyx_n_s_get_token, __pyx_k_get_token, sizeof(__pyx_k_get_token), 0, 0, 1, 1},
  {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
  {&__pyx_n_s_getframe, __pyx_k_getframe, sizeof(__pyx_k_getframe), 0, 0, 1, 1},
  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
  {&__pyx_n_s_globals, __pyx_k_globals, sizeof(__pyx_k_globals), 0, 0, 1, 1},
  {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
  {&__pyx_n_s_help, __pyx_k_help, sizeof(__pyx_k_help), 0, 0, 1, 1},
  {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
  {&__pyx_n_s_html, __pyx_k_html, sizeof(__pyx_k_html), 0, 0, 1, 1},
  {&__pyx_n_s_html_2, __pyx_k_html_2, sizeof(__pyx_k_html_2), 0, 0, 1, 1},
  {&__pyx_kp_s_html_3, __pyx_k_html_3, sizeof(__pyx_k_html_3), 0, 0, 1, 0},
  {&__pyx_n_s_html___html, __pyx_k_html___html, sizeof(__pyx_k_html___html), 0, 0, 1, 1},
  {&__pyx_n_s_html___init, __pyx_k_html___init, sizeof(__pyx_k_html___init), 0, 0, 1, 1},
  {&__pyx_n_s_html___repr, __pyx_k_html___repr, sizeof(__pyx_k_html___repr), 0, 0, 1, 1},
  {&__pyx_n_s_html___str, __pyx_k_html___str, sizeof(__pyx_k_html___str), 0, 0, 1, 1},
  {&__pyx_n_s_html_quote, __pyx_k_html_quote, sizeof(__pyx_k_html_quote), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_kp_s_if, __pyx_k_if, sizeof(__pyx_k_if), 0, 0, 1, 0},
  {&__pyx_n_s_if_2, __pyx_k_if_2, sizeof(__pyx_k_if_2), 0, 0, 1, 1},
  {&__pyx_kp_s_if_elif_for_def_inherit_default, __pyx_k_if_elif_for_def_inherit_default, sizeof(__pyx_k_if_elif_for_def_inherit_default), 0, 0, 1, 0},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_in_expr, __pyx_k_in_expr, sizeof(__pyx_k_in_expr), 0, 0, 1, 1},
  {&__pyx_kp_s_in_file_s, __pyx_k_in_file_s, sizeof(__pyx_k_in_file_s), 0, 0, 1, 0},
  {&__pyx_n_s_in_re, __pyx_k_in_re, sizeof(__pyx_k_in_re), 0, 0, 1, 1},
  {&__pyx_kp_s_in_s, __pyx_k_in_s, sizeof(__pyx_k_in_s), 0, 0, 1, 0},
  {&__pyx_kp_s_in_string_r, __pyx_k_in_string_r, sizeof(__pyx_k_in_string_r), 0, 0, 1, 0},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_inherit, __pyx_k_inherit, sizeof(__pyx_k_inherit), 0, 0, 1, 1},
  {&__pyx_n_s_inherit_2, __pyx_k_inherit_2, sizeof(__pyx_k_inherit_2), 0, 0, 1, 1},
  {&__pyx_kp_s_inherit_3, __pyx_k_inherit_3, sizeof(__pyx_k_inherit_3), 0, 0, 1, 0},
  {&__pyx_n_s_inherit_template, __pyx_k_inherit_template, sizeof(__pyx_k_inherit_template), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_interpret, __pyx_k_interpret, sizeof(__pyx_k_interpret), 0, 0, 1, 1},
  {&__pyx_n_s_interpret_code, __pyx_k_interpret_code, sizeof(__pyx_k_interpret_code), 0, 0, 1, 1},
  {&__pyx_n_s_interpret_codes, __pyx_k_interpret_codes, sizeof(__pyx_k_interpret_codes), 0, 0, 1, 1},
  {&__pyx_n_s_interpret_for, __pyx_k_interpret_for, sizeof(__pyx_k_interpret_for), 0, 0, 1, 1},
  {&__pyx_n_s_interpret_if, __pyx_k_interpret_if, sizeof(__pyx_k_interpret_if), 0, 0, 1, 1},
  {&__pyx_n_s_interpret_inherit, __pyx_k_interpret_inherit, sizeof(__pyx_k_interpret_inherit), 0, 0, 1, 1},
  {&__pyx_kp_s_invalid_syntax_in_expression_s, __pyx_k_invalid_syntax_in_expression_s, sizeof(__pyx_k_invalid_syntax_in_expression_s), 0, 0, 1, 0},
  {&__pyx_n_s_io, __pyx_k_io, sizeof(__pyx_k_io), 0, 0, 1, 1},
  {&__pyx_n_s_is_unicode, __pyx_k_is_unicode, sizeof(__pyx_k_is_unicode), 0, 0, 1, 1},
  {&__pyx_n_s_isolate_expression, __pyx_k_isolate_expression, sizeof(__pyx_k_isolate_expression), 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_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
  {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
  {&__pyx_n_s_last, __pyx_k_last, sizeof(__pyx_k_last), 0, 0, 1, 1},
  {&__pyx_n_s_last_index, __pyx_k_last_index, sizeof(__pyx_k_last_index), 0, 0, 1, 1},
  {&__pyx_n_s_last_pos, __pyx_k_last_pos, sizeof(__pyx_k_last_pos), 0, 0, 1, 1},
  {&__pyx_n_s_last_trim, __pyx_k_last_trim, sizeof(__pyx_k_last_trim), 0, 0, 1, 1},
  {&__pyx_n_s_latin1, __pyx_k_latin1, sizeof(__pyx_k_latin1), 0, 0, 1, 1},
  {&__pyx_n_s_lead_whitespace_re, __pyx_k_lead_whitespace_re, sizeof(__pyx_k_lead_whitespace_re), 0, 0, 1, 1},
  {&__pyx_n_s_lex, __pyx_k_lex, sizeof(__pyx_k_lex), 0, 0, 1, 1},
  {&__pyx_kp_u_lex_line_629, __pyx_k_lex_line_629, sizeof(__pyx_k_lex_line_629), 0, 1, 0, 0},
  {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
  {&__pyx_n_s_line_offset, __pyx_k_line_offset, sizeof(__pyx_k_line_offset), 0, 0, 1, 1},
  {&__pyx_n_s_lineno, __pyx_k_lineno, sizeof(__pyx_k_lineno), 0, 0, 1, 1},
  {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1},
  {&__pyx_n_s_looper, __pyx_k_looper, sizeof(__pyx_k_looper), 0, 0, 1, 1},
  {&__pyx_n_s_looper_2, __pyx_k_looper_2, sizeof(__pyx_k_looper_2), 0, 0, 1, 1},
  {&__pyx_n_s_lstrip, __pyx_k_lstrip, sizeof(__pyx_k_lstrip), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
  {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_metavar, __pyx_k_metavar, sizeof(__pyx_k_metavar), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
  {&__pyx_kp_s_n_r_t, __pyx_k_n_r_t, sizeof(__pyx_k_n_r_t), 0, 0, 1, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_name_3, __pyx_k_name_3, sizeof(__pyx_k_name_3), 0, 0, 1, 1},
  {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
  {&__pyx_n_s_nest_count, __pyx_k_nest_count, sizeof(__pyx_k_nest_count), 0, 0, 1, 1},
  {&__pyx_n_s_nest_type, __pyx_k_nest_type, sizeof(__pyx_k_nest_type), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_next_chunk, __pyx_k_next_chunk, sizeof(__pyx_k_next_chunk), 0, 0, 1, 1},
  {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1},
  {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1},
  {&__pyx_n_s_ns_2, __pyx_k_ns_2, sizeof(__pyx_k_ns_2), 0, 0, 1, 1},
  {&__pyx_kp_s_o, __pyx_k_o, sizeof(__pyx_k_o), 0, 0, 1, 0},
  {&__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_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1},
  {&__pyx_n_s_optparse, __pyx_k_optparse, sizeof(__pyx_k_optparse), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_out, __pyx_k_out, sizeof(__pyx_k_out), 0, 0, 1, 1},
  {&__pyx_kp_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 0},
  {&__pyx_n_s_output_2, __pyx_k_output_2, sizeof(__pyx_k_output_2), 0, 0, 1, 1},
  {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
  {&__pyx_n_s_parse_args, __pyx_k_parse_args, sizeof(__pyx_k_parse_args), 0, 0, 1, 1},
  {&__pyx_n_s_parse_cond, __pyx_k_parse_cond, sizeof(__pyx_k_parse_cond), 0, 0, 1, 1},
  {&__pyx_n_s_parse_def, __pyx_k_parse_def, sizeof(__pyx_k_parse_def), 0, 0, 1, 1},
  {&__pyx_n_s_parse_default, __pyx_k_parse_default, sizeof(__pyx_k_parse_default), 0, 0, 1, 1},
  {&__pyx_n_s_parse_expr, __pyx_k_parse_expr, sizeof(__pyx_k_parse_expr), 0, 0, 1, 1},
  {&__pyx_n_s_parse_for, __pyx_k_parse_for, sizeof(__pyx_k_parse_for), 0, 0, 1, 1},
  {&__pyx_n_s_parse_inherit, __pyx_k_parse_inherit, sizeof(__pyx_k_parse_inherit), 0, 0, 1, 1},
  {&__pyx_kp_u_parse_line_766, __pyx_k_parse_line_766, sizeof(__pyx_k_parse_line_766), 0, 1, 0, 0},
  {&__pyx_n_s_parse_one_cond, __pyx_k_parse_one_cond, sizeof(__pyx_k_parse_one_cond), 0, 0, 1, 1},
  {&__pyx_n_s_parse_signature, __pyx_k_parse_signature, sizeof(__pyx_k_parse_signature), 0, 0, 1, 1},
  {&__pyx_n_s_parse_signature_2, __pyx_k_parse_signature_2, sizeof(__pyx_k_parse_signature_2), 0, 0, 1, 1},
  {&__pyx_n_s_parse_signature_locals_get_token, __pyx_k_parse_signature_locals_get_token, sizeof(__pyx_k_parse_signature_locals_get_token), 0, 0, 1, 1},
  {&__pyx_n_s_parsed, __pyx_k_parsed, sizeof(__pyx_k_parsed), 0, 0, 1, 1},
  {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
  {&__pyx_n_s_part, __pyx_k_part, sizeof(__pyx_k_part), 0, 0, 1, 1},
  {&__pyx_n_s_parts, __pyx_k_parts, sizeof(__pyx_k_parts), 0, 0, 1, 1},
  {&__pyx_n_s_paste_script_template_renderer, __pyx_k_paste_script_template_renderer, sizeof(__pyx_k_paste_script_template_renderer), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pieces, __pyx_k_pieces, sizeof(__pyx_k_pieces), 0, 0, 1, 1},
  {&__pyx_n_s_pkg_resources, __pyx_k_pkg_resources, sizeof(__pyx_k_pkg_resources), 0, 0, 1, 1},
  {&__pyx_n_s_plain, __pyx_k_plain, sizeof(__pyx_k_plain), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  {&__pyx_n_s_pos_2, __pyx_k_pos_2, sizeof(__pyx_k_pos_2), 0, 0, 1, 1},
  {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_prev, __pyx_k_prev, sizeof(__pyx_k_prev), 0, 0, 1, 1},
  {&__pyx_n_s_prev_ok, __pyx_k_prev_ok, sizeof(__pyx_k_prev_ok), 0, 0, 1, 1},
  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
  {&__pyx_kp_s_prog_OPTIONS_TEMPLATE_arg_value, __pyx_k_prog_OPTIONS_TEMPLATE_arg_value, sizeof(__pyx_k_prog_OPTIONS_TEMPLATE_arg_value), 0, 0, 1, 0},
  {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1},
  {&__pyx_kp_s_py_2, __pyx_k_py_2, sizeof(__pyx_k_py_2), 0, 0, 1, 0},
  {&__pyx_kp_s_pyc, __pyx_k_pyc, sizeof(__pyx_k_pyc), 0, 0, 1, 0},
  {&__pyx_kp_s_pyo, __pyx_k_pyo, sizeof(__pyx_k_pyo), 0, 0, 1, 0},
  {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
  {&__pyx_n_s_quote, __pyx_k_quote, sizeof(__pyx_k_quote), 0, 0, 1, 1},
  {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
  {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
  {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
  {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
  {&__pyx_n_s_reason, __pyx_k_reason, sizeof(__pyx_k_reason), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
  {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
  {&__pyx_n_s_repr_2, __pyx_k_repr_2, sizeof(__pyx_k_repr_2), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_rfind, __pyx_k_rfind, sizeof(__pyx_k_rfind), 0, 0, 1, 1},
  {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
  {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
  {&__pyx_kp_s_s_around_r, __pyx_k_s_around_r, sizeof(__pyx_k_s_around_r), 0, 0, 1, 0},
  {&__pyx_kp_s_s_at_line_s_column_s, __pyx_k_s_at_line_s_column_s, sizeof(__pyx_k_s_at_line_s_column_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_in_s, __pyx_k_s_in_s, sizeof(__pyx_k_s_in_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_inside_expression, __pyx_k_s_inside_expression, sizeof(__pyx_k_s_inside_expression), 0, 0, 1, 0},
  {&__pyx_kp_s_s_outside_expression, __pyx_k_s_outside_expression, sizeof(__pyx_k_s_outside_expression), 0, 0, 1, 0},
  {&__pyx_kp_s_s_outside_of_an_if_block, __pyx_k_s_outside_of_an_if_block, sizeof(__pyx_k_s_outside_of_an_if_block), 0, 0, 1, 0},
  {&__pyx_kp_s_s_r, __pyx_k_s_r, sizeof(__pyx_k_s_r), 0, 0, 1, 0},
  {&__pyx_kp_s_s_r_2, __pyx_k_s_r_2, sizeof(__pyx_k_s_r_2), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_3, __pyx_k_s_s_3, sizeof(__pyx_k_s_s_3), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_name_r, __pyx_k_s_s_name_r, sizeof(__pyx_k_s_s_name_r), 0, 0, 1, 0},
  {&__pyx_kp_s_s_with_no_expression, __pyx_k_s_with_no_expression, sizeof(__pyx_k_s_with_no_expression), 0, 0, 1, 0},
  {&__pyx_n_s_scol, __pyx_k_scol, sizeof(__pyx_k_scol), 0, 0, 1, 1},
  {&__pyx_n_s_search, __pyx_k_search, sizeof(__pyx_k_search), 0, 0, 1, 1},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 1},
  {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
  {&__pyx_n_s_sig, __pyx_k_sig, sizeof(__pyx_k_sig), 0, 0, 1, 1},
  {&__pyx_n_s_sig_args, __pyx_k_sig_args, sizeof(__pyx_k_sig_args), 0, 0, 1, 1},
  {&__pyx_n_s_sig_text, __pyx_k_sig_text, sizeof(__pyx_k_sig_text), 0, 0, 1, 1},
  {&__pyx_n_s_signature, __pyx_k_signature, sizeof(__pyx_k_signature), 0, 0, 1, 1},
  {&__pyx_n_s_single_statements, __pyx_k_single_statements, sizeof(__pyx_k_single_statements), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_splitlines, __pyx_k_splitlines, sizeof(__pyx_k_splitlines), 0, 0, 1, 1},
  {&__pyx_n_s_srow, __pyx_k_srow, sizeof(__pyx_k_srow), 0, 0, 1, 1},
  {&__pyx_n_s_stacklevel, __pyx_k_stacklevel, sizeof(__pyx_k_stacklevel), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_start_braces, __pyx_k_start_braces, sizeof(__pyx_k_start_braces), 0, 0, 1, 1},
  {&__pyx_n_s_start_pos, __pyx_k_start_pos, sizeof(__pyx_k_start_pos), 0, 0, 1, 1},
  {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
  {&__pyx_n_s_statement_re, __pyx_k_statement_re, sizeof(__pyx_k_statement_re), 0, 0, 1, 1},
  {&__pyx_n_s_stdin, __pyx_k_stdin, sizeof(__pyx_k_stdin), 0, 0, 1, 1},
  {&__pyx_kp_s_stdin_2, __pyx_k_stdin_2, sizeof(__pyx_k_stdin_2), 0, 0, 1, 0},
  {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
  {&__pyx_n_s_store_true, __pyx_k_store_true, sizeof(__pyx_k_store_true), 0, 0, 1, 1},
  {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
  {&__pyx_kp_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 0},
  {&__pyx_n_s_string_2, __pyx_k_string_2, sizeof(__pyx_k_string_2), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1},
  {&__pyx_n_s_sub_html, __pyx_k_sub_html, sizeof(__pyx_k_sub_html), 0, 0, 1, 1},
  {&__pyx_n_s_subdefs, __pyx_k_subdefs, sizeof(__pyx_k_subdefs), 0, 0, 1, 1},
  {&__pyx_n_s_substitute, __pyx_k_substitute, sizeof(__pyx_k_substitute), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_kp_s_t_n, __pyx_k_t_n, sizeof(__pyx_k_t_n), 0, 0, 1, 0},
  {&__pyx_kp_s_tempita_function_s_s_at_s_s, __pyx_k_tempita_function_s_s_at_s_s, sizeof(__pyx_k_tempita_function_s_s_at_s_s), 0, 0, 1, 0},
  {&__pyx_n_s_templ, __pyx_k_templ, sizeof(__pyx_k_templ), 0, 0, 1, 1},
  {&__pyx_n_s_template, __pyx_k_template, sizeof(__pyx_k_template), 0, 0, 1, 1},
  {&__pyx_n_s_template_2, __pyx_k_template_2, sizeof(__pyx_k_template_2), 0, 0, 1, 1},
  {&__pyx_n_s_template_content, __pyx_k_template_content, sizeof(__pyx_k_template_content), 0, 0, 1, 1},
  {&__pyx_n_s_template_name, __pyx_k_template_name, sizeof(__pyx_k_template_name), 0, 0, 1, 1},
  {&__pyx_n_s_template_name_2, __pyx_k_template_name_2, sizeof(__pyx_k_template_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_template_obj, __pyx_k_template_obj, sizeof(__pyx_k_template_obj), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_k_tmp_pip_install_9i_72p5f_cython, sizeof(__pyx_k_tmp_pip_install_9i_72p5f_cython), 0, 0, 1, 0},
  {&__pyx_n_s_tmpl, __pyx_k_tmpl, sizeof(__pyx_k_tmpl), 0, 0, 1, 1},
  {&__pyx_n_s_tok_string, __pyx_k_tok_string, sizeof(__pyx_k_tok_string), 0, 0, 1, 1},
  {&__pyx_n_s_tok_type, __pyx_k_tok_type, sizeof(__pyx_k_tok_type), 0, 0, 1, 1},
  {&__pyx_n_s_token_re, __pyx_k_token_re, sizeof(__pyx_k_token_re), 0, 0, 1, 1},
  {&__pyx_n_s_tokenize, __pyx_k_tokenize, sizeof(__pyx_k_tokenize), 0, 0, 1, 1},
  {&__pyx_n_s_tokens, __pyx_k_tokens, sizeof(__pyx_k_tokens), 0, 0, 1, 1},
  {&__pyx_n_s_traceback_hide, __pyx_k_traceback_hide, sizeof(__pyx_k_traceback_hide), 0, 0, 1, 1},
  {&__pyx_n_s_trail_whitespace_re, __pyx_k_trail_whitespace_re, sizeof(__pyx_k_trail_whitespace_re), 0, 0, 1, 1},
  {&__pyx_n_s_trim_lex, __pyx_k_trim_lex, sizeof(__pyx_k_trim_lex), 0, 0, 1, 1},
  {&__pyx_kp_u_trim_lex_line_698, __pyx_k_trim_lex_line_698, sizeof(__pyx_k_trim_lex_line_698), 0, 1, 0, 0},
  {&__pyx_n_s_trim_whitespace, __pyx_k_trim_whitespace, sizeof(__pyx_k_trim_whitespace), 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_unicode_2, __pyx_k_unicode_2, sizeof(__pyx_k_unicode_2), 0, 0, 1, 1},
  {&__pyx_n_s_unicode_3, __pyx_k_unicode_3, sizeof(__pyx_k_unicode_3), 0, 0, 1, 1},
  {&__pyx_n_s_unnest_type, __pyx_k_unnest_type, sizeof(__pyx_k_unnest_type), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_url, __pyx_k_url, sizeof(__pyx_k_url), 0, 0, 1, 1},
  {&__pyx_n_s_url_quote, __pyx_k_url_quote, sizeof(__pyx_k_url_quote), 0, 0, 1, 1},
  {&__pyx_n_s_urllib, __pyx_k_urllib, sizeof(__pyx_k_urllib), 0, 0, 1, 1},
  {&__pyx_n_s_urllib_parse, __pyx_k_urllib_parse, sizeof(__pyx_k_urllib_parse), 0, 0, 1, 1},
  {&__pyx_n_s_usage, __pyx_k_usage, sizeof(__pyx_k_usage), 0, 0, 1, 1},
  {&__pyx_n_s_use_env, __pyx_k_use_env, sizeof(__pyx_k_use_env), 0, 0, 1, 1},
  {&__pyx_n_s_use_html, __pyx_k_use_html, sizeof(__pyx_k_use_html), 0, 0, 1, 1},
  {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_value_expr, __pyx_k_value_expr, sizeof(__pyx_k_value_expr), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
  {&__pyx_n_s_var_arg, __pyx_k_var_arg, sizeof(__pyx_k_var_arg), 0, 0, 1, 1},
  {&__pyx_n_s_var_arg_type, __pyx_k_var_arg_type, sizeof(__pyx_k_var_arg_type), 0, 0, 1, 1},
  {&__pyx_n_s_var_args, __pyx_k_var_args, sizeof(__pyx_k_var_args), 0, 0, 1, 1},
  {&__pyx_n_s_var_kw, __pyx_k_var_kw, sizeof(__pyx_k_var_kw), 0, 0, 1, 1},
  {&__pyx_n_s_var_name, __pyx_k_var_name, sizeof(__pyx_k_var_name), 0, 0, 1, 1},
  {&__pyx_n_s_var_re, __pyx_k_var_re, sizeof(__pyx_k_var_re), 0, 0, 1, 1},
  {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__pyx_n_s_xmlcharrefreplace, __pyx_k_xmlcharrefreplace, sizeof(__pyx_k_xmlcharrefreplace), 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_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 39, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 121, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 147, __pyx_L1_error)
  __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 160, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 160, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 165, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 273, __pyx_L1_error)
  __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 300, __pyx_L1_error)
  __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) __PYX_ERR(0, 301, __pyx_L1_error)
  __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(0, 332, __pyx_L1_error)
  __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(0, 360, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 397, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 398, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1028, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "Cython/Tempita/_tempita.py":128
 *                 if '__file__' in globals:
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):             # <<<<<<<<<<<<<<
 *                         name = name[:-1]
 *                 elif '__name__' in globals:
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_pyc); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "Cython/Tempita/_tempita.py":129
 *                     name = globals['__file__']
 *                     if name.endswith('.pyc') or name.endswith('.pyo'):
 *                         name = name[:-1]             # <<<<<<<<<<<<<<
 *                 elif '__name__' in globals:
 *                     name = globals['__name__']
 */
  __pyx_slice__4 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__4);
  __Pyx_GIVEREF(__pyx_slice__4);

  /* "Cython/Tempita/_tempita.py":160
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 *             hex(id(self))[2:], self.name)             # <<<<<<<<<<<<<<
 * 
 *     def substitute(self, *args, **kw):
 */
  __pyx_slice__5 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__5);
  __Pyx_GIVEREF(__pyx_slice__5);

  /* "Cython/Tempita/_tempita.py":165
 *         if args:
 *             if kw:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_You_can_only_give_positional_or); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "Cython/Tempita/_tempita.py":168
 *                     "You can only give positional *or* keyword arguments")
 *             if len(args) > 1:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     "You can only give one positional argument")
 *             if not hasattr(args[0], 'items'):
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_You_can_only_give_one_positional); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "Cython/Tempita/_tempita.py":192
 *         self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
 *         if '__inherit__' in defs:
 *             inherit = defs.pop('__inherit__')             # <<<<<<<<<<<<<<
 *         else:
 *             inherit = None
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_n_s_inherit); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "Cython/Tempita/_tempita.py":200
 *         __traceback_hide__ = True
 *         if not self.get_template:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'You cannot use inheritance without passing in get_template',
 *                 position=None, name=self.name)
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_You_cannot_use_inheritance_witho); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "Cython/Tempita/_tempita.py":234
 *             self._interpret_for(vars, expr, content, ns, out, defs)
 *         elif name == 'cond':
 *             parts = code[2:]             # <<<<<<<<<<<<<<
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':
 */
  __pyx_slice__11 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__11);
  __Pyx_GIVEREF(__pyx_slice__11);

  /* "Cython/Tempita/_tempita.py":237
 *             self._interpret_if(parts, ns, out, defs)
 *         elif name == 'expr':
 *             parts = code[2].split('|')             # <<<<<<<<<<<<<<
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s__12); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "Cython/Tempita/_tempita.py":239
 *             parts = code[2].split('|')
 *             base = self._eval(parts[0], ns, pos)
 *             for part in parts[1:]:             # <<<<<<<<<<<<<<
 *                 func = self._eval(part, ns, pos)
 *                 base = func(base)
 */
  __pyx_slice__14 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "Cython/Tempita/_tempita.py":443
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):
 *         value = cgi.escape(value.decode('latin1'), 1)             # <<<<<<<<<<<<<<
 *         value = value.encode('latin1')
 *     else:
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_n_s_latin1); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "Cython/Tempita/_tempita.py":444
 *     if sys.version >= "3" and isinstance(value, bytes):
 *         value = cgi.escape(value.decode('latin1'), 1)
 *         value = value.encode('latin1')             # <<<<<<<<<<<<<<
 *     else:
 *         value = cgi.escape(value, 1)
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_latin1); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "Cython/Tempita/_tempita.py":449
 *     if sys.version < "3":
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
  __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_s_ascii, __pyx_n_s_xmlcharrefreplace); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "Cython/Tempita/_tempita.py":456
 *     v = coerce_text(v)
 *     if is_unicode(v):
 *         v = v.encode('utf8')             # <<<<<<<<<<<<<<
 *     return url_quote(v)
 * 
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "Cython/Tempita/_tempita.py":465
 *         if value is None:
 *             continue
 *         if name.endswith('_'):             # <<<<<<<<<<<<<<
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s__19); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "Cython/Tempita/_tempita.py":466
 *             continue
 *         if name.endswith('_'):
 *             name = name[:-1]             # <<<<<<<<<<<<<<
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))
 *     return html(' '.join(parts))
 */
  __pyx_slice__21 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);

  /* "Cython/Tempita/_tempita.py":662
 *                                       re.escape(delimeters[1])))
 *     for match in token_re.finditer(s):
 *         expr = match.group(0)             # <<<<<<<<<<<<<<
 *         pos = find_position(s, match.end(), last, last_pos)
 *         if expr == delimeters[0] and in_expr:
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "Cython/Tempita/_tempita.py":829
 * def parse_expr(tokens, name, context=()):
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]             # <<<<<<<<<<<<<<
 *     expr, pos = tokens[0]
 *     expr = expr.strip()
 */
  __pyx_slice__25 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "Cython/Tempita/_tempita.py":832
 *     expr, pos = tokens[0]
 *     expr = expr.strip()
 *     if expr.startswith('py:'):             # <<<<<<<<<<<<<<
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_py_2); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "Cython/Tempita/_tempita.py":833
 *     expr = expr.strip()
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')             # <<<<<<<<<<<<<<
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')
 */
  __pyx_slice__27 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__27);
  __Pyx_GIVEREF(__pyx_slice__27);
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s__28); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "Cython/Tempita/_tempita.py":834
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):             # <<<<<<<<<<<<<<
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s__31); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "Cython/Tempita/_tempita.py":835
 *         expr = expr[3:].lstrip(' \t')
 *         if expr.startswith('\n') or expr.startswith('\r'):
 *             expr = expr.lstrip('\r\n')             # <<<<<<<<<<<<<<
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s__33); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "Cython/Tempita/_tempita.py":837
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')             # <<<<<<<<<<<<<<
 *                 expr = expr.replace('\r', '')
 *             expr += '\n'
 */
  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_kp_s__33, __pyx_kp_s__24); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "Cython/Tempita/_tempita.py":838
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')             # <<<<<<<<<<<<<<
 *             expr += '\n'
 *         else:
 */
  __pyx_tuple__36 = PyTuple_Pack(2, __pyx_kp_s__31, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "Cython/Tempita/_tempita.py":842
 *         else:
 *             if '\n' in expr:
 *                 raise TemplateError(             # <<<<<<<<<<<<<<
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_Multi_line_py_blocks_must_start); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "Cython/Tempita/_tempita.py":845
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 *         return ('py', pos, expr), tokens[1:]             # <<<<<<<<<<<<<<
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 */
  __pyx_slice__38 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__38)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__38);
  __Pyx_GIVEREF(__pyx_slice__38);

  /* "Cython/Tempita/_tempita.py":848
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_continue_outside_of_for_loop); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "Cython/Tempita/_tempita.py":851
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 *         return (expr, pos), tokens[1:]             # <<<<<<<<<<<<<<
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 */
  __pyx_slice__40 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__40);
  __Pyx_GIVEREF(__pyx_slice__40);

  /* "Cython/Tempita/_tempita.py":852
 *                 position=pos, name=name)
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):             # <<<<<<<<<<<<<<
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_if); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "Cython/Tempita/_tempita.py":854
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')             # <<<<<<<<<<<<<<
 *           or expr == 'else'):
 *         raise TemplateError(
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_elif); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "Cython/Tempita/_tempita.py":867
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 *     elif expr.startswith('for '):             # <<<<<<<<<<<<<<
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_for_2); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "Cython/Tempita/_tempita.py":869
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):             # <<<<<<<<<<<<<<
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_default_2); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "Cython/Tempita/_tempita.py":871
 *     elif expr.startswith('default '):
 *         return parse_default(tokens, name, context)
 *     elif expr.startswith('inherit '):             # <<<<<<<<<<<<<<
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_inherit_3); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "Cython/Tempita/_tempita.py":873
 *     elif expr.startswith('inherit '):
 *         return parse_inherit(tokens, name, context)
 *     elif expr.startswith('def '):             # <<<<<<<<<<<<<<
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_def_2); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "Cython/Tempita/_tempita.py":875
 *     elif expr.startswith('def '):
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):             # <<<<<<<<<<<<<<
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 *     return ('expr', pos, tokens[0][0]), tokens[1:]
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s__47); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "Cython/Tempita/_tempita.py":876
 *         return parse_def(tokens, name, context)
 *     elif expr.startswith('#'):
 *         return ('comment', pos, tokens[0][0]), tokens[1:]             # <<<<<<<<<<<<<<
 *     return ('expr', pos, tokens[0][0]), tokens[1:]
 * 
 */
  __pyx_slice__49 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__49)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__49);
  __Pyx_GIVEREF(__pyx_slice__49);

  /* "Cython/Tempita/_tempita.py":877
 *     elif expr.startswith('#'):
 *         return ('comment', pos, tokens[0][0]), tokens[1:]
 *     return ('expr', pos, tokens[0][0]), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_slice__50 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__50)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__50);
  __Pyx_GIVEREF(__pyx_slice__50);

  /* "Cython/Tempita/_tempita.py":883
 *     start = tokens[0][1]
 *     pieces = []
 *     context = context + ('if',)             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_if_2); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 883, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "Cython/Tempita/_tempita.py":886
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{endif}}',
 *                 position=start, name=name)
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Missing_endif); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "Cython/Tempita/_tempita.py":891
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endif'):
 *             return ('cond', start) + tuple(pieces), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)
 *         pieces.append(next_chunk)
 */
  __pyx_slice__53 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__53)) __PYX_ERR(0, 891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);

  /* "Cython/Tempita/_tempita.py":897
 * 
 * def parse_one_cond(tokens, name, context):
 *     (first, pos), tokens = tokens[0], tokens[1:]             # <<<<<<<<<<<<<<
 *     content = []
 *     if first.endswith(':'):
 */
  __pyx_slice__54 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) __PYX_ERR(0, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__54);
  __Pyx_GIVEREF(__pyx_slice__54);

  /* "Cython/Tempita/_tempita.py":899
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if first.startswith('if '):
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s__55); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "Cython/Tempita/_tempita.py":900
 *     content = []
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)
 */
  __pyx_slice__57 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 900, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__57);
  __Pyx_GIVEREF(__pyx_slice__57);

  /* "Cython/Tempita/_tempita.py":901
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if first.startswith('if '):             # <<<<<<<<<<<<<<
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_if); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "Cython/Tempita/_tempita.py":902
 *         first = first[:-1]
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)             # <<<<<<<<<<<<<<
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)
 */
  __pyx_slice__59 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__59);
  __Pyx_GIVEREF(__pyx_slice__59);

  /* "Cython/Tempita/_tempita.py":903
 *     if first.startswith('if '):
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):             # <<<<<<<<<<<<<<
 *         part = ('elif', pos, first[5:].lstrip(), content)
 *     elif first == 'else':
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_elif); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "Cython/Tempita/_tempita.py":904
 *         part = ('if', pos, first[3:].lstrip(), content)
 *     elif first.startswith('elif '):
 *         part = ('elif', pos, first[5:].lstrip(), content)             # <<<<<<<<<<<<<<
 *     elif first == 'else':
 *         part = ('else', pos, None, content)
 */
  __pyx_slice__61 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__61);
  __Pyx_GIVEREF(__pyx_slice__61);

  /* "Cython/Tempita/_tempita.py":911
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endif}}',
 *                 position=pos, name=name)
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_No_endif); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "Cython/Tempita/_tempita.py":916
 *         if (isinstance(tokens[0], tuple)
 *             and (tokens[0][0] == 'endif'
 *                  or tokens[0][0].startswith('elif ')             # <<<<<<<<<<<<<<
 *                  or tokens[0][0] == 'else')):
 *             return part, tokens
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_elif); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "Cython/Tempita/_tempita.py":925
 * def parse_for(tokens, name, context):
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]             # <<<<<<<<<<<<<<
 *     context = ('for',) + context
 *     content = []
 */
  __pyx_slice__64 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__64)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__64);
  __Pyx_GIVEREF(__pyx_slice__64);

  /* "Cython/Tempita/_tempita.py":926
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 *     context = ('for',) + context             # <<<<<<<<<<<<<<
 *     content = []
 *     assert first.startswith('for ')
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_n_s_for); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "Cython/Tempita/_tempita.py":928
 *     context = ('for',) + context
 *     content = []
 *     assert first.startswith('for ')             # <<<<<<<<<<<<<<
 *     if first.endswith(':'):
 *         first = first[:-1]
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_for_2); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "Cython/Tempita/_tempita.py":929
 *     content = []
 *     assert first.startswith('for ')
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     first = first[3:].strip()
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s__55); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "Cython/Tempita/_tempita.py":930
 *     assert first.startswith('for ')
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     first = first[3:].strip()
 *     match = in_re.search(first)
 */
  __pyx_slice__68 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__68)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__68);
  __Pyx_GIVEREF(__pyx_slice__68);

  /* "Cython/Tempita/_tempita.py":931
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     first = first[3:].strip()             # <<<<<<<<<<<<<<
 *     match = in_re.search(first)
 *     if not match:
 */
  __pyx_slice__69 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__69)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__69);
  __Pyx_GIVEREF(__pyx_slice__69);

  /* "Cython/Tempita/_tempita.py":943
 *             % vars, position=pos, name=name)
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')             # <<<<<<<<<<<<<<
 *         if v.strip()])
 *     expr = first[match.end():]
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s__71); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "Cython/Tempita/_tempita.py":948
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_No_endfor); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "Cython/Tempita/_tempita.py":953
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endfor'):
 *             return ('for', pos, vars, expr, content), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)
 */
  __pyx_slice__74 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__74)) __PYX_ERR(0, 953, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__74);
  __Pyx_GIVEREF(__pyx_slice__74);

  /* "Cython/Tempita/_tempita.py":960
 * def parse_default(tokens, name, context):
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')             # <<<<<<<<<<<<<<
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_default_2); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "Cython/Tempita/_tempita.py":961
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 *     first = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     parts = first.split('=', 1)
 *     if len(parts) == 1:
 */
  __pyx_tuple__76 = PyTuple_Pack(2, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "Cython/Tempita/_tempita.py":962
 *     assert first.startswith('default ')
 *     first = first.split(None, 1)[1]
 *     parts = first.split('=', 1)             # <<<<<<<<<<<<<<
 *     if len(parts) == 1:
 *         raise TemplateError(
 */
  __pyx_tuple__78 = PyTuple_Pack(2, __pyx_kp_s__77, __pyx_int_1); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 962, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "Cython/Tempita/_tempita.py":969
 *     var = parts[0].strip()
 *     if ',' in var:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_default_x_y_is_not_supported); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "Cython/Tempita/_tempita.py":977
 *             % var, position=pos, name=name)
 *     expr = parts[1].strip()
 *     return ('default', pos, var, expr), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_slice__80 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__80)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__80);
  __Pyx_GIVEREF(__pyx_slice__80);

  /* "Cython/Tempita/_tempita.py":982
 * def parse_inherit(tokens, name, context):
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')             # <<<<<<<<<<<<<<
 *     expr = first.split(None, 1)[1]
 *     return ('inherit', pos, expr), tokens[1:]
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_inherit_3); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "Cython/Tempita/_tempita.py":983
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 *     expr = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     return ('inherit', pos, expr), tokens[1:]
 * 
 */
  __pyx_tuple__82 = PyTuple_Pack(2, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "Cython/Tempita/_tempita.py":984
 *     assert first.startswith('inherit ')
 *     expr = first.split(None, 1)[1]
 *     return ('inherit', pos, expr), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_slice__83 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__83)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__83);
  __Pyx_GIVEREF(__pyx_slice__83);

  /* "Cython/Tempita/_tempita.py":989
 * def parse_def(tokens, name, context):
 *     first, start = tokens[0]
 *     tokens = tokens[1:]             # <<<<<<<<<<<<<<
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]
 */
  __pyx_slice__84 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__84)) __PYX_ERR(0, 989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__84);
  __Pyx_GIVEREF(__pyx_slice__84);

  /* "Cython/Tempita/_tempita.py":990
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 *     assert first.startswith('def ')             # <<<<<<<<<<<<<<
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):
 */
  __pyx_tuple__85 = PyTuple_Pack(1, __pyx_kp_s_def_2); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "Cython/Tempita/_tempita.py":991
 *     tokens = tokens[1:]
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]             # <<<<<<<<<<<<<<
 *     if first.endswith(':'):
 *         first = first[:-1]
 */
  __pyx_tuple__86 = PyTuple_Pack(2, Py_None, __pyx_int_1); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 991, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "Cython/Tempita/_tempita.py":992
 *     assert first.startswith('def ')
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):             # <<<<<<<<<<<<<<
 *         first = first[:-1]
 *     if '(' not in first:
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s__55); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 992, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "Cython/Tempita/_tempita.py":993
 *     first = first.split(None, 1)[1]
 *     if first.endswith(':'):
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *     if '(' not in first:
 *         func_name = first
 */
  __pyx_slice__88 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__88)) __PYX_ERR(0, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__88);
  __Pyx_GIVEREF(__pyx_slice__88);

  /* "Cython/Tempita/_tempita.py":997
 *         func_name = first
 *         sig = ((), None, None, {})
 *     elif not first.endswith(')'):             # <<<<<<<<<<<<<<
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 *                             position=start, name=name)
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s__89); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 997, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "Cython/Tempita/_tempita.py":1001
 *                             position=start, name=name)
 *     else:
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 */
  __pyx_slice__91 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__91)) __PYX_ERR(0, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__91);
  __Pyx_GIVEREF(__pyx_slice__91);

  /* "Cython/Tempita/_tempita.py":1002
 *     else:
 *         first = first[:-1]
 *         func_name, sig_text = first.split('(', 1)             # <<<<<<<<<<<<<<
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)
 */
  __pyx_tuple__92 = PyTuple_Pack(2, __pyx_kp_s__70, __pyx_int_1); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1002, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "Cython/Tempita/_tempita.py":1004
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)             # <<<<<<<<<<<<<<
 *     content = []
 *     while 1:
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_n_s_def); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "Cython/Tempita/_tempita.py":1008
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_Missing_enddef); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "Cython/Tempita/_tempita.py":1013
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'enddef'):
 *             return ('def', start, func_name, sig, content), tokens[1:]             # <<<<<<<<<<<<<<
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)
 */
  __pyx_slice__95 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__95)) __PYX_ERR(0, 1013, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__95);
  __Pyx_GIVEREF(__pyx_slice__95);

  /* "Cython/Tempita/_tempita.py":1025
 *     defaults = {}
 * 
 *     def get_token(pos=False):             # <<<<<<<<<<<<<<
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 */
  __pyx_tuple__96 = PyTuple_Pack(8, __pyx_n_s_pos, __pyx_n_s_tok_type, __pyx_n_s_tok_string, __pyx_n_s_srow, __pyx_n_s_scol, __pyx_n_s_erow, __pyx_n_s_ecol, __pyx_n_s_line); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);
  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_get_token, 1025, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __pyx_tuple__98 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "Cython/Tempita/_tempita.py":1099
 *     erow, ecol = end_pos
 *     erow -= 1
 *     lines = string.splitlines(True)             # <<<<<<<<<<<<<<
 *     if srow == erow:
 *         return lines[srow][scol:ecol]
 */
  __pyx_tuple__105 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "Cython/Tempita/_tempita.py":1123
 *     import os
 *     if args is None:
 *         args = sys.argv[1:]             # <<<<<<<<<<<<<<
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(
 */
  __pyx_slice__106 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__106)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__106);
  __Pyx_GIVEREF(__pyx_slice__106);

  /* "Cython/Tempita/_tempita.py":1124
 *     if args is None:
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')             # <<<<<<<<<<<<<<
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_Paste); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "Cython/Tempita/_tempita.py":1128
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '-o', '--output',
 *         dest='output',
 */
  __pyx_tuple__108 = PyTuple_Pack(2, __pyx_kp_s_o, __pyx_kp_s_output); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "Cython/Tempita/_tempita.py":1133
 *         metavar="FILENAME",
 *         help="File to write output to (default stdout)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--html',
 *         dest='use_html',
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_html_3); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(0, 1133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "Cython/Tempita/_tempita.py":1138
 *         action='store_true',
 *         help="Use HTML style filling (including automatic HTML quoting)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--env',
 *         dest='use_env',
 */
  __pyx_tuple__110 = PyTuple_Pack(1, __pyx_kp_s_env); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "Cython/Tempita/_tempita.py":1146
 *     if len(args) < 1:
 *         print('You must give a template filename')
 *         sys.exit(2)             # <<<<<<<<<<<<<<
 *     template_name = args[0]
 *     args = args[1:]
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "Cython/Tempita/_tempita.py":1148
 *         sys.exit(2)
 *     template_name = args[0]
 *     args = args[1:]             # <<<<<<<<<<<<<<
 *     vars = {}
 *     if options.use_env:
 */
  __pyx_slice__112 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__112)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__112);
  __Pyx_GIVEREF(__pyx_slice__112);

  /* "Cython/Tempita/_tempita.py":1155
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)             # <<<<<<<<<<<<<<
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 1155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "Cython/Tempita/_tempita.py":1156
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)
 *         name, value = value.split('=', 1)             # <<<<<<<<<<<<<<
 *         if name.startswith('py:'):
 *             name = name[:3]
 */
  __pyx_tuple__114 = PyTuple_Pack(2, __pyx_kp_s__77, __pyx_int_1); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "Cython/Tempita/_tempita.py":1157
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):             # <<<<<<<<<<<<<<
 *             name = name[:3]
 *             value = eval(value)
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_kp_s_py_2); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 1157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "Cython/Tempita/_tempita.py":1158
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 *             name = name[:3]             # <<<<<<<<<<<<<<
 *             value = eval(value)
 *         vars[name] = value
 */
  __pyx_slice__116 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__116)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__116);
  __Pyx_GIVEREF(__pyx_slice__116);

  /* "Cython/Tempita/_tempita.py":51
 *            'sub_html', 'html', 'bunch']
 * 
 * in_re = re.compile(r'\s+in\s+')             # <<<<<<<<<<<<<<
 * var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I)
 * 
 */
  __pyx_tuple__118 = PyTuple_Pack(1, __pyx_kp_s_s_in_s); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "Cython/Tempita/_tempita.py":59
 *     """
 * 
 *     def __init__(self, message, position, name=None):             # <<<<<<<<<<<<<<
 *         Exception.__init__(self, message)
 *         self.position = position
 */
  __pyx_tuple__119 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_message, __pyx_n_s_position, __pyx_n_s_name); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 59, __pyx_L1_error)
  __pyx_tuple__121 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "Cython/Tempita/_tempita.py":64
 *         self.name = name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         msg = ' '.join(self.args)
 *         if self.position:
 */
  __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_msg); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_str, 64, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 64, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":82
 * 
 * 
 * def get_file_template(name, from_template):             # <<<<<<<<<<<<<<
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(
 */
  __pyx_tuple__124 = PyTuple_Pack(3, __pyx_n_s_name, __pyx_n_s_from_template, __pyx_n_s_path); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_get_file_template, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 82, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":100
 *     default_inherit = None
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,             # <<<<<<<<<<<<<<
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 */
  __pyx_tuple__128 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_content, __pyx_n_s_name, __pyx_n_s_namespace, __pyx_n_s_stacklevel, __pyx_n_s_get_template, __pyx_n_s_default_inherit, __pyx_n_s_line_offset, __pyx_n_s_delimeters, __pyx_n_s_caller, __pyx_n_s_globals, __pyx_n_s_lineno); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(9, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 100, __pyx_L1_error)
  __pyx_tuple__130 = PyTuple_Pack(7, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);

  /* "Cython/Tempita/_tempita.py":145
 *             self.default_inherit = default_inherit
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,             # <<<<<<<<<<<<<<
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 */
  __pyx_tuple__131 = PyTuple_Pack(8, __pyx_n_s_cls, __pyx_n_s_filename, __pyx_n_s_namespace, __pyx_n_s_encoding, __pyx_n_s_default_inherit, __pyx_n_s_get_template, __pyx_n_s_f, __pyx_n_s_c); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);
  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_from_filename, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 145, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":157
 *     from_filename = classmethod(from_filename)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 157, __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_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 157, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":162
 *             hex(id(self))[2:], self.name)
 * 
 *     def substitute(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         if args:
 *             if kw:
 */
  __pyx_tuple__135 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kw, __pyx_n_s_ns, __pyx_n_s_result, __pyx_n_s_defs, __pyx_n_s_inherit_2); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_substitute, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 162, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":186
 *         return result
 * 
 *     def _interpret(self, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         parts = []
 */
  __pyx_tuple__137 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_ns, __pyx_n_s_traceback_hide, __pyx_n_s_parts, __pyx_n_s_defs, __pyx_n_s_inherit_2); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);
  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret, 186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(0, 186, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":197
 *         return ''.join(parts), defs, inherit
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         if not self.get_template:
 */
  __pyx_tuple__139 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_body, __pyx_n_s_defs, __pyx_n_s_inherit_template, __pyx_n_s_ns, __pyx_n_s_traceback_hide, __pyx_n_s_templ, __pyx_n_s_self_2, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret_inherit, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 197, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":212
 *         return templ.substitute(ns)
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in codes:
 */
  __pyx_tuple__141 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_codes, __pyx_n_s_ns, __pyx_n_s_out, __pyx_n_s_defs, __pyx_n_s_traceback_hide, __pyx_n_s_item); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret_codes, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 212, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":220
 *                 self._interpret_code(item, ns, out, defs)
 * 
 *     def _interpret_code(self, code, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]
 */
  __pyx_tuple__143 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_ns, __pyx_n_s_out, __pyx_n_s_defs, __pyx_n_s_traceback_hide, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_vars, __pyx_n_s_expr, __pyx_n_s_content, __pyx_n_s_parts, __pyx_n_s_base, __pyx_n_s_part, __pyx_n_s_func, __pyx_n_s_var, __pyx_n_s_result, __pyx_n_s_value, __pyx_n_s_signature); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(5, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret_code, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 220, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":263
 *             assert 0, "Unknown code: %r" % name
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in expr:
 */
  __pyx_tuple__145 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_vars, __pyx_n_s_expr, __pyx_n_s_content, __pyx_n_s_ns, __pyx_n_s_out, __pyx_n_s_defs, __pyx_n_s_traceback_hide, __pyx_n_s_item, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(7, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret_for, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 263, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":282
 *                 break
 * 
 *     def _interpret_if(self, parts, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 */
  __pyx_tuple__147 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_parts, __pyx_n_s_ns, __pyx_n_s_out, __pyx_n_s_defs, __pyx_n_s_traceback_hide, __pyx_n_s_part, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_result); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_interpret_if, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 282, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__149 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_ns, __pyx_n_s_pos, __pyx_n_s_traceback_hide, __pyx_n_s_value, __pyx_n_s_e, __pyx_n_s_arg0); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_eval_2, 296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 296, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":313
 *             raise
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__151 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_ns, __pyx_n_s_pos, __pyx_n_s_traceback_hide, __pyx_n_s_e); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_exec, 313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 313, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":324
 *             raise
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__153 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_pos, __pyx_n_s_traceback_hide, __pyx_n_s_e); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr, 324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 324, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":366
 *             return value
 * 
 *     def _add_line_info(self, msg, pos):             # <<<<<<<<<<<<<<
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 */
  __pyx_tuple__155 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_msg, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_add_line_info, 366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 366, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":374
 * 
 * 
 * def sub(content, delimeters=None, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 */
  __pyx_tuple__157 = PyTuple_Pack(5, __pyx_n_s_content, __pyx_n_s_delimeters, __pyx_n_s_kw, __pyx_n_s_name, __pyx_n_s_tmpl); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_sub, 374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 374, __pyx_L1_error)
  __pyx_tuple__159 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * def paste_script_template_renderer(content, vars, filename=None):             # <<<<<<<<<<<<<<
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)
 */
  __pyx_tuple__160 = PyTuple_Pack(4, __pyx_n_s_content, __pyx_n_s_vars, __pyx_n_s_filename, __pyx_n_s_tmpl); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);
  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_paste_script_template_renderer, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 380, __pyx_L1_error)
  __pyx_tuple__162 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "Cython/Tempita/_tempita.py":387
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.items():
 *             setattr(self, name, value)
 */
  __pyx_tuple__163 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_kw, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 387, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":391
 *             setattr(self, name, value)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         self[name] = value
 * 
 */
  __pyx_tuple__165 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_setattr, 391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 391, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":394
 *         self[name] = value
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self[name]
 */
  __pyx_tuple__167 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_getattr, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 394, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":400
 *             raise AttributeError(name)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if 'default' in self:
 *             try:
 */
  __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_getitem, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 400, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":409
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 */
  __pyx_tuple__171 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 409, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":421
 * class html(object):
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.value = value
 * 
 */
  __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 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_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 421, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":424
 *         self.value = value
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_tuple__175 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 424, __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_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_str, 424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 424, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":427
 *         return self.value
 * 
 *     def __html__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_tuple__177 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_html, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 427, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":430
 *         return self.value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)
 */
  __pyx_tuple__179 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(0, 430, __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_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 430, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":435
 * 
 * 
 * def html_quote(value, force=True):             # <<<<<<<<<<<<<<
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 */
  __pyx_tuple__181 = PyTuple_Pack(2, __pyx_n_s_value, __pyx_n_s_force); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__181);
  __Pyx_GIVEREF(__pyx_tuple__181);
  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_html_quote, 435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 435, __pyx_L1_error)
  __pyx_tuple__183 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "Cython/Tempita/_tempita.py":453
 * 
 * 
 * def url(v):             # <<<<<<<<<<<<<<
 *     v = coerce_text(v)
 *     if is_unicode(v):
 */
  __pyx_tuple__184 = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple__184)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__184);
  __Pyx_GIVEREF(__pyx_tuple__184);
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__184, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_url, 453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 453, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":460
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     parts = []
 *     for name, value in sorted(kw.items()):
 */
  __pyx_tuple__186 = PyTuple_Pack(4, __pyx_n_s_kw, __pyx_n_s_parts, __pyx_n_s_name, __pyx_n_s_value); if (unlikely(!__pyx_tuple__186)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__186);
  __Pyx_GIVEREF(__pyx_tuple__186);
  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_attr, 460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 460, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":481
 *         ))
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 */
  __pyx_tuple__188 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_pos, __pyx_n_s_quote, __pyx_n_s_plain); if (unlikely(!__pyx_tuple__188)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__188);
  __Pyx_GIVEREF(__pyx_tuple__188);
  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr, 481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 481, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":494
 * 
 * 
 * def sub_html(content, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 */
  __pyx_tuple__190 = PyTuple_Pack(4, __pyx_n_s_content, __pyx_n_s_kw, __pyx_n_s_name, __pyx_n_s_tmpl); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__190);
  __Pyx_GIVEREF(__pyx_tuple__190);
  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_sub_html, 494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 494, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":501
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */
  __pyx_tuple__192 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_template, __pyx_n_s_func_name, __pyx_n_s_func_signature, __pyx_n_s_body, __pyx_n_s_ns, __pyx_n_s_pos, __pyx_n_s_bound_self); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 501, __pyx_L1_error)
  __pyx_tuple__194 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "Cython/Tempita/_tempita.py":511
 *         self._bound_self = bound_self
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 511, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":516
 *             self._template.name, self._pos)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self()
 * 
 */
  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_str, 516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 516, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":519
 *         return self()
 * 
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 */
  __pyx_tuple__199 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kw, __pyx_n_s_values, __pyx_n_s_ns, __pyx_n_s_out, __pyx_n_s_subdefs); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_call, 519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 519, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":530
 *         return ''.join(out)
 * 
 *     def __get__(self, obj, type=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self
 */
  __pyx_tuple__201 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_obj, __pyx_n_s_type); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_get_2, 530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_tuple__203 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "Cython/Tempita/_tempita.py":537
 *             self._body, self._ns, self._pos, bound_self=obj)
 * 
 *     def _parse_signature(self, args, kw):             # <<<<<<<<<<<<<<
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 */
  __pyx_tuple__204 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kw, __pyx_n_s_values, __pyx_n_s_sig_args, __pyx_n_s_var_args, __pyx_n_s_var_kw, __pyx_n_s_defaults, __pyx_n_s_extra_kw, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_value_expr, __pyx_n_s_v); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__204);
  __Pyx_GIVEREF(__pyx_tuple__204);
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_signature, 537, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 537, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":579
 * class TemplateObject(object):
 * 
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)
 */
  __pyx_tuple__206 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__206);
  __Pyx_GIVEREF(__pyx_tuple__206);
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 579, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":583
 *         self.get = TemplateObjectGetter(self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 583, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 583, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":589
 * class TemplateObjectGetter(object):
 * 
 *     def __init__(self, template_obj):             # <<<<<<<<<<<<<<
 *         self.__template_obj = template_obj
 * 
 */
  __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_template_obj); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_init, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 589, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":592
 *         self.__template_obj = template_obj
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 */
  __pyx_tuple__212 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_attr); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__212);
  __Pyx_GIVEREF(__pyx_tuple__212);
  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_getattr, 592, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 592, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":595
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)
 * 
 */
  __pyx_tuple__214 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__214);
  __Pyx_GIVEREF(__pyx_tuple__214);
  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 595, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 595, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":600
 * 
 * class _Empty(object):
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_tuple__216 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kw); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__216);
  __Pyx_GIVEREF(__pyx_tuple__216);
  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_call, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 600, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":603
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__218);
  __Pyx_GIVEREF(__pyx_tuple__218);
  __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_str, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 603, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":606
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__220);
  __Pyx_GIVEREF(__pyx_tuple__220);
  __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_repr_2, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 606, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":609
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */
  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__222);
  __Pyx_GIVEREF(__pyx_tuple__222);
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_unicode_3, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 609, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":612
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */
  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__224);
  __Pyx_GIVEREF(__pyx_tuple__224);
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_iter, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":615
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_tuple__226 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__226);
  __Pyx_GIVEREF(__pyx_tuple__226);
  __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_bool, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 615, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":629
 * 
 * 
 * def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     """
 *     Lex a string into chunks:
 */
  __pyx_tuple__228 = PyTuple_Pack(14, __pyx_n_s_s_2, __pyx_n_s_name, __pyx_n_s_trim_whitespace, __pyx_n_s_line_offset, __pyx_n_s_delimeters, __pyx_n_s_in_expr, __pyx_n_s_chunks, __pyx_n_s_last, __pyx_n_s_last_pos, __pyx_n_s_token_re, __pyx_n_s_match, __pyx_n_s_expr, __pyx_n_s_pos, __pyx_n_s_part); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__228);
  __Pyx_GIVEREF(__pyx_tuple__228);
  __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(5, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_lex, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_tuple__230 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_True), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "Cython/Tempita/_tempita.py":692
 *     return chunks
 * 
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')             # <<<<<<<<<<<<<<
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_kp_s_if_elif_for_def_inherit_default); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "Cython/Tempita/_tempita.py":694
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')             # <<<<<<<<<<<<<<
 * lead_whitespace_re = re.compile(r'^[\t ]*\n')
 * 
 */
  __pyx_tuple__232 = PyTuple_Pack(1, __pyx_kp_s_n_r_t); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "Cython/Tempita/_tempita.py":695
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')
 * lead_whitespace_re = re.compile(r'^[\t ]*\n')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_s_t_n); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "Cython/Tempita/_tempita.py":698
 * 
 * 
 * def trim_lex(tokens):             # <<<<<<<<<<<<<<
 *     r"""
 *     Takes a lexed set of tokens, and removes whitespace when there is
 */
  __pyx_tuple__234 = PyTuple_Pack(9, __pyx_n_s_tokens, __pyx_n_s_last_trim, __pyx_n_s_i, __pyx_n_s_current, __pyx_n_s_item, __pyx_n_s_prev, __pyx_n_s_next_chunk, __pyx_n_s_prev_ok, __pyx_n_s_m); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_trim_lex, 698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 698, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":756
 * 
 * 
 * def find_position(string, index, last_index, last_pos):             # <<<<<<<<<<<<<<
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 */
  __pyx_tuple__236 = PyTuple_Pack(6, __pyx_n_s_string_2, __pyx_n_s_index, __pyx_n_s_last_index, __pyx_n_s_last_pos, __pyx_n_s_lines, __pyx_n_s_column); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_find_position, 756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 756, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":766
 * 
 * 
 * def parse(s, name=None, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parses a string into a kind of AST
 */
  __pyx_tuple__238 = PyTuple_Pack(7, __pyx_n_s_s_2, __pyx_n_s_name, __pyx_n_s_line_offset, __pyx_n_s_delimeters, __pyx_n_s_tokens, __pyx_n_s_result, __pyx_n_s_next_chunk); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse, 766, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 766, __pyx_L1_error)
  __pyx_tuple__240 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "Cython/Tempita/_tempita.py":827
 * 
 * 
 * def parse_expr(tokens, name, context=()):             # <<<<<<<<<<<<<<
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 */
  __pyx_tuple__241 = PyTuple_Pack(5, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_expr, __pyx_n_s_pos); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_expr, 827, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_tuple__243 = PyTuple_Pack(1, ((PyObject*)__pyx_empty_tuple)); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "Cython/Tempita/_tempita.py":880
 * 
 * 
 * def parse_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     start = tokens[0][1]
 *     pieces = []
 */
  __pyx_tuple__244 = PyTuple_Pack(6, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_start, __pyx_n_s_pieces, __pyx_n_s_next_chunk); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_cond, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 880, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":896
 * 
 * 
 * def parse_one_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 */
  __pyx_tuple__246 = PyTuple_Pack(8, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_first, __pyx_n_s_pos, __pyx_n_s_content, __pyx_n_s_part, __pyx_n_s_next_chunk); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_one_cond, 896, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 896, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":923
 * 
 * 
 * def parse_for(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_tuple__248 = PyTuple_Pack(11, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_first, __pyx_n_s_pos, __pyx_n_s_content, __pyx_n_s_match, __pyx_n_s_vars, __pyx_n_s_expr, __pyx_n_s_next_chunk, __pyx_n_s_v); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_for, 923, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 923, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":958
 * 
 * 
 * def parse_default(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 */
  __pyx_tuple__250 = PyTuple_Pack(8, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_first, __pyx_n_s_pos, __pyx_n_s_parts, __pyx_n_s_var, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_default, 958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 958, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":980
 * 
 * 
 * def parse_inherit(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 */
  __pyx_tuple__252 = PyTuple_Pack(6, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_first, __pyx_n_s_pos, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_inherit, 980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 980, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":987
 * 
 * 
 * def parse_def(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_tuple__254 = PyTuple_Pack(10, __pyx_n_s_tokens, __pyx_n_s_name, __pyx_n_s_context, __pyx_n_s_first, __pyx_n_s_start, __pyx_n_s_func_name, __pyx_n_s_sig, __pyx_n_s_sig_text, __pyx_n_s_content, __pyx_n_s_next_chunk); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_def, 987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 987, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */
  __pyx_tuple__256 = PyTuple_Pack(23, __pyx_n_s_sig_text, __pyx_n_s_name, __pyx_n_s_pos, __pyx_n_s_tokens, __pyx_n_s_sig_args, __pyx_n_s_var_arg, __pyx_n_s_var_kw, __pyx_n_s_defaults, __pyx_n_s_get_token, __pyx_n_s_get_token, __pyx_n_s_var_arg_type, __pyx_n_s_tok_type, __pyx_n_s_tok_string, __pyx_n_s_var_name, __pyx_n_s_nest_type, __pyx_n_s_unnest_type, __pyx_n_s_nest_count, __pyx_n_s_start_pos, __pyx_n_s_end_pos, __pyx_n_s_parts, __pyx_n_s_s_2, __pyx_n_s_e, __pyx_n_s_default_expr); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);
  __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(3, 0, 23, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_parse_signature_2, 1018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 1018, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":1094
 * 
 * 
 * def isolate_expression(string, start_pos, end_pos):             # <<<<<<<<<<<<<<
 *     srow, scol = start_pos
 *     srow -= 1
 */
  __pyx_tuple__258 = PyTuple_Pack(9, __pyx_n_s_string_2, __pyx_n_s_start_pos, __pyx_n_s_end_pos, __pyx_n_s_srow, __pyx_n_s_scol, __pyx_n_s_erow, __pyx_n_s_ecol, __pyx_n_s_lines, __pyx_n_s_parts); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__258);
  __Pyx_GIVEREF(__pyx_tuple__258);
  __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_isolate_expression, 1094, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 1094, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":1117
 * 
 * 
 * def fill_command(args=None):             # <<<<<<<<<<<<<<
 *     import sys
 *     import optparse
 */
  __pyx_tuple__260 = PyTuple_Pack(17, __pyx_n_s_args, __pyx_n_s_sys, __pyx_n_s_optparse, __pyx_n_s_pkg_resources, __pyx_n_s_os, __pyx_n_s_dist, __pyx_n_s_parser, __pyx_n_s_options, __pyx_n_s_template_name_2, __pyx_n_s_vars, __pyx_n_s_value, __pyx_n_s_name, __pyx_n_s_template_content, __pyx_n_s_f, __pyx_n_s_TemplateClass, __pyx_n_s_template, __pyx_n_s_result); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(1, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tmp_pip_install_9i_72p5f_cython, __pyx_n_s_fill_command, 1117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __pyx_tuple__262 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init_tempita(void); /*proto*/
PyMODINIT_FUNC init_tempita(void)
#else
PyMODINIT_FUNC PyInit__tempita(void); /*proto*/
PyMODINIT_FUNC PyInit__tempita(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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  __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__tempita(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __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("_tempita", __pyx_methods, __pyx_k_A_small_templating_language_Thi, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __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_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_Cython__Tempita___tempita) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "Cython.Tempita._tempita")) {
      if (unlikely(PyDict_SetItemString(modules, "Cython.Tempita._tempita", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
  __pyx_type_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature.tp_print = 0;
  __pyx_ptype_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature = &__pyx_type_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "Cython/Tempita/_tempita.py":34
 * from __future__ import absolute_import
 * 
 * import re             # <<<<<<<<<<<<<<
 * import sys
 * import cgi
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":35
 * 
 * import re
 * import sys             # <<<<<<<<<<<<<<
 * import cgi
 * try:
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":36
 * import re
 * import sys
 * import cgi             # <<<<<<<<<<<<<<
 * try:
 *     from urllib import quote as url_quote
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_cgi, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cgi, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":37
 * import sys
 * import cgi
 * try:             # <<<<<<<<<<<<<<
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "Cython/Tempita/_tempita.py":38
 * import cgi
 * try:
 *     from urllib import quote as url_quote             # <<<<<<<<<<<<<<
 * except ImportError:  # Py3
 *     from urllib.parse import quote as url_quote
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_quote);
      __Pyx_GIVEREF(__pyx_n_s_quote);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_quote);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_urllib, __pyx_t_1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 38, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_quote); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_url_quote, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":37
 * import sys
 * import cgi
 * try:             # <<<<<<<<<<<<<<
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3
 */
    }
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":39
 * try:
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3             # <<<<<<<<<<<<<<
 *     from urllib.parse import quote as url_quote
 * import os
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("Cython.Tempita._tempita", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 39, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "Cython/Tempita/_tempita.py":40
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3
 *     from urllib.parse import quote as url_quote             # <<<<<<<<<<<<<<
 * import os
 * import tokenize
 */
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_n_s_quote);
      __Pyx_GIVEREF(__pyx_n_s_quote);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_quote);
      __pyx_t_9 = __Pyx_Import(__pyx_n_s_urllib_parse, __pyx_t_8, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 40, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_quote); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 40, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_url_quote, __pyx_t_8) < 0) __PYX_ERR(0, 40, __pyx_L4_except_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;
    __pyx_L4_except_error:;

    /* "Cython/Tempita/_tempita.py":37
 * import sys
 * import cgi
 * try:             # <<<<<<<<<<<<<<
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3
 */
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_PyThreadState_assign
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    __pyx_L9_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":41
 * except ImportError:  # Py3
 *     from urllib.parse import quote as url_quote
 * import os             # <<<<<<<<<<<<<<
 * import tokenize
 * from io import StringIO
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_os, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_7) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":42
 *     from urllib.parse import quote as url_quote
 * import os
 * import tokenize             # <<<<<<<<<<<<<<
 * from io import StringIO
 * 
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_tokenize, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tokenize, __pyx_t_7) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":43
 * import os
 * import tokenize
 * from io import StringIO             # <<<<<<<<<<<<<<
 * 
 * from ._looper import looper
 */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_StringIO);
  __Pyx_GIVEREF(__pyx_n_s_StringIO);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_StringIO);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_io, __pyx_t_7, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StringIO, __pyx_t_7) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":45
 * from io import StringIO
 * 
 * from ._looper import looper             # <<<<<<<<<<<<<<
 * from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_looper_2);
  __Pyx_GIVEREF(__pyx_n_s_looper_2);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_looper_2);
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_looper, __pyx_t_1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_looper_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_looper_2, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":46
 * 
 * from ._looper import looper
 * from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text             # <<<<<<<<<<<<<<
 * 
 * __all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate',
 */
  __pyx_t_7 = PyList_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_bytes);
  __Pyx_GIVEREF(__pyx_n_s_bytes);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_bytes);
  __Pyx_INCREF(__pyx_n_s_unicode_2);
  __Pyx_GIVEREF(__pyx_n_s_unicode_2);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_unicode_2);
  __Pyx_INCREF(__pyx_n_s_basestring);
  __Pyx_GIVEREF(__pyx_n_s_basestring);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_basestring);
  __Pyx_INCREF(__pyx_n_s_next);
  __Pyx_GIVEREF(__pyx_n_s_next);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_next);
  __Pyx_INCREF(__pyx_n_s_is_unicode);
  __Pyx_GIVEREF(__pyx_n_s_is_unicode);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_is_unicode);
  __Pyx_INCREF(__pyx_n_s_coerce_text);
  __Pyx_GIVEREF(__pyx_n_s_coerce_text);
  PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_coerce_text);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_compat3, __pyx_t_7, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_bytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bytes, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unicode_2, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_basestring); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_next); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_next, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_is_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_unicode, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_coerce_text); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_coerce_text, __pyx_t_7) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":48
 * from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text
 * 
 * __all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate',             # <<<<<<<<<<<<<<
 *            'sub_html', 'html', 'bunch']
 * 
 */
  __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_TemplateError);
  __Pyx_GIVEREF(__pyx_n_s_TemplateError);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_TemplateError);
  __Pyx_INCREF(__pyx_n_s_Template);
  __Pyx_GIVEREF(__pyx_n_s_Template);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Template);
  __Pyx_INCREF(__pyx_n_s_sub);
  __Pyx_GIVEREF(__pyx_n_s_sub);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_sub);
  __Pyx_INCREF(__pyx_n_s_HTMLTemplate);
  __Pyx_GIVEREF(__pyx_n_s_HTMLTemplate);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_HTMLTemplate);
  __Pyx_INCREF(__pyx_n_s_sub_html);
  __Pyx_GIVEREF(__pyx_n_s_sub_html);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_sub_html);
  __Pyx_INCREF(__pyx_n_s_html_2);
  __Pyx_GIVEREF(__pyx_n_s_html_2);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_html_2);
  __Pyx_INCREF(__pyx_n_s_bunch);
  __Pyx_GIVEREF(__pyx_n_s_bunch);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_bunch);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":51
 *            'sub_html', 'html', 'bunch']
 * 
 * in_re = re.compile(r'\s+in\s+')             # <<<<<<<<<<<<<<
 * var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_in_re, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":52
 * 
 * in_re = re.compile(r'\s+in\s+')
 * var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_I); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_a_z__a_z0_9, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_kp_s_a_z__a_z0_9, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_kp_s_a_z__a_z0_9);
    __Pyx_GIVEREF(__pyx_kp_s_a_z__a_z0_9);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_6, __pyx_kp_s_a_z__a_z0_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_6, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_var_re, __pyx_t_1) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":55
 * 
 * 
 * class TemplateError(Exception):             # <<<<<<<<<<<<<<
 *     """Exception raised while parsing a template
 *     """
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_TemplateError, __pyx_n_s_TemplateError, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_kp_s_Exception_raised_while_parsing_a); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":59
 *     """
 * 
 *     def __init__(self, message, position, name=None):             # <<<<<<<<<<<<<<
 *         Exception.__init__(self, message)
 *         self.position = position
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_13TemplateError_1__init__, 0, __pyx_n_s_TemplateError___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__121);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":64
 *         self.name = name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         msg = ' '.join(self.args)
 *         if self.position:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_13TemplateError_3__str__, 0, __pyx_n_s_TemplateError___str, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_str, __pyx_t_9) < 0) __PYX_ERR(0, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":55
 * 
 * 
 * class TemplateError(Exception):             # <<<<<<<<<<<<<<
 *     """Exception raised while parsing a template
 *     """
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateError, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateError, __pyx_t_9) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":74
 * 
 * 
 * class _TemplateContinue(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_TemplateContinue, __pyx_n_s_TemplateContinue, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateContinue, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateContinue, __pyx_t_9) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":78
 * 
 * 
 * class _TemplateBreak(Exception):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_TemplateBreak, __pyx_n_s_TemplateBreak, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateBreak, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateBreak, __pyx_t_9) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":82
 * 
 * 
 * def get_file_template(name, from_template):             # <<<<<<<<<<<<<<
 *     path = os.path.join(os.path.dirname(from_template.name), name)
 *     return from_template.__class__.from_filename(
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_1get_file_template, 0, __pyx_n_s_get_file_template, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_file_template, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":89
 * 
 * 
 * class Template(object):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = {
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_Template, __pyx_n_s_Template, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":92
 * 
 *     default_namespace = {
 *         'start_braces': '{{',             # <<<<<<<<<<<<<<
 *         'end_braces': '}}',
 *         'looper': looper,
 */
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_start_braces, __pyx_kp_s__126) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_end_braces, __pyx_kp_s__127) < 0) __PYX_ERR(0, 92, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":94
 *         'start_braces': '{{',
 *         'end_braces': '}}',
 *         'looper': looper,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_looper_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_looper_2, __pyx_t_7) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_default_namespace, __pyx_t_9) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":97
 *         }
 * 
 *     default_encoding = 'utf8'             # <<<<<<<<<<<<<<
 *     default_inherit = None
 * 
 */
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_default_encoding, __pyx_n_s_utf8) < 0) __PYX_ERR(0, 97, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":98
 * 
 *     default_encoding = 'utf8'
 *     default_inherit = None             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,
 */
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_default_inherit, Py_None) < 0) __PYX_ERR(0, 98, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":100
 *     default_inherit = None
 * 
 *     def __init__(self, content, name=None, namespace=None, stacklevel=None,             # <<<<<<<<<<<<<<
 *                  get_template=None, default_inherit=None, line_offset=0,
 *                  delimeters=None):
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_1__init__, 0, __pyx_n_s_Template___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_tuple__130);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":145
 *             self.default_inherit = default_inherit
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,             # <<<<<<<<<<<<<<
 *                       default_inherit=None, get_template=get_file_template):
 *         f = open(filename, 'rb')
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_3from_filename, 0, __pyx_n_s_Template_from_filename, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_9, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 145, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":146
 * 
 *     def from_filename(cls, filename, namespace=None, encoding=None,
 *                       default_inherit=None, get_template=get_file_template):             # <<<<<<<<<<<<<<
 *         f = open(filename, 'rb')
 *         c = f.read()
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_template); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_9)->__pyx_arg_get_template = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_9, __pyx_pf_6Cython_7Tempita_8_tempita_42__defaults__);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_from_filename, __pyx_t_9) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":155
 *                    default_inherit=default_inherit, get_template=get_template)
 * 
 *     from_filename = classmethod(from_filename)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_n_s_from_filename);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_from_filename);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = __Pyx_Method_ClassMethod(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_from_filename, __pyx_t_7) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":157
 *     from_filename = classmethod(from_filename)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_5__repr__, 0, __pyx_n_s_Template___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":162
 *             hex(id(self))[2:], self.name)
 * 
 *     def substitute(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         if args:
 *             if kw:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_7substitute, 0, __pyx_n_s_Template_substitute, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_substitute, __pyx_t_7) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":186
 *         return result
 * 
 *     def _interpret(self, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         parts = []
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_9_interpret, 0, __pyx_n_s_Template__interpret, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret, __pyx_t_7) < 0) __PYX_ERR(0, 186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":197
 *         return ''.join(parts), defs, inherit
 * 
 *     def _interpret_inherit(self, body, defs, inherit_template, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         if not self.get_template:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit, 0, __pyx_n_s_Template__interpret_inherit, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret_inherit, __pyx_t_7) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":212
 *         return templ.substitute(ns)
 * 
 *     def _interpret_codes(self, codes, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in codes:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes, 0, __pyx_n_s_Template__interpret_codes, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret_codes, __pyx_t_7) < 0) __PYX_ERR(0, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":220
 *                 self._interpret_code(item, ns, out, defs)
 * 
 *     def _interpret_code(self, code, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         name, pos = code[0], code[1]
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_15_interpret_code, 0, __pyx_n_s_Template__interpret_code, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret_code, __pyx_t_7) < 0) __PYX_ERR(0, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":263
 *             assert 0, "Unknown code: %r" % name
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         for item in expr:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_17_interpret_for, 0, __pyx_n_s_Template__interpret_for, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret_for, __pyx_t_7) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":282
 *                 break
 * 
 *     def _interpret_if(self, parts, ns, out, defs):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         # @@: if/else/else gets through
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_19_interpret_if, 0, __pyx_n_s_Template__interpret_if, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_interpret_if, __pyx_t_7) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_21_eval, 0, __pyx_n_s_Template__eval, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_eval_2, __pyx_t_7) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":313
 *             raise
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_23_exec, 0, __pyx_n_s_Template__exec, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_exec, __pyx_t_7) < 0) __PYX_ERR(0, 313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":324
 *             raise
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_25_repr, 0, __pyx_n_s_Template__repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":366
 *             return value
 * 
 *     def _add_line_info(self, msg, pos):             # <<<<<<<<<<<<<<
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_27_add_line_info, 0, __pyx_n_s_Template__add_line_info, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_add_line_info, __pyx_t_7) < 0) __PYX_ERR(0, 366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":89
 * 
 * 
 * class Template(object):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = {
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_Template, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Template, __pyx_t_7) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":374
 * 
 * 
 * def sub(content, delimeters=None, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_3sub, 0, __pyx_n_s_sub, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__159);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sub, __pyx_t_1) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * def paste_script_template_renderer(content, vars, filename=None):             # <<<<<<<<<<<<<<
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5paste_script_template_renderer, 0, __pyx_n_s_paste_script_template_renderer, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__162);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_paste_script_template_renderer, __pyx_t_1) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":385
 * 
 * 
 * class bunch(dict):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kw):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)(&PyDict_Type)));
  __Pyx_GIVEREF(((PyObject *)(&PyDict_Type)));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyDict_Type)));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_bunch, __pyx_n_s_bunch, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":387
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.items():
 *             setattr(self, name, value)
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_1__init__, 0, __pyx_n_s_bunch___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":391
 *             setattr(self, name, value)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         self[name] = value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_3__setattr__, 0, __pyx_n_s_bunch___setattr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_setattr, __pyx_t_7) < 0) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":394
 *         self[name] = value
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self[name]
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_5__getattr__, 0, __pyx_n_s_bunch___getattr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_getattr, __pyx_t_7) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":400
 *             raise AttributeError(name)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if 'default' in self:
 *             try:
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_7__getitem__, 0, __pyx_n_s_bunch___getitem, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_getitem, __pyx_t_7) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":409
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_5bunch_9__repr__, 0, __pyx_n_s_bunch___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":385
 * 
 * 
 * class bunch(dict):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kw):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_bunch, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bunch, __pyx_t_7) < 0) __PYX_ERR(0, 385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":419
 * 
 * 
 * class html(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_1, __pyx_n_s_html_2, __pyx_n_s_html_2, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":421
 * class html(object):
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.value = value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_4html_1__init__, 0, __pyx_n_s_html___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":424
 *         self.value = value
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_4html_3__str__, 0, __pyx_n_s_html___str, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":427
 *         return self.value
 * 
 *     def __html__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_4html_5__html__, 0, __pyx_n_s_html___html, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_html, __pyx_t_7) < 0) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":430
 *         return self.value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_4html_7__repr__, 0, __pyx_n_s_html___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":419
 * 
 * 
 * class html(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_html_2, __pyx_t_1, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_html_2, __pyx_t_7) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":435
 * 
 * 
 * def html_quote(value, force=True):             # <<<<<<<<<<<<<<
 *     if not force and hasattr(value, '__html__'):
 *         return value.__html__()
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_7html_quote, 0, __pyx_n_s_html_quote, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__183);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_html_quote, __pyx_t_1) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":453
 * 
 * 
 * def url(v):             # <<<<<<<<<<<<<<
 *     v = coerce_text(v)
 *     if is_unicode(v):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_9url, 0, __pyx_n_s_url, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_url, __pyx_t_1) < 0) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":460
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     parts = []
 *     for name, value in sorted(kw.items()):
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11attr, 0, __pyx_n_s_attr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_attr, __pyx_t_1) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":471
 * 
 * 
 * class HTMLTemplate(Template):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = Template.default_namespace.copy()
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_HTMLTemplate, __pyx_n_s_HTMLTemplate, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":473
 * class HTMLTemplate(Template):
 * 
 *     default_namespace = Template.default_namespace.copy()             # <<<<<<<<<<<<<<
 *     default_namespace.update(dict(
 *         html=html,
 */
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_copy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
    }
  }
  if (__pyx_t_10) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 473, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_default_namespace, __pyx_t_7) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":474
 * 
 *     default_namespace = Template.default_namespace.copy()
 *     default_namespace.update(dict(             # <<<<<<<<<<<<<<
 *         html=html,
 *         attr=attr,
 */
  __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_n_s_default_namespace);
  if (unlikely(!__pyx_t_9)) {
    PyErr_Clear();
    __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_namespace);
  }
  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":475
 *     default_namespace = Template.default_namespace.copy()
 *     default_namespace.update(dict(
 *         html=html,             # <<<<<<<<<<<<<<
 *         attr=attr,
 *         url=url,
 */
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_html_2, __pyx_t_11) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "Cython/Tempita/_tempita.py":476
 *     default_namespace.update(dict(
 *         html=html,
 *         attr=attr,             # <<<<<<<<<<<<<<
 *         url=url,
 *         html_quote=html_quote,
 */
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_attr); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_attr, __pyx_t_11) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "Cython/Tempita/_tempita.py":477
 *         html=html,
 *         attr=attr,
 *         url=url,             # <<<<<<<<<<<<<<
 *         html_quote=html_quote,
 *         ))
 */
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_url); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_url, __pyx_t_11) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "Cython/Tempita/_tempita.py":478
 *         attr=attr,
 *         url=url,
 *         html_quote=html_quote,             # <<<<<<<<<<<<<<
 *         ))
 * 
 */
  __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_html_quote, __pyx_t_11) < 0) __PYX_ERR(0, 475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
    }
  }
  if (!__pyx_t_11) {
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_7);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
      PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":481
 *         ))
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr, 0, __pyx_n_s_HTMLTemplate__repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr, __pyx_t_7) < 0) __PYX_ERR(0, 481, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":471
 * 
 * 
 * class HTMLTemplate(Template):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = Template.default_namespace.copy()
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HTMLTemplate, __pyx_t_5, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTMLTemplate, __pyx_t_7) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":494
 * 
 * 
 * def sub_html(content, **kw):             # <<<<<<<<<<<<<<
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_13sub_html, 0, __pyx_n_s_sub_html, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sub_html, __pyx_t_5) < 0) __PYX_ERR(0, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":500
 * 
 * 
 * class TemplateDef(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, template, func_name, func_signature,
 *                  body, ns, pos, bound_self=None):
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_TemplateDef, __pyx_n_s_TemplateDef, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":501
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__, 0, __pyx_n_s_TemplateDef___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__194);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":511
 *         self._bound_self = bound_self
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__, 0, __pyx_n_s_TemplateDef___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":516
 *             self._template.name, self._pos)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self()
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__, 0, __pyx_n_s_TemplateDef___str, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":519
 *         return self()
 * 
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__, 0, __pyx_n_s_TemplateDef___call, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_call, __pyx_t_7) < 0) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":530
 *         return ''.join(out)
 * 
 *     def __get__(self, obj, type=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__, 0, __pyx_n_s_TemplateDef___get, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__203);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_get_2, __pyx_t_7) < 0) __PYX_ERR(0, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":537
 *             self._body, self._ns, self._pos, bound_self=obj)
 * 
 *     def _parse_signature(self, args, kw):             # <<<<<<<<<<<<<<
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature, 0, __pyx_n_s_TemplateDef__parse_signature, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_parse_signature, __pyx_t_7) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":500
 * 
 * 
 * class TemplateDef(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, template, func_name, func_signature,
 *                  body, ns, pos, bound_self=None):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateDef, __pyx_t_5, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateDef, __pyx_t_7) < 0) __PYX_ERR(0, 500, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":577
 * 
 * 
 * class TemplateObject(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name):
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_TemplateObject, __pyx_n_s_TemplateObject, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":579
 * class TemplateObject(object):
 * 
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__, 0, __pyx_n_s_TemplateObject___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":583
 *         self.get = TemplateObjectGetter(self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__, 0, __pyx_n_s_TemplateObject___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 583, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":577
 * 
 * 
 * class TemplateObject(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateObject, __pyx_t_5, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateObject, __pyx_t_7) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":587
 * 
 * 
 * class TemplateObjectGetter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, template_obj):
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_TemplateObjectGetter, __pyx_n_s_TemplateObjectGetter, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":589
 * class TemplateObjectGetter(object):
 * 
 *     def __init__(self, template_obj):             # <<<<<<<<<<<<<<
 *         self.__template_obj = template_obj
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__, 0, __pyx_n_s_TemplateObjectGetter___init, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_init, __pyx_t_7) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":592
 *         self.__template_obj = template_obj
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__, 0, __pyx_n_s_TemplateObjectGetter___getattr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_getattr, __pyx_t_7) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":595
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__, 0, __pyx_n_s_TemplateObjectGetter___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":587
 * 
 * 
 * class TemplateObjectGetter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, template_obj):
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateObjectGetter, __pyx_t_5, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateObjectGetter, __pyx_t_7) < 0) __PYX_ERR(0, 587, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":599
 * 
 * 
 * class _Empty(object):             # <<<<<<<<<<<<<<
 *     def __call__(self, *args, **kw):
 *         return self
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_5, __pyx_n_s_Empty_2, __pyx_n_s_Empty_2, (PyObject *) NULL, __pyx_n_s_Cython_Tempita__tempita, (PyObject *) NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":600
 * 
 * class _Empty(object):
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_1__call__, 0, __pyx_n_s_Empty___call, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_call, __pyx_t_7) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":603
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_3__str__, 0, __pyx_n_s_Empty___str, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_str, __pyx_t_7) < 0) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":606
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_5__repr__, 0, __pyx_n_s_Empty___repr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_repr_2, __pyx_t_7) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":609
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__, 0, __pyx_n_s_Empty___unicode, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_unicode_3, __pyx_t_7) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":612
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_9__iter__, 0, __pyx_n_s_Empty___iter, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":615
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_6_Empty_11__bool__, 0, __pyx_n_s_Empty___bool, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_bool, __pyx_t_7) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":618
 *         return False
 * 
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         __nonzero__ = __bool__
 * 
 */
  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_10, __pyx_kp_s_3, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_13) {

    /* "Cython/Tempita/_tempita.py":619
 * 
 *     if sys.version < "3":
 *         __nonzero__ = __bool__             # <<<<<<<<<<<<<<
 * 
 * Empty = _Empty()
 */
    __pyx_t_7 = PyObject_GetItem(__pyx_t_8, __pyx_n_s_bool);
    if (unlikely(!__pyx_t_7)) {
      PyErr_Clear();
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_bool);
    }
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyObject_SetItem(__pyx_t_8, __pyx_n_s_nonzero, __pyx_t_7) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":618
 *         return False
 * 
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         __nonzero__ = __bool__
 * 
 */
  }

  /* "Cython/Tempita/_tempita.py":599
 * 
 * 
 * class _Empty(object):             # <<<<<<<<<<<<<<
 *     def __call__(self, *args, **kw):
 *         return self
 */
  __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Empty_2, __pyx_t_5, __pyx_t_8, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Empty_2, __pyx_t_7) < 0) __PYX_ERR(0, 599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":621
 *         __nonzero__ = __bool__
 * 
 * Empty = _Empty()             # <<<<<<<<<<<<<<
 * del _Empty
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Empty_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  if (__pyx_t_8) {
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  } else {
    __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 621, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Empty, __pyx_t_5) < 0) __PYX_ERR(0, 621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":622
 * 
 * Empty = _Empty()
 * del _Empty             # <<<<<<<<<<<<<<
 * 
 * ############################################################
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_Empty_2) < 0) __PYX_ERR(0, 622, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":629
 * 
 * 
 * def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     """
 *     Lex a string into chunks:
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_15lex, 0, __pyx_n_s_lex, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__230);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lex, __pyx_t_5) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":692
 *     return chunks
 * 
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')             # <<<<<<<<<<<<<<
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__231, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_statement_re, __pyx_t_5) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":693
 * 
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']             # <<<<<<<<<<<<<<
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')
 * lead_whitespace_re = re.compile(r'^[\t ]*\n')
 */
  __pyx_t_5 = PyList_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_else);
  __Pyx_GIVEREF(__pyx_n_s_else);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_else);
  __Pyx_INCREF(__pyx_n_s_endif);
  __Pyx_GIVEREF(__pyx_n_s_endif);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_endif);
  __Pyx_INCREF(__pyx_n_s_endfor);
  __Pyx_GIVEREF(__pyx_n_s_endfor);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_endfor);
  __Pyx_INCREF(__pyx_n_s_enddef);
  __Pyx_GIVEREF(__pyx_n_s_enddef);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_enddef);
  __Pyx_INCREF(__pyx_n_s_continue);
  __Pyx_GIVEREF(__pyx_n_s_continue);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_s_continue);
  __Pyx_INCREF(__pyx_n_s_break);
  __Pyx_GIVEREF(__pyx_n_s_break);
  PyList_SET_ITEM(__pyx_t_5, 5, __pyx_n_s_break);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_single_statements, __pyx_t_5) < 0) __PYX_ERR(0, 693, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":694
 * statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)')
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')             # <<<<<<<<<<<<<<
 * lead_whitespace_re = re.compile(r'^[\t ]*\n')
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trail_whitespace_re, __pyx_t_5) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":695
 * single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break']
 * trail_whitespace_re = re.compile(r'\n\r?[\t ]*$')
 * lead_whitespace_re = re.compile(r'^[\t ]*\n')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lead_whitespace_re, __pyx_t_5) < 0) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":698
 * 
 * 
 * def trim_lex(tokens):             # <<<<<<<<<<<<<<
 *     r"""
 *     Takes a lexed set of tokens, and removes whitespace when there is
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_17trim_lex, 0, __pyx_n_s_trim_lex, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trim_lex, __pyx_t_5) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":756
 * 
 * 
 * def find_position(string, index, last_index, last_pos):             # <<<<<<<<<<<<<<
 *     """Given a string and index, return (line, column)"""
 *     lines = string.count('\n', last_index, index)
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_19find_position, 0, __pyx_n_s_find_position, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_position, __pyx_t_5) < 0) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":766
 * 
 * 
 * def parse(s, name=None, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parses a string into a kind of AST
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_21parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__240);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_5) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":827
 * 
 * 
 * def parse_expr(tokens, name, context=()):             # <<<<<<<<<<<<<<
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_23parse_expr, 0, __pyx_n_s_parse_expr, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__243);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_expr, __pyx_t_5) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":880
 * 
 * 
 * def parse_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     start = tokens[0][1]
 *     pieces = []
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_25parse_cond, 0, __pyx_n_s_parse_cond, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_cond, __pyx_t_5) < 0) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":896
 * 
 * 
 * def parse_one_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_27parse_one_cond, 0, __pyx_n_s_parse_one_cond, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_one_cond, __pyx_t_5) < 0) __PYX_ERR(0, 896, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":923
 * 
 * 
 * def parse_for(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_29parse_for, 0, __pyx_n_s_parse_for, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_for, __pyx_t_5) < 0) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":958
 * 
 * 
 * def parse_default(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_31parse_default, 0, __pyx_n_s_parse_default, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_default, __pyx_t_5) < 0) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":980
 * 
 * 
 * def parse_inherit(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_33parse_inherit, 0, __pyx_n_s_parse_inherit, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_inherit, __pyx_t_5) < 0) __PYX_ERR(0, 980, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":987
 * 
 * 
 * def parse_def(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_35parse_def, 0, __pyx_n_s_parse_def, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_def, __pyx_t_5) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":1018
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_37parse_signature, 0, __pyx_n_s_parse_signature_2, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_signature_2, __pyx_t_5) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":1094
 * 
 * 
 * def isolate_expression(string, start_pos, end_pos):             # <<<<<<<<<<<<<<
 *     srow, scol = start_pos
 *     srow -= 1
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_39isolate_expression, 0, __pyx_n_s_isolate_expression, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isolate_expression, __pyx_t_5) < 0) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":1109
 *     return ''.join(parts)
 * 
 * _fill_command_usage = """\             # <<<<<<<<<<<<<<
 * %prog [OPTIONS] TEMPLATE arg=value
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fill_command_usage, __pyx_kp_s_prog_OPTIONS_TEMPLATE_arg_value) < 0) __PYX_ERR(0, 1109, __pyx_L1_error)

  /* "Cython/Tempita/_tempita.py":1117
 * 
 * 
 * def fill_command(args=None):             # <<<<<<<<<<<<<<
 *     import sys
 *     import optparse
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_41fill_command, 0, __pyx_n_s_fill_command, NULL, __pyx_n_s_Cython_Tempita__tempita, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__262);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fill_command, __pyx_t_5) < 0) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":1181
 *         sys.stdout.write(result)
 * 
 * if __name__ == '__main__':             # <<<<<<<<<<<<<<
 *     fill_command()
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_13) {

    /* "Cython/Tempita/_tempita.py":1182
 * 
 * if __name__ == '__main__':
 *     fill_command()             # <<<<<<<<<<<<<<
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fill_command); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_8) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":1181
 *         sys.stdout.write(result)
 * 
 * if __name__ == '__main__':             # <<<<<<<<<<<<<<
 *     fill_command()
 */
  }

  /* "Cython/Tempita/_tempita.py":1
 * """             # <<<<<<<<<<<<<<
 * A small templating language
 * 
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_lex_line_629, __pyx_kp_u_Lex_a_string_into_chunks_lex_he) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_trim_lex_line_698, __pyx_kp_u_Takes_a_lexed_set_of_tokens_and) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_parse_line_766, __pyx_kp_u_Parses_a_string_into_a_kind_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init Cython.Tempita._tempita", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init Cython.Tempita._tempita");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#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

/* GetBuiltinName */
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;
}

/* RaiseArgTupleInvalid */
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);
}

/* RaiseDoubleKeywords */
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
}

/* ParseKeywords */
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;
}

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
#include "frameobject.h"
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = PyThreadState_GET();
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = f->f_localsplus;
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif  // CPython < 3.6
#endif  // CYTHON_FAST_PYCALL

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    PyObject *result;
    int flags;
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
}
#endif  // CYTHON_FAST_PYCCALL

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* StringJoin */
#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

/* GetItemInt */
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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    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))
                        return NULL;
                    PyErr_Clear();
                }
            }
            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));
}

/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* PyObjectCallMethO */
  #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
  #if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* PyObjectCallNoArg */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* SaveResetException */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
}
#endif

/* SliceObject */
      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_USE_TYPE_SLOTS
    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))
                    goto bad;
                PyErr_Clear();
            }
        }
        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_USE_TYPE_SLOTS
        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;
}

/* PyErrExceptionMatches */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
      #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
      #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* RaiseTooManyValuesToUnpack */
        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);
}

/* RaiseNeedMoreValuesToUnpack */
        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");
}

/* IterFinish */
        static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    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
}

/* UnpackItemEndCheck */
        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;
}

/* PyObjectCallMethod1 */
        static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto done;
#if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(function)) {
                PyObject *args[2] = {self, arg};
                result = __Pyx_PyCFunction_FastCall(function, args, 2);
                goto done;
            }
            #endif
            args = PyTuple_New(2);
            if (unlikely(!args)) goto done;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
done:
    Py_XDECREF(method);
    return result;
}

/* append */
        static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* BytesEquals */
        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
}

/* UnicodeEquals */
        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 (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        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, (size_t)(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
}

/* GetException */
        #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
#endif
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    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_FAST_THREAD_STATE
    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_FAST_THREAD_STATE
    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;
}

/* GetAttr */
          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);
}

/* GetAttr3 */
          static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

/* dict_getitem_default */
          static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

/* UnpackUnboundCMethod */
          static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(PyObject_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
          static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_items */
          static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
    else
        return PyDict_Items(d);
}

/* KeywordStringCheck */
          static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* pop_index */
          static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
    PyObject *r;
    if (unlikely(!py_ix)) return NULL;
    r = __Pyx__PyObject_PopIndex(L, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
    return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
    Py_ssize_t size = PyList_GET_SIZE(L);
    if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
        Py_ssize_t cix = ix;
        if (cix < 0) {
            cix += size;
        }
        if (likely(0 <= cix && cix < size)) {
            PyObject* v = PyList_GET_ITEM(L, cix);
            Py_SIZE(L) -= 1;
            size -= 1;
            memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
            return v;
        }
    }
    if (py_ix == Py_None) {
        return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
    } else {
        return __Pyx__PyObject_PopIndex(L, py_ix);
    }
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a - b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyIntBinop */
          #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) {
            Py_RETURN_TRUE;
        } else {
            Py_RETURN_FALSE;
        }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a;
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
                default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
                #else
                default: Py_RETURN_FALSE;
                #endif
            }
        }
            if (a == b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            if ((double)a == (double)b) {
                Py_RETURN_TRUE;
            } else {
                Py_RETURN_FALSE;
            }
    }
    return PyObject_RichCompare(op1, op2, Py_EQ);
}
#endif

/* None */
          static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* None */
          static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* FetchCommonType */
          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;
}

/* CythonFunction */
          static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    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);
    #else
    op->defaults_tuple = PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return __Pyx_PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    Py_ssize_t size;
    switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    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 (likely(size == 0))
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
            size = PyTuple_GET_SIZE(arg);
            if (likely(size == 1)) {
                PyObject *result, *arg0 = PySequence_ITEM(arg, 0);
                if (unlikely(!arg0)) return NULL;
                result = (*meth)(self, arg0);
                Py_DECREF(arg0);
                return result;
            }
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
        argc = PyTuple_GET_SIZE(args);
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
    0,
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_CyFunction_descr_get,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __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 = PyObject_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);
}

/* Import */
              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_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;
        }
        #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
        }
    }
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
              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;
}

/* CalculateMetaclass */
              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;
}

/* Py3ClassCreate */
              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;
}

/* ClassMethod */
              static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYSTON
    if (PyMethodDescr_Check(method)) {
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) {
#endif
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

/* CodeObjectCache */
                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 - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
                #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
                static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 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);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* PyExec */
                static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject* o, PyObject* globals) {
    return __Pyx_PyExec3(o, globals, NULL);
}
static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals) {
    PyObject* result;
    PyObject* s = 0;
    char *code = 0;
    if (!globals || globals == Py_None) {
        globals = __pyx_d;
    } else if (!PyDict_Check(globals)) {
        PyErr_Format(PyExc_TypeError, "exec() arg 2 must be a dict, not %.200s",
                     Py_TYPE(globals)->tp_name);
        goto bad;
    }
    if (!locals || locals == Py_None) {
        locals = globals;
    }
    if (PyDict_GetItem(globals, __pyx_n_s_builtins) == NULL) {
        if (PyDict_SetItem(globals, __pyx_n_s_builtins, PyEval_GetBuiltins()) < 0)
            goto bad;
    }
    if (PyCode_Check(o)) {
        if (__Pyx_PyCode_HasFreeVars((PyCodeObject *)o)) {
            PyErr_SetString(PyExc_TypeError,
                "code object passed to exec() may not contain free variables");
            goto bad;
        }
        #if CYTHON_COMPILING_IN_PYPY || PY_VERSION_HEX < 0x030200B1
        result = PyEval_EvalCode((PyCodeObject *)o, globals, locals);
        #else
        result = PyEval_EvalCode(o, globals, locals);
        #endif
    } else {
        PyCompilerFlags cf;
        cf.cf_flags = 0;
        if (PyUnicode_Check(o)) {
            cf.cf_flags = PyCF_SOURCE_IS_UTF8;
            s = PyUnicode_AsUTF8String(o);
            if (!s) goto bad;
            o = s;
        #if PY_MAJOR_VERSION >= 3
        } else if (!PyBytes_Check(o)) {
        #else
        } else if (!PyString_Check(o)) {
        #endif
            PyErr_Format(PyExc_TypeError,
                "exec: arg 1 must be string, bytes or code object, got %.200s",
                Py_TYPE(o)->tp_name);
            goto bad;
        }
        #if PY_MAJOR_VERSION >= 3
        code = PyBytes_AS_STRING(o);
        #else
        code = PyString_AS_STRING(o);
        #endif
        if (PyEval_MergeCompilerFlags(&cf)) {
            result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf);
        } else {
            result = PyRun_String(code, Py_file_input, globals, locals);
        }
        Py_XDECREF(s);
    }
    return result;
bad:
    Py_XDECREF(s);
    return 0;
}

/* Print */
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0) {
                switch (s[len-1]) {
                    case ' ': break;
                    case '\f': case '\r': case '\n': case '\t': case '\v':
                        PyFile_SoftSpace(f, 0);
                        break;
                    default:  break;
                }
            }
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file_2, stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

/* PrintOne */
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    if (PyFile_SoftSpace(f, 0)) {
        if (PyFile_WriteString(" ", f) < 0)
            goto error;
    }
    if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
        goto error;
    if (PyFile_WriteString("\n", f) < 0)
        goto error;
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
    /* the line below is just to avoid C compiler
     * warnings about unused functions */
    return __Pyx_Print(f, NULL, 0);
}
#else
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
    int res;
    PyObject* arg_tuple = PyTuple_Pack(1, o);
    if (unlikely(!arg_tuple))
        return -1;
    res = __Pyx_Print(stream, arg_tuple, 1);
    Py_DECREF(arg_tuple);
    return res;
}
#endif

/* Globals */
                static PyObject* __Pyx_Globals(void) {
    Py_ssize_t i;
    PyObject *names;
    PyObject *globals = __pyx_d;
    Py_INCREF(globals);
    names = PyObject_Dir(__pyx_m);
    if (!names)
        goto bad;
    for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject* name = PySequence_ITEM(names, i);
        if (!name)
            goto bad;
#else
        PyObject* name = PyList_GET_ITEM(names, i);
#endif
        if (!PyDict_Contains(globals, name)) {
            PyObject* value = __Pyx_GetAttr(__pyx_m, name);
            if (!value) {
#if CYTHON_COMPILING_IN_PYPY
                Py_DECREF(name);
#endif
                goto bad;
            }
            if (PyDict_SetItem(globals, name, value) < 0) {
#if CYTHON_COMPILING_IN_PYPY
                Py_DECREF(name);
#endif
                Py_DECREF(value);
                goto bad;
            }
        }
#if CYTHON_COMPILING_IN_PYPY
        Py_DECREF(name);
#endif
    }
    Py_DECREF(names);
    return globals;
bad:
    Py_XDECREF(names);
    Py_XDECREF(globals);
    return NULL;
}

/* CIntFromPyVerify */
                #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
                static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
                static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#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_IntOrLong(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_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CheckBinaryVersion */
                static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
                static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  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 __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  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
#else
  res = PyNumber_Int(x);
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
