/* Generated by Cython 0.20.1rc1 on Fri Feb  7 22:07:42 2014 */

#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#define CYTHON_ABI "0_20_1rc1"
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if CYTHON_COMPILING_IN_PYPY
#define Py_OptimizeFlag 0
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_As_int(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \
                                  !PyComplex_Check(o))
  #define PyIndex_Check __Pyx_PyIndex_Check
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
  #define __Pyx_PyIndex_Check PyIndex_Check
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
#endif
#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT)
  #define Py_TPFLAGS_IS_ABSTRACT 0
#endif
#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#define __Pyx_PyString_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
                                         PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
   a quiet NaN. */
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif


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

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

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__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
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/

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


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

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


static const char *__pyx_f[] = {
  "_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":1029
 * 
 * 
 * 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;
};

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

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

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

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

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

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

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

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

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

#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);

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

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

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

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

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

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

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

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

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

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

static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) {
    PyObject *method, *result = NULL;
    if (unlikely(!args)) return NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_Call(method, args, NULL);
    Py_DECREF(method);
bad:
    Py_DECREF(args);
    return result;
}
#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3))
#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2))
#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \
    __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1))
#define __Pyx_PyObject_CallMethod0(obj, name) \
    __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple))

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/

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

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

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

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

#include <string.h>

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

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

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

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

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

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

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

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

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

#define __Pyx_PyObject_PopIndex(L, ix) (PyList_CheckExact(L) ? \
    __Pyx_PyList_PopIndex(L, ix) : __Pyx__PyObject_PopIndex(L, ix))
static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

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

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

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
}

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

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

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

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

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*);

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

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

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

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

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static int __Pyx_check_binary_version(void);

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

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

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


/* Module declarations from '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_Exception;
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 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_8Template_28__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 char __pyx_k_[] = " ";
static char __pyx_k_3[] = "3";
static char __pyx_k_I[] = "I";
static char __pyx_k_c[] = "c";
static char __pyx_k_e[] = "e";
static char __pyx_k_f[] = "f";
static char __pyx_k_i[] = "i";
static char __pyx_k_k[] = "k";
static char __pyx_k_m[] = "m";
static char __pyx_k_o[] = "-o";
static char __pyx_k_s[] = ":%s";
static char __pyx_k_v[] = "v";
static char __pyx_k_OP[] = "OP";
static char __pyx_k__9[] = "";
static char __pyx_k_id[] = "id";
static char __pyx_k_if[] = "if ";
static char __pyx_k_io[] = "io";
static char __pyx_k_kw[] = "kw";
static char __pyx_k_ns[] = "ns";
static char __pyx_k_os[] = "os";
static char __pyx_k_py[] = "py";
static char __pyx_k_rb[] = "rb";
static char __pyx_k_re[] = "re";
static char __pyx_k_wb[] = "wb";
static char __pyx_k__12[] = "|";
static char __pyx_k__19[] = "_";
static char __pyx_k__22[] = ", ";
static char __pyx_k__24[] = "\n";
static char __pyx_k__28[] = " \t";
static char __pyx_k__31[] = "\r";
static char __pyx_k__33[] = "\r\n";
static char __pyx_k__47[] = "#";
static char __pyx_k__55[] = ":";
static char __pyx_k__70[] = "(";
static char __pyx_k__71[] = ",";
static char __pyx_k__77[] = "=";
static char __pyx_k__89[] = ")";
static char __pyx_k__99[] = "*";
static char __pyx_k_all[] = "__all__";
static char __pyx_k_cgi[] = "cgi";
static char __pyx_k_cls[] = "cls";
static char __pyx_k_def[] = "def";
static char __pyx_k_doc[] = "__doc__";
static char __pyx_k_end[] = "end";
static char __pyx_k_env[] = "--env";
static char __pyx_k_for[] = "for";
static char __pyx_k_get[] = "get";
static char __pyx_k_hex[] = "hex";
static char __pyx_k_key[] = "key";
static char __pyx_k_lex[] = "lex";
static char __pyx_k_msg[] = "msg";
static char __pyx_k_obj[] = "obj";
static char __pyx_k_out[] = "out";
static char __pyx_k_pop[] = "pop";
static char __pyx_k_pos[] = "pos";
static char __pyx_k_pyc[] = ".pyc";
static char __pyx_k_pyo[] = ".pyo";
static char __pyx_k_s_2[] = "s";
static char __pyx_k_s_r[] = "%s=%r";
static char __pyx_k_s_s[] = "<%s %s>";
static char __pyx_k_sig[] = "sig";
static char __pyx_k_str[] = "__str__";
static char __pyx_k_sub[] = "sub";
static char __pyx_k_sys[] = "sys";
static char __pyx_k_t_n[] = "^[\\t ]*\\n";
static char __pyx_k_url[] = "url";
static char __pyx_k_var[] = "var";
static char __pyx_k_zip[] = "zip";
static char __pyx_k_NAME[] = "NAME";
static char __pyx_k__100[] = "**";
static char __pyx_k__101[] = "[";
static char __pyx_k__102[] = "{";
  static char __pyx_k__103[] = "]";
static char __pyx_k__104[] = "}";
static char __pyx_k__117[] = "-";
static char __pyx_k__126[] = "{{";
static char __pyx_k__127[] = "}}";
static char __pyx_k_arg0[] = "arg0";
static char __pyx_k_args[] = "args";
static char __pyx_k_argv[] = "argv";
static char __pyx_k_attr[] = "attr";
static char __pyx_k_base[] = "base";
static char __pyx_k_body[] = "body";
static char __pyx_k_bool[] = "__bool__";
static char __pyx_k_call[] = "__call__";
static char __pyx_k_code[] = "code";
static char __pyx_k_cond[] = "cond";
static char __pyx_k_copy[] = "copy";
static char __pyx_k_defs[] = "defs";
static char __pyx_k_dest[] = "dest";
static char __pyx_k_dict[] = "__dict__";
static char __pyx_k_dist[] = "dist";
static char __pyx_k_ecol[] = "ecol";
static char __pyx_k_elif[] = "elif ";
static char __pyx_k_else[] = "else";
static char __pyx_k_erow[] = "erow";
static char __pyx_k_eval[] = "eval";
static char __pyx_k_exec[] = "_exec";
static char __pyx_k_exit[] = "exit";
static char __pyx_k_expr[] = "expr";
static char __pyx_k_file[] = "__file__";
static char __pyx_k_func[] = "func";
static char __pyx_k_help[] = "help";
static char __pyx_k_html[] = "__html__";
static char __pyx_k_if_2[] = "if";
static char __pyx_k_in_s[] = " in %s";
static char __pyx_k_init[] = "__init__";
static char __pyx_k_item[] = "item";
static char __pyx_k_iter[] = "__iter__";
static char __pyx_k_join[] = "join";
static char __pyx_k_last[] = "last";
static char __pyx_k_line[] = "line";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_name[] = "name";
static char __pyx_k_next[] = "next";
static char __pyx_k_ns_2[] = "_ns";
static char __pyx_k_open[] = "open";
static char __pyx_k_part[] = "part";
static char __pyx_k_path[] = "path";
static char __pyx_k_prev[] = "prev";
static char __pyx_k_py_2[] = "py:";
static char __pyx_k_read[] = "read";
static char __pyx_k_repr[] = "_repr";
static char __pyx_k_scol[] = "scol";
static char __pyx_k_self[] = "self";
static char __pyx_k_sort[] = "sort";
static char __pyx_k_srow[] = "srow";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_tmpl[] = "tmpl";
static char __pyx_k_type[] = "type";
static char __pyx_k_utf8[] = "utf8";
static char __pyx_k_vars[] = "vars";
static char __pyx_k_Empty[] = "Empty";
static char __pyx_k_Paste[] = "Paste";
static char __pyx_k_ascii[] = "ascii";
static char __pyx_k_break[] = "break";
static char __pyx_k_bunch[] = "bunch";
static char __pyx_k_bytes[] = "bytes";
static char __pyx_k_class[] = "__class__";
static char __pyx_k_close[] = "close";
static char __pyx_k_codes[] = "codes";
static char __pyx_k_count[] = "count";
static char __pyx_k_def_2[] = "def ";
static char __pyx_k_endif[] = "endif";
static char __pyx_k_first[] = "first";
static char __pyx_k_for_2[] = "for ";
static char __pyx_k_force[] = "force";
static char __pyx_k_get_2[] = "__get__";
static char __pyx_k_group[] = "group";
static char __pyx_k_in_re[] = "in_re";
static char __pyx_k_index[] = "index";
static char __pyx_k_items[] = "items";
static char __pyx_k_lines[] = "lines";
static char __pyx_k_match[] = "match";
static char __pyx_k_n_r_t[] = "\\n\\r?[\\t ]*$";
static char __pyx_k_parse[] = "parse";
static char __pyx_k_parts[] = "parts";
static char __pyx_k_plain[] = "plain";
static char __pyx_k_pos_2[] = "_pos";
static char __pyx_k_print[] = "print";
static char __pyx_k_quote[] = "quote";
static char __pyx_k_rfind[] = "rfind";
static char __pyx_k_s_r_2[] = "<%s %r>";
static char __pyx_k_s_s_2[] = "%s=\"%s\"";
static char __pyx_k_s_s_3[] = "%s|%s";
static char __pyx_k_split[] = "split";
static char __pyx_k_start[] = "start";
static char __pyx_k_stdin[] = "stdin";
static char __pyx_k_strip[] = "strip";
static char __pyx_k_templ[] = "templ";
static char __pyx_k_usage[] = "usage";
static char __pyx_k_value[] = "value";
static char __pyx_k_write[] = "write";
static char __pyx_k_action[] = "action";
static char __pyx_k_append[] = "append";
static char __pyx_k_body_2[] = "_body";
static char __pyx_k_caller[] = "caller";
static char __pyx_k_chunks[] = "chunks";
static char __pyx_k_column[] = "column";
static char __pyx_k_decode[] = "decode";
static char __pyx_k_elif_2[] = "elif";
static char __pyx_k_encode[] = "encode";
static char __pyx_k_enddef[] = "enddef";
static char __pyx_k_endfor[] = "endfor";
static char __pyx_k_escape[] = "escape";
static char __pyx_k_eval_2[] = "_eval";
static char __pyx_k_file_2[] = "file";
static char __pyx_k_html_2[] = "html";
static char __pyx_k_html_3[] = "--html";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_latin1[] = "latin1";
static char __pyx_k_lineno[] = "lineno";
static char __pyx_k_looper[] = "looper";
static char __pyx_k_lstrip[] = "lstrip";
static char __pyx_k_module[] = "__module__";
static char __pyx_k_name_2[] = "__name__";
static char __pyx_k_name_3[] = "__name";
static char __pyx_k_object[] = "object";
static char __pyx_k_output[] = "--output";
static char __pyx_k_parsed[] = "_parsed";
static char __pyx_k_parser[] = "parser";
static char __pyx_k_pieces[] = "pieces";
static char __pyx_k_reason[] = "reason";
static char __pyx_k_repr_2[] = "__repr__";
static char __pyx_k_result[] = "result";
static char __pyx_k_s_in_s[] = "\\s+in\\s+";
static char __pyx_k_search[] = "search";
static char __pyx_k_self_2[] = "self_";
static char __pyx_k_stdout[] = "stdout";
static char __pyx_k_string[] = "<string>";
static char __pyx_k_tokens[] = "tokens";
static char __pyx_k_update[] = "update";
static char __pyx_k_urllib[] = "urllib";
static char __pyx_k_values[] = "values";
static char __pyx_k_var_kw[] = "var_kw";
static char __pyx_k_var_re[] = "var_re";
static char __pyx_k_Empty_2[] = "_Empty";
static char __pyx_k_comment[] = "comment";
static char __pyx_k_compile[] = "compile";
static char __pyx_k_content[] = "content";
static char __pyx_k_context[] = "context";
static char __pyx_k_current[] = "current";
static char __pyx_k_default[] = "default";
static char __pyx_k_dirname[] = "dirname";
static char __pyx_k_end_pos[] = "end_pos";
static char __pyx_k_environ[] = "environ";
static char __pyx_k_getattr[] = "__getattr__";
static char __pyx_k_getitem[] = "__getitem__";
static char __pyx_k_globals[] = "globals";
static char __pyx_k_in_expr[] = "in_expr";
static char __pyx_k_inherit[] = "__inherit__";
static char __pyx_k_message[] = "message";
static char __pyx_k_metavar[] = "metavar";
static char __pyx_k_nonzero[] = "__nonzero__";
static char __pyx_k_options[] = "options";
static char __pyx_k_prepare[] = "__prepare__";
static char __pyx_k_prev_ok[] = "prev_ok";
static char __pyx_k_replace[] = "replace";
static char __pyx_k_setattr[] = "__setattr__";
static char __pyx_k_stdin_2[] = "<stdin>";
static char __pyx_k_subdefs[] = "subdefs";
static char __pyx_k_unicode[] = "_unicode";
static char __pyx_k_use_env[] = "use_env";
static char __pyx_k_var_arg[] = "var_arg";
static char __pyx_k_version[] = "version";
static char __pyx_k_FILENAME[] = "FILENAME";
static char __pyx_k_KeyError[] = "KeyError";
static char __pyx_k_No_endif[] = "No {{endif}}";
static char __pyx_k_StringIO[] = "StringIO";
static char __pyx_k_Template[] = "Template";
static char __pyx_k_builtins[] = "__builtins__";
static char __pyx_k_continue[] = "continue";
static char __pyx_k_defaults[] = "defaults";
static char __pyx_k_encoding[] = "encoding";
static char __pyx_k_endswith[] = "endswith";
static char __pyx_k_exc_info[] = "exc_info";
static char __pyx_k_extra_kw[] = "extra_kw";
static char __pyx_k_f_lineno[] = "f_lineno";
static char __pyx_k_filename[] = "filename";
static char __pyx_k_finditer[] = "finditer";
static char __pyx_k_getframe[] = "_getframe";
static char __pyx_k_last_pos[] = "last_pos";
static char __pyx_k_optparse[] = "optparse";
static char __pyx_k_output_2[] = "output";
static char __pyx_k_position[] = "position";
static char __pyx_k_qualname[] = "__qualname__";
static char __pyx_k_readline[] = "readline";
static char __pyx_k_sig_args[] = "sig_args";
static char __pyx_k_sig_text[] = "sig_text";
static char __pyx_k_string_2[] = "string";
static char __pyx_k_sub_html[] = "sub_html";
static char __pyx_k_template[] = "template";
static char __pyx_k_tok_type[] = "tok_type";
static char __pyx_k_token_re[] = "token_re";
static char __pyx_k_tokenize[] = "tokenize";
static char __pyx_k_trim_lex[] = "trim_lex";
static char __pyx_k_use_html[] = "use_html";
static char __pyx_k_var_args[] = "var_args";
static char __pyx_k_var_name[] = "var_name";
static char __pyx_k_ENDMARKER[] = "ENDMARKER";
static char __pyx_k_Exception[] = "Exception";
static char __pyx_k_No_endfor[] = "No {{endfor}}";
static char __pyx_k_TypeError[] = "TypeError";
static char __pyx_k_cStringIO[] = "cStringIO";
static char __pyx_k_default_2[] = "default ";
static char __pyx_k_enumerate[] = "enumerate";
static char __pyx_k_f_globals[] = "f_globals";
static char __pyx_k_func_name[] = "func_name";
static char __pyx_k_get_token[] = "get_token";
static char __pyx_k_in_file_s[] = " in file %s";
static char __pyx_k_inherit_2[] = "inherit";
static char __pyx_k_inherit_3[] = "inherit ";
static char __pyx_k_interpret[] = "_interpret";
static char __pyx_k_iteritems[] = "iteritems";
static char __pyx_k_last_trim[] = "last_trim";
static char __pyx_k_metaclass[] = "__metaclass__";
static char __pyx_k_namespace[] = "namespace";
static char __pyx_k_nest_type[] = "nest_type";
static char __pyx_k_parse_def[] = "parse_def";
static char __pyx_k_parse_for[] = "parse_for";
static char __pyx_k_signature[] = "signature";
static char __pyx_k_start_pos[] = "start_pos";
static char __pyx_k_unicode_2[] = "__unicode__";
static char __pyx_k_url_quote[] = "url_quote";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_add_option[] = "add_option";
static char __pyx_k_basestring[] = "basestring_";
static char __pyx_k_bound_self[] = "bound_self";
static char __pyx_k_delimeters[] = "delimeters";
static char __pyx_k_end_braces[] = "end_braces";
static char __pyx_k_html___str[] = "html.__str__";
static char __pyx_k_html_quote[] = "html_quote";
static char __pyx_k_is_unicode[] = "is_unicode";
static char __pyx_k_last_index[] = "last_index";
static char __pyx_k_nest_count[] = "nest_count";
static char __pyx_k_next_chunk[] = "next_chunk";
static char __pyx_k_parse_args[] = "parse_args";
static char __pyx_k_parse_cond[] = "parse_cond";
static char __pyx_k_parse_expr[] = "parse_expr";
static char __pyx_k_s_around_r[] = "<%s around %r>";
static char __pyx_k_s_s_name_r[] = "<%s %s name=%r>";
static char __pyx_k_splitlines[] = "splitlines";
static char __pyx_k_stacklevel[] = "stacklevel";
static char __pyx_k_startswith[] = "startswith";
static char __pyx_k_store_true[] = "store_true";
static char __pyx_k_substitute[] = "substitute";
static char __pyx_k_template_2[] = "_template";
static char __pyx_k_tok_string[] = "tok_string";
static char __pyx_k_value_expr[] = "value_expr";
static char __pyx_k_Empty___str[] = "_Empty.__str__";
static char __pyx_k_ImportError[] = "ImportError";
static char __pyx_k_SyntaxError[] = "SyntaxError";
static char __pyx_k_TemplateDef[] = "TemplateDef";
static char __pyx_k_a_z__a_z0_9[] = "^[a-z_][a-z0-9_]*$";
static char __pyx_k_coerce_text[] = "coerce_text";
static char __pyx_k_func_name_2[] = "_func_name";
static char __pyx_k_html___html[] = "html.__html__";
static char __pyx_k_html___init[] = "html.__init__";
static char __pyx_k_html___repr[] = "html.__repr__";
static char __pyx_k_in_string_r[] = " in string %r";
static char __pyx_k_line_offset[] = "line_offset";
static char __pyx_k_unnest_type[] = "unnest_type";
static char __pyx_k_Empty___bool[] = "_Empty.__bool__";
static char __pyx_k_Empty___call[] = "_Empty.__call__";
static char __pyx_k_Empty___iter[] = "_Empty.__iter__";
static char __pyx_k_Empty___repr[] = "_Empty.__repr__";
static char __pyx_k_HTMLTemplate[] = "HTMLTemplate";
static char __pyx_k_OptionParser[] = "OptionParser";
static char __pyx_k_Unexpected_s[] = "Unexpected %s";
static char __pyx_k_bound_self_2[] = "_bound_self";
static char __pyx_k_bunch___init[] = "bunch.__init__";
static char __pyx_k_bunch___repr[] = "bunch.__repr__";
static char __pyx_k_default_expr[] = "default_expr";
static char __pyx_k_fill_command[] = "fill_command";
static char __pyx_k_get_template[] = "get_template";
static char __pyx_k_interpret_if[] = "_interpret_if";
static char __pyx_k_lex_line_640[] = "lex (line 640)";
static char __pyx_k_start_braces[] = "start_braces";
static char __pyx_k_statement_re[] = "statement_re";
static char __pyx_k_template_obj[] = "template_obj";
static char __pyx_k_urllib_parse[] = "urllib.parse";
static char __pyx_k_var_arg_type[] = "var_arg_type";
static char __pyx_k_Missing_endif[] = "Missing {{endif}}";
static char __pyx_k_StopIteration[] = "StopIteration";
static char __pyx_k_TemplateBreak[] = "_TemplateBreak";
static char __pyx_k_TemplateClass[] = "TemplateClass";
static char __pyx_k_TemplateError[] = "TemplateError";
static char __pyx_k_add_line_info[] = "_add_line_info";
static char __pyx_k_find_position[] = "find_position";
static char __pyx_k_from_filename[] = "from_filename";
static char __pyx_k_from_template[] = "from_template";
static char __pyx_k_interpret_for[] = "_interpret_for";
static char __pyx_k_parse_default[] = "parse_default";
static char __pyx_k_parse_inherit[] = "parse_inherit";
static char __pyx_k_pkg_resources[] = "pkg_resources";
static char __pyx_k_template_name[] = "__template_name__";
static char __pyx_k_AttributeError[] = "AttributeError";
static char __pyx_k_Bad_argument_r[] = "Bad argument: %r";
static char __pyx_k_Missing_enddef[] = "Missing {{enddef}}";
static char __pyx_k_TemplateObject[] = "TemplateObject";
static char __pyx_k_Template__eval[] = "Template._eval";
static char __pyx_k_Template__exec[] = "Template._exec";
static char __pyx_k_Template__repr[] = "Template._repr";
static char __pyx_k_Unknown_code_r[] = "Unknown code: %r";
static char __pyx_k_func_signature[] = "func_signature";
static char __pyx_k_interpret_code[] = "_interpret_code";
static char __pyx_k_parse_line_777[] = "parse (line 777)";
static char __pyx_k_parse_one_cond[] = "parse_one_cond";
static char __pyx_k_traceback_hide[] = "__traceback_hide__";
static char __pyx_k_Empty___unicode[] = "_Empty.__unicode__";
static char __pyx_k_Template___init[] = "Template.__init__";
static char __pyx_k_Template___repr[] = "Template.__repr__";
static char __pyx_k_bunch___getattr[] = "bunch.__getattr__";
static char __pyx_k_bunch___getitem[] = "bunch.__getitem__";
static char __pyx_k_bunch___setattr[] = "bunch.__setattr__";
static char __pyx_k_default_inherit[] = "default_inherit";
static char __pyx_k_generate_tokens[] = "generate_tokens";
static char __pyx_k_interpret_codes[] = "_interpret_codes";
static char __pyx_k_parse_signature[] = "_parse_signature";
static char __pyx_k_template_name_2[] = "template_name";
static char __pyx_k_trim_whitespace[] = "trim_whitespace";
static char __pyx_k_TemplateContinue[] = "_TemplateContinue";
static char __pyx_k_default_encoding[] = "default_encoding";
static char __pyx_k_func_signature_2[] = "_func_signature";
static char __pyx_k_get_distribution[] = "get_distribution";
static char __pyx_k_inherit_template[] = "inherit_template";
static char __pyx_k_template_content[] = "template_content";
static char __pyx_k_TemplateDef___get[] = "TemplateDef.__get__";
static char __pyx_k_TemplateDef___str[] = "TemplateDef.__str__";
static char __pyx_k_default_namespace[] = "default_namespace";
static char __pyx_k_get_file_template[] = "get_file_template";
static char __pyx_k_interpret_inherit[] = "_interpret_inherit";
static char __pyx_k_parse_signature_2[] = "parse_signature";
static char __pyx_k_single_statements[] = "single_statements";
static char __pyx_k_trim_lex_line_709[] = "trim_lex (line 709)";
static char __pyx_k_xmlcharrefreplace[] = "xmlcharrefreplace";
static char __pyx_k_Bad_for_no_in_in_r[] = "Bad for (no \"in\") in %r";
static char __pyx_k_HTMLTemplate__repr[] = "HTMLTemplate._repr";
static char __pyx_k_Missing_argument_s[] = "Missing argument: %s";
static char __pyx_k_TemplateDef___call[] = "TemplateDef.__call__";
static char __pyx_k_TemplateDef___init[] = "TemplateDef.__init__";
static char __pyx_k_TemplateDef___repr[] = "TemplateDef.__repr__";
static char __pyx_k_UnicodeDecodeError[] = "UnicodeDecodeError";
static char __pyx_k_UnicodeEncodeError[] = "UnicodeEncodeError";
static char __pyx_k_fill_command_usage[] = "_fill_command_usage";
static char __pyx_k_isolate_expression[] = "isolate_expression";
static char __pyx_k_lead_whitespace_re[] = "lead_whitespace_re";
static char __pyx_k_Invalid_signature_s[] = "Invalid signature: (%s)";
static char __pyx_k_TemplateError___str[] = "TemplateError.__str__";
static char __pyx_k_Template__interpret[] = "Template._interpret";
static char __pyx_k_Template_substitute[] = "Template.substitute";
static char __pyx_k_s_inside_expression[] = "%s inside expression";
static char __pyx_k_trail_whitespace_re[] = "trail_whitespace_re";
static char __pyx_k_TemplateError___init[] = "TemplateError.__init__";
static char __pyx_k_TemplateObjectGetter[] = "TemplateObjectGetter";
static char __pyx_k_TemplateObject__name[] = "_TemplateObject__name";
static char __pyx_k_s_at_line_s_column_s[] = "%s at line %s column %s";
static char __pyx_k_s_outside_expression[] = "%s outside expression";
static char __pyx_k_s_with_no_expression[] = "%s with no expression";
static char __pyx_k_TemplateObject___init[] = "TemplateObject.__init__";
static char __pyx_k_TemplateObject___repr[] = "TemplateObject.__repr__";
static char __pyx_k_Unexpected_argument_s[] = "Unexpected argument %s";
static char __pyx_k_Cython_Tempita__looper[] = "Cython.Tempita._looper";
static char __pyx_k_Cython_Tempita_compat3[] = "Cython.Tempita.compat3";
static char __pyx_k_Template__interpret_if[] = "Template._interpret_if";
static char __pyx_k_Template_from_filename[] = "Template.from_filename";
static char __pyx_k_Cython_Tempita__tempita[] = "Cython.Tempita._tempita";
static char __pyx_k_Template__add_line_info[] = "Template._add_line_info";
static char __pyx_k_Template__interpret_for[] = "Template._interpret_for";
static char __pyx_k_Unexpected_token_r_at_s[] = "Unexpected token %r at %s";
static char __pyx_k_Template__interpret_code[] = "Template._interpret_code";
static char __pyx_k_s_outside_of_an_if_block[] = "%s outside of an if block";
static char __pyx_k_Template__interpret_codes[] = "Template._interpret_codes";
static char __pyx_k_Extra_position_arguments_s[] = "Extra position arguments: %s";
static char __pyx_k_TemplateObjectGetter___init[] = "TemplateObjectGetter.__init__";
static char __pyx_k_TemplateObjectGetter___repr[] = "TemplateObjectGetter.__repr__";
static char __pyx_k_Template__interpret_inherit[] = "Template._interpret_inherit";
static char __pyx_k_tempita_function_s_s_at_s_s[] = "<tempita function %s(%s) at %s:%s>";
static char __pyx_k_TemplateDef__parse_signature[] = "TemplateDef._parse_signature";
static char __pyx_k_continue_outside_of_for_loop[] = "continue outside of for loop";
static char __pyx_k_default_x_y_is_not_supported[] = "{{default x, y = ...}} is not supported";
static char __pyx_k_No_s_to_finish_last_expression[] = "No %s to finish last expression";
static 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 char __pyx_k_TemplateObjectGetter___getattr[] = "TemplateObjectGetter.__getattr__";
static char __pyx_k_TemplateObjectGetter__template[] = "_TemplateObjectGetter__template_obj";
static char __pyx_k_invalid_syntax_in_expression_s[] = "invalid syntax in expression: %s";
static char __pyx_k_paste_script_template_renderer[] = "paste_script_template_renderer";
static 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 char __pyx_k_File_to_write_output_to_default[] = "File to write output to (default stdout)";
static char __pyx_k_Function_definition_doesn_t_end[] = "Function definition doesn't end with ): %s";
static 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 char __pyx_k_Multi_line_py_blocks_must_start[] = "Multi-line py blocks must start with a newline";
    static 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 char __pyx_k_Users_robertwb_sage_cython_cyth[] = "/Users/robertwb/sage/cython/cython-release/Cython/Tempita/_tempita.py";
    static char __pyx_k_You_can_only_give_positional_or[] = "You can only give positional *or* keyword arguments";
    static char __pyx_k_You_cannot_have_in_the_variable[] = "You cannot have () in the variable section of a for loop (%r)";
    static char __pyx_k_if_elif_for_def_inherit_default[] = "^(?:if |elif |for |def |inherit |default |py:)";
    static 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 char __pyx_k_Cannot_decode_bytes_value_r_into[] = "Cannot decode bytes value %r into unicode (no default_encoding provided)";
    static char __pyx_k_Cannot_encode_unicode_value_r_in[] = "Cannot encode unicode value %r into bytes (no default_encoding provided)";
    static char __pyx_k_Exception_raised_while_parsing_a[] = "Exception raised while parsing a template\n    ";
    static char __pyx_k_Expression_must_be_default_var_v[] = "Expression must be {{default var=value}}; no = found in %r";
    static 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 char __pyx_k_Need_i_items_to_unpack_got_i_ite[] = "Need %i items to unpack (got %i items)";
    static char __pyx_k_Not_a_valid_variable_name_for_de[] = "Not a valid variable name for {{default}}: %r";
    static char __pyx_k_Put_the_environment_in_as_top_le[] = "Put the environment in as top-level variables";
    static char __pyx_k_Use_HTML_style_filling_including[] = "Use HTML style filling (including automatic HTML quoting)";
    static char __pyx_k_You_can_only_give_one_positional[] = "You can only give one positional argument";
    static char __pyx_k_You_cannot_use_inheritance_witho[] = "You cannot use inheritance without passing in get_template";
    static char __pyx_k_You_must_give_a_template_filenam[] = "You must give a template filename";
    static 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__looper;
    static PyObject *__pyx_n_s_Cython_Tempita__tempita;
    static PyObject *__pyx_n_s_Cython_Tempita_compat3;
    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_n_s_Exception;
    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_kp_s_Users_robertwb_sage_cython_cyth;
    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_cStringIO;
    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_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_dict;
    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_exc_info;
    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_iteritems;
    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_640;
    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_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_777;
    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_sort;
    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_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_709;
    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_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_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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_1 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_Exception, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_message);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_message);
  __Pyx_GIVEREF(__pyx_v_message);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __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_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__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13TemplateError_3__str__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_msg);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_msg);
    __Pyx_GIVEREF(__pyx_v_msg);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
    __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __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;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "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 = {__Pyx_NAMESTR("get_file_template"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_1get_file_template, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_file_template") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dirname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_path = __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_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_from_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
  __Pyx_GIVEREF(__pyx_v_path);

  /* "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_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_namespace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_namespace, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_from_template, __pyx_n_s_get_template); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_get_template, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 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_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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "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]
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_5 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_n_s_start_braces, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_5 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_n_s_end_braces, __pyx_t_5) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __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;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_unicode, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_2 = (__pyx_v_name == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_1 = (__pyx_v_stacklevel != Py_None);
    __pyx_t_6 = (__pyx_t_1 != 0);
  } else {
    __pyx_t_6 = (__pyx_t_2 != 0);
  }
  if (__pyx_t_6) {

    /* "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_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":120
 *         if name is None and stacklevel is not None:
 *             try:
 *                 caller = sys._getframe(stacklevel)             # <<<<<<<<<<<<<<
 *             except ValueError:
 *                 pass
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_stacklevel);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_stacklevel);
        __Pyx_GIVEREF(__pyx_v_stacklevel);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L5_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_v_caller = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      /*else:*/ {

        /* "Cython/Tempita/_tempita.py":124
 *                 pass
 *             else:
 *                 globals = caller.f_globals             # <<<<<<<<<<<<<<
 *                 lineno = caller.f_lineno
 *                 if '__file__' in globals:
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_caller, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_globals = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":125
 *             else:
 *                 globals = caller.f_globals
 *                 lineno = caller.f_lineno             # <<<<<<<<<<<<<<
 *                 if '__file__' in globals:
 *                     name = globals['__file__']
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_caller, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_lineno = __pyx_t_5;
        __pyx_t_5 = 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_6 = (__Pyx_PySequence_Contains(__pyx_n_s_file, __pyx_v_globals, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __pyx_t_2 = (__pyx_t_6 != 0);
        if (__pyx_t_2) {

          /* "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_5 = PyObject_GetItem(__pyx_v_globals, __pyx_n_s_file); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;};
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_5);
          __pyx_t_5 = 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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __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_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (!__pyx_t_2) {
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_1 = __pyx_t_6;
          } else {
            __pyx_t_1 = __pyx_t_2;
          }
          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_5 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, -1, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_5);
            __pyx_t_5 = 0;
            goto __pyx_L14;
          }
          __pyx_L14:;
          goto __pyx_L13;
        }

        /* "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_Contains(__pyx_n_s_name_2, __pyx_v_globals, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L7_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_5 = PyObject_GetItem(__pyx_v_globals, __pyx_n_s_name_2); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;};
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_5);
          __pyx_t_5 = 0;
          goto __pyx_L13;
        }
        /*else*/ {

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

        /* "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_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L7_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_5 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_lineno); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
          __pyx_t_4 = 0;
          goto __pyx_L15;
        }
        __pyx_L15:;
      }
      __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_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":121
 *             try:
 *                 caller = sys._getframe(stacklevel)
 *             except ValueError:             # <<<<<<<<<<<<<<
 *                 pass
 *             else:
 */
      __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
      if (__pyx_t_10) {
        PyErr_Restore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;
      __pyx_L7_except_error:;
      __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_L1_error;
      __pyx_L6_exception_handled:;
      __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_L12_try_end:;
    }
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_line_offset, __pyx_v_line_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_delimeters); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimeters, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parsed, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF_SET(__pyx_v_namespace, __pyx_t_11);
    __pyx_t_11 = 0;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L17;
  }
  __pyx_L17:;

  /* "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_11);
  __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_8Template_28__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 0);
  __Pyx_XDECREF(__pyx_r);

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(((PyObject *)Py_None));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));
  __Pyx_GIVEREF(((PyObject *)Py_None));
  __Pyx_INCREF(__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);
  __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template.__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 = {__Pyx_NAMESTR("from_filename"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_3from_filename, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_filename);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename);
  __Pyx_GIVEREF(__pyx_v_filename);
  __Pyx_INCREF(__pyx_n_s_rb);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_rb);
  __Pyx_GIVEREF(__pyx_n_s_rb);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_c = __pyx_t_1;
  __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_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_3 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_3) {

    /* "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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_encoding);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_encoding);
    __Pyx_GIVEREF(__pyx_v_encoding);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "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_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_content, __pyx_v_c) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_v_filename) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_namespace, __pyx_v_namespace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_4, __pyx_n_s_default_inherit, __pyx_v_default_inherit) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_get_template, __pyx_v_get_template) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __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_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "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_4);
  __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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_5__repr__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_hex, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __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 = {__Pyx_NAMESTR("substitute"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_7substitute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("substitute", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __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")
 */
    __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __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"
 */
    __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
      __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_kw, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_namespace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_7);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
    index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = NULL;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L9_unpacking_done;
    __pyx_L8_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L9_unpacking_done:;
  }
  __pyx_v_result = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_defs = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_inherit = __pyx_t_7;
  __pyx_t_7 = 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_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_inherit, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_inherit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_result);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    __Pyx_INCREF(__pyx_v_defs);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_defs);
    __Pyx_GIVEREF(__pyx_v_defs);
    __Pyx_INCREF(__pyx_v_inherit);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_inherit);
    __Pyx_GIVEREF(__pyx_v_inherit);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
    __pyx_t_5 = 0;
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "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 = {__Pyx_NAMESTR("_interpret"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_9_interpret, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parsed); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_out, __pyx_v_parts) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_defs, __pyx_v_defs) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_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_Contains(__pyx_n_s_inherit, __pyx_v_defs, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __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;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "Cython/Tempita/_tempita.py":194
 *             inherit = defs.pop('__inherit__')
 *         else:
 *             inherit = None             # <<<<<<<<<<<<<<
 *         return ''.join(parts), defs, inherit
 * 
 */
    __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_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_defs);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_defs);
  __Pyx_GIVEREF(__pyx_v_defs);
  __Pyx_INCREF(__pyx_v_inherit);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_inherit);
  __Pyx_GIVEREF(__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 = {__Pyx_NAMESTR("_interpret_inherit"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_11_interpret_inherit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_inherit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "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)
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_position, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "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.iteritems():
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_get_template); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_inherit_template);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_inherit_template);
  __Pyx_GIVEREF(__pyx_v_inherit_template);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_templ = __pyx_t_1;
  __pyx_t_1 = 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.iteritems():
 *             setattr(self_, name, value)
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateObject); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_self_ = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":205
 *         templ = self.get_template(inherit_template, self)
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.iteritems():             # <<<<<<<<<<<<<<
 *             setattr(self_, name, value)
 *         self_.body = body
 */
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_defs == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_defs, 0, __pyx_n_s_iteritems, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_4);
  __pyx_t_4 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_7, &__pyx_t_6, &__pyx_t_5, &__pyx_t_1, NULL, __pyx_t_8);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":206
 *         self_ = TemplateObject(self.name)
 *         for name, value in defs.iteritems():
 *             setattr(self_, name, value)             # <<<<<<<<<<<<<<
 *         self_.body = body
 *         ns = ns.copy()
 */
    __pyx_t_10 = PyObject_SetAttr(__pyx_v_self_, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":207
 *         for name, value in defs.iteritems():
 *             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_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_ns, __pyx_t_1);
  __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_templ, __pyx_n_s_substitute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 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_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 = {__Pyx_NAMESTR("_interpret_codes"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_13_interpret_codes, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_codes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 (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_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "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_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "Cython/Tempita/_tempita.py":218
 *                 out.append(item)
 *             else:
 *                 self._interpret_code(item, ns, out, defs)             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_code(self, code, ns, out, defs):
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      __Pyx_INCREF(__pyx_v_defs);
      PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_defs);
      __Pyx_GIVEREF(__pyx_v_defs);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __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;
    }
    __pyx_L5:;
  }
  __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_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 = {__Pyx_NAMESTR("_interpret_code"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_15_interpret_code, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_code") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_exec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    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_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateBreak); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __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_1 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_code, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_vars = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_expr = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_content = __pyx_t_2;
    __pyx_t_2 = 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_expr);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
    __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_vars);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_vars);
    __Pyx_GIVEREF(__pyx_v_vars);
    __Pyx_INCREF(__pyx_v_expr);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    __Pyx_INCREF(__pyx_v_content);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_content);
    __Pyx_GIVEREF(__pyx_v_content);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_INCREF(__pyx_v_defs);
    PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_defs);
    __Pyx_GIVEREF(__pyx_v_defs);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    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_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __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_2 = __Pyx_PyObject_GetSlice(__pyx_v_code, 2, 0, NULL, NULL, &__pyx_slice__11, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_parts = __pyx_t_2;
    __pyx_t_2 = 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_if); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_parts);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_parts);
    __Pyx_GIVEREF(__pyx_v_parts);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_out);
    PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    __Pyx_INCREF(__pyx_v_defs);
    PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_defs);
    __Pyx_GIVEREF(__pyx_v_defs);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    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_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __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_1 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_parts = __pyx_t_1;
    __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_base = __pyx_t_4;
    __pyx_t_4 = 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_4 = __Pyx_PyObject_GetSlice(__pyx_v_parts, 1, 0, NULL, NULL, &__pyx_slice__14, 1, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_2)) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_2)) {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
      } else {
        __pyx_t_4 = __pyx_t_6(__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_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __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":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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_part);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_part);
      __Pyx_GIVEREF(__pyx_v_part);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_base);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_base);
      __Pyx_GIVEREF(__pyx_v_base);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_func, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF_SET(__pyx_v_base, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_repr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_base);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_base);
    __Pyx_GIVEREF(__pyx_v_base);
    __Pyx_INCREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __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_t_8 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    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_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __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_7 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_var = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_v_expr = __pyx_t_1;
    __pyx_t_1 = 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_Contains(__pyx_v_var, __pyx_v_ns, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_9 = (__pyx_t_3 != 0);
    if (__pyx_t_9) {

      /* "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_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 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_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;
    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_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_inherit_2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {

    /* "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_2 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_expr = __pyx_t_2;
    __pyx_t_2 = 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_expr);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_expr);
    __Pyx_GIVEREF(__pyx_v_expr);
    __Pyx_INCREF(__pyx_v_ns);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ns);
    __Pyx_GIVEREF(__pyx_v_ns);
    __Pyx_INCREF(__pyx_v_pos);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_pos);
    __Pyx_GIVEREF(__pyx_v_pos);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_value = __pyx_t_1;
    __pyx_t_1 = 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_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    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_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_def, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {

    /* "Cython/Tempita/_tempita.py":253
 *             defs['__inherit__'] = value
 *         elif name == 'def':
 *             name = code[2]             # <<<<<<<<<<<<<<
 *             signature = code[3]
 *             parts = code[4]
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_code, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 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_1 = __Pyx_GetItemInt(__pyx_v_code, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_signature = __pyx_t_1;
    __pyx_t_1 = 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_1 = __Pyx_GetItemInt(__pyx_v_code, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_parts = __pyx_t_1;
    __pyx_t_1 = 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateDef); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __Pyx_INCREF(__pyx_v_signature);
    PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_signature);
    __Pyx_GIVEREF(__pyx_v_signature);
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_body, __pyx_v_parts) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ns, __pyx_v_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __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_2, __pyx_n_s_pos, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __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_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_v_name, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (unlikely(PyObject_SetItem(__pyx_v_defs, __pyx_v_name, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    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_9 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_comment, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {

    /* "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;
  }
  /*else*/ {

    /* "Cython/Tempita/_tempita.py":261
 *             return
 *         else:
 *             assert 0, "Unknown code: %r" % name             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_for(self, vars, expr, content, ns, out, defs):
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(!Py_OptimizeFlag)) {
      if (unlikely(!0)) {
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_code_r, __pyx_v_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyErr_SetObject(PyExc_AssertionError, __pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __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_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 = {__Pyx_NAMESTR("_interpret_for"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_17_interpret_for, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_for") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 (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_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "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_filename = __pyx_f[0]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_t_4, __pyx_v_item) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "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)'
 */
      __pyx_t_5 = PyObject_Length(__pyx_v_vars); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_v_item); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
        __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
        __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __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_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_vars);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_vars);
      __Pyx_GIVEREF(__pyx_v_vars);
      __Pyx_INCREF(__pyx_v_item);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_item);
      __Pyx_GIVEREF(__pyx_v_item);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_8)) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_8)) {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __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_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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        __Pyx_INCREF(__pyx_v_ns);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ns);
        __Pyx_GIVEREF(__pyx_v_ns);
        __Pyx_INCREF(__pyx_v_out);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_out);
        __Pyx_GIVEREF(__pyx_v_out);
        __Pyx_INCREF(__pyx_v_defs);
        PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_v_defs);
        __Pyx_GIVEREF(__pyx_v_defs);
        __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __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_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;

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

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

      /* "Cython/Tempita/_tempita.py":279
 *             except _TemplateContinue:
 *                 continue
 *             except _TemplateBreak:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateBreak); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_17 = 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_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_11);

        /* "Cython/Tempita/_tempita.py":280
 *                 continue
 *             except _TemplateBreak:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *     def _interpret_if(self, parts, ns, out, defs):
 */
        goto __pyx_L21_except_break;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L12_exception_handled;
        __pyx_L21_except_break:;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L16_try_break;
      }
      goto __pyx_L13_except_error;
      __pyx_L13_except_error:;
      __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_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_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_L12_exception_handled:;
      __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);
      __pyx_L18_try_end:;
    }
    __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 = {__Pyx_NAMESTR("_interpret_if"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_19_interpret_if, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_interpret_if") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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 (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_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!((!(__pyx_t_5 != 0)) != 0))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __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);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "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)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_part, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_4);
      __pyx_t_4 = 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_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_part, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_ns);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ns);
      __Pyx_GIVEREF(__pyx_v_ns);
      __Pyx_INCREF(__pyx_v_out);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_out);
      __Pyx_GIVEREF(__pyx_v_out);
      __Pyx_INCREF(__pyx_v_defs);
      PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_defs);
      __Pyx_GIVEREF(__pyx_v_defs);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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;
    }
  }
  __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_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 = {__Pyx_NAMESTR("_eval"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_21_eval, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_eval") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __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_exc_info = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_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, e:
 */
      {
        __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, e:
 *                 raise SyntaxError(
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_code);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_code);
          __Pyx_GIVEREF(__pyx_v_code);
          PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_v_ns);
          PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_ns);
          __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __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;
        }
        __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_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, e:             # <<<<<<<<<<<<<<
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)
 */
        __pyx_t_9 = 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_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __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, e:
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)             # <<<<<<<<<<<<<<
 *             return value
 *         except:
 */
          __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_invalid_syntax_in_expression_s, __pyx_v_code); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
          __Pyx_GOTREF(__pyx_t_11);

          /* "Cython/Tempita/_tempita.py":302
 *                 value = eval(code, self.default_namespace, ns)
 *             except SyntaxError, e:
 *                 raise SyntaxError(             # <<<<<<<<<<<<<<
 *                     'invalid syntax in expression: %s' % code)
 *             return value
 */
          __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11);
          __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L12_exception_handled;
        }
        goto __pyx_L13_except_error;
        __pyx_L13_except_error:;
        __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_L12_exception_handled:;
        __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);
        __pyx_L18_try_end:;
      }

      /* "Cython/Tempita/_tempita.py":304
 *                 raise SyntaxError(
 *                     'invalid syntax in expression: %s' % code)
 *             return value             # <<<<<<<<<<<<<<
 *         except:
 *             exc_info = sys.exc_info()
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_value);
      __pyx_r = __pyx_v_value;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_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:             # <<<<<<<<<<<<<<
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 */
    /*except:*/ {
      __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_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);

      /* "Cython/Tempita/_tempita.py":306
 *             return value
 *         except:
 *             exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 *             e = exc_info[1]
 *             if getattr(e, 'args', None):
 */
      __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_v_exc_info = __pyx_t_11;
      __pyx_t_11 = 0;

      /* "Cython/Tempita/_tempita.py":307
 *         except:
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]             # <<<<<<<<<<<<<<
 *             if getattr(e, 'args', None):
 *                 arg0 = e.args[0]
 */
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "Cython/Tempita/_tempita.py":308
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 *             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_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_13) {

        /* "Cython/Tempita/_tempita.py":309
 *             e = exc_info[1]
 *             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_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __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;
        goto __pyx_L23;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":311
 *                 arg0 = e.args[0]
 *             else:
 *                 arg0 = coerce_text(e)             # <<<<<<<<<<<<<<
 *             e.args = (self._add_line_info(arg0, pos),)
 *             raise exc_info[0], e, exc_info[2]
 */
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_e);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_e);
        __Pyx_GIVEREF(__pyx_v_e);
        __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_11, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_arg0 = __pyx_t_14;
        __pyx_t_14 = 0;
      }
      __pyx_L23:;

      /* "Cython/Tempita/_tempita.py":312
 *             else:
 *                 arg0 = coerce_text(e)
 *             e.args = (self._add_line_info(arg0, pos),)             # <<<<<<<<<<<<<<
 *             raise exc_info[0], e, exc_info[2]
 * 
 */
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_arg0);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_arg0);
      __Pyx_GIVEREF(__pyx_v_arg0);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "Cython/Tempita/_tempita.py":313
 *                 arg0 = coerce_text(e)
 *             e.args = (self._add_line_info(arg0, pos),)
 *             raise exc_info[0], e, exc_info[2]             # <<<<<<<<<<<<<<
 * 
 *     def _exec(self, code, ns, pos):
 */
      __pyx_t_11 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_Raise(__pyx_t_11, __pyx_v_e, __pyx_t_12, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "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_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_exc_info);
  __Pyx_XDECREF(__pyx_v_arg0);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":315
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     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 = {__Pyx_NAMESTR("_exec"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_23_exec, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_exec") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __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_exc_info = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_exec", 0);

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

  /* "Cython/Tempita/_tempita.py":317
 *     def _exec(self, code, ns, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             exec code in self.default_namespace, ns
 *         except:
 */
  {
    __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":318
 *         __traceback_hide__ = True
 *         try:
 *             exec code in self.default_namespace, ns             # <<<<<<<<<<<<<<
 *         except:
 *             exc_info = sys.exc_info()
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":319
 *         try:
 *             exec code in self.default_namespace, ns
 *         except:             # <<<<<<<<<<<<<<
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 */
    /*except:*/ {
      __Pyx_AddTraceback("Cython.Tempita._tempita.Template._exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "Cython/Tempita/_tempita.py":320
 *             exec code in self.default_namespace, ns
 *         except:
 *             exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 *             e = exc_info[1]
 *             if e.args:
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_exc_info = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":321
 *         except:
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]             # <<<<<<<<<<<<<<
 *             if e.args:
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 */
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_v_e = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":322
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 *             if e.args:             # <<<<<<<<<<<<<<
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 *             else:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {

        /* "Cython/Tempita/_tempita.py":323
 *             e = exc_info[1]
 *             if e.args:
 *                 e.args = (self._add_line_info(e.args[0], pos),)             # <<<<<<<<<<<<<<
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        __pyx_t_10 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":325
 *                 e.args = (self._add_line_info(e.args[0], pos),)
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)             # <<<<<<<<<<<<<<
 *             raise exc_info[0], e, exc_info[2]
 * 
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_10, 0, Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __pyx_t_7 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_L13:;

      /* "Cython/Tempita/_tempita.py":326
 *             else:
 *                 e.args = (self._add_line_info(None, pos),)
 *             raise exc_info[0], e, exc_info[2]             # <<<<<<<<<<<<<<
 * 
 *     def _repr(self, value, pos):
 */
      __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_Raise(__pyx_t_10, __pyx_v_e, __pyx_t_7, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":315
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("Cython.Tempita._tempita.Template._exec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_exc_info);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":328
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     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 = {__Pyx_NAMESTR("_repr"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_25_repr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_repr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __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_exc_info = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  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;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr", 0);
  __Pyx_INCREF(__pyx_v_value);

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

  /* "Cython/Tempita/_tempita.py":330
 *     def _repr(self, value, pos):
 *         __traceback_hide__ = True
 *         try:             # <<<<<<<<<<<<<<
 *             if value is None:
 *                 return ''
 */
  {
    __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":331
 *         __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":332
 *         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":333
 *             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_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":334
 *                 return ''
 *             if self._unicode:
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = unicode(value)
 *                 except UnicodeDecodeError:
 */
        {
          __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":335
 *             if self._unicode:
 *                 try:
 *                     value = unicode(value)             # <<<<<<<<<<<<<<
 *                 except UnicodeDecodeError:
 *                     value = bytes(value)
 */
            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_10);
            __pyx_t_10 = 0;
          }
          __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_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "Cython/Tempita/_tempita.py":336
 *                 try:
 *                     value = unicode(value)
 *                 except UnicodeDecodeError:             # <<<<<<<<<<<<<<
 *                     value = bytes(value)
 *             else:
 */
          __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
          if (__pyx_t_11) {
            __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_6, &__pyx_t_12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_12);

            /* "Cython/Tempita/_tempita.py":337
 *                     value = unicode(value)
 *                 except UnicodeDecodeError:
 *                     value = bytes(value)             # <<<<<<<<<<<<<<
 *             else:
 *                 if not isinstance(value, basestring_):
 */
            __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_INCREF(__pyx_v_value);
            PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_value);
            __Pyx_GIVEREF(__pyx_v_value);
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_15);
            __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            goto __pyx_L14_exception_handled;
          }
          goto __pyx_L15_except_error;
          __pyx_L15_except_error:;
          __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_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:;
        }
        goto __pyx_L12;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":339
 *                     value = bytes(value)
 *             else:
 *                 if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)
 */
        __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __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":340
 *             else:
 *                 if not isinstance(value, basestring_):
 *                     value = coerce_text(value)             # <<<<<<<<<<<<<<
 *                 if (is_unicode(value)
 *                     and self.default_encoding):
 */
          __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_10);
          __pyx_t_10 = 0;
          goto __pyx_L23;
        }
        __pyx_L23:;

        /* "Cython/Tempita/_tempita.py":341
 *                 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_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":342
 *                     value = coerce_text(value)
 *                 if (is_unicode(value)
 *                     and self.default_encoding):             # <<<<<<<<<<<<<<
 *                     value = value.encode(self.default_encoding)
 *         except:
 */
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_16 = __pyx_t_5;
        } else {
          __pyx_t_16 = __pyx_t_4;
        }
        if (__pyx_t_16) {

          /* "Cython/Tempita/_tempita.py":343
 *                 if (is_unicode(value)
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)             # <<<<<<<<<<<<<<
 *         except:
 *             exc_info = sys.exc_info()
 */
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_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;
          goto __pyx_L24;
        }
        __pyx_L24:;
      }
      __pyx_L12:;
    }
    /*else:*/ {

      /* "Cython/Tempita/_tempita.py":350
 *             raise exc_info[0], e, exc_info[2]
 *         else:
 *             if self._unicode and isinstance(value, bytes):             # <<<<<<<<<<<<<<
 *                 if not self.default_encoding:
 *                     raise UnicodeDecodeError(
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unicode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_16) {
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = PyObject_IsInstance(__pyx_v_value, __pyx_t_6); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_5 = __pyx_t_4;
      } else {
        __pyx_t_5 = __pyx_t_16;
      }
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":351
 *         else:
 *             if self._unicode and isinstance(value, bytes):
 *                 if not self.default_encoding:             # <<<<<<<<<<<<<<
 *                     raise UnicodeDecodeError(
 *                         'Cannot decode bytes value %r into unicode '
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_16 = ((!__pyx_t_5) != 0);
        if (__pyx_t_16) {

          /* "Cython/Tempita/_tempita.py":354
 *                     raise UnicodeDecodeError(
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)             # <<<<<<<<<<<<<<
 *                 try:
 *                     value = value.decode(self.default_encoding)
 */
          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_decode_bytes_value_r_into, __pyx_v_value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_6);

          /* "Cython/Tempita/_tempita.py":352
 *             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_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeDecodeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        }

        /* "Cython/Tempita/_tempita.py":355
 *                         'Cannot decode bytes value %r into unicode '
 *                         '(no default_encoding provided)' % value)
 *                 try:             # <<<<<<<<<<<<<<
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError, e:
 */
        {
          __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":356
 *                         '(no default_encoding provided)' % value)
 *                 try:
 *                     value = value.decode(self.default_encoding)             # <<<<<<<<<<<<<<
 *                 except UnicodeDecodeError, e:
 *                     raise UnicodeDecodeError(
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
            __Pyx_GOTREF(__pyx_t_12);
            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_10);
            __pyx_t_10 = 0;
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_10);
            __pyx_t_10 = 0;
          }
          __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_L34_try_end;
          __pyx_L27_error:;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "Cython/Tempita/_tempita.py":357
 *                 try:
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError, e:             # <<<<<<<<<<<<<<
 *                     raise UnicodeDecodeError(
 *                         e.encoding,
 */
          __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
          if (__pyx_t_11) {
            __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_12, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_12);
            __pyx_v_e = __pyx_t_12;

            /* "Cython/Tempita/_tempita.py":359
 *                 except UnicodeDecodeError, e:
 *                     raise UnicodeDecodeError(
 *                         e.encoding,             # <<<<<<<<<<<<<<
 *                         e.object,
 *                         e.start,
 */
            __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_encoding); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_15);

            /* "Cython/Tempita/_tempita.py":360
 *                     raise UnicodeDecodeError(
 *                         e.encoding,
 *                         e.object,             # <<<<<<<<<<<<<<
 *                         e.start,
 *                         e.end,
 */
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_object); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_14);

            /* "Cython/Tempita/_tempita.py":361
 *                         e.encoding,
 *                         e.object,
 *                         e.start,             # <<<<<<<<<<<<<<
 *                         e.end,
 *                         e.reason + ' in string %r' % value)
 */
            __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_start); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_13);

            /* "Cython/Tempita/_tempita.py":362
 *                         e.object,
 *                         e.start,
 *                         e.end,             # <<<<<<<<<<<<<<
 *                         e.reason + ' in string %r' % value)
 *             elif not self._unicode and is_unicode(value):
 */
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_end); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_17);

            /* "Cython/Tempita/_tempita.py":363
 *                         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_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L29_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_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_20 = PyNumber_Add(__pyx_t_18, __pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L29_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":358
 *                     value = value.decode(self.default_encoding)
 *                 except UnicodeDecodeError, e:
 *                     raise UnicodeDecodeError(             # <<<<<<<<<<<<<<
 *                         e.encoding,
 *                         e.object,
 */
            __pyx_t_19 = PyTuple_New(5); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_GOTREF(__pyx_t_19);
            PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_15);
            __Pyx_GIVEREF(__pyx_t_15);
            PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_14);
            __Pyx_GIVEREF(__pyx_t_14);
            PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_13);
            PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_t_17);
            __Pyx_GIVEREF(__pyx_t_17);
            PyTuple_SET_ITEM(__pyx_t_19, 4, __pyx_t_20);
            __Pyx_GIVEREF(__pyx_t_20);
            __pyx_t_15 = 0;
            __pyx_t_14 = 0;
            __pyx_t_13 = 0;
            __pyx_t_17 = 0;
            __pyx_t_20 = 0;
            __pyx_t_20 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeDecodeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L29_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_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L29_except_error;}
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            goto __pyx_L28_exception_handled;
          }
          goto __pyx_L29_except_error;
          __pyx_L29_except_error:;
          __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_L28_exception_handled:;
          __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);
          __pyx_L34_try_end:;
        }
        goto __pyx_L25;
      }

      /* "Cython/Tempita/_tempita.py":364
 *                         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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_unicode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_5 = (!__pyx_t_16);
      if (__pyx_t_5) {
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_INCREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_4 = __pyx_t_16;
      } else {
        __pyx_t_4 = __pyx_t_5;
      }
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":365
 *                         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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_5 = ((!__pyx_t_4) != 0);
        if (__pyx_t_5) {

          /* "Cython/Tempita/_tempita.py":368
 *                     raise UnicodeEncodeError(
 *                         'Cannot encode unicode value %r into bytes '
 *                         '(no default_encoding provided)' % value)             # <<<<<<<<<<<<<<
 *                 value = value.encode(self.default_encoding)
 *             return value
 */
          __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_encode_unicode_value_r_in, __pyx_v_value); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_10);

          /* "Cython/Tempita/_tempita.py":366
 *             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_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_10);
          __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_UnicodeEncodeError, __pyx_t_12, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_Raise(__pyx_t_10, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        }

        /* "Cython/Tempita/_tempita.py":369
 *                         '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_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_default_encoding); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_12);
        __pyx_t_12 = 0;
        goto __pyx_L25;
      }
      __pyx_L25:;

      /* "Cython/Tempita/_tempita.py":370
 *                         '(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_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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":344
 *                     and self.default_encoding):
 *                     value = value.encode(self.default_encoding)
 *         except:             # <<<<<<<<<<<<<<
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 */
    /*except:*/ {
      __Pyx_AddTraceback("Cython.Tempita._tempita.Template._repr", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_10);

      /* "Cython/Tempita/_tempita.py":345
 *                     value = value.encode(self.default_encoding)
 *         except:
 *             exc_info = sys.exc_info()             # <<<<<<<<<<<<<<
 *             e = exc_info[1]
 *             e.args = (self._add_line_info(e.args[0], pos),)
 */
      __pyx_t_20 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_v_exc_info = __pyx_t_20;
      __pyx_t_20 = 0;

      /* "Cython/Tempita/_tempita.py":346
 *         except:
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]             # <<<<<<<<<<<<<<
 *             e.args = (self._add_line_info(e.args[0], pos),)
 *             raise exc_info[0], e, exc_info[2]
 */
      __pyx_t_20 = __Pyx_GetItemInt(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_20 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_v_e = __pyx_t_20;
      __pyx_t_20 = 0;

      /* "Cython/Tempita/_tempita.py":347
 *             exc_info = sys.exc_info()
 *             e = exc_info[1]
 *             e.args = (self._add_line_info(e.args[0], pos),)             # <<<<<<<<<<<<<<
 *             raise exc_info[0], e, exc_info[2]
 *         else:
 */
      __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_add_line_info); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_17 = __Pyx_GetItemInt(__pyx_t_19, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __pyx_t_17 = 0;
      __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_20, __pyx_t_19, NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_19);
      PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17);
      __Pyx_GIVEREF(__pyx_t_17);
      __pyx_t_17 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_19) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

      /* "Cython/Tempita/_tempita.py":348
 *             e = exc_info[1]
 *             e.args = (self._add_line_info(e.args[0], pos),)
 *             raise exc_info[0], e, exc_info[2]             # <<<<<<<<<<<<<<
 *         else:
 *             if self._unicode and isinstance(value, bytes):
 */
      __pyx_t_19 = __Pyx_GetItemInt(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_19 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_19);
      __pyx_t_17 = __Pyx_GetItemInt(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;};
      __Pyx_GOTREF(__pyx_t_17);
      __Pyx_Raise(__pyx_t_19, __pyx_v_e, __pyx_t_17, 0);
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":328
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     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_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_17);
  __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_exc_info);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "Cython/Tempita/_tempita.py":372
 *             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 = {__Pyx_NAMESTR("_add_line_info"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_8Template_27_add_line_info, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_add_line_info") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_add_line_info", 0);
  __Pyx_INCREF(__pyx_v_msg);

  /* "Cython/Tempita/_tempita.py":374
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_msg);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
  __Pyx_GIVEREF(__pyx_v_msg);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":373
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __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":375
 *         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_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "Cython/Tempita/_tempita.py":376
 *             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_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __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;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":377
 *         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":372
 *             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":380
 * 
 * 
 * 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 = {__Pyx_NAMESTR("sub"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_3sub, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sub", 0);

  /* "Cython/Tempita/_tempita.py":381
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":382
 * 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_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimeters, __pyx_v_delimeters) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":383
 *     name = kw.get('__name')
 *     tmpl = Template(content, name=name, delimeters=delimeters)
 *     return tmpl.substitute(kw)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_kw);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_kw);
  __Pyx_GIVEREF(__pyx_v_kw);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * 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":386
 * 
 * 
 * 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 = {__Pyx_NAMESTR("paste_script_template_renderer"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5paste_script_template_renderer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("paste_script_template_renderer", 0);

  /* "Cython/Tempita/_tempita.py":387
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_filename) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":388
 * def paste_script_template_renderer(content, vars, filename=None):
 *     tmpl = Template(content, name=filename)
 *     return tmpl.substitute(vars)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_vars);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_vars);
  __Pyx_GIVEREF(__pyx_v_vars);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":386
 * 
 * 
 * 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":393
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.iteritems():
 *             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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __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;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":394
 * 
 *     def __init__(self, **kw):
 *         for name, value in kw.iteritems():             # <<<<<<<<<<<<<<
 *             setattr(self, name, value)
 * 
 */
  __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_kw, 1, __pyx_n_s_iteritems, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_6);
    __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":395
 *     def __init__(self, **kw):
 *         for name, value in kw.iteritems():
 *             setattr(self, name, value)             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name, value):
 */
    __pyx_t_8 = PyObject_SetAttr(__pyx_v_self, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":393
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.iteritems():
 *             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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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":397
 *             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__ = {__Pyx_NAMESTR("__setattr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_3__setattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__setattr__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setattr__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "Cython/Tempita/_tempita.py":398
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":397
 *             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":400
 *         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__ = {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_5__getattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "Cython/Tempita/_tempita.py":401
 * 
 *     def __getattr__(self, name):
 *         try:             # <<<<<<<<<<<<<<
 *             return self[name]
 *         except KeyError:
 */
  {
    __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":402
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L3_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":403
 *         try:
 *             return self[name]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             raise AttributeError(name)
 * 
 */
    __pyx_t_5 = 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_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "Cython/Tempita/_tempita.py":404
 *             return self[name]
 *         except KeyError:
 *             raise AttributeError(name)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, key):
 */
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_name);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_name);
      __Pyx_GIVEREF(__pyx_v_name);
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":400
 *         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":406
 *             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__ = {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_7__getitem__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "Cython/Tempita/_tempita.py":407
 * 
 *     def __getitem__(self, key):
 *         if 'default' in self:             # <<<<<<<<<<<<<<
 *             try:
 *                 return dict.__getitem__(self, key)
 */
  __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_n_s_default, __pyx_v_self, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":408
 *     def __getitem__(self, key):
 *         if 'default' in self:
 *             try:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 */
    {
      __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":409
 *         if 'default' in self:
 *             try:
 *                 return dict.__getitem__(self, key)             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 return dict.__getitem__(self, 'default')
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_n_s_getitem); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_self);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
        __Pyx_GIVEREF(__pyx_v_self);
        __Pyx_INCREF(__pyx_v_key);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_key);
        __Pyx_GIVEREF(__pyx_v_key);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_8;
        __pyx_t_8 = 0;
        goto __pyx_L8_try_return;
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "Cython/Tempita/_tempita.py":410
 *             try:
 *                 return dict.__getitem__(self, key)
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 return dict.__getitem__(self, 'default')
 *         else:
 */
      __pyx_t_9 = 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_8, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_6);

        /* "Cython/Tempita/_tempita.py":411
 *                 return dict.__getitem__(self, key)
 *             except KeyError:
 *                 return dict.__getitem__(self, 'default')             # <<<<<<<<<<<<<<
 *         else:
 *             return dict.__getitem__(self, key)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_n_s_getitem); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_self);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_self);
        __Pyx_GIVEREF(__pyx_v_self);
        __Pyx_INCREF(__pyx_n_s_default);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_n_s_default);
        __Pyx_GIVEREF(__pyx_n_s_default);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_r = __pyx_t_12;
        __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L7_except_return;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L5_exception_handled;
      }
      goto __pyx_L6_except_error;
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L8_try_return:;
      __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_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_L5_exception_handled:;
      __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);
      __pyx_L11_try_end:;
    }
  }
  /*else*/ {

    /* "Cython/Tempita/_tempita.py":413
 *                 return dict.__getitem__(self, 'default')
 *         else:
 *             return dict.__getitem__(self, key)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_n_s_getitem); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;
  }

  /* "Cython/Tempita/_tempita.py":406
 *             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_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":415
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         items = [
 *             (k, v) for k, v in self.iteritems()]
 */

/* 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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_5bunch_9__repr__, METH_O, __Pyx_DOCSTR(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_items = NULL;
  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;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":416
 * 
 *     def __repr__(self):
 *         items = [             # <<<<<<<<<<<<<<
 *             (k, v) for k, v in self.iteritems()]
 *         items.sort()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "Cython/Tempita/_tempita.py":417
 *     def __repr__(self):
 *         items = [
 *             (k, v) for k, v in self.iteritems()]             # <<<<<<<<<<<<<<
 *         items.sort()
 *         return '<%s %s>' % (
 */
  __pyx_t_3 = 0;
  if (unlikely(__pyx_v_self == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_self, 0, __pyx_n_s_iteritems, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = __pyx_t_6;
  __pyx_t_6 = 0;
  while (1) {
    __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5);
    if (unlikely(__pyx_t_8 == 0)) break;
    if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "Cython/Tempita/_tempita.py":416
 * 
 *     def __repr__(self):
 *         items = [             # <<<<<<<<<<<<<<
 *             (k, v) for k, v in self.iteritems()]
 *         items.sort()
 */
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_items = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":418
 *         items = [
 *             (k, v) for k, v in self.iteritems()]
 *         items.sort()             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 */
  __pyx_t_9 = PyList_Sort(__pyx_v_items); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

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

  /* "Cython/Tempita/_tempita.py":420
 *         items.sort()
 *         return '<%s %s>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             ' '.join(['%s=%r' % (k, v) for k, v in items]))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":421
 *         return '<%s %s>' % (
 *             self.__class__.__name__,
 *             ' '.join(['%s=%r' % (k, v) for k, v in items]))             # <<<<<<<<<<<<<<
 * 
 * ############################################################
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __pyx_v_items; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0;
  for (;;) {
    if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_7)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_10 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_11);
      #else
      __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_12 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
      index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_10);
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_11);
    __pyx_t_11 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    __Pyx_INCREF(__pyx_v_v);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_v);
    __Pyx_GIVEREF(__pyx_v_v);
    __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_s_r, __pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":420
 *         items.sort()
 *         return '<%s %s>' % (
 *             self.__class__.__name__,             # <<<<<<<<<<<<<<
 *             ' '.join(['%s=%r' % (k, v) for k, v in items]))
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_2 = 0;
  __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":419
 *             (k, v) for k, v in self.iteritems()]
 *         items.sort()
 *         return '<%s %s>' % (             # <<<<<<<<<<<<<<
 *             self.__class__.__name__,
 *             ' '.join(['%s=%r' % (k, v) for k, v in items]))
 */
  __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":415
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         items = [
 *             (k, v) for k, v in self.iteritems()]
 */

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

/* "Cython/Tempita/_tempita.py":430
 * 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":431
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":430
 * 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":433
 *         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__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_3__str__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":434
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":433
 *         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":436
 *         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__ = {__Pyx_NAMESTR("__html__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_5__html__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__html__", 0);

  /* "Cython/Tempita/_tempita.py":437
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":436
 *         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":439
 *         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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_4html_7__repr__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

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

  /* "Cython/Tempita/_tempita.py":441
 *     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_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":440
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __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":439
 *         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":444
 * 
 * 
 * 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 = {__Pyx_NAMESTR("html_quote"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_7html_quote, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("html_quote", 0);
  __Pyx_INCREF(__pyx_v_value);

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

    /* "Cython/Tempita/_tempita.py":446
 * 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_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_html); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

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

    /* "Cython/Tempita/_tempita.py":448
 *         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":449
 *     if value is None:
 *         return ''
 *     if not isinstance(value, basestring_):             # <<<<<<<<<<<<<<
 *         value = coerce_text(value)
 *     if sys.version >= "3" and isinstance(value, bytes):
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_5); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_3) {

    /* "Cython/Tempita/_tempita.py":450
 *         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_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __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_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "Cython/Tempita/_tempita.py":451
 *     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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_version); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_kp_s_3, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_bytes); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_IsInstance(__pyx_v_value, __pyx_t_6); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __pyx_t_2;
  } else {
    __pyx_t_1 = __pyx_t_3;
  }
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":452
 *         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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cgi); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_escape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":453
 *     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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "Cython/Tempita/_tempita.py":455
 *         value = value.encode('latin1')
 *     else:
 *         value = cgi.escape(value, 1)             # <<<<<<<<<<<<<<
 *     if sys.version < "3":
 *         if is_unicode(value):
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cgi); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_escape); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __Pyx_INCREF(__pyx_int_1);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;
  }
  __pyx_L6:;

  /* "Cython/Tempita/_tempita.py":456
 *     else:
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 */
  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_kp_s_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "Cython/Tempita/_tempita.py":457
 *         value = cgi.escape(value, 1)
 *     if sys.version < "3":
 *         if is_unicode(value):             # <<<<<<<<<<<<<<
 *             value = value.encode('ascii', 'xmlcharrefreplace')
 *     return value
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "Cython/Tempita/_tempita.py":458
 *     if sys.version < "3":
 *         if is_unicode(value):
 *             value = value.encode('ascii', 'xmlcharrefreplace')             # <<<<<<<<<<<<<<
 *     return value
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "Cython/Tempita/_tempita.py":459
 *         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":444
 * 
 * 
 * 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_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":462
 * 
 * 
 * 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 = {__Pyx_NAMESTR("url"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_9url, METH_O, __Pyx_DOCSTR(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;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("url", 0);
  __Pyx_INCREF(__pyx_v_v);

  /* "Cython/Tempita/_tempita.py":463
 * 
 * def url(v):
 *     v = coerce_text(v)             # <<<<<<<<<<<<<<
 *     if is_unicode(v):
 *         v = v.encode('utf8')
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_v);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
  __Pyx_GIVEREF(__pyx_v_v);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":464
 * def url(v):
 *     v = coerce_text(v)
 *     if is_unicode(v):             # <<<<<<<<<<<<<<
 *         v = v.encode('utf8')
 *     return url_quote(v)
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_unicode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_v);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
  __Pyx_GIVEREF(__pyx_v_v);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {

    /* "Cython/Tempita/_tempita.py":465
 *     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_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":466
 *     if is_unicode(v):
 *         v = v.encode('utf8')
 *     return url_quote(v)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_url_quote); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_v);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
  __Pyx_GIVEREF(__pyx_v_v);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":462
 * 
 * 
 * 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_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":469
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     kw = list(kw.iteritems())
 *     kw.sort()
 */

/* 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 = {__Pyx_NAMESTR("attr"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11attr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("attr", 0);
  __Pyx_INCREF(__pyx_v_kw);

  /* "Cython/Tempita/_tempita.py":470
 * 
 * def attr(**kw):
 *     kw = list(kw.iteritems())             # <<<<<<<<<<<<<<
 *     kw.sort()
 *     parts = []
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kw, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_kw, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "Cython/Tempita/_tempita.py":471
 * def attr(**kw):
 *     kw = list(kw.iteritems())
 *     kw.sort()             # <<<<<<<<<<<<<<
 *     parts = []
 *     for name, value in kw:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kw, __pyx_n_s_sort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":472
 *     kw = list(kw.iteritems())
 *     kw.sort()
 *     parts = []             # <<<<<<<<<<<<<<
 *     for name, value in kw:
 *         if value is None:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_parts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":473
 *     kw.sort()
 *     parts = []
 *     for name, value in kw:             # <<<<<<<<<<<<<<
 *         if value is None:
 *             continue
 */
  if (PyList_CheckExact(__pyx_v_kw) || PyTuple_CheckExact(__pyx_v_kw)) {
    __pyx_t_1 = __pyx_v_kw; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_kw); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __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":474
 *     parts = []
 *     for name, value in kw:
 *         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":475
 *     for name, value in kw:
 *         if value is None:
 *             continue             # <<<<<<<<<<<<<<
 *         if name.endswith('_'):
 *             name = name[:-1]
 */
      goto __pyx_L3_continue;
    }

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

      /* "Cython/Tempita/_tempita.py":477
 *             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, -1, NULL, NULL, &__pyx_slice__21, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "Cython/Tempita/_tempita.py":478
 *         if name.endswith('_'):
 *             name = name[:-1]
 *         parts.append('%s="%s"' % (html_quote(name), html_quote(value)))             # <<<<<<<<<<<<<<
 *     return html(' '.join(parts))
 * 
 */
    __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_name);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_7); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":479
 *             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_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":469
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     kw = list(kw.iteritems())
 *     kw.sort()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("Cython.Tempita._tempita.attr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kw);
  __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":492
 *         ))
 * 
 *     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 = {__Pyx_NAMESTR("_repr"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_12HTMLTemplate_1_repr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_repr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_repr", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "Cython/Tempita/_tempita.py":493
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "Cython/Tempita/_tempita.py":494
 *     def _repr(self, value, pos):
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()             # <<<<<<<<<<<<<<
 *             quote = False
 *         else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_html); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

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

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

  /* "Cython/Tempita/_tempita.py":498
 *         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_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_repr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_INCREF(__pyx_v_pos);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_pos);
  __Pyx_GIVEREF(__pyx_v_pos);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __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_v_plain = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":499
 *             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":500
 *         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_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_plain);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_plain);
    __Pyx_GIVEREF(__pyx_v_plain);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  /*else*/ {

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

  /* "Cython/Tempita/_tempita.py":492
 *         ))
 * 
 *     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_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":505
 * 
 * 
 * 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 = {__Pyx_NAMESTR("sub_html"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_13sub_html, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sub_html", 0);

  /* "Cython/Tempita/_tempita.py":506
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":507
 * 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_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_content);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_content);
  __Pyx_GIVEREF(__pyx_v_content);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_tmpl = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":508
 *     name = kw.get('__name')
 *     tmpl = HTMLTemplate(content, name=name)
 *     return tmpl.substitute(kw)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_tmpl, __pyx_n_s_substitute); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_kw);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_kw);
  __Pyx_GIVEREF(__pyx_v_kw);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":505
 * 
 * 
 * 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":512
 * 
 * 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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":513
 * 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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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":512
 * 
 * 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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":514
 *     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_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":515
 *                  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_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":516
 *         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_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":517
 *         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_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":518
 *         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_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":519
 *         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_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":520
 *         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_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":512
 * 
 * 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":522
 *         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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_3__repr__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":523
 * 
 *     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":524
 *     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_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);

  /* "Cython/Tempita/_tempita.py":525
 *         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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "Cython/Tempita/_tempita.py":524
 *     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_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":523
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __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":522
 *         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":527
 *             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__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_5__str__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "Cython/Tempita/_tempita.py":528
 * 
 *     def __str__(self):
 *         return self()             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self, *args, **kw):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __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":530
 *         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__ = {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_7__call__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __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;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__call__", 0);

  /* "Cython/Tempita/_tempita.py":531
 * 
 *     def __call__(self, *args, **kw):
 *         values = self._parse_signature(args, kw)             # <<<<<<<<<<<<<<
 *         ns = self._ns.copy()
 *         ns.update(values)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parse_signature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  __Pyx_INCREF(__pyx_v_kw);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_kw);
  __Pyx_GIVEREF(__pyx_v_kw);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_values = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":532
 *     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ns_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_ns = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":533
 *         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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ns, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":534
 *         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_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "Cython/Tempita/_tempita.py":535
 *         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_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyObject_SetItem(__pyx_v_ns, __pyx_n_s_self, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "Cython/Tempita/_tempita.py":536
 *         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_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":537
 *             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_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_subdefs = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":538
 *         out = []
 *         subdefs = {}
 *         self._template._interpret_codes(self._body, ns, out, subdefs)             # <<<<<<<<<<<<<<
 *         return ''.join(out)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_interpret_codes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_body_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_ns);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ns);
  __Pyx_GIVEREF(__pyx_v_ns);
  __Pyx_INCREF(__pyx_v_out);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_out);
  __Pyx_GIVEREF(__pyx_v_out);
  __Pyx_INCREF(__pyx_v_subdefs);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_subdefs);
  __Pyx_GIVEREF(__pyx_v_subdefs);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":539
 *         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_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":530
 *         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_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":541
 *         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__ = {__Pyx_NAMESTR("__get__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_9__get__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "Cython/Tempita/_tempita.py":542
 * 
 *     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":543
 *     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":544
 *         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_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);

  /* "Cython/Tempita/_tempita.py":545
 *             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_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);

  /* "Cython/Tempita/_tempita.py":546
 *         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_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "Cython/Tempita/_tempita.py":544
 *         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_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_9);
  __Pyx_GIVEREF(__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;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);

  /* "Cython/Tempita/_tempita.py":546
 *         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):
 */
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_bound_self, __pyx_v_obj) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":544
 *         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_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __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":541
 *         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":548
 *             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 = {__Pyx_NAMESTR("_parse_signature"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_11TemplateDef_11_parse_signature, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_signature") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_parse_signature", 0);
  __Pyx_INCREF(__pyx_v_args);

  /* "Cython/Tempita/_tempita.py":549
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":550
 *     def _parse_signature(self, args, kw):
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature             # <<<<<<<<<<<<<<
 *         extra_kw = {}
 *         for name, value in kw.iteritems():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_signature_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    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_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    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_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __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":551
 *         values = {}
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}             # <<<<<<<<<<<<<<
 *         for name, value in kw.iteritems():
 *             if not var_kw and name not in sig_args:
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_extra_kw = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":552
 *         sig_args, var_args, var_kw, defaults = self._func_signature
 *         extra_kw = {}
 *         for name, value in kw.iteritems():             # <<<<<<<<<<<<<<
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(
 */
  __pyx_t_8 = 0;
  if (unlikely(__pyx_v_kw == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_kw, 0, __pyx_n_s_iteritems, (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_5;
  __pyx_t_5 = 0;
  while (1) {
    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_9, &__pyx_t_8, &__pyx_t_5, &__pyx_t_4, NULL, __pyx_t_10);
    if (unlikely(__pyx_t_11 == 0)) break;
    if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "Cython/Tempita/_tempita.py":553
 *         extra_kw = {}
 *         for name, value in kw.iteritems():
 *             if not var_kw and name not in sig_args:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_var_kw); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = ((!__pyx_t_12) != 0);
    if (__pyx_t_13) {
      __pyx_t_12 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_sig_args, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_14 = (__pyx_t_12 != 0);
    } else {
      __pyx_t_14 = __pyx_t_13;
    }
    if (__pyx_t_14) {

      /* "Cython/Tempita/_tempita.py":555
 *             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_4 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_s, __pyx_v_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);

      /* "Cython/Tempita/_tempita.py":554
 *         for name, value in kw.iteritems():
 *             if not var_kw and name not in sig_args:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }

    /* "Cython/Tempita/_tempita.py":556
 *                 raise TypeError(
 *                     'Unexpected argument %s' % name)
 *             if name in sig_args:             # <<<<<<<<<<<<<<
 *                 values[sig_args] = value
 *             else:
 */
    __pyx_t_14 = (__Pyx_PySequence_Contains(__pyx_v_name, __pyx_v_sig_args, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (__pyx_t_14 != 0);
    if (__pyx_t_13) {

      /* "Cython/Tempita/_tempita.py":557
 *                     '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_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    /*else*/ {

      /* "Cython/Tempita/_tempita.py":559
 *                 values[sig_args] = value
 *             else:
 *                 extra_kw[name] = value             # <<<<<<<<<<<<<<
 *         args = list(args)
 *         sig_args = list(sig_args)
 */
      if (unlikely(PyDict_SetItem(__pyx_v_extra_kw, __pyx_v_name, __pyx_v_value) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L8:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":560
 *             else:
 *                 extra_kw[name] = value
 *         args = list(args)             # <<<<<<<<<<<<<<
 *         sig_args = list(sig_args)
 *         while args:
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_4);
  __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":561
 *                 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_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_sig_args);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sig_args);
  __Pyx_GIVEREF(__pyx_v_sig_args);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_sig_args, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":562
 *         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_13 = __Pyx_PyObject_IsTrue(__pyx_v_args); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_13) break;

    /* "Cython/Tempita/_tempita.py":563
 *         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_13 = __Pyx_PyObject_IsTrue(__pyx_v_sig_args); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_13) {
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_sig_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = (__Pyx_PyDict_Contains(__pyx_t_1, __pyx_v_values, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_12 = __pyx_t_14;
      } else {
        __pyx_t_12 = __pyx_t_13;
      }
      if (!__pyx_t_12) break;

      /* "Cython/Tempita/_tempita.py":564
 *         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_1 = __Pyx_PyObject_PopIndex(__pyx_v_sig_args, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "Cython/Tempita/_tempita.py":565
 *             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_12 = __Pyx_PyObject_IsTrue(__pyx_v_sig_args); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "Cython/Tempita/_tempita.py":566
 *                 sig_args.pop(0)
 *             if sig_args:
 *                 name = sig_args.pop(0)             # <<<<<<<<<<<<<<
 *                 values[name] = args.pop(0)
 *             elif var_args:
 */
      __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_sig_args, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":567
 *             if sig_args:
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)             # <<<<<<<<<<<<<<
 *             elif var_args:
 *                 values[var_args] = tuple(args)
 */
      __pyx_t_1 = __Pyx_PyObject_PopIndex(__pyx_v_args, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_name, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L13;
    }

    /* "Cython/Tempita/_tempita.py":568
 *                 name = sig_args.pop(0)
 *                 values[name] = args.pop(0)
 *             elif var_args:             # <<<<<<<<<<<<<<
 *                 values[var_args] = tuple(args)
 *                 break
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_var_args); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "Cython/Tempita/_tempita.py":569
 *                 values[name] = args.pop(0)
 *             elif var_args:
 *                 values[var_args] = tuple(args)             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_args);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_var_args, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

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

      /* "Cython/Tempita/_tempita.py":574
 *                 raise TypeError(
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))             # <<<<<<<<<<<<<<
 *         for name, value_expr in defaults.iteritems():
 *             if name not in values:
 */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (PyList_CheckExact(__pyx_v_args) || PyTuple_CheckExact(__pyx_v_args)) {
        __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
        __pyx_t_15 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_1)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_1)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_5 = __pyx_t_15(__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_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Repr(__pyx_v_v); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__22, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Extra_position_arguments_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":572
 *                 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_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L13:;
  }
  __pyx_L10_break:;

  /* "Cython/Tempita/_tempita.py":575
 *                     'Extra position arguments: %s'
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.iteritems():             # <<<<<<<<<<<<<<
 *             if name not in values:
 *                 values[name] = self._template._eval(
 */
  __pyx_t_9 = 0;
  if (unlikely(__pyx_v_defaults == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_defaults, 0, __pyx_n_s_iteritems, (&__pyx_t_8), (&__pyx_t_10)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __pyx_t_4 = __pyx_t_1;
  __pyx_t_1 = 0;
  while (1) {
    __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_8, &__pyx_t_9, &__pyx_t_1, &__pyx_t_5, NULL, __pyx_t_10);
    if (unlikely(__pyx_t_11 == 0)) break;
    if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value_expr, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":576
 *                     % ', '.join([repr(v) for v in args]))
 *         for name, value_expr in defaults.iteritems():
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 values[name] = self._template._eval(
 *                     value_expr, self._ns, self._pos)
 */
    __pyx_t_12 = (__Pyx_PyDict_Contains(__pyx_v_name, __pyx_v_values, Py_NE)); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (__pyx_t_12 != 0);
    if (__pyx_t_13) {

      /* "Cython/Tempita/_tempita.py":577
 *         for name, value_expr in defaults.iteritems():
 *             if name not in values:
 *                 values[name] = self._template._eval(             # <<<<<<<<<<<<<<
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_template_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_eval_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":578
 *             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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ns_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_pos_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "Cython/Tempita/_tempita.py":577
 *         for name, value_expr in defaults.iteritems():
 *             if name not in values:
 *                 values[name] = self._template._eval(             # <<<<<<<<<<<<<<
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 */
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_value_expr);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value_expr);
      __Pyx_GIVEREF(__pyx_v_value_expr);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(PyDict_SetItem(__pyx_v_values, __pyx_v_name, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L18;
    }
    __pyx_L18:;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":579
 *                 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_4 = __pyx_v_sig_args; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0;
  for (;;) {
    if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_4)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "Cython/Tempita/_tempita.py":580
 *                     value_expr, self._ns, self._pos)
 *         for name in sig_args:
 *             if name not in values:             # <<<<<<<<<<<<<<
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 */
    __pyx_t_13 = (__Pyx_PyDict_Contains(__pyx_v_name, __pyx_v_values, Py_NE)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_12 = (__pyx_t_13 != 0);
    if (__pyx_t_12) {

      /* "Cython/Tempita/_tempita.py":582
 *             if name not in values:
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)             # <<<<<<<<<<<<<<
 *         if var_kw:
 *             values[var_kw] = extra_kw
 */
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Missing_argument_s, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "Cython/Tempita/_tempita.py":581
 *         for name in sig_args:
 *             if name not in values:
 *                 raise TypeError(             # <<<<<<<<<<<<<<
 *                     'Missing argument: %s' % name)
 *         if var_kw:
 */
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __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_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "Cython/Tempita/_tempita.py":583
 *                 raise TypeError(
 *                     'Missing argument: %s' % name)
 *         if var_kw:             # <<<<<<<<<<<<<<
 *             values[var_kw] = extra_kw
 *         return values
 */
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_var_kw); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_12) {

    /* "Cython/Tempita/_tempita.py":584
 *                     '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_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L22;
  }
  __pyx_L22:;

  /* "Cython/Tempita/_tempita.py":585
 *         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":548
 *             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_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":590
 * 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":591
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":592
 *     def __init__(self, name):
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateObjectGetter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_get, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "Cython/Tempita/_tempita.py":590
 * 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_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":594
 *         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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_14TemplateObject_3__repr__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":595
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_TemplateObject__name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":594
 *         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":600
 * 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__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_1__init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __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
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "Cython/Tempita/_tempita.py":601
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":600
 * 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":603
 *         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__ = {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_3__getattr__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_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_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getattr__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "Cython/Tempita/_tempita.py":604
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetAttr3(__pyx_t_1, __pyx_v_attr, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":603
 *         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":606
 *         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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_20TemplateObjectGetter_5__repr__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "Cython/Tempita/_tempita.py":607
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_TemplateObjectGetter__template); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_around_r, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":606
 *         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":611
 * 
 * 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__ = {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_1__call__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __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":612
 * 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":611
 * 
 * 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":614
 *         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__ = {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_3__str__, METH_O, __Pyx_DOCSTR(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":615
 * 
 *     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":614
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */

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

/* "Cython/Tempita/_tempita.py":617
 *         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__ = {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_5__repr__, METH_O, __Pyx_DOCSTR(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":618
 * 
 *     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":617
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */

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

/* "Cython/Tempita/_tempita.py":620
 *         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__ = {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_7__unicode__, METH_O, __Pyx_DOCSTR(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":621
 * 
 *     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":620
 *         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":623
 *         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__ = {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_9__iter__, METH_O, __Pyx_DOCSTR(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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "Cython/Tempita/_tempita.py":624
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "Cython/Tempita/_tempita.py":623
 *         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":626
 *         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__ = {__Pyx_NAMESTR("__bool__"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_6_Empty_11__bool__, METH_O, __Pyx_DOCSTR(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":627
 * 
 *     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":626
 *         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":640
 * 
 * 
 * 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 = {__Pyx_NAMESTR("lex"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_15lex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
            case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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;
      Py_ssize_t __pyx_t_8;
      PyObject *(*__pyx_t_9)(PyObject *);
      int __pyx_t_10;
      int __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("lex", 0);
      __Pyx_INCREF(__pyx_v_delimeters);

      /* "Cython/Tempita/_tempita.py":662
 * 
 *     """
 *     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":663
 *     """
 *     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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":664
 *     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_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":663
 *     """
 *     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_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "Cython/Tempita/_tempita.py":665
 *         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":666
 *                        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_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_chunks = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "Cython/Tempita/_tempita.py":667
 *     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":668
 *     chunks = []
 *     last = 0
 *     last_pos = (line_offset + 1, 1)             # <<<<<<<<<<<<<<
 * 
 *     token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]),
 */
      __pyx_t_5 = PyNumber_Add(__pyx_v_line_offset, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_int_1);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      __pyx_t_5 = 0;
      __pyx_v_last_pos = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":670
 *     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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_escape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":671
 * 
 *     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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_escape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":670
 *     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_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_4 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_token_re = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":672
 *     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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_token_re, __pyx_n_s_finditer); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_7)) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_7)) {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_5 = __pyx_t_9(__pyx_t_7);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":673
 *                                       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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_expr, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":674
 *     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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_find_position); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_s);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
        __Pyx_GIVEREF(__pyx_v_s);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_last);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_last);
        __Pyx_GIVEREF(__pyx_v_last);
        __Pyx_INCREF(__pyx_v_last_pos);
        PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_last_pos);
        __Pyx_GIVEREF(__pyx_v_last_pos);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_pos, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":675
 *         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_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_2) {
          __pyx_t_1 = __pyx_v_in_expr;
          __pyx_t_10 = __pyx_t_1;
        } else {
          __pyx_t_10 = __pyx_t_2;
        }
        if (__pyx_t_10) {

          /* "Cython/Tempita/_tempita.py":676
 *         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_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_inside_expression, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          __pyx_t_6 = 0;
          __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);

          /* "Cython/Tempita/_tempita.py":677
 *         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:
 */
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":678
 *             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_6, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":676
 *         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_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":679
 *                                 position=pos,
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:             # <<<<<<<<<<<<<<
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_10) {
          __pyx_t_2 = (!(__pyx_v_in_expr != 0));
          __pyx_t_1 = __pyx_t_2;
        } else {
          __pyx_t_1 = __pyx_t_10;
        }
        if (__pyx_t_1) {

          /* "Cython/Tempita/_tempita.py":680
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_outside_expression, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);

          /* "Cython/Tempita/_tempita.py":681
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],
 *                                 position=pos,             # <<<<<<<<<<<<<<
 *                                 name=name)
 *         if expr == delimeters[0]:
 */
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":682
 *             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_4, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":680
 *                                 name=name)
 *         elif expr == delimeters[1] and not in_expr:
 *             raise TemplateError('%s outside expression' % delimeters[1],             # <<<<<<<<<<<<<<
 *                                 position=pos,
 *                                 name=name)
 */
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __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;
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":683
 *                                 position=pos,
 *                                 name=name)
 *         if expr == delimeters[0]:             # <<<<<<<<<<<<<<
 *             part = s[last:match.start()]
 *             if part:
 */
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_delimeters, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_RichCompare(__pyx_v_expr, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_1) {

          /* "Cython/Tempita/_tempita.py":684
 *                                 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_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __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_5, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_4);
          __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":685
 *         if expr == delimeters[0]:
 *             part = s[last:match.start()]
 *             if part:             # <<<<<<<<<<<<<<
 *                 chunks.append(part)
 *             in_expr = True
 */
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_1) {

            /* "Cython/Tempita/_tempita.py":686
 *             part = s[last:match.start()]
 *             if part:
 *                 chunks.append(part)             # <<<<<<<<<<<<<<
 *             in_expr = True
 *         else:
 */
            __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_part); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            goto __pyx_L8;
          }
          __pyx_L8:;

          /* "Cython/Tempita/_tempita.py":687
 *             if part:
 *                 chunks.append(part)
 *             in_expr = True             # <<<<<<<<<<<<<<
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))
 */
          __pyx_v_in_expr = 1;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "Cython/Tempita/_tempita.py":689
 *             in_expr = True
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))             # <<<<<<<<<<<<<<
 *             in_expr = False
 *         last = match.end()
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __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_5, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_last_pos);
          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_last_pos);
          __Pyx_GIVEREF(__pyx_v_last_pos);
          __pyx_t_4 = 0;
          __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_t_5); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "Cython/Tempita/_tempita.py":690
 *         else:
 *             chunks.append((s[last:match.start()], last_pos))
 *             in_expr = False             # <<<<<<<<<<<<<<
 *         last = match.end()
 *         last_pos = pos
 */
          __pyx_v_in_expr = 0;
        }
        __pyx_L7:;

        /* "Cython/Tempita/_tempita.py":691
 *             chunks.append((s[last:match.start()], last_pos))
 *             in_expr = False
 *         last = match.end()             # <<<<<<<<<<<<<<
 *         last_pos = pos
 *     if in_expr:
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_last, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":692
 *             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);
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":693
 *         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_1 = (__pyx_v_in_expr != 0);
      if (__pyx_t_1) {

        /* "Cython/Tempita/_tempita.py":694
 *         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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_delimeters, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_No_s_to_finish_last_expression, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":695
 *     if in_expr:
 *         raise TemplateError('No %s to finish last expression' % delimeters[1],
 *                             name=name, position=last_pos)             # <<<<<<<<<<<<<<
 *     part = s[last:]
 *     if part:
 */
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_last_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":694
 *         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_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __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_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":696
 *         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_3 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, &__pyx_v_last, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_part, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":697
 *                             name=name, position=last_pos)
 *     part = s[last:]
 *     if part:             # <<<<<<<<<<<<<<
 *         chunks.append(part)
 *     if trim_whitespace:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_part); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "Cython/Tempita/_tempita.py":698
 *     part = s[last:]
 *     if part:
 *         chunks.append(part)             # <<<<<<<<<<<<<<
 *     if trim_whitespace:
 *         chunks = trim_lex(chunks)
 */
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_chunks, __pyx_v_part); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "Cython/Tempita/_tempita.py":699
 *     if part:
 *         chunks.append(part)
 *     if trim_whitespace:             # <<<<<<<<<<<<<<
 *         chunks = trim_lex(chunks)
 *     return chunks
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_trim_whitespace); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_1) {

        /* "Cython/Tempita/_tempita.py":700
 *         chunks.append(part)
 *     if trim_whitespace:
 *         chunks = trim_lex(chunks)             # <<<<<<<<<<<<<<
 *     return chunks
 * 
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_trim_lex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_chunks);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chunks);
        __Pyx_GIVEREF(__pyx_v_chunks);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_chunks, __pyx_t_4);
        __pyx_t_4 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "Cython/Tempita/_tempita.py":701
 *     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":640
 * 
 * 
 * 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_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":709
 * 
 * 
 * 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 = {__Pyx_NAMESTR("trim_lex"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_17trim_lex, METH_O, __Pyx_DOCSTR(__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;
      int __pyx_t_10;
      Py_ssize_t __pyx_t_11;
      PyObject *__pyx_t_12 = NULL;
      int __pyx_t_13;
      int __pyx_t_14;
      int __pyx_t_15;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("trim_lex", 0);

      /* "Cython/Tempita/_tempita.py":720
 *        [('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":721
 *     """
 *     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 (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_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_2)) {
          if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) {
          if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_2);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __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 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1);
        __pyx_t_1 = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":722
 *     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_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __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":724
 *         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":725
 *             # 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __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":726
 *             continue
 *         item = current[0]
 *         if not statement_re.search(item) and item not in single_statements:             # <<<<<<<<<<<<<<
 *             continue
 *         if not i:
 */
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_statement_re); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_search); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_item);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
        __Pyx_GIVEREF(__pyx_v_item);
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_6 = ((!__pyx_t_7) != 0);
        if (__pyx_t_6) {
          __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_single_statements); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_item, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_10 = (__pyx_t_7 != 0);
        } else {
          __pyx_t_10 = __pyx_t_6;
        }
        if (__pyx_t_10) {

          /* "Cython/Tempita/_tempita.py":727
 *         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":728
 *         if not statement_re.search(item) and item not in single_statements:
 *             continue
 *         if not i:             # <<<<<<<<<<<<<<
 *             prev = ''
 *         else:
 */
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_i); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = ((!__pyx_t_10) != 0);
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":729
 *             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);
          goto __pyx_L7;
        }
        /*else*/ {

          /* "Cython/Tempita/_tempita.py":731
 *             prev = ''
 *         else:
 *             prev = tokens[i - 1]             # <<<<<<<<<<<<<<
 *         if i + 1 >= len(tokens):
 *             next_chunk = ''
 */
          __pyx_t_9 = PyNumber_Subtract(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_5 = PyObject_GetItem(__pyx_v_tokens, __pyx_t_9); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF_SET(__pyx_v_prev, __pyx_t_5);
          __pyx_t_5 = 0;
        }
        __pyx_L7:;

        /* "Cython/Tempita/_tempita.py":732
 *         else:
 *             prev = tokens[i - 1]
 *         if i + 1 >= len(tokens):             # <<<<<<<<<<<<<<
 *             next_chunk = ''
 *         else:
 */
        __pyx_t_5 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":733
 *             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);
          goto __pyx_L8;
        }
        /*else*/ {

          /* "Cython/Tempita/_tempita.py":735
 *             next_chunk = ''
 *         else:
 *             next_chunk = tokens[i + 1]             # <<<<<<<<<<<<<<
 *         if (not isinstance(next_chunk, basestring_)
 *             or not isinstance(prev, basestring_)):
 */
          __pyx_t_8 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = PyObject_GetItem(__pyx_v_tokens, __pyx_t_8); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_9);
          __pyx_t_9 = 0;
        }
        __pyx_L8:;

        /* "Cython/Tempita/_tempita.py":736
 *         else:
 *             next_chunk = tokens[i + 1]
 *         if (not isinstance(next_chunk, basestring_)             # <<<<<<<<<<<<<<
 *             or not isinstance(prev, basestring_)):
 *             continue
 */
        __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = PyObject_IsInstance(__pyx_v_next_chunk, __pyx_t_9); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = ((!(__pyx_t_6 != 0)) != 0);
        if (!__pyx_t_10) {

          /* "Cython/Tempita/_tempita.py":737
 *             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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_6 = PyObject_IsInstance(__pyx_v_prev, __pyx_t_9); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_7 = ((!(__pyx_t_6 != 0)) != 0);
          __pyx_t_6 = __pyx_t_7;
        } else {
          __pyx_t_6 = __pyx_t_10;
        }
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":738
 *         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":739
 *             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_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_9 = __Pyx_PyBool_FromLong((!__pyx_t_6)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_6) {
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_trail_whitespace_re); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_v_prev);
          PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_prev);
          __Pyx_GIVEREF(__pyx_v_prev);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_8 = __pyx_t_12;
          __pyx_t_12 = 0;
        } else {
          __pyx_t_8 = __pyx_t_9;
          __pyx_t_9 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_prev_ok, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "Cython/Tempita/_tempita.py":740
 *             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_8 = PyObject_RichCompare(__pyx_v_i, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (__pyx_t_6) {
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_7 = (!__pyx_t_10);
          __pyx_t_10 = __pyx_t_7;
        } else {
          __pyx_t_10 = __pyx_t_6;
        }
        if (__pyx_t_10) {

          /* "Cython/Tempita/_tempita.py":741
 *         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);
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "Cython/Tempita/_tempita.py":742
 *         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_10 = (__pyx_v_last_trim != Py_None);
        if (__pyx_t_10) {
          __pyx_t_9 = PyNumber_Add(__pyx_v_last_trim, __pyx_int_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_v_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_6) {
            __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_13 = (!__pyx_t_7);
            __pyx_t_7 = __pyx_t_13;
          } else {
            __pyx_t_7 = __pyx_t_6;
          }
          __pyx_t_6 = __pyx_t_7;
        } else {
          __pyx_t_6 = __pyx_t_10;
        }
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":743
 *             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);
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "Cython/Tempita/_tempita.py":745
 *             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_6 = __Pyx_PyObject_IsTrue(__pyx_v_prev_ok); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_6) {
          __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_next_chunk); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_7 = (!__pyx_t_10);
          if (!__pyx_t_7) {

            /* "Cython/Tempita/_tempita.py":746
 *         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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_lead_whitespace_re); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_9);

            /* "Cython/Tempita/_tempita.py":745
 *             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_9, __pyx_n_s_search); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(__pyx_v_next_chunk);
            PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_next_chunk);
            __Pyx_GIVEREF(__pyx_v_next_chunk);
            __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (!__pyx_t_10) {

              /* "Cython/Tempita/_tempita.py":746
 *         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_11 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_12 = PyInt_FromSsize_t((__pyx_t_11 - 2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_9 = PyObject_RichCompare(__pyx_v_i, __pyx_t_12, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_13) {
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_chunk, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_GOTREF(__pyx_t_12);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
                __pyx_t_15 = (!__pyx_t_14);
                __pyx_t_14 = __pyx_t_15;
              } else {
                __pyx_t_14 = __pyx_t_13;
              }
              __pyx_t_13 = __pyx_t_14;
            } else {
              __pyx_t_13 = __pyx_t_10;
            }
            __pyx_t_10 = __pyx_t_13;
          } else {
            __pyx_t_10 = __pyx_t_7;
          }
          __pyx_t_7 = __pyx_t_10;
        } else {
          __pyx_t_7 = __pyx_t_6;
        }
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":747
 *             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_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_7) {

            /* "Cython/Tempita/_tempita.py":748
 *                  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_12 = PyObject_RichCompare(__pyx_v_i, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (__pyx_t_7) {
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_prev, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_10 = (!__pyx_t_6);
              __pyx_t_6 = __pyx_t_10;
            } else {
              __pyx_t_6 = __pyx_t_7;
            }
            if (!__pyx_t_6) {

              /* "Cython/Tempita/_tempita.py":749
 *             if prev:
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):             # <<<<<<<<<<<<<<
 *                     tokens[i - 1] = ''
 *                 else:
 */
              __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_prev_ok, __pyx_n_s_last, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_10 = __pyx_t_7;
            } else {
              __pyx_t_10 = __pyx_t_6;
            }
            if (__pyx_t_10) {

              /* "Cython/Tempita/_tempita.py":750
 *                 if ((i == 1 and not prev.strip())
 *                     or prev_ok == 'last'):
 *                     tokens[i - 1] = ''             # <<<<<<<<<<<<<<
 *                 else:
 *                     m = trail_whitespace_re.search(prev)
 */
              __pyx_t_9 = PyNumber_Subtract(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_9, __pyx_kp_s__9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L14;
            }
            /*else*/ {

              /* "Cython/Tempita/_tempita.py":752
 *                     tokens[i - 1] = ''
 *                 else:
 *                     m = trail_whitespace_re.search(prev)             # <<<<<<<<<<<<<<
 *                     # +1 to leave the leading \n on:
 *                     prev = prev[:m.start() + 1]
 */
              __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_trail_whitespace_re); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_search); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_INCREF(__pyx_v_prev);
              PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_prev);
              __Pyx_GIVEREF(__pyx_v_prev);
              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_8);
              __pyx_t_8 = 0;

              /* "Cython/Tempita/_tempita.py":754
 *                     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_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_prev, 0, 0, NULL, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF_SET(__pyx_v_prev, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "Cython/Tempita/_tempita.py":755
 *                     # +1 to leave the leading \n on:
 *                     prev = prev[:m.start() + 1]
 *                     tokens[i - 1] = prev             # <<<<<<<<<<<<<<
 *             if next_chunk:
 *                 last_trim = i
 */
              __pyx_t_9 = PyNumber_Subtract(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_9, __pyx_v_prev) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_L14:;
            goto __pyx_L13;
          }
          __pyx_L13:;

          /* "Cython/Tempita/_tempita.py":756
 *                     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_10 = __Pyx_PyObject_IsTrue(__pyx_v_next_chunk); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_10) {

            /* "Cython/Tempita/_tempita.py":757
 *                     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":758
 *             if next_chunk:
 *                 last_trim = i
 *                 if i == len(tokens) - 2 and not next_chunk.strip():             # <<<<<<<<<<<<<<
 *                     tokens[i + 1] = ''
 *                 else:
 */
            __pyx_t_11 = PyObject_Length(__pyx_v_tokens); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_9 = PyInt_FromSsize_t((__pyx_t_11 - 2)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_8 = PyObject_RichCompare(__pyx_v_i, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (__pyx_t_10) {
              __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_chunk, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_7 = (!__pyx_t_6);
              __pyx_t_6 = __pyx_t_7;
            } else {
              __pyx_t_6 = __pyx_t_10;
            }
            if (__pyx_t_6) {

              /* "Cython/Tempita/_tempita.py":759
 *                 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_9 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_9, __pyx_kp_s__9) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              goto __pyx_L16;
            }
            /*else*/ {

              /* "Cython/Tempita/_tempita.py":761
 *                     tokens[i + 1] = ''
 *                 else:
 *                     m = lead_whitespace_re.search(next_chunk)             # <<<<<<<<<<<<<<
 *                     next_chunk = next_chunk[m.end():]
 *                     tokens[i + 1] = next_chunk
 */
              __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_lead_whitespace_re); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_INCREF(__pyx_v_next_chunk);
              PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_next_chunk);
              __Pyx_GIVEREF(__pyx_v_next_chunk);
              __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_12);
              __pyx_t_12 = 0;

              /* "Cython/Tempita/_tempita.py":762
 *                 else:
 *                     m = lead_whitespace_re.search(next_chunk)
 *                     next_chunk = next_chunk[m.end():]             # <<<<<<<<<<<<<<
 *                     tokens[i + 1] = next_chunk
 *     return tokens
 */
              __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_end); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_next_chunk, 0, 0, &__pyx_t_9, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF_SET(__pyx_v_next_chunk, __pyx_t_12);
              __pyx_t_12 = 0;

              /* "Cython/Tempita/_tempita.py":763
 *                     m = lead_whitespace_re.search(next_chunk)
 *                     next_chunk = next_chunk[m.end():]
 *                     tokens[i + 1] = next_chunk             # <<<<<<<<<<<<<<
 *     return tokens
 * 
 */
              __pyx_t_12 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              if (unlikely(PyObject_SetItem(__pyx_v_tokens, __pyx_t_12, __pyx_v_next_chunk) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __pyx_L16:;
            goto __pyx_L15;
          }
          __pyx_L15:;
          goto __pyx_L12;
        }
        __pyx_L12:;
        __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":764
 *                     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":709
 * 
 * 
 * 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_12);
      __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":767
 * 
 * 
 * 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 = {__Pyx_NAMESTR("find_position"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_19find_position, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find_position") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("find_position", 0);

      /* "Cython/Tempita/_tempita.py":769
 * 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_kp_s__24);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__24);
      __Pyx_GIVEREF(__pyx_kp_s__24);
      __Pyx_INCREF(__pyx_v_last_index);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_last_index);
      __Pyx_GIVEREF(__pyx_v_last_index);
      __Pyx_INCREF(__pyx_v_index);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_lines = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":770
 *     """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_3 = PyObject_RichCompare(__pyx_v_lines, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":771
 *     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_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_rfind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_kp_s__24);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s__24);
        __Pyx_GIVEREF(__pyx_kp_s__24);
        __Pyx_INCREF(__pyx_v_last_index);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_last_index);
        __Pyx_GIVEREF(__pyx_v_last_index);
        __Pyx_INCREF(__pyx_v_index);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_index);
        __Pyx_GIVEREF(__pyx_v_index);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyNumber_Subtract(__pyx_v_index, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __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;
        goto __pyx_L3;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":773
 *         column = index - string.rfind('\n', last_index, index)
 *     else:
 *         column = last_pos[1] + (index - last_index)             # <<<<<<<<<<<<<<
 *     return (last_pos[0] + lines, column)
 * 
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_last_pos, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_column = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L3:;

      /* "Cython/Tempita/_tempita.py":774
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_column);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_column);
      __Pyx_GIVEREF(__pyx_v_column);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":767
 * 
 * 
 * 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_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":777
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_21parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            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_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __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;
      PyObject *(*__pyx_t_7)(PyObject *);
      int __pyx_t_8;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse", 0);
      __Pyx_INCREF(__pyx_v_delimeters);

      /* "Cython/Tempita/_tempita.py":827
 *         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":828
 *     """
 *     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_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":829
 *     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_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "Cython/Tempita/_tempita.py":828
 *     """
 *     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_filename = __pyx_f[0]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_delimeters, __pyx_t_5);
        __pyx_t_5 = 0;
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "Cython/Tempita/_tempita.py":830
 *         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_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_line_offset, __pyx_v_line_offset) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_delimeters, __pyx_v_delimeters) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __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":831
 *                        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_filename = __pyx_f[0]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_result = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "Cython/Tempita/_tempita.py":832
 *     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_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (!__pyx_t_2) break;

        /* "Cython/Tempita/_tempita.py":833
 *     result = []
 *     while tokens:
 *         next_chunk, tokens = parse_expr(tokens, name)             # <<<<<<<<<<<<<<
 *         result.append(next_chunk)
 *     return result
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_7 = NULL;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L7_unpacking_done;
          __pyx_L6_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_7 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __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_6);
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":834
 *     while tokens:
 *         next_chunk, tokens = parse_expr(tokens, name)
 *         result.append(next_chunk)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_next_chunk); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":835
 *         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":777
 * 
 * 
 * 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":838
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_expr"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_23parse_expr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else {
          switch (PyTuple_GET_SIZE(__pyx_args)) {
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            break;
            default: goto __pyx_L5_argtuple_error;
          }
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_expr", 0);

      /* "Cython/Tempita/_tempita.py":839
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":840
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
        __Pyx_GIVEREF(__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":841
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __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":842
 *         return tokens[0], tokens[1:]
 *     expr, pos = tokens[0]
 *     expr = expr.strip()             # <<<<<<<<<<<<<<
 *     if expr.startswith('py:'):
 *         expr = expr[3:].lstrip(' \t')
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __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":843
 *     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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":844
 *     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_5 = __Pyx_PyObject_GetSlice(__pyx_v_expr, 3, 0, NULL, NULL, &__pyx_slice__27, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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":845
 *     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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!__pyx_t_4) {
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_8 = __pyx_t_3;
        } else {
          __pyx_t_8 = __pyx_t_4;
        }
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":846
 *         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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __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":847
 *         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_8 = (__Pyx_PySequence_Contains(__pyx_kp_s__31, __pyx_v_expr, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_4 = (__pyx_t_8 != 0);
          if (__pyx_t_4) {

            /* "Cython/Tempita/_tempita.py":848
 *             expr = expr.lstrip('\r\n')
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')             # <<<<<<<<<<<<<<
 *                 expr = expr.replace('\r', '')
 *             expr += '\n'
 */
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __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":849
 *             if '\r' in expr:
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')             # <<<<<<<<<<<<<<
 *             expr += '\n'
 *         else:
 */
            __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
            __pyx_t_2 = 0;
            goto __pyx_L8;
          }
          __pyx_L8:;

          /* "Cython/Tempita/_tempita.py":850
 *                 expr = expr.replace('\r\n', '\n')
 *                 expr = expr.replace('\r', '')
 *             expr += '\n'             # <<<<<<<<<<<<<<
 *         else:
 *             if '\n' in expr:
 */
          __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_kp_s__24); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
          __pyx_t_2 = 0;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "Cython/Tempita/_tempita.py":852
 *             expr += '\n'
 *         else:
 *             if '\n' in expr:             # <<<<<<<<<<<<<<
 *                 raise TemplateError(
 *                     'Multi-line py blocks must start with a newline',
 */
          __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_kp_s__24, __pyx_v_expr, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = (__pyx_t_4 != 0);
          if (__pyx_t_8) {

            /* "Cython/Tempita/_tempita.py":853
 *         else:
 *             if '\n' in expr:
 *                 raise TemplateError(             # <<<<<<<<<<<<<<
 *                     'Multi-line py blocks must start with a newline',
 *                     position=pos, name=name)
 */
            __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_5);

            /* "Cython/Tempita/_tempita.py":855
 *                 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'):
 */
            if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

            /* "Cython/Tempita/_tempita.py":853
 *         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_2, __pyx_tuple__37, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_Raise(__pyx_t_1, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
        }
        __pyx_L7:;

        /* "Cython/Tempita/_tempita.py":856
 *                     '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_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_py);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_py);
        __Pyx_GIVEREF(__pyx_n_s_py);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        __Pyx_INCREF(__pyx_v_expr);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_expr);
        __Pyx_GIVEREF(__pyx_v_expr);
        __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__38, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_1 = 0;
        __pyx_t_5 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":857
 *                     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_2 = __pyx_v_expr;
      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_continue, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_8) {
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_break, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_3 = __pyx_t_4;
      } else {
        __pyx_t_3 = __pyx_t_8;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = (__pyx_t_3 != 0);
      if (__pyx_t_8) {

        /* "Cython/Tempita/_tempita.py":858
 *         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_8 = (__Pyx_PySequence_Contains(__pyx_n_s_for, __pyx_v_context, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_3 = (__pyx_t_8 != 0);
        if (__pyx_t_3) {

          /* "Cython/Tempita/_tempita.py":859
 *     elif expr in ('continue', 'break'):
 *         if 'for' not in context:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'continue outside of for loop',
 *                 position=pos, name=name)
 */
          __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);

          /* "Cython/Tempita/_tempita.py":861
 *             raise TemplateError(
 *                 'continue outside of for loop',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         return (expr, pos), tokens[1:]
 *     elif expr.startswith('if '):
 */
          if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":859
 *     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_2, __pyx_tuple__39, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":862
 *                 '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_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_expr);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_expr);
        __Pyx_GIVEREF(__pyx_v_expr);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__40, 1, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_1 = 0;
        __pyx_t_5 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":863
 *                 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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":864
 *         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_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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":865
 *     elif expr.startswith('if '):
 *         return parse_cond(tokens, name, context)
 *     elif (expr.startswith('elif ')             # <<<<<<<<<<<<<<
 *           or expr == 'else'):
 *         raise TemplateError(
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":866
 *         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_8 = (__Pyx_PyString_Equals(__pyx_v_expr, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = __pyx_t_8;
      } else {
        __pyx_t_4 = __pyx_t_3;
      }
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":867
 *     elif (expr.startswith('elif ')
 *           or expr == 'else'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":868
 *           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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __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_s_outside_of_an_if_block, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":867
 *     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 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":869
 *         raise TemplateError(
 *             '%s outside of an if block' % expr.split()[0],
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(
 */
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":867
 *     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 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":870
 *             '%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_6 = __pyx_v_expr;
      __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_if_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_4) {
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_elif_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = __pyx_t_3;
      } else {
        __pyx_t_8 = __pyx_t_4;
      }
      if (!__pyx_t_8) {
        __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_for, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_3 = __pyx_t_4;
      } else {
        __pyx_t_3 = __pyx_t_8;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = (__pyx_t_3 != 0);
      if (__pyx_t_8) {

        /* "Cython/Tempita/_tempita.py":871
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);

        /* "Cython/Tempita/_tempita.py":872
 *     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_5 = __Pyx_PyString_Format(__pyx_kp_s_s_with_no_expression, __pyx_v_expr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":871
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":873
 *         raise TemplateError(
 *             '%s with no expression' % expr,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(
 */
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":871
 *             position=pos, name=name)
 *     elif expr in ('if', 'elif', 'for'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             '%s with no expression' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __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_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":874
 *             '%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_2 = __pyx_v_expr;
      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_8) {
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_endfor, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = __pyx_t_3;
      } else {
        __pyx_t_4 = __pyx_t_8;
      }
      if (!__pyx_t_4) {
        __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_enddef, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_3 = __pyx_t_8;
      } else {
        __pyx_t_3 = __pyx_t_4;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = (__pyx_t_3 != 0);
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":875
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":876
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(
 *             'Unexpected %s' % expr,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     elif expr.startswith('for '):
 */
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_s, __pyx_v_expr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":875
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);

        /* "Cython/Tempita/_tempita.py":877
 *         raise TemplateError(
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     elif expr.startswith('for '):
 *         return parse_for(tokens, name, context)
 */
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":875
 *             position=pos, name=name)
 *     elif expr in ('endif', 'endfor', 'enddef'):
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 */
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":878
 *             'Unexpected %s' % expr,
 *             position=pos, name=name)
 *     elif expr.startswith('for '):             # <<<<<<<<<<<<<<
 *         return parse_for(tokens, name, context)
 *     elif expr.startswith('default '):
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":879
 *             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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_for); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":880
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":881
 *         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_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_default); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __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":882
 *     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_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":883
 *         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_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":884
 *     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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_startswith); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":885
 *         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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_def); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __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_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":886
 *     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_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_4) {

        /* "Cython/Tempita/_tempita.py":887
 *         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_6 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_n_s_comment);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_comment);
        __Pyx_GIVEREF(__pyx_n_s_comment);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1);
        __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_6 = 0;
        __pyx_t_1 = 0;
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":888
 *     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_5 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_expr);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_expr);
      __Pyx_GIVEREF(__pyx_n_s_expr);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
      __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_t_5 = 0;
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":838
 * 
 * 
 * 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":891
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_cond"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_25parse_cond, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cond") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __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;
      PyObject *__pyx_t_7 = NULL;
      PyObject *(*__pyx_t_8)(PyObject *);
      int __pyx_t_9;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_cond", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":892
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __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":893
 * 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_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_pieces = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":894
 *     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_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __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":895
 *     pieces = []
 *     context = context + ('if',)
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":896
 *     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_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_4 = ((!__pyx_t_3) != 0);
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":897
 *     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_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);

          /* "Cython/Tempita/_tempita.py":899
 *             raise TemplateError(
 *                 'Missing {{endif}}',
 *                 position=start, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endif'):
 */
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_start) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":897
 *     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_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_Raise(__pyx_t_5, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":900
 *                 '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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyTuple_Check(__pyx_t_5); 
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_4) {

          /* "Cython/Tempita/_tempita.py":901
 *                 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_6 = __pyx_t_3;
        } else {
          __pyx_t_6 = __pyx_t_4;
        }
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":902
 *         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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_n_s_cond);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_cond);
          __Pyx_GIVEREF(__pyx_n_s_cond);
          __Pyx_INCREF(__pyx_v_start);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_start);
          __Pyx_GIVEREF(__pyx_v_start);
          __pyx_t_5 = PyList_AsTuple(__pyx_v_pieces); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
          __Pyx_GIVEREF(__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":903
 *             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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_one_cond); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_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_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
          index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L7_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = NULL;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L8_unpacking_done;
          __pyx_L7_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L8_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":904
 *             return ('cond', start) + tuple(pieces), tokens[1:]
 *         next_chunk, tokens = parse_one_cond(tokens, name, context)
 *         pieces.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_pieces, __pyx_v_next_chunk); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":891
 * 
 * 
 * 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_7);
      __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":907
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_one_cond"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_27parse_one_cond, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __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;
      int __pyx_t_12;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_one_cond", 0);
      __Pyx_INCREF(__pyx_v_tokens);

      /* "Cython/Tempita/_tempita.py":908
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __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":909
 * 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_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_content = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":910
 *     (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_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":911
 *     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, -1, NULL, NULL, &__pyx_slice__57, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "Cython/Tempita/_tempita.py":912
 *     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_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":913
 *         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_2 = __Pyx_PyObject_GetSlice(__pyx_v_first, 3, 0, NULL, NULL, &__pyx_slice__59, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_if_2);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_if_2);
        __Pyx_GIVEREF(__pyx_n_s_if_2);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        __pyx_t_2 = 0;
        __pyx_v_part = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":914
 *     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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_first, __pyx_n_s_startswith); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":915
 *         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_2 = __Pyx_PyObject_GetSlice(__pyx_v_first, 5, 0, NULL, NULL, &__pyx_slice__61, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lstrip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_elif_2);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_elif_2);
        __Pyx_GIVEREF(__pyx_n_s_elif_2);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        __pyx_t_2 = 0;
        __pyx_v_part = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":916
 *     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_filename = __pyx_f[0]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":917
 *         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_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_n_s_else);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_else);
        __Pyx_GIVEREF(__pyx_n_s_else);
        __Pyx_INCREF(__pyx_v_pos);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
        __Pyx_GIVEREF(__pyx_v_pos);
        __Pyx_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_INCREF(__pyx_v_content);
        PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_content);
        __Pyx_GIVEREF(__pyx_v_content);
        __pyx_v_part = ((PyObject*)__pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":919
 *         part = ('else', pos, None, content)
 *     else:
 *         assert 0, "Unexpected token %r at %s" % (first, pos)             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(!Py_OptimizeFlag)) {
          if (unlikely(!0)) {
            __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_first);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_first);
            __Pyx_GIVEREF(__pyx_v_first);
            __Pyx_INCREF(__pyx_v_pos);
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
            __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
        }
        #endif
      }
      __pyx_L6:;

      /* "Cython/Tempita/_tempita.py":920
 *     else:
 *         assert 0, "Unexpected token %r at %s" % (first, pos)
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":921
 *         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_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = ((!__pyx_t_7) != 0);
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":922
 *     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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);

          /* "Cython/Tempita/_tempita.py":924
 *             raise TemplateError(
 *                 'No {{endif}}',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and (tokens[0][0] == 'endif'
 */
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":922
 *     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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_Raise(__pyx_t_4, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":925
 *                 '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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = PyTuple_Check(__pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":926
 *                 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_endif, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (!__pyx_t_7) {

            /* "Cython/Tempita/_tempita.py":927
 *         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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (!__pyx_t_9) {

              /* "Cython/Tempita/_tempita.py":928
 *             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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_else, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_11 = __pyx_t_10;
            } else {
              __pyx_t_11 = __pyx_t_9;
            }
            __pyx_t_9 = __pyx_t_11;
          } else {
            __pyx_t_9 = __pyx_t_7;
          }
          __pyx_t_7 = __pyx_t_9;
        } else {
          __pyx_t_7 = __pyx_t_8;
        }
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":929
 *                  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_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_v_part);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_part);
          __Pyx_GIVEREF(__pyx_v_part);
          __Pyx_INCREF(__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_v_tokens);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          goto __pyx_L0;
        }

        /* "Cython/Tempita/_tempita.py":930
 *                  or tokens[0][0] == 'else')):
 *             return part, tokens
 *         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_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
          PyObject* sequence = __pyx_t_2;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_1 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_6 = NULL;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L12_unpacking_done;
          __pyx_L11_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_6 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":931
 *             return part, tokens
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_content, __pyx_v_next_chunk); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":907
 * 
 * 
 * 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":934
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_for"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_29parse_for, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_for") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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 *);
      int __pyx_t_10;
      int __pyx_t_11;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_for", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":935
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __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":936
 * 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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __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":937
 *     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_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __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":938
 *     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_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_content = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":939
 *     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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":940
 *     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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":941
 *     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, -1, NULL, NULL, &__pyx_slice__68, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "Cython/Tempita/_tempita.py":942
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     first = first[3:].strip()             # <<<<<<<<<<<<<<
 *     match = in_re.search(first)
 *     if not match:
 */
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 3, 0, NULL, NULL, &__pyx_slice__69, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":943
 *         first = first[:-1]
 *     first = first[3:].strip()
 *     match = in_re.search(first)             # <<<<<<<<<<<<<<
 *     if not match:
 *         raise TemplateError(
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_in_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_search); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_first);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_first);
      __Pyx_GIVEREF(__pyx_v_first);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __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_v_match = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":944
 *     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_filename = __pyx_f[0]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = ((!__pyx_t_6) != 0);
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":945
 *     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_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":946
 *     if not match:
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,             # <<<<<<<<<<<<<<
 *             position=pos, name=name)
 *     vars = first[:match.start()]
 */
        __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Bad_for_no_in_in_r, __pyx_v_first); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":945
 *     match = in_re.search(first)
 *     if not match:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 */
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":947
 *         raise TemplateError(
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     vars = first[:match.start()]
 *     if '(' in vars:
 */
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":945
 *     match = in_re.search(first)
 *     if not match:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":948
 *             'Bad for (no "in") in %r' % first,
 *             position=pos, name=name)
 *     vars = first[:match.start()]             # <<<<<<<<<<<<<<
 *     if '(' in vars:
 *         raise TemplateError(
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, NULL, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_vars = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":949
 *             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_Contains(__pyx_kp_s__70, __pyx_v_vars, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = (__pyx_t_7 != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":950
 *     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 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);

        /* "Cython/Tempita/_tempita.py":952
 *         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_1 = __Pyx_PyString_Format(__pyx_kp_s_You_cannot_have_in_the_variable, __pyx_v_vars); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":950
 *     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 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":952
 *         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(',')
 */
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":950
 *     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_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":953
 *             '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_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);

      /* "Cython/Tempita/_tempita.py":954
 *             % 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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, NULL, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_3)) {
          if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_3)) {
          if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_1 = __pyx_t_9(__pyx_t_3);
          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_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":955
 *     vars = tuple([
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])             # <<<<<<<<<<<<<<
 *     expr = first[match.end():]
 *     while 1:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":954
 *             % 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_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L10;
        }
        __pyx_L10:;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":953
 *             '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_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_vars, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":956
 *         v.strip() for v in first[:match.start()].split(',')
 *         if v.strip()])
 *     expr = first[match.end():]             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, 0, &__pyx_t_2, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_expr = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":957
 *         if v.strip()])
 *     expr = first[match.end():]
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":958
 *     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_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = ((!__pyx_t_6) != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":959
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 */
          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);

          /* "Cython/Tempita/_tempita.py":961
 *             raise TemplateError(
 *                 'No {{endfor}}',
 *                 position=pos, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'endfor'):
 */
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":959
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'No {{endfor}}',
 *                 position=pos, name=name)
 */
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__73, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":962
 *                 '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_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = PyTuple_Check(__pyx_t_1); 
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":963
 *                 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_1 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_endfor, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_10 = __pyx_t_6;
        } else {
          __pyx_t_10 = __pyx_t_7;
        }
        if (__pyx_t_10) {

          /* "Cython/Tempita/_tempita.py":964
 *         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_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_n_s_for);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_for);
          __Pyx_GIVEREF(__pyx_n_s_for);
          __Pyx_INCREF(__pyx_v_pos);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_pos);
          __Pyx_GIVEREF(__pyx_v_pos);
          __Pyx_INCREF(__pyx_v_vars);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_vars);
          __Pyx_GIVEREF(__pyx_v_vars);
          __Pyx_INCREF(__pyx_v_expr);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_expr);
          __Pyx_GIVEREF(__pyx_v_expr);
          __Pyx_INCREF(__pyx_v_content);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_content);
          __Pyx_GIVEREF(__pyx_v_content);
          __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__74, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_1);
          __pyx_t_2 = 0;
          __pyx_t_1 = 0;
          __pyx_r = __pyx_t_3;
          __pyx_t_3 = 0;
          goto __pyx_L0;
        }

        /* "Cython/Tempita/_tempita.py":965
 *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __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;
        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
          PyObject* sequence = __pyx_t_2;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
          index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L16_unpacking_done;
          __pyx_L15_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __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_3);
        __pyx_t_3 = 0;

        /* "Cython/Tempita/_tempita.py":966
 *             return ('for', pos, vars, expr, content), tokens[1:]
 *         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_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":934
 * 
 * 
 * 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_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":969
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_default"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_31parse_default, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_default") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_default", 0);

      /* "Cython/Tempita/_tempita.py":970
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __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":971
 * 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_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":972
 *     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_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __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":973
 *     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_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __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":974
 *     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_filename = __pyx_f[0]; __pyx_lineno = 974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = ((__pyx_t_7 == 1) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":975
 *     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_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);

        /* "Cython/Tempita/_tempita.py":976
 *     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_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":975
 *     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_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":977
 *         raise TemplateError(
 *             "Expression must be {{default var=value}}; no = found in %r" % first,
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     var = parts[0].strip()
 *     if ',' in var:
 */
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":975
 *     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_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":978
 *             "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_4 = __Pyx_GetItemInt(__pyx_v_parts, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_var = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":979
 *             position=pos, name=name)
 *     var = parts[0].strip()
 *     if ',' in var:             # <<<<<<<<<<<<<<
 *         raise TemplateError(
 *             "{{default x, y = ...}} is not supported",
 */
      __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_kp_s__71, __pyx_v_var, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = (__pyx_t_6 != 0);
      if (__pyx_t_8) {

        /* "Cython/Tempita/_tempita.py":980
 *     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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":982
 *         raise TemplateError(
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)             # <<<<<<<<<<<<<<
 *     if not var_re.search(var):
 *         raise TemplateError(
 */
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":980
 *     var = parts[0].strip()
 *     if ',' in var:
 *         raise TemplateError(             # <<<<<<<<<<<<<<
 *             "{{default x, y = ...}} is not supported",
 *             position=pos, name=name)
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__79, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":983
 *             "{{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_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_var);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_var);
      __Pyx_GIVEREF(__pyx_v_var);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = ((!__pyx_t_8) != 0);
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":984
 *             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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);

        /* "Cython/Tempita/_tempita.py":986
 *         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_2 = __Pyx_PyString_Format(__pyx_kp_s_Not_a_valid_variable_name_for_de, __pyx_v_var); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":984
 *             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 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);

        /* "Cython/Tempita/_tempita.py":986
 *         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:]
 */
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":984
 *             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 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_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_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":987
 *             "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_1 = __Pyx_GetItemInt(__pyx_v_parts, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __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":988
 *             % var, position=pos, name=name)
 *     expr = parts[1].strip()
 *     return ('default', pos, var, expr), tokens[1:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_default);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_default);
      __Pyx_GIVEREF(__pyx_n_s_default);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __Pyx_INCREF(__pyx_v_var);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_var);
      __Pyx_GIVEREF(__pyx_v_var);
      __Pyx_INCREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_expr);
      __Pyx_GIVEREF(__pyx_v_expr);
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__80, 1, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":969
 * 
 * 
 * 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":991
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_inherit"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_33parse_inherit, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_inherit") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_inherit", 0);

      /* "Cython/Tempita/_tempita.py":992
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __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":993
 * 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_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":994
 *     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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __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":995
 *     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_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_inherit_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_inherit_2);
      __Pyx_GIVEREF(__pyx_n_s_inherit_2);
      __Pyx_INCREF(__pyx_v_pos);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_pos);
      __Pyx_GIVEREF(__pyx_v_pos);
      __Pyx_INCREF(__pyx_v_expr);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_expr);
      __Pyx_GIVEREF(__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_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __Pyx_GIVEREF(__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":991
 * 
 * 
 * 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":998
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_def"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_35parse_def, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_def") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __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_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("parse_def", 0);
      __Pyx_INCREF(__pyx_v_tokens);
      __Pyx_INCREF(__pyx_v_context);

      /* "Cython/Tempita/_tempita.py":999
 * 
 * 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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __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":1000
 * 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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __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":1001
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
      }
      #endif

      /* "Cython/Tempita/_tempita.py":1002
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __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":1003
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "Cython/Tempita/_tempita.py":1004
 *     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, -1, NULL, NULL, &__pyx_slice__88, 0, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_first, __pyx_t_1);
        __pyx_t_1 = 0;
        goto __pyx_L5;
      }
      __pyx_L5:;

      /* "Cython/Tempita/_tempita.py":1005
 *     if first.endswith(':'):
 *         first = first[:-1]
 *     if '(' not in first:             # <<<<<<<<<<<<<<
 *         func_name = first
 *         sig = ((), None, None, {})
 */
      __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_kp_s__70, __pyx_v_first, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = (__pyx_t_6 != 0);
      if (__pyx_t_7) {

        /* "Cython/Tempita/_tempita.py":1006
 *         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":1007
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_empty_tuple);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_empty_tuple);
        __Pyx_GIVEREF(__pyx_empty_tuple);
        __Pyx_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_INCREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
        __Pyx_GIVEREF(Py_None);
        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_1);
        __pyx_t_1 = 0;
        __pyx_v_sig = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L6;
      }

      /* "Cython/Tempita/_tempita.py":1008
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __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":1009
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);

        /* "Cython/Tempita/_tempita.py":1010
 *     elif not first.endswith(')'):
 *         raise TemplateError("Function definition doesn't end with ): %s" % first,
 *                             position=start, name=name)             # <<<<<<<<<<<<<<
 *     else:
 *         first = first[:-1]
 */
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_position, __pyx_v_start) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":1009
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":1012
 *                             position=start, name=name)
 *     else:
 *         first = first[:-1]             # <<<<<<<<<<<<<<
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 */
        __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_first, 0, -1, NULL, NULL, &__pyx_slice__91, 0, 1, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __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":1013
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __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":1014
 *         first = first[:-1]
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)             # <<<<<<<<<<<<<<
 *     context = context + ('def',)
 *     content = []
 */
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_signature_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_sig_text);
        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sig_text);
        __Pyx_GIVEREF(__pyx_v_sig_text);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_start);
        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_start);
        __Pyx_GIVEREF(__pyx_v_start);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_sig = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L6:;

      /* "Cython/Tempita/_tempita.py":1015
 *         func_name, sig_text = first.split('(', 1)
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)             # <<<<<<<<<<<<<<
 *     content = []
 *     while 1:
 */
      __pyx_t_4 = PyNumber_Add(__pyx_v_context, __pyx_tuple__93); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF_SET(__pyx_v_context, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":1016
 *         sig = parse_signature(sig_text, name, start)
 *     context = context + ('def',)
 *     content = []             # <<<<<<<<<<<<<<
 *     while 1:
 *         if not tokens:
 */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_content = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":1017
 *     context = context + ('def',)
 *     content = []
 *     while 1:             # <<<<<<<<<<<<<<
 *         if not tokens:
 *             raise TemplateError(
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":1018
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_7 = ((!__pyx_t_6) != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1019
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);

          /* "Cython/Tempita/_tempita.py":1021
 *             raise TemplateError(
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)             # <<<<<<<<<<<<<<
 *         if (isinstance(tokens[0], tuple)
 *             and tokens[0][0] == 'enddef'):
 */
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_start) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":1019
 *     while 1:
 *         if not tokens:
 *             raise TemplateError(             # <<<<<<<<<<<<<<
 *                 'Missing {{enddef}}',
 *                 position=start, name=name)
 */
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__94, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":1022
 *                 '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_3 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = PyTuple_Check(__pyx_t_3); 
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1023
 *                 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_3 = __Pyx_GetItemInt(__pyx_v_tokens, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_enddef, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_8 = __pyx_t_6;
        } else {
          __pyx_t_8 = __pyx_t_7;
        }
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1024
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_n_s_def);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_def);
          __Pyx_GIVEREF(__pyx_n_s_def);
          __Pyx_INCREF(__pyx_v_start);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_start);
          __Pyx_GIVEREF(__pyx_v_start);
          __Pyx_INCREF(__pyx_v_func_name);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_func_name);
          __Pyx_GIVEREF(__pyx_v_func_name);
          __Pyx_INCREF(__pyx_v_sig);
          PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_sig);
          __Pyx_GIVEREF(__pyx_v_sig);
          __Pyx_INCREF(__pyx_v_content);
          PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_content);
          __Pyx_GIVEREF(__pyx_v_content);
          __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_tokens, 1, 0, NULL, NULL, &__pyx_slice__95, 1, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          __pyx_t_2 = 0;
          __pyx_t_3 = 0;
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;
        }

        /* "Cython/Tempita/_tempita.py":1025
 *             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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_expr); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_tokens);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tokens);
        __Pyx_GIVEREF(__pyx_v_tokens);
        __Pyx_INCREF(__pyx_v_name);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_name);
        __Pyx_GIVEREF(__pyx_v_name);
        __Pyx_INCREF(__pyx_v_context);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_context);
        __Pyx_GIVEREF(__pyx_v_context);
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
          PyObject* sequence = __pyx_t_2;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L14_unpacking_done;
          __pyx_L13_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L14_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_next_chunk, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_DECREF_SET(__pyx_v_tokens, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1026
 *             return ('def', start, func_name, sig, content), tokens[1:]
 *         next_chunk, tokens = parse_expr(tokens, name, context)
 *         content.append(next_chunk)             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_content, __pyx_v_next_chunk); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "Cython/Tempita/_tempita.py":998
 * 
 * 
 * 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":1029
 * 
 * 
 * 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 = {__Pyx_NAMESTR("parse_signature"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_37parse_signature, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_signature") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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":1036
 *     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 = {__Pyx_NAMESTR("get_token"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_15parse_signature_1get_token, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __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":1037
 * 
 *     def get_token(pos=False):
 *         try:             # <<<<<<<<<<<<<<
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:
 */
      {
        __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":1038
 *     def get_token(pos=False):
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)             # <<<<<<<<<<<<<<
 *         except StopIteration:
 *             return tokenize.ENDMARKER, ''
 */
          __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_next); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_4);
          if (unlikely(!__pyx_cur_scope->__pyx_v_tokens)) { __Pyx_RaiseClosureNameError("tokens"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_cur_scope->__pyx_v_tokens);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_tokens);
          __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_tokens);
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
            PyObject* sequence = __pyx_t_6;
            #if CYTHON_COMPILING_IN_CPYTHON
            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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            #if CYTHON_COMPILING_IN_CPYTHON
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
              __pyx_t_7 = 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_4 = PyList_GET_ITEM(sequence, 1); 
              __pyx_t_7 = 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_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_9);
            #else
            {
              Py_ssize_t i;
              PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
              for (i=0; i < 5; i++) {
                PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
                __Pyx_GOTREF(item);
                *(temps[i]) = item;
              }
            }
            #endif
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            Py_ssize_t index = -1;
            PyObject** temps[5] = {&__pyx_t_5,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9};
            __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __pyx_L12_unpacking_done:;
          }
          __pyx_v_tok_type = __pyx_t_5;
          __pyx_t_5 = 0;
          __pyx_v_tok_string = __pyx_t_4;
          __pyx_t_4 = 0;
          if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
            PyObject* sequence = __pyx_t_7;
            #if CYTHON_COMPILING_IN_CPYTHON
            Py_ssize_t size = Py_SIZE(sequence);
            #else
            Py_ssize_t size = PySequence_Size(sequence);
            #endif
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            #if CYTHON_COMPILING_IN_CPYTHON
            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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_12);
            #endif
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_CPYTHON
            Py_ssize_t size = Py_SIZE(sequence);
            #else
            Py_ssize_t size = PySequence_Size(sequence);
            #endif
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
            #if CYTHON_COMPILING_IN_CPYTHON
            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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __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;
        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L10_try_end;
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_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_4); __pyx_t_4 = 0;
        __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;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1039
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 *         except StopIteration:             # <<<<<<<<<<<<<<
 *             return tokenize.ENDMARKER, ''
 *         if pos:
 */
        __pyx_t_14 = 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_6, &__pyx_t_9, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GOTREF(__pyx_t_8);

          /* "Cython/Tempita/_tempita.py":1040
 *             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_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
          __Pyx_GOTREF(__pyx_t_7);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_kp_s__9);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_kp_s__9);
          __Pyx_GIVEREF(__pyx_kp_s__9);
          __pyx_t_4 = 0;
          __pyx_r = __pyx_t_7;
          __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L6_except_return;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L4_exception_handled;
        }
        goto __pyx_L5_except_error;
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L4_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        __pyx_L10_try_end:;
      }

      /* "Cython/Tempita/_tempita.py":1041
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_15) {

        /* "Cython/Tempita/_tempita.py":1042
 *             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_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_srow);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_srow);
        __Pyx_GIVEREF(__pyx_v_srow);
        __Pyx_INCREF(__pyx_v_scol);
        PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_scol);
        __Pyx_GIVEREF(__pyx_v_scol);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_erow);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_erow);
        __Pyx_GIVEREF(__pyx_v_erow);
        __Pyx_INCREF(__pyx_v_ecol);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ecol);
        __Pyx_GIVEREF(__pyx_v_ecol);
        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_tok_type);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tok_type);
        __Pyx_GIVEREF(__pyx_v_tok_type);
        __Pyx_INCREF(__pyx_v_tok_string);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_tok_string);
        __Pyx_GIVEREF(__pyx_v_tok_string);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_9);
        __pyx_t_8 = 0;
        __pyx_t_9 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":1044
 *             return tok_type, tok_string, (srow, scol), (erow, ecol)
 *         else:
 *             return tok_type, tok_string             # <<<<<<<<<<<<<<
 *     while 1:
 *         var_arg_type = None
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_v_tok_type);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tok_type);
        __Pyx_GIVEREF(__pyx_v_tok_type);
        __Pyx_INCREF(__pyx_v_tok_string);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_tok_string);
        __Pyx_GIVEREF(__pyx_v_tok_string);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":1036
 *     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":1029
 * 
 * 
 * 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)(PyObject *);
      int __pyx_t_6;
      int __pyx_t_7;
      int __pyx_t_8;
      int __pyx_t_9;
      int __pyx_t_10;
      PyObject *__pyx_t_11 = NULL;
      PyObject *__pyx_t_12 = NULL;
      int __pyx_t_13;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __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_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_cur_scope);

      /* "Cython/Tempita/_tempita.py":1030
 * 
 * def parse_signature(sig_text, name, pos):
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)             # <<<<<<<<<<<<<<
 *     sig_args = []
 *     var_arg = None
 */
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_sig_text);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sig_text);
      __Pyx_GIVEREF(__pyx_v_sig_text);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_readline); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_cur_scope->__pyx_v_tokens = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1031
 * 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_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_sig_args = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1032
 *     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":1033
 *     sig_args = []
 *     var_arg = None
 *     var_kw = None             # <<<<<<<<<<<<<<
 *     defaults = {}
 * 
 */
      __Pyx_INCREF(Py_None);
      __pyx_v_var_kw = Py_None;

      /* "Cython/Tempita/_tempita.py":1034
 *     var_arg = None
 *     var_kw = None
 *     defaults = {}             # <<<<<<<<<<<<<<
 * 
 *     def get_token(pos=False):
 */
      __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_defaults = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1036
 *     defaults = {}
 * 
 *     def get_token(pos=False):             # <<<<<<<<<<<<<<
 *         try:
 *             tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens)
 */
      __pyx_t_3 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__98);
      __pyx_v_get_token = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "Cython/Tempita/_tempita.py":1045
 *         else:
 *             return tok_type, tok_string
 *     while 1:             # <<<<<<<<<<<<<<
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()
 */
      while (1) {

        /* "Cython/Tempita/_tempita.py":1046
 *             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":1047
 *     while 1:
 *         var_arg_type = None
 *         tok_type, tok_string = get_token()             # <<<<<<<<<<<<<<
 *         if tok_type == tokenize.ENDMARKER:
 *             break
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_get_token, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
          PyObject* sequence = __pyx_t_3;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __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_L5_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_L5_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L6_unpacking_done;
          __pyx_L5_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L6_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_tok_type, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_XDECREF_SET(__pyx_v_tok_string, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":1048
 *         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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":1049
 *         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":1050
 *         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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_6) {
          __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__99, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (!__pyx_t_7) {
            __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__100, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_9 = __pyx_t_8;
          } else {
            __pyx_t_9 = __pyx_t_7;
          }
          __pyx_t_7 = __pyx_t_9;
        } else {
          __pyx_t_7 = __pyx_t_6;
        }
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1051
 *             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":1052
 *         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_3 = __Pyx_PyObject_Call(__pyx_v_get_token, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
            PyObject* sequence = __pyx_t_3;
            #if CYTHON_COMPILING_IN_CPYTHON
            Py_ssize_t size = Py_SIZE(sequence);
            #else
            Py_ssize_t size = PySequence_Size(sequence);
            #endif
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            #if CYTHON_COMPILING_IN_CPYTHON
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_4);
            #else
            __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __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_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __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_2 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_2);
            index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_4);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_5 = NULL;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L10_unpacking_done;
            __pyx_L9_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_5 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_L10_unpacking_done:;
          }
          __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_2);
          __pyx_t_2 = 0;
          __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_4);
          __pyx_t_4 = 0;
          goto __pyx_L8;
        }
        __pyx_L8:;

        /* "Cython/Tempita/_tempita.py":1053
 *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1054
 *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);

          /* "Cython/Tempita/_tempita.py":1055
 *         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()
 */
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":1054
 *             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_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":1056
 *             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":1057
 *                                 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_1 = __Pyx_PyObject_Call(__pyx_v_get_token, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          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_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
          index = 0; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_4);
          index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L12_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_2);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_5 = NULL;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          goto __pyx_L13_unpacking_done;
          __pyx_L12_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L13_unpacking_done:;
        }
        __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_4);
        __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "Cython/Tempita/_tempita.py":1058
 *         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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __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_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (!__pyx_t_7) {
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_6) {
            __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__71, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_8 = __pyx_t_9;
          } else {
            __pyx_t_8 = __pyx_t_6;
          }
          __pyx_t_6 = __pyx_t_8;
        } else {
          __pyx_t_6 = __pyx_t_7;
        }
        if (__pyx_t_6) {

          /* "Cython/Tempita/_tempita.py":1059
 *         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_6 = (__Pyx_PyString_Equals(__pyx_v_var_arg_type, __pyx_kp_s__99, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_6) {

            /* "Cython/Tempita/_tempita.py":1060
 *         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);
            goto __pyx_L15;
          }

          /* "Cython/Tempita/_tempita.py":1061
 *             if var_arg_type == '*':
 *                 var_arg = var_name
 *             elif var_arg_type == '**':             # <<<<<<<<<<<<<<
 *                 var_kw = var_name
 *             else:
 */
          __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_var_arg_type, __pyx_kp_s__100, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (__pyx_t_6) {

            /* "Cython/Tempita/_tempita.py":1062
 *                 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);
            goto __pyx_L15;
          }
          /*else*/ {

            /* "Cython/Tempita/_tempita.py":1064
 *                 var_kw = var_name
 *             else:
 *                 sig_args.append(var_name)             # <<<<<<<<<<<<<<
 *             if tok_type == tokenize.ENDMARKER:
 *                 break
 */
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_sig_args, __pyx_v_var_name); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_L15:;

          /* "Cython/Tempita/_tempita.py":1065
 *             else:
 *                 sig_args.append(var_name)
 *             if tok_type == tokenize.ENDMARKER:             # <<<<<<<<<<<<<<
 *                 break
 *             continue
 */
          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (__pyx_t_6) {

            /* "Cython/Tempita/_tempita.py":1066
 *                 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":1067
 *             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":1068
 *                 break
 *             continue
 *         if var_arg_type is not None:             # <<<<<<<<<<<<<<
 *             raise TemplateError('Invalid signature: (%s)' % sig_text,
 *                                 position=pos, name=name)
 */
        __pyx_t_6 = (__pyx_v_var_arg_type != Py_None);
        __pyx_t_7 = (__pyx_t_6 != 0);
        if (__pyx_t_7) {

          /* "Cython/Tempita/_tempita.py":1069
 *             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_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);

          /* "Cython/Tempita/_tempita.py":1070
 *         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
 */
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

          /* "Cython/Tempita/_tempita.py":1069
 *             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_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_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_filename = __pyx_f[0]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "Cython/Tempita/_tempita.py":1071
 *             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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_7) {
          __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__77, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = __pyx_t_6;
        } else {
          __pyx_t_8 = __pyx_t_7;
        }
        if (__pyx_t_8) {

          /* "Cython/Tempita/_tempita.py":1072
 *                                 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":1073
 *         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":1074
 *             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":1075
 *             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":1076
 *             nest_count = 0
 *             start_pos = end_pos = None
 *             parts = []             # <<<<<<<<<<<<<<
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)
 */
          __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_parts, ((PyObject*)__pyx_t_3));
          __pyx_t_3 = 0;

          /* "Cython/Tempita/_tempita.py":1077
 *             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":1078
 *             parts = []
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)             # <<<<<<<<<<<<<<
 *                 if start_pos is None:
 *                     start_pos = s
 */
            __pyx_t_3 = __pyx_pf_6Cython_7Tempita_8_tempita_15parse_signature_get_token(__pyx_v_get_token, Py_True); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
              PyObject* sequence = __pyx_t_3;
              #if CYTHON_COMPILING_IN_CPYTHON
              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_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              }
              #if CYTHON_COMPILING_IN_CPYTHON
              if (likely(PyTuple_CheckExact(sequence))) {
                __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
                __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
                __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); 
                __pyx_t_11 = PyTuple_GET_ITEM(sequence, 3); 
              } else {
                __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
                __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
                __pyx_t_1 = PyList_GET_ITEM(sequence, 2); 
                __pyx_t_11 = PyList_GET_ITEM(sequence, 3); 
              }
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_11);
              #else
              {
                Py_ssize_t i;
                PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_4,&__pyx_t_1,&__pyx_t_11};
                for (i=0; i < 4; i++) {
                  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __Pyx_GOTREF(item);
                  *(temps[i]) = item;
                }
              }
              #endif
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            } else {
              Py_ssize_t index = -1;
              PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_4,&__pyx_t_1,&__pyx_t_11};
              __pyx_t_12 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_5 = Py_TYPE(__pyx_t_12)->tp_iternext;
              for (index=0; index < 4; index++) {
                PyObject* item = __pyx_t_5(__pyx_t_12); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
                __Pyx_GOTREF(item);
                *(temps[index]) = item;
              }
              if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_12), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_5 = NULL;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              goto __pyx_L22_unpacking_done;
              __pyx_L21_unpacking_failed:;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_5 = NULL;
              if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_L22_unpacking_done:;
            }
            __Pyx_DECREF_SET(__pyx_v_tok_type, __pyx_t_2);
            __pyx_t_2 = 0;
            __Pyx_DECREF_SET(__pyx_v_tok_string, __pyx_t_4);
            __pyx_t_4 = 0;
            __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_1);
            __pyx_t_1 = 0;
            __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_11);
            __pyx_t_11 = 0;

            /* "Cython/Tempita/_tempita.py":1079
 *             while 1:
 *                 tok_type, tok_string, s, e = get_token(True)
 *                 if start_pos is None:             # <<<<<<<<<<<<<<
 *                     start_pos = s
 *                 end_pos = e
 */
            __pyx_t_8 = (__pyx_v_start_pos == Py_None);
            __pyx_t_7 = (__pyx_t_8 != 0);
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":1080
 *                 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);
              goto __pyx_L23;
            }
            __pyx_L23:;

            /* "Cython/Tempita/_tempita.py":1081
 *                 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":1082
 *                     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_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (__pyx_t_7) {
              __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_6 = __pyx_t_8;
            } else {
              __pyx_t_6 = __pyx_t_7;
            }
            if (__pyx_t_6) {

              /* "Cython/Tempita/_tempita.py":1083
 *                 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_GetModuleGlobalName(__pyx_n_s_TemplateError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_11 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_signature_s, __pyx_v_sig_text); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_11);
              __pyx_t_11 = 0;
              __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);

              /* "Cython/Tempita/_tempita.py":1084
 *                 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 == ','))):
 */
              if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_position, __pyx_v_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

              /* "Cython/Tempita/_tempita.py":1083
 *                 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_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_Raise(__pyx_t_4, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }

            /* "Cython/Tempita/_tempita.py":1085
 *                     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_6 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_7 = (!__pyx_t_6);
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":1086
 *                                         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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ENDMARKER); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __pyx_t_4 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (!__pyx_t_6) {
                __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_GOTREF(__pyx_t_4);
                __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_OP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                __pyx_t_4 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (__pyx_t_8) {
                  __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_tok_string, __pyx_kp_s__71, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __pyx_t_13 = __pyx_t_9;
                } else {
                  __pyx_t_13 = __pyx_t_8;
                }
                __pyx_t_8 = __pyx_t_13;
              } else {
                __pyx_t_8 = __pyx_t_6;
              }
              __pyx_t_6 = __pyx_t_8;
            } else {
              __pyx_t_6 = __pyx_t_7;
            }
            if (__pyx_t_6) {

              /* "Cython/Tempita/_tempita.py":1087
 *                 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_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_isolate_expression); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_4);
              __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_INCREF(__pyx_v_sig_text);
              PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_sig_text);
              __Pyx_GIVEREF(__pyx_v_sig_text);
              __Pyx_INCREF(__pyx_v_start_pos);
              PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_start_pos);
              __Pyx_GIVEREF(__pyx_v_start_pos);
              __Pyx_INCREF(__pyx_v_end_pos);
              PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_end_pos);
              __Pyx_GIVEREF(__pyx_v_end_pos);
              __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF_SET(__pyx_v_default_expr, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "Cython/Tempita/_tempita.py":1088
 *                     (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_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

              /* "Cython/Tempita/_tempita.py":1089
 *                     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_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

              /* "Cython/Tempita/_tempita.py":1090
 *                     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_L20_break;
            }

            /* "Cython/Tempita/_tempita.py":1091
 *                     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_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_INCREF(__pyx_v_tok_type);
            PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tok_type);
            __Pyx_GIVEREF(__pyx_v_tok_type);
            __Pyx_INCREF(__pyx_v_tok_string);
            PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tok_string);
            __Pyx_GIVEREF(__pyx_v_tok_string);
            __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "Cython/Tempita/_tempita.py":1092
 *                     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_6 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            if (__pyx_t_6) {
              __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (__pyx_t_7) {
                __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_string, __pyx_v_nest_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_13 = __pyx_t_8;
              } else {
                __pyx_t_13 = __pyx_t_7;
              }
              __pyx_t_7 = __pyx_t_13;
            } else {
              __pyx_t_7 = __pyx_t_6;
            }
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":1093
 *                 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_1 = PyNumber_InPlaceAdd(__pyx_v_nest_count, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF_SET(__pyx_v_nest_count, __pyx_t_1);
              __pyx_t_1 = 0;
              goto __pyx_L26;
            }

            /* "Cython/Tempita/_tempita.py":1094
 *                 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_7 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            if (__pyx_t_7) {
              __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (__pyx_t_6) {
                __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_string, __pyx_v_unnest_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_8 = __pyx_t_13;
              } else {
                __pyx_t_8 = __pyx_t_6;
              }
              __pyx_t_6 = __pyx_t_8;
            } else {
              __pyx_t_6 = __pyx_t_7;
            }
            if (__pyx_t_6) {

              /* "Cython/Tempita/_tempita.py":1095
 *                     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_1 = PyNumber_InPlaceSubtract(__pyx_v_nest_count, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF_SET(__pyx_v_nest_count, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "Cython/Tempita/_tempita.py":1096
 *                 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_6 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_7 = ((!__pyx_t_6) != 0);
              if (__pyx_t_7) {

                /* "Cython/Tempita/_tempita.py":1097
 *                     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);
                goto __pyx_L27;
              }
              __pyx_L27:;
              goto __pyx_L26;
            }

            /* "Cython/Tempita/_tempita.py":1098
 *                     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_7 = __Pyx_PyObject_IsTrue(__pyx_v_nest_count); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            __pyx_t_6 = (!__pyx_t_7);
            if (__pyx_t_6) {
              __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tokenize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_OP); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = PyObject_RichCompare(__pyx_v_tok_type, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (__pyx_t_7) {
                __Pyx_INCREF(__pyx_v_tok_string);
                __pyx_t_1 = __pyx_v_tok_string;
                __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__70, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                if (!__pyx_t_8) {
                  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__101, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __pyx_t_9 = __pyx_t_13;
                } else {
                  __pyx_t_9 = __pyx_t_8;
                }
                if (!__pyx_t_9) {
                  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__102, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
                  __pyx_t_13 = __pyx_t_8;
                } else {
                  __pyx_t_13 = __pyx_t_9;
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                __pyx_t_9 = __pyx_t_13;
                __pyx_t_13 = __pyx_t_9;
              } else {
                __pyx_t_13 = __pyx_t_7;
              }
              __pyx_t_7 = __pyx_t_13;
            } else {
              __pyx_t_7 = __pyx_t_6;
            }
            if (__pyx_t_7) {

              /* "Cython/Tempita/_tempita.py":1099
 *                         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":1100
 *                 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":1101
 *                     nest_type = tok_string
 *                     nest_count = 1
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]             # <<<<<<<<<<<<<<
 *     return sig_args, var_arg, var_kw, defaults
 * 
 */
              __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __Pyx_GOTREF(__pyx_t_1);
              if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__70, __pyx_kp_s__89) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__101, __pyx_kp_s__103) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__102, __pyx_kp_s__104) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
              __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_t_1, __pyx_v_nest_type); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF_SET(__pyx_v_unnest_type, __pyx_t_11);
              __pyx_t_11 = 0;
              goto __pyx_L26;
            }
            __pyx_L26:;
          }
          __pyx_L20_break:;
          goto __pyx_L18;
        }
        __pyx_L18:;
        __pyx_L3_continue:;
      }
      __pyx_L4_break:;

      /* "Cython/Tempita/_tempita.py":1102
 *                     nest_count = 1
 *                     unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type]
 *     return sig_args, var_arg, var_kw, defaults             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_v_sig_args);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_sig_args);
      __Pyx_GIVEREF(__pyx_v_sig_args);
      __Pyx_INCREF(__pyx_v_var_arg);
      PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_var_arg);
      __Pyx_GIVEREF(__pyx_v_var_arg);
      __Pyx_INCREF(__pyx_v_var_kw);
      PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_v_var_kw);
      __Pyx_GIVEREF(__pyx_v_var_kw);
      __Pyx_INCREF(__pyx_v_defaults);
      PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_v_defaults);
      __Pyx_GIVEREF(__pyx_v_defaults);
      __pyx_r = __pyx_t_11;
      __pyx_t_11 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":1029
 * 
 * 
 * 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_11);
      __Pyx_XDECREF(__pyx_t_12);
      __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":1105
 * 
 * 
 * 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 = {__Pyx_NAMESTR("isolate_expression"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_39isolate_expression, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isolate_expression") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_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_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("isolate_expression", 0);

      /* "Cython/Tempita/_tempita.py":1106
 * 
 * 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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __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":1107
 * def isolate_expression(string, start_pos, end_pos):
 *     srow, scol = start_pos
 *     srow -= 1             # <<<<<<<<<<<<<<
 *     erow, ecol = end_pos
 *     erow -= 1
 */
      __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_srow, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __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":1108
 *     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_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __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":1109
 *     srow -= 1
 *     erow, ecol = end_pos
 *     erow -= 1             # <<<<<<<<<<<<<<
 *     lines = string.splitlines(True)
 *     if srow == erow:
 */
      __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_erow, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __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":1110
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __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":1111
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":1112
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;
      }

      /* "Cython/Tempita/_tempita.py":1113
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_v_parts = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1114
 *         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 = PyNumber_Add(__pyx_v_srow, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "Cython/Tempita/_tempita.py":1115
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "Cython/Tempita/_tempita.py":1117
 *     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 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_2); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "Cython/Tempita/_tempita.py":1118
 *         # 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_filename = __pyx_f[0]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "Cython/Tempita/_tempita.py":1105
 * 
 * 
 * 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":1128
 * 
 * 
 * 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 = {__Pyx_NAMESTR("fill_command"), (PyCFunction)__pyx_pw_6Cython_7Tempita_8_tempita_41fill_command, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(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;
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 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_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __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)(PyObject *);
      Py_ssize_t __pyx_t_9;
      PyObject *(*__pyx_t_10)(PyObject *);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;
      __Pyx_RefNannySetupContext("fill_command", 0);
      __Pyx_INCREF(__pyx_v_args);

      /* "Cython/Tempita/_tempita.py":1129
 * 
 * def fill_command(args=None):
 *     import sys             # <<<<<<<<<<<<<<
 *     import optparse
 *     import pkg_resources
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_sys = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1130
 * def fill_command(args=None):
 *     import sys
 *     import optparse             # <<<<<<<<<<<<<<
 *     import pkg_resources
 *     import os
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_optparse, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_optparse = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1131
 *     import sys
 *     import optparse
 *     import pkg_resources             # <<<<<<<<<<<<<<
 *     import os
 *     if args is None:
 */
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_pkg_resources, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_pkg_resources = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1132
 *     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, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_os = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1133
 *     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":1134
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __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;
        goto __pyx_L3;
      }
      __pyx_L3:;

      /* "Cython/Tempita/_tempita.py":1135
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __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":1136
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);

      /* "Cython/Tempita/_tempita.py":1137
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),             # <<<<<<<<<<<<<<
 *         usage=_fill_command_usage)
 *     parser.add_option(
 */
      __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_coerce_text); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_v_dist);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_dist);
      __Pyx_GIVEREF(__pyx_v_dist);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_version, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":1138
 *     parser = optparse.OptionParser(
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)             # <<<<<<<<<<<<<<
 *     parser.add_option(
 *         '-o', '--output',
 */
      __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_fill_command_usage); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_usage, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":1136
 *         args = sys.argv[1:]
 *     dist = pkg_resources.get_distribution('Paste')
 *     parser = optparse.OptionParser(             # <<<<<<<<<<<<<<
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_parser = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":1139
 *         version=coerce_text(dist),
 *         usage=_fill_command_usage)
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '-o', '--output',
 *         dest='output',
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_option); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_metavar, __pyx_n_s_FILENAME) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_help, __pyx_kp_s_File_to_write_output_to_default) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__108, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1144
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_action, __pyx_n_s_store_true) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_help, __pyx_kp_s_Use_HTML_style_filling_including) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__109, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":1149
 *         action='store_true',
 *         help="Use HTML style filling (including automatic HTML quoting)")
 *     parser.add_option(             # <<<<<<<<<<<<<<
 *         '--env',
 *         dest='use_env',
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_add_option); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_action, __pyx_n_s_store_true) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__110, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1154
 *         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_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_parse_args); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_args);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
        PyObject* sequence = __pyx_t_7;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_8 = 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_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __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_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1155
 *         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_9 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_3 = ((__pyx_t_9 < 1) != 0);
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":1156
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "Cython/Tempita/_tempita.py":1157
 *     if len(args) < 1:
 *         print('You must give a template filename')
 *         sys.exit(2)             # <<<<<<<<<<<<<<
 *     template_name = args[0]
 *     args = args[1:]
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_exit); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__111, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "Cython/Tempita/_tempita.py":1158
 *         print('You must give a template filename')
 *         sys.exit(2)
 *     template_name = args[0]             # <<<<<<<<<<<<<<
 *     args = args[1:]
 *     vars = {}
 */
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_template_name = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1159
 *         sys.exit(2)
 *     template_name = args[0]
 *     args = args[1:]             # <<<<<<<<<<<<<<
 *     vars = {}
 *     if options.use_env:
 */
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_args, 1, 0, NULL, NULL, &__pyx_slice__112, 1, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1160
 *     template_name = args[0]
 *     args = args[1:]
 *     vars = {}             # <<<<<<<<<<<<<<
 *     if options.use_env:
 *         vars.update(os.environ)
 */
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_vars = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1161
 *     args = args[1:]
 *     vars = {}
 *     if options.use_env:             # <<<<<<<<<<<<<<
 *         vars.update(os.environ)
 *     for value in args:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_use_env); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_3) {

        /* "Cython/Tempita/_tempita.py":1162
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_os, __pyx_n_s_environ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L7;
      }
      __pyx_L7:;

      /* "Cython/Tempita/_tempita.py":1163
 *     if options.use_env:
 *         vars.update(os.environ)
 *     for value in args:             # <<<<<<<<<<<<<<
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 */
      if (PyList_CheckExact(__pyx_v_args) || PyTuple_CheckExact(__pyx_v_args)) {
        __pyx_t_7 = __pyx_v_args; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext;
      }
      for (;;) {
        if (!__pyx_t_10 && PyList_CheckExact(__pyx_t_7)) {
          if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else if (!__pyx_t_10 && PyTuple_CheckExact(__pyx_t_7)) {
          if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #endif
        } else {
          __pyx_t_4 = __pyx_t_10(__pyx_t_7);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1164
 *         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_Contains(__pyx_kp_s__77, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = (__pyx_t_3 != 0);
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":1165
 *     for value in args:
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)             # <<<<<<<<<<<<<<
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 */
          __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Bad_argument_r, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          if (__Pyx_PrintOne(0, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "Cython/Tempita/_tempita.py":1166
 *         if '=' not in value:
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)             # <<<<<<<<<<<<<<
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 */
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "Cython/Tempita/_tempita.py":1167
 *             print('Bad argument: %r' % value)
 *             sys.exit(2)
 *         name, value = value.split('=', 1)             # <<<<<<<<<<<<<<
 *         if name.startswith('py:'):
 *             name = name[:3]
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__114, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
          PyObject* sequence = __pyx_t_4;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 2)) {
            if (size > 2) __Pyx_RaiseTooManyValuesError(2);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __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_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
          index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_6);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_t_8 = 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_8 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __pyx_L12_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "Cython/Tempita/_tempita.py":1168
 *             sys.exit(2)
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):             # <<<<<<<<<<<<<<
 *             name = name[:3]
 *             value = eval(value)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_2) {

          /* "Cython/Tempita/_tempita.py":1169
 *         name, value = value.split('=', 1)
 *         if name.startswith('py:'):
 *             name = name[:3]             # <<<<<<<<<<<<<<
 *             value = eval(value)
 *         vars[name] = value
 */
          __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_name, 0, 3, NULL, NULL, &__pyx_slice__116, 0, 1, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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":1170
 *         if name.startswith('py:'):
 *             name = name[:3]
 *             value = eval(value)             # <<<<<<<<<<<<<<
 *         vars[name] = value
 *     if template_name == '-':
 */
          __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_v_TemplateClass) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_TemplateClass, __pyx_v_TemplateClass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_args) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_args, __pyx_v_args) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_dist) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dist, __pyx_v_dist) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_f) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_name) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_name, __pyx_v_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_options) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_options, __pyx_v_options) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_optparse) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_optparse, __pyx_v_optparse) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_os) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_os, __pyx_v_os) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_parser) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parser, __pyx_v_parser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_pkg_resources) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_pkg_resources, __pyx_v_pkg_resources) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_result) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_result, __pyx_v_result) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_sys) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sys, __pyx_v_sys) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_template) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_template, __pyx_v_template) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_template_content) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_template_content, __pyx_v_template_content) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_template_name) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_template_name_2, __pyx_v_template_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_value) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_value, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          if (__pyx_v_vars) {
            if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_vars, __pyx_v_vars) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_6 = 0;
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
          __pyx_t_4 = 0;
          goto __pyx_L13;
        }
        __pyx_L13:;

        /* "Cython/Tempita/_tempita.py":1171
 *             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_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "Cython/Tempita/_tempita.py":1172
 *             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_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1173
 *         vars[name] = value
 *     if template_name == '-':
 *         template_content = sys.stdin.read()             # <<<<<<<<<<<<<<
 *         template_name = '<stdin>'
 *     else:
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_stdin); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_template_content = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":1174
 *     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);
        goto __pyx_L14;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":1176
 *         template_name = '<stdin>'
 *     else:
 *         f = open(template_name, 'rb')             # <<<<<<<<<<<<<<
 *         template_content = f.read()
 *         f.close()
 */
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_template_name);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_template_name);
        __Pyx_GIVEREF(__pyx_v_template_name);
        __Pyx_INCREF(__pyx_n_s_rb);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_rb);
        __Pyx_GIVEREF(__pyx_n_s_rb);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_v_f = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1177
 *     else:
 *         f = open(template_name, 'rb')
 *         template_content = f.read()             # <<<<<<<<<<<<<<
 *         f.close()
 *     if options.use_html:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_template_content = __pyx_t_7;
        __pyx_t_7 = 0;

        /* "Cython/Tempita/_tempita.py":1178
 *         f = open(template_name, 'rb')
 *         template_content = f.read()
 *         f.close()             # <<<<<<<<<<<<<<
 *     if options.use_html:
 *         TemplateClass = HTMLTemplate
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L14:;

      /* "Cython/Tempita/_tempita.py":1179
 *         template_content = f.read()
 *         f.close()
 *     if options.use_html:             # <<<<<<<<<<<<<<
 *         TemplateClass = HTMLTemplate
 *     else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_use_html); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1180
 *         f.close()
 *     if options.use_html:
 *         TemplateClass = HTMLTemplate             # <<<<<<<<<<<<<<
 *     else:
 *         TemplateClass = Template
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTMLTemplate); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_TemplateClass = __pyx_t_4;
        __pyx_t_4 = 0;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":1182
 *         TemplateClass = HTMLTemplate
 *     else:
 *         TemplateClass = Template             # <<<<<<<<<<<<<<
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)
 */
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_TemplateClass = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L15:;

      /* "Cython/Tempita/_tempita.py":1183
 *     else:
 *         TemplateClass = Template
 *     template = TemplateClass(template_content, name=template_name)             # <<<<<<<<<<<<<<
 *     result = template.substitute(vars)
 *     if options.output:
 */
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_template_content);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_template_content);
      __Pyx_GIVEREF(__pyx_v_template_content);
      __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_name, __pyx_v_template_name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_TemplateClass, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_template = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "Cython/Tempita/_tempita.py":1184
 *         TemplateClass = Template
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)             # <<<<<<<<<<<<<<
 *     if options.output:
 *         f = open(options.output, 'wb')
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_template, __pyx_n_s_substitute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_vars);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_vars);
      __Pyx_GIVEREF(__pyx_v_vars);
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_result = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "Cython/Tempita/_tempita.py":1185
 *     template = TemplateClass(template_content, name=template_name)
 *     result = template.substitute(vars)
 *     if options.output:             # <<<<<<<<<<<<<<
 *         f = open(options.output, 'wb')
 *         f.write(result)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_output_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {

        /* "Cython/Tempita/_tempita.py":1186
 *     result = template.substitute(vars)
 *     if options.output:
 *         f = open(options.output, 'wb')             # <<<<<<<<<<<<<<
 *         f.write(result)
 *         f.close()
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_output_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_n_s_wb);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_wb);
        __Pyx_GIVEREF(__pyx_n_s_wb);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "Cython/Tempita/_tempita.py":1187
 *     if options.output:
 *         f = open(options.output, 'wb')
 *         f.write(result)             # <<<<<<<<<<<<<<
 *         f.close()
 *     else:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_result);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result);
        __Pyx_GIVEREF(__pyx_v_result);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "Cython/Tempita/_tempita.py":1188
 *         f = open(options.output, 'wb')
 *         f.write(result)
 *         f.close()             # <<<<<<<<<<<<<<
 *     else:
 *         sys.stdout.write(result)
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L16;
      }
      /*else*/ {

        /* "Cython/Tempita/_tempita.py":1190
 *         f.close()
 *     else:
 *         sys.stdout.write(result)             # <<<<<<<<<<<<<<
 * 
 * if __name__ == '__main__':
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_stdout); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_v_result);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result);
        __Pyx_GIVEREF(__pyx_v_result);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L16:;

      /* "Cython/Tempita/_tempita.py":1128
 * 
 * 
 * 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_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 (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 ((__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)
      __Pyx_NAMESTR("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*/
      #else
      0, /*reserved*/
      #endif
      0, /*tp_repr*/
      0, /*tp_as_number*/
      0, /*tp_as_sequence*/
      0, /*tp_as_mapping*/
      0, /*tp_hash*/
      0, /*tp_call*/
      0, /*tp_str*/
      0, /*tp_getattro*/
      0, /*tp_setattro*/
      0, /*tp_as_buffer*/
      Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
      0, /*tp_doc*/
      __pyx_tp_traverse_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*/
      #if PY_VERSION_HEX >= 0x02060000
      0, /*tp_version_tag*/
      #endif
      #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
        __Pyx_NAMESTR("_tempita"),
        __Pyx_DOCSTR(__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__looper, __pyx_k_Cython_Tempita__looper, sizeof(__pyx_k_Cython_Tempita__looper), 0, 0, 1, 1},
  {&__pyx_n_s_Cython_Tempita__tempita, __pyx_k_Cython_Tempita__tempita, sizeof(__pyx_k_Cython_Tempita__tempita), 0, 0, 1, 1},
  {&__pyx_n_s_Cython_Tempita_compat3, __pyx_k_Cython_Tempita_compat3, sizeof(__pyx_k_Cython_Tempita_compat3), 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_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 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_kp_s_Users_robertwb_sage_cython_cyth, __pyx_k_Users_robertwb_sage_cython_cyth, sizeof(__pyx_k_Users_robertwb_sage_cython_cyth), 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_cStringIO, __pyx_k_cStringIO, sizeof(__pyx_k_cStringIO), 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_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_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 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_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 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_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_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_640, __pyx_k_lex_line_640, sizeof(__pyx_k_lex_line_640), 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_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_777, __pyx_k_parse_line_777, sizeof(__pyx_k_parse_line_777), 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_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 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_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_709, __pyx_k_trim_lex_line_709, sizeof(__pyx_k_trim_lex_line_709), 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_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_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "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_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__14);
  __Pyx_GIVEREF(__pyx_slice__14);

  /* "Cython/Tempita/_tempita.py":452
 *         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_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "Cython/Tempita/_tempita.py":453
 *     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_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "Cython/Tempita/_tempita.py":458
 *     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_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "Cython/Tempita/_tempita.py":465
 *     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_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "Cython/Tempita/_tempita.py":476
 *         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_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "Cython/Tempita/_tempita.py":477
 *             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_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__21);
  __Pyx_GIVEREF(__pyx_slice__21);

  /* "Cython/Tempita/_tempita.py":673
 *                                       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_filename = __pyx_f[0]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "Cython/Tempita/_tempita.py":840
 * 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_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__25);
  __Pyx_GIVEREF(__pyx_slice__25);

  /* "Cython/Tempita/_tempita.py":843
 *     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_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "Cython/Tempita/_tempita.py":844
 *     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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "Cython/Tempita/_tempita.py":845
 *     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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "Cython/Tempita/_tempita.py":846
 *         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_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "Cython/Tempita/_tempita.py":848
 *             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_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "Cython/Tempita/_tempita.py":849
 *             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_filename = __pyx_f[0]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "Cython/Tempita/_tempita.py":853
 *         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_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "Cython/Tempita/_tempita.py":856
 *                     '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_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__38);
  __Pyx_GIVEREF(__pyx_slice__38);

  /* "Cython/Tempita/_tempita.py":859
 *     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_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "Cython/Tempita/_tempita.py":862
 *                 '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_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__40);
  __Pyx_GIVEREF(__pyx_slice__40);

  /* "Cython/Tempita/_tempita.py":863
 *                 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_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "Cython/Tempita/_tempita.py":865
 *     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_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "Cython/Tempita/_tempita.py":878
 *             '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_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "Cython/Tempita/_tempita.py":880
 *     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_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "Cython/Tempita/_tempita.py":882
 *     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_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "Cython/Tempita/_tempita.py":884
 *     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_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "Cython/Tempita/_tempita.py":886
 *     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_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "Cython/Tempita/_tempita.py":887
 *         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_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__49);
  __Pyx_GIVEREF(__pyx_slice__49);

  /* "Cython/Tempita/_tempita.py":888
 *     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_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__50);
  __Pyx_GIVEREF(__pyx_slice__50);

  /* "Cython/Tempita/_tempita.py":894
 *     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_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "Cython/Tempita/_tempita.py":897
 *     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_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "Cython/Tempita/_tempita.py":902
 *         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_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);

  /* "Cython/Tempita/_tempita.py":908
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__54);
  __Pyx_GIVEREF(__pyx_slice__54);

  /* "Cython/Tempita/_tempita.py":910
 *     (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_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "Cython/Tempita/_tempita.py":911
 *     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_filename = __pyx_f[0]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__57);
  __Pyx_GIVEREF(__pyx_slice__57);

  /* "Cython/Tempita/_tempita.py":912
 *     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_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "Cython/Tempita/_tempita.py":913
 *         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_filename = __pyx_f[0]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__59);
  __Pyx_GIVEREF(__pyx_slice__59);

  /* "Cython/Tempita/_tempita.py":914
 *     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_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "Cython/Tempita/_tempita.py":915
 *         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_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__61);
  __Pyx_GIVEREF(__pyx_slice__61);

  /* "Cython/Tempita/_tempita.py":922
 *     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_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "Cython/Tempita/_tempita.py":927
 *         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_filename = __pyx_f[0]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "Cython/Tempita/_tempita.py":936
 * 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_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__64);
  __Pyx_GIVEREF(__pyx_slice__64);

  /* "Cython/Tempita/_tempita.py":937
 *     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_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "Cython/Tempita/_tempita.py":939
 *     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_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "Cython/Tempita/_tempita.py":940
 *     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_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "Cython/Tempita/_tempita.py":941
 *     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_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__68);
  __Pyx_GIVEREF(__pyx_slice__68);

  /* "Cython/Tempita/_tempita.py":942
 *     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_filename = __pyx_f[0]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__69);
  __Pyx_GIVEREF(__pyx_slice__69);

  /* "Cython/Tempita/_tempita.py":954
 *             % 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_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "Cython/Tempita/_tempita.py":959
 *     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_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "Cython/Tempita/_tempita.py":964
 *         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_filename = __pyx_f[0]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__74);
  __Pyx_GIVEREF(__pyx_slice__74);

  /* "Cython/Tempita/_tempita.py":971
 * 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_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "Cython/Tempita/_tempita.py":972
 *     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_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "Cython/Tempita/_tempita.py":973
 *     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_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "Cython/Tempita/_tempita.py":980
 *     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_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "Cython/Tempita/_tempita.py":988
 *             % 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_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__80);
  __Pyx_GIVEREF(__pyx_slice__80);

  /* "Cython/Tempita/_tempita.py":993
 * 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_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "Cython/Tempita/_tempita.py":994
 *     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_filename = __pyx_f[0]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "Cython/Tempita/_tempita.py":995
 *     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_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__83);
  __Pyx_GIVEREF(__pyx_slice__83);

  /* "Cython/Tempita/_tempita.py":1000
 * 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_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__84);
  __Pyx_GIVEREF(__pyx_slice__84);

  /* "Cython/Tempita/_tempita.py":1001
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);

  /* "Cython/Tempita/_tempita.py":1002
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "Cython/Tempita/_tempita.py":1003
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "Cython/Tempita/_tempita.py":1004
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__88);
  __Pyx_GIVEREF(__pyx_slice__88);

  /* "Cython/Tempita/_tempita.py":1008
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "Cython/Tempita/_tempita.py":1012
 *                             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_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__91);
  __Pyx_GIVEREF(__pyx_slice__91);

  /* "Cython/Tempita/_tempita.py":1013
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "Cython/Tempita/_tempita.py":1015
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "Cython/Tempita/_tempita.py":1019
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "Cython/Tempita/_tempita.py":1024
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__95);
  __Pyx_GIVEREF(__pyx_slice__95);

  /* "Cython/Tempita/_tempita.py":1036
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_get_token, 1036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__98 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "Cython/Tempita/_tempita.py":1110
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "Cython/Tempita/_tempita.py":1134
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__106);
  __Pyx_GIVEREF(__pyx_slice__106);

  /* "Cython/Tempita/_tempita.py":1135
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "Cython/Tempita/_tempita.py":1139
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);

  /* "Cython/Tempita/_tempita.py":1144
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "Cython/Tempita/_tempita.py":1149
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "Cython/Tempita/_tempita.py":1157
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);

  /* "Cython/Tempita/_tempita.py":1159
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_slice__112);
  __Pyx_GIVEREF(__pyx_slice__112);

  /* "Cython/Tempita/_tempita.py":1166
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "Cython/Tempita/_tempita.py":1167
 *             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_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);

  /* "Cython/Tempita/_tempita.py":1168
 *             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_filename = __pyx_f[0]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);

  /* "Cython/Tempita/_tempita.py":1169
 *         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_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__121 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__121)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_str, 64, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_get_file_template, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_from_filename, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);
  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_substitute, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret, 186, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret_inherit, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret_codes, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret_code, 220, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret_for, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_interpret_if, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__149 = PyTuple_Pack(9, __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_exc_info, __pyx_n_s_arg0); if (unlikely(!__pyx_tuple__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_eval_2, 296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":315
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__151 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_ns, __pyx_n_s_pos, __pyx_n_s_traceback_hide, __pyx_n_s_exc_info, __pyx_n_s_e); if (unlikely(!__pyx_tuple__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_exec, 315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":328
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_tuple__153 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_value, __pyx_n_s_pos, __pyx_n_s_traceback_hide, __pyx_n_s_exc_info, __pyx_n_s_e); if (unlikely(!__pyx_tuple__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr, 328, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":372
 *             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_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_add_line_info, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_sub, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__159 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__159)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "Cython/Tempita/_tempita.py":386
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_paste_script_template_renderer, 386, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__162 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__162)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "Cython/Tempita/_tempita.py":393
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.iteritems():
 *             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_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 393, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":397
 *             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_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_setattr, 397, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":400
 *         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_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_getattr, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":406
 *             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_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_getitem, 406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":415
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         items = [
 *             (k, v) for k, v in self.iteritems()]
 */
  __pyx_tuple__171 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_items, __pyx_n_s_k, __pyx_n_s_v); if (unlikely(!__pyx_tuple__171)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":430
 * 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_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":433
 *         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_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_str, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":436
 *         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_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_html, 436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":439
 *         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_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__179);
  __Pyx_GIVEREF(__pyx_tuple__179);
  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":444
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_html_quote, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__183 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__183)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__183);
  __Pyx_GIVEREF(__pyx_tuple__183);

  /* "Cython/Tempita/_tempita.py":462
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_url, 462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":469
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     kw = list(kw.iteritems())
 *     kw.sort()
 */
  __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_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_attr, 469, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":492
 *         ))
 * 
 *     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_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr, 492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":505
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_sub_html, 505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":512
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__194 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__194)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);

  /* "Cython/Tempita/_tempita.py":522
 *         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_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":527
 *             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_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_robertwb_sage_cython_cyth, __pyx_n_s_str, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":530
 *         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_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_call, 530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":541
 *         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_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_get_2, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__203 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__203)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);

  /* "Cython/Tempita/_tempita.py":548
 *             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_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_signature, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":590
 * 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_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":594
 *         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_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":600
 * 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_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_init, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":603
 *         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_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_getattr, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":606
 *         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_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":611
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_call, 611, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":614
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
  __pyx_tuple__218 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__218)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_str, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":617
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */
  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__220)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_repr_2, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":620
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */
  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__222)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_unicode_2, 620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":623
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */
  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__224)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_iter, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":626
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_tuple__226 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__226)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_bool, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":640
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_lex, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__230);
  __Pyx_GIVEREF(__pyx_tuple__230);

  /* "Cython/Tempita/_tempita.py":703
 *     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_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);

  /* "Cython/Tempita/_tempita.py":705
 * 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_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__232);
  __Pyx_GIVEREF(__pyx_tuple__232);

  /* "Cython/Tempita/_tempita.py":706
 * 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_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "Cython/Tempita/_tempita.py":709
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_trim_lex, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":767
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_find_position, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":777
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse, 777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__240);
  __Pyx_GIVEREF(__pyx_tuple__240);

  /* "Cython/Tempita/_tempita.py":838
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_expr, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__243 = PyTuple_Pack(1, ((PyObject*)__pyx_empty_tuple)); if (unlikely(!__pyx_tuple__243)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);

  /* "Cython/Tempita/_tempita.py":891
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_cond, 891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":907
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_one_cond, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":934
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_for, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":969
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_default, 969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":991
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_inherit, 991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":998
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_def, 998, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":1029
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_parse_signature_2, 1029, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":1105
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_isolate_expression, 1105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":1128
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __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_Users_robertwb_sage_cython_cyth, __pyx_n_s_fill_command, 1128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_tuple__262 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__262)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __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) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC 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;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__tempita(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_tempita"), __pyx_methods, __Pyx_DOCSTR(__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_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_Cython__Tempita___tempita) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "Cython.Tempita._tempita")) {
      if (unlikely(PyDict_SetItemString(modules, "Cython.Tempita._tempita", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_6Cython_7Tempita_8_tempita___pyx_scope_struct__parse_signature) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __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 ---*/

  /* "Cython/Tempita/_tempita.py":32
 * """
 * 
 * import re             # <<<<<<<<<<<<<<
 * import sys
 * import cgi
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":33
 * 
 * import re
 * import sys             # <<<<<<<<<<<<<<
 * import cgi
 * try:
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":34
 * import re
 * import sys
 * import cgi             # <<<<<<<<<<<<<<
 * try:
 *     from urllib import quote as url_quote
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_cgi, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cgi, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":35
 * import sys
 * import cgi
 * try:             # <<<<<<<<<<<<<<
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3
 */
  {
    __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":36
 * 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_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_n_s_quote);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_quote);
      __Pyx_GIVEREF(__pyx_n_s_quote);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_urllib, __pyx_t_1, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_url_quote, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __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_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "Cython/Tempita/_tempita.py":37
 * try:
 *     from urllib import quote as url_quote
 * except ImportError:  # Py3             # <<<<<<<<<<<<<<
 *     from urllib.parse import quote as url_quote
 * import os
 */
    __pyx_t_6 = 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_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);

      /* "Cython/Tempita/_tempita.py":38
 *     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_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_n_s_quote);
      PyList_SET_ITEM(__pyx_t_8, 0, __pyx_n_s_quote);
      __Pyx_GIVEREF(__pyx_n_s_quote);
      __pyx_t_9 = __Pyx_Import(__pyx_n_s_urllib_parse, __pyx_t_8, -1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_url_quote, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __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:;
    __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_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":39
 * except ImportError:  # Py3
 *     from urllib.parse import quote as url_quote
 * import os             # <<<<<<<<<<<<<<
 * import tokenize
 * try:
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":40
 *     from urllib.parse import quote as url_quote
 * import os
 * import tokenize             # <<<<<<<<<<<<<<
 * try:
 *     from io import StringIO
 */
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_tokenize, 0, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tokenize, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":41
 * import os
 * import tokenize
 * try:             # <<<<<<<<<<<<<<
 *     from io import StringIO
 * except ImportError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    /*try:*/ {

      /* "Cython/Tempita/_tempita.py":42
 * import tokenize
 * try:
 *     from io import StringIO             # <<<<<<<<<<<<<<
 * except ImportError:
 *     from cStringIO import StringIO
 */
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_n_s_StringIO);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_StringIO);
      __Pyx_GIVEREF(__pyx_n_s_StringIO);
      __pyx_t_1 = __Pyx_Import(__pyx_n_s_io, __pyx_t_7, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L12_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_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_StringIO, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L19_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "Cython/Tempita/_tempita.py":43
 * try:
 *     from io import StringIO
 * except ImportError:             # <<<<<<<<<<<<<<
 *     from cStringIO import StringIO
 * from Cython.Tempita._looper import looper
 */
    __pyx_t_6 = 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_1, &__pyx_t_7, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_5);

      /* "Cython/Tempita/_tempita.py":44
 *     from io import StringIO
 * except ImportError:
 *     from cStringIO import StringIO             # <<<<<<<<<<<<<<
 * from Cython.Tempita._looper import looper
 * from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text
 */
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_n_s_StringIO);
      PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_StringIO);
      __Pyx_GIVEREF(__pyx_n_s_StringIO);
      __pyx_t_8 = __Pyx_Import(__pyx_n_s_cStringIO, __pyx_t_9, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_8, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_StringIO, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L13_exception_handled;
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
    goto __pyx_L1_error;
    __pyx_L13_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2);
    __pyx_L19_try_end:;
  }

  /* "Cython/Tempita/_tempita.py":45
 * except ImportError:
 *     from cStringIO import StringIO
 * from Cython.Tempita._looper import looper             # <<<<<<<<<<<<<<
 * from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text
 * 
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_looper);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_looper);
  __Pyx_GIVEREF(__pyx_n_s_looper);
  __pyx_t_7 = __Pyx_Import(__pyx_n_s_Cython_Tempita__looper, __pyx_t_5, -1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_looper); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_looper, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "Cython/Tempita/_tempita.py":46
 *     from cStringIO import StringIO
 * from Cython.Tempita._looper import looper
 * from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text             # <<<<<<<<<<<<<<
 * 
 * __all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate',
 */
  __pyx_t_7 = PyList_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_n_s_bytes);
  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_bytes);
  __Pyx_GIVEREF(__pyx_n_s_bytes);
  __Pyx_INCREF(__pyx_n_s_basestring);
  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_basestring);
  __Pyx_GIVEREF(__pyx_n_s_basestring);
  __Pyx_INCREF(__pyx_n_s_next);
  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_next);
  __Pyx_GIVEREF(__pyx_n_s_next);
  __Pyx_INCREF(__pyx_n_s_is_unicode);
  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_is_unicode);
  __Pyx_GIVEREF(__pyx_n_s_is_unicode);
  __Pyx_INCREF(__pyx_n_s_coerce_text);
  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_coerce_text);
  __Pyx_GIVEREF(__pyx_n_s_coerce_text);
  __pyx_t_5 = __Pyx_Import(__pyx_n_s_Cython_Tempita_compat3, __pyx_t_7, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_bytes); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bytes, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_basestring); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_next, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_is_unicode); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_unicode, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_coerce_text); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_coerce_text, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":48
 * from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text
 * 
 * __all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate',             # <<<<<<<<<<<<<<
 *            'sub_html', 'html', 'bunch']
 * 
 */
  __pyx_t_5 = PyList_New(7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_TemplateError);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_TemplateError);
  __Pyx_GIVEREF(__pyx_n_s_TemplateError);
  __Pyx_INCREF(__pyx_n_s_Template);
  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_Template);
  __Pyx_GIVEREF(__pyx_n_s_Template);
  __Pyx_INCREF(__pyx_n_s_sub);
  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_sub);
  __Pyx_GIVEREF(__pyx_n_s_sub);
  __Pyx_INCREF(__pyx_n_s_HTMLTemplate);
  PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_HTMLTemplate);
  __Pyx_GIVEREF(__pyx_n_s_HTMLTemplate);
  __Pyx_INCREF(__pyx_n_s_sub_html);
  PyList_SET_ITEM(__pyx_t_5, 4, __pyx_n_s_sub_html);
  __Pyx_GIVEREF(__pyx_n_s_sub_html);
  __Pyx_INCREF(__pyx_n_s_html_2);
  PyList_SET_ITEM(__pyx_t_5, 5, __pyx_n_s_html_2);
  __Pyx_GIVEREF(__pyx_n_s_html_2);
  __Pyx_INCREF(__pyx_n_s_bunch);
  PyList_SET_ITEM(__pyx_t_5, 6, __pyx_n_s_bunch);
  __Pyx_GIVEREF(__pyx_n_s_bunch);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__118, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_in_re, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_I); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_kp_s_a_z__a_z0_9);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_a_z__a_z0_9);
  __Pyx_GIVEREF(__pyx_kp_s_a_z__a_z0_9);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_var_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":59
 *     """
 * 
 *     def __init__(self, message, position, name=None):             # <<<<<<<<<<<<<<
 *         Exception.__init__(self, message)
 *         self.position = position
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__121);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":64
 *         self.name = name
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         msg = ' '.join(self.args)
 *         if self.position:
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_str, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":55
 * 
 * 
 * class TemplateError(Exception):             # <<<<<<<<<<<<<<
 *     """Exception raised while parsing a template
 *     """
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateError, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateError, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateContinue, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateContinue, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_Exception);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_Exception);
  __Pyx_GIVEREF(__pyx_builtin_Exception);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TemplateBreak, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateBreak, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_file_template, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":91
 * class Template(object):
 * 
 *     default_namespace = {             # <<<<<<<<<<<<<<
 *         'start_braces': '{{',
 *         'end_braces': '}}',
 */
  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_start_braces, __pyx_kp_s__126) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_end_braces, __pyx_kp_s__127) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":94
 *         'start_braces': '{{',
 *         'end_braces': '}}',
 *         'looper': looper,             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_looper); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_looper, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_default_namespace, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":97
 *         }
 * 
 *     default_encoding = 'utf8'             # <<<<<<<<<<<<<<
 *     default_inherit = None
 * 
 */
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_default_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __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_7, __pyx_n_s_default_inherit, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __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_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__130);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_8, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __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_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_template); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_8)->__pyx_arg_get_template = __pyx_t_9;
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_8, __pyx_pf_6Cython_7Tempita_8_tempita_8Template_28__defaults__);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_from_filename, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":155
 *                    default_inherit=default_inherit, get_template=get_template)
 * 
 *     from_filename = classmethod(from_filename)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_n_s_from_filename);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_from_filename);
  }
  if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_Method_ClassMethod(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_from_filename, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":157
 *     from_filename = classmethod(from_filename)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s name=%r>' % (
 *             self.__class__.__name__,
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":162
 *             hex(id(self))[2:], self.name)
 * 
 *     def substitute(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         if args:
 *             if kw:
 */
  __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_8Template_7substitute, 0, __pyx_n_s_Template_substitute, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_substitute, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":186
 *         return result
 * 
 *     def _interpret(self, ns):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         parts = []
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret_inherit, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret_codes, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret_code, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret_for, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_interpret_if, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":296
 *                 break
 * 
 *     def _eval(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_eval_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":315
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     def _exec(self, code, ns, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_exec, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":328
 *             raise exc_info[0], e, exc_info[2]
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         __traceback_hide__ = True
 *         try:
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":372
 *             return value
 * 
 *     def _add_line_info(self, msg, pos):             # <<<<<<<<<<<<<<
 *         msg = "%s at line %s column %s" % (
 *             msg, pos[0], pos[1])
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_add_line_info, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":89
 * 
 * 
 * class Template(object):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = {
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_Template, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Template, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":380
 * 
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":386
 * 
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":391
 * 
 * 
 * class bunch(dict):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kw):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)(&PyDict_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyDict_Type))));
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":393
 * class bunch(dict):
 * 
 *     def __init__(self, **kw):             # <<<<<<<<<<<<<<
 *         for name, value in kw.iteritems():
 *             setattr(self, name, value)
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":397
 *             setattr(self, name, value)
 * 
 *     def __setattr__(self, name, value):             # <<<<<<<<<<<<<<
 *         self[name] = value
 * 
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_setattr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":400
 *         self[name] = value
 * 
 *     def __getattr__(self, name):             # <<<<<<<<<<<<<<
 *         try:
 *             return self[name]
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getattr, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":406
 *             raise AttributeError(name)
 * 
 *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
 *         if 'default' in self:
 *             try:
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getitem, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":415
 *             return dict.__getitem__(self, key)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         items = [
 *             (k, v) for k, v in self.iteritems()]
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":391
 * 
 * 
 * class bunch(dict):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **kw):
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_bunch, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bunch, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":428
 * 
 * 
 * class html(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value):
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":430
 * class html(object):
 * 
 *     def __init__(self, value):             # <<<<<<<<<<<<<<
 *         self.value = value
 * 
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":433
 *         self.value = value
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_str, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":436
 *         return self.value
 * 
 *     def __html__(self):             # <<<<<<<<<<<<<<
 *         return self.value
 * 
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__178)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_html, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":439
 *         return self.value
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %r>' % (
 *             self.__class__.__name__, self.value)
 */
  __pyx_t_9 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "Cython/Tempita/_tempita.py":428
 * 
 * 
 * class html(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, value):
 */
  __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_html_2, __pyx_t_1, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_html_2, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":444
 * 
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __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_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":462
 * 
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_url, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":469
 * 
 * 
 * def attr(**kw):             # <<<<<<<<<<<<<<
 *     kw = list(kw.iteritems())
 *     kw.sort()
 */
  __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_attr, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":482
 * 
 * 
 * class HTMLTemplate(Template):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = Template.default_namespace.copy()
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Template); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":484
 * 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_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_default_namespace); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_copy); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_default_namespace, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":485
 * 
 *     default_namespace = Template.default_namespace.copy()
 *     default_namespace.update(dict(             # <<<<<<<<<<<<<<
 *         html=html,
 *         attr=attr,
 */
  __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_n_s_default_namespace);
  if (unlikely(!__pyx_t_8)) {
    PyErr_Clear();
    __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_default_namespace);
  }
  if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);

  /* "Cython/Tempita/_tempita.py":486
 *     default_namespace = Template.default_namespace.copy()
 *     default_namespace.update(dict(
 *         html=html,             # <<<<<<<<<<<<<<
 *         attr=attr,
 *         url=url,
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_html_2, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "Cython/Tempita/_tempita.py":487
 *     default_namespace.update(dict(
 *         html=html,
 *         attr=attr,             # <<<<<<<<<<<<<<
 *         url=url,
 *         html_quote=html_quote,
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_attr); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_attr, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "Cython/Tempita/_tempita.py":488
 *         html=html,
 *         attr=attr,
 *         url=url,             # <<<<<<<<<<<<<<
 *         html_quote=html_quote,
 *         ))
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_url); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_url, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "Cython/Tempita/_tempita.py":489
 *         attr=attr,
 *         url=url,
 *         html_quote=html_quote,             # <<<<<<<<<<<<<<
 *         ))
 * 
 */
  __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_html_quote); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_html_quote, __pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "Cython/Tempita/_tempita.py":485
 * 
 *     default_namespace = Template.default_namespace.copy()
 *     default_namespace.update(dict(             # <<<<<<<<<<<<<<
 *         html=html,
 *         attr=attr,
 */
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":492
 *         ))
 * 
 *     def _repr(self, value, pos):             # <<<<<<<<<<<<<<
 *         if hasattr(value, '__html__'):
 *             value = value.__html__()
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":482
 * 
 * 
 * class HTMLTemplate(Template):             # <<<<<<<<<<<<<<
 * 
 *     default_namespace = Template.default_namespace.copy()
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_HTMLTemplate, __pyx_t_5, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTMLTemplate, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":505
 * 
 * 
 * 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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sub_html, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":511
 * 
 * 
 * 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_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":512
 * 
 * class TemplateDef(object):
 *     def __init__(self, template, func_name, func_signature,             # <<<<<<<<<<<<<<
 *                  body, ns, pos, bound_self=None):
 *         self._template = template
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__194);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":522
 *         self._bound_self = bound_self
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<tempita function %s(%s) at %s:%s>' % (
 *             self._func_name, self._func_signature,
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":527
 *             self._template.name, self._pos)
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return self()
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_str, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":530
 *         return self()
 * 
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         values = self._parse_signature(args, kw)
 *         ns = self._ns.copy()
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_call, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":541
 *         return ''.join(out)
 * 
 *     def __get__(self, obj, type=None):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_8, __pyx_tuple__203);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_get_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":548
 *             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_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_parse_signature, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":511
 * 
 * 
 * class TemplateDef(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, template, func_name, func_signature,
 *                  body, ns, pos, bound_self=None):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateDef, __pyx_t_5, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateDef, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":588
 * 
 * 
 * class TemplateObject(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name):
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":590
 * class TemplateObject(object):
 * 
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.__name = name
 *         self.get = TemplateObjectGetter(self)
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":594
 *         self.get = TemplateObjectGetter(self)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (self.__class__.__name__, self.__name)
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":588
 * 
 * 
 * class TemplateObject(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateObject, __pyx_t_5, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateObject, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":598
 * 
 * 
 * class TemplateObjectGetter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, template_obj):
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":600
 * class TemplateObjectGetter(object):
 * 
 *     def __init__(self, template_obj):             # <<<<<<<<<<<<<<
 *         self.__template_obj = template_obj
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":603
 *         self.__template_obj = template_obj
 * 
 *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getattr, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":606
 *         return getattr(self.__template_obj, attr, Empty)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s around %r>' % (self.__class__.__name__, self.__template_obj)
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":598
 * 
 * 
 * class TemplateObjectGetter(object):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, template_obj):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_TemplateObjectGetter, __pyx_t_5, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateObjectGetter, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":610
 * 
 * 
 * class _Empty(object):             # <<<<<<<<<<<<<<
 *     def __call__(self, *args, **kw):
 *         return self
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __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_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);

  /* "Cython/Tempita/_tempita.py":611
 * 
 * class _Empty(object):
 *     def __call__(self, *args, **kw):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_call, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":614
 *         return self
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_str, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":617
 *         return ''
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Empty'
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_repr_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":620
 *         return 'Empty'
 * 
 *     def __unicode__(self):             # <<<<<<<<<<<<<<
 *         return u''
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_unicode_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":623
 *         return u''
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return iter(())
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_iter, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":626
 *         return iter(())
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
  __pyx_t_8 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_bool, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "Cython/Tempita/_tempita.py":629
 *         return False
 * 
 *     if sys.version < "3":             # <<<<<<<<<<<<<<
 *         __nonzero__ = __bool__
 * 
 */
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_version); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_RichCompare(__pyx_t_10, __pyx_kp_s_3, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":630
 * 
 *     if sys.version < "3":
 *         __nonzero__ = __bool__             # <<<<<<<<<<<<<<
 * 
 * Empty = _Empty()
 */
    __pyx_t_8 = PyObject_GetItem(__pyx_t_7, __pyx_n_s_bool);
    if (unlikely(!__pyx_t_8)) {
      PyErr_Clear();
      __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_bool);
    }
    if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_nonzero, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L22;
  }
  __pyx_L22:;

  /* "Cython/Tempita/_tempita.py":610
 * 
 * 
 * class _Empty(object):             # <<<<<<<<<<<<<<
 *     def __call__(self, *args, **kw):
 *         return self
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Empty_2, __pyx_t_5, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Empty_2, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "Cython/Tempita/_tempita.py":632
 *         __nonzero__ = __bool__
 * 
 * Empty = _Empty()             # <<<<<<<<<<<<<<
 * del _Empty
 * 
 */
  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Empty_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Empty, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":633
 * 
 * Empty = _Empty()
 * del _Empty             # <<<<<<<<<<<<<<
 * 
 * ############################################################
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_Empty_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":640
 * 
 * 
 * def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     """
 *     Lex a string into chunks:
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_15lex, 0, __pyx_n_s_lex, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__230);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lex, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":703
 *     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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__231, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_statement_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":704
 * 
 * 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_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_else);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_else);
  __Pyx_GIVEREF(__pyx_n_s_else);
  __Pyx_INCREF(__pyx_n_s_endif);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_endif);
  __Pyx_GIVEREF(__pyx_n_s_endif);
  __Pyx_INCREF(__pyx_n_s_endfor);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_endfor);
  __Pyx_GIVEREF(__pyx_n_s_endfor);
  __Pyx_INCREF(__pyx_n_s_enddef);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_enddef);
  __Pyx_GIVEREF(__pyx_n_s_enddef);
  __Pyx_INCREF(__pyx_n_s_continue);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_continue);
  __Pyx_GIVEREF(__pyx_n_s_continue);
  __Pyx_INCREF(__pyx_n_s_break);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_break);
  __Pyx_GIVEREF(__pyx_n_s_break);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_single_statements, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":705
 * 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__232, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trail_whitespace_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":706
 * 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_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_lead_whitespace_re, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":709
 * 
 * 
 * def trim_lex(tokens):             # <<<<<<<<<<<<<<
 *     r"""
 *     Takes a lexed set of tokens, and removes whitespace when there is
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_17trim_lex, 0, __pyx_n_s_trim_lex, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_trim_lex, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":767
 * 
 * 
 * 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_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_19find_position, 0, __pyx_n_s_find_position, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_find_position, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":777
 * 
 * 
 * def parse(s, name=None, line_offset=0, delimeters=None):             # <<<<<<<<<<<<<<
 *     r"""
 *     Parses a string into a kind of AST
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_21parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__240);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":838
 * 
 * 
 * def parse_expr(tokens, name, context=()):             # <<<<<<<<<<<<<<
 *     if isinstance(tokens[0], basestring_):
 *         return tokens[0], tokens[1:]
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_23parse_expr, 0, __pyx_n_s_parse_expr, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__243);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_expr, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":891
 * 
 * 
 * def parse_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     start = tokens[0][1]
 *     pieces = []
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_25parse_cond, 0, __pyx_n_s_parse_cond, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_cond, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":907
 * 
 * 
 * def parse_one_cond(tokens, name, context):             # <<<<<<<<<<<<<<
 *     (first, pos), tokens = tokens[0], tokens[1:]
 *     content = []
 */
  __pyx_t_1 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_one_cond, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":934
 * 
 * 
 * def parse_for(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_29parse_for, 0, __pyx_n_s_parse_for, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_for, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":969
 * 
 * 
 * def parse_default(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('default ')
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_31parse_default, 0, __pyx_n_s_parse_default, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_default, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":991
 * 
 * 
 * def parse_inherit(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, pos = tokens[0]
 *     assert first.startswith('inherit ')
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_33parse_inherit, 0, __pyx_n_s_parse_inherit, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_inherit, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":998
 * 
 * 
 * def parse_def(tokens, name, context):             # <<<<<<<<<<<<<<
 *     first, start = tokens[0]
 *     tokens = tokens[1:]
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_35parse_def, 0, __pyx_n_s_parse_def, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_def, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":1029
 * 
 * 
 * def parse_signature(sig_text, name, pos):             # <<<<<<<<<<<<<<
 *     tokens = tokenize.generate_tokens(StringIO(sig_text).readline)
 *     sig_args = []
 */
  __pyx_t_1 = __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, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_signature_2, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":1105
 * 
 * 
 * def isolate_expression(string, start_pos, end_pos):             # <<<<<<<<<<<<<<
 *     srow, scol = start_pos
 *     srow -= 1
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_39isolate_expression, 0, __pyx_n_s_isolate_expression, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_isolate_expression, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":1120
 *     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_filename = __pyx_f[0]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "Cython/Tempita/_tempita.py":1128
 * 
 * 
 * def fill_command(args=None):             # <<<<<<<<<<<<<<
 *     import sys
 *     import optparse
 */
  __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6Cython_7Tempita_8_tempita_41fill_command, 0, __pyx_n_s_fill_command, NULL, __pyx_n_s_Cython_Tempita__tempita, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__262);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_fill_command, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "Cython/Tempita/_tempita.py":1192
 *         sys.stdout.write(result)
 * 
 * if __name__ == '__main__':             # <<<<<<<<<<<<<<
 *     fill_command()
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_11) {

    /* "Cython/Tempita/_tempita.py":1193
 * 
 * if __name__ == '__main__':
 *     fill_command()             # <<<<<<<<<<<<<<
 */
    __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_fill_command); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L23;
  }
  __pyx_L23:;

  /* "Cython/Tempita/_tempita.py":1
 * """             # <<<<<<<<<<<<<<
 * A small templating language
 * 
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_lex_line_640, __pyx_kp_u_Lex_a_string_into_chunks_lex_he) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_trim_lex_line_709, __pyx_kp_u_Takes_a_lexed_set_of_tokens_and) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_parse_line_777, __pyx_kp_u_Parses_a_string_into_a_kind_of) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  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);
  if (__pyx_m) {
    __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 */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
#endif
    result = (*call)(func, arg, kw);
#if PY_VERSION_HEX >= 0x02060000
    Py_LeaveRecursiveCall();
#endif
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL)
}
#endif

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (result) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (PyErr_ExceptionMatches(PyExc_OverflowError))
                    PyErr_Clear();
                else
                    goto bad;
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_COMPILING_IN_CPYTHON
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    PyErr_Format(PyExc_TypeError,
        "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
bad:
    return NULL;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
        if (PyInstance_Check(type)) {
            type = (PyObject*) ((PyInstanceObject*)type)->in_class;
            Py_INCREF(type);
        } else {
            type = 0;
            PyErr_SetString(PyExc_TypeError,
                "raise: exception must be an old-style class or instance");
            goto raise_error;
        }
        #else
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                if (PyObject_IsSubclass(instance_class, type)) {
                    type = instance_class;
                } else {
                    instance_class = NULL;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                             int is_tuple, int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    if (!is_tuple && unlikely(!PyTuple_Check(tuple))) {
        iternextfunc iternext;
        iter = PyObject_GetIter(tuple);
        if (unlikely(!iter)) goto bad;
        if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
        iternext = Py_TYPE(iter)->tp_iternext;
        value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
        value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
        if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
        Py_DECREF(iter);
    } else {
        if (!has_known_size && unlikely(PyTuple_GET_SIZE(tuple) != 2)) {
            __Pyx_UnpackTupleError(tuple, 2);
            goto bad;
        }
#if CYTHON_COMPILING_IN_PYPY
        value1 = PySequence_ITEM(tuple, 0);
        if (unlikely(!value1)) goto bad;
        value2 = PySequence_ITEM(tuple, 1);
        if (unlikely(!value2)) goto bad;
#else
        value1 = PyTuple_GET_ITEM(tuple, 0);
        value2 = PyTuple_GET_ITEM(tuple, 1);
        Py_INCREF(value1);
        Py_INCREF(value2);
#endif
        if (decref_tuple) { Py_DECREF(tuple); }
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
#if !CYTHON_COMPILING_IN_PYPY
    if (is_dict) {
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#endif
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

static 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;
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        #if CYTHON_PEP393_ENABLED
        if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, length * kind);
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_COMPILING_IN_CPYTHON
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

static CYTHON_INLINE 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;
}

static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if PY_MAJOR_VERSION >= 3
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
#else
    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    } else {
        if (default_value == Py_None)
            default_value = NULL;
        value = PyObject_CallMethodObjArgs(
            d, __pyx_n_s_get, key, default_value, NULL);
    }
#endif
    return value;
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, Py_ssize_t ix) {
    PyObject *r, *py_ix;
    py_ix = PyInt_FromSsize_t(ix);
    if (!py_ix) return NULL;
    r = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx_PyList_PopIndex(PyObject* L, Py_ssize_t ix) {
#if CYTHON_COMPILING_IN_CPYTHON
    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-cix)*sizeof(PyObject*));
            return v;
        }
    }
#endif
    return __Pyx__PyObject_PopIndex(L, ix);
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (unlikely(op->func_doc == NULL)) {
        if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        value = Py_None; /* Mark as deleted */
    Py_INCREF(value);
    op->func_doc = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = op->func_qualname;
    Py_INCREF(value);
    op->func_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
{
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    Py_DECREF(res);
    return 0;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyTuple_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_tuple;
    op->defaults_tuple = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value) {
        value = Py_None;
    } else if (value != Py_None && !PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    Py_INCREF(value);
    tmp = op->defaults_kwdict;
    op->defaults_kwdict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
    PyObject* tmp;
    if (!value || value == Py_None) {
        value = NULL;
    } else if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    tmp = op->func_annotations;
    op->func_annotations = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
#if CYTHON_COMPILING_IN_PYPY
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    Py_ssize_t size;
    switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
    case METH_VARARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0)
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 0)
                return (*meth)(self, NULL);
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL) || PyDict_Size(kw) == 0) {
            size = PyTuple_GET_SIZE(arg);
            if (size == 1)
                return (*meth)(self, PyTuple_GET_ITEM(arg, 0));
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%zd given)",
                f->m_ml->ml_name, size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags in "
                        "__Pyx_CyFunction_Call. METH_OLDARGS is no "
                        "longer supported!");
        return NULL;
    }
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
    return NULL;
}
#else
static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
	return PyCFunction_Call(func, arg, kw);
}
#endif
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    __Pyx_CyFunction_Call,              /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
#if PY_VERSION_HEX >= 0x030400a1
    0,                                  /*tp_finalize*/
#endif
};
static int __Pyx_CyFunction_init(void) {
#if !CYTHON_COMPILING_IN_PYPY
    __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
#endif
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (__pyx_CyFunctionType == NULL) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs = PyTuple_Pack(2, name, bases);
            if (unlikely(!pargs)) {
                Py_DECREF(prep);
                return NULL;
            }
            ns = PyObject_Call(prep, pargs, mkw);
            Py_DECREF(prep);
            Py_DECREF(pargs);
        } else {
            if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
                return NULL;
            PyErr_Clear();
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result, *margs;
    PyObject *owned_metaclass = NULL;
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    margs = PyTuple_Pack(3, name, bases, dict);
    if (unlikely(!margs)) {
        result = NULL;
    } else {
        result = PyObject_Call(metaclass, margs, mkw);
        Py_DECREF(margs);
    }
    Py_XDECREF(owned_metaclass);
    return result;
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_VERSION_HEX < 0x03030000
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    #if PY_VERSION_HEX < 0x03030000
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned long long)) {
            return PyLong_FromUnsignedLongLong((unsigned long long) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(long long)) {
            return PyLong_FromLongLong((long long) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

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 = PyModule_GetDict(__pyx_m);
        if (!globals)
            goto bad;
    } 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 (PyCode_GetNumFree((PyCodeObject *)o) > 0) {
            PyErr_SetString(PyExc_TypeError,
                "code object passed to exec() may not contain free variables");
            goto bad;
        }
        #if 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;
}

#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 /* Python 3 has a print function */
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

#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 /* Python 3 has a print function */
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

static PyObject* __Pyx_Globals(void) {
    Py_ssize_t i;
    PyObject *names = NULL;
    PyObject *globals = PyObject_GetAttr(__pyx_m, __pyx_n_s_dict);
    if (!globals) {
        PyErr_SetString(PyExc_TypeError,
            "current module must have __dict__ attribute");
        goto bad;
    }
    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_GetItem(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;
}

static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */
        return PyClassMethod_New(method);
    }
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */
        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)) { /* python classes */
        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;
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func)             \
    {                                                                     \
        func_type value = func(x);                                        \
        if (sizeof(target_type) < sizeof(func_type)) {                    \
            if (unlikely(value != (func_type) (target_type) value)) {     \
                func_type zero = 0;                                       \
                PyErr_SetString(PyExc_OverflowError,                      \
                    (is_unsigned && unlikely(value < zero)) ?             \
                    "can't convert negative value to " #target_type :     \
                    "value too large to convert to " #target_type);       \
                return (target_type) -1;                                  \
            }                                                             \
        }                                                                 \
        return (target_type) value;                                       \
    }

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long) -1;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long) -1;
            }
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(long) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(long)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(long) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(long) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong)
            } else if (sizeof(long) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG)
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return (int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to int");
                return (int) -1;
            }
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong)
            } else if (sizeof(int) <= sizeof(unsigned long long)) {
                __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong)
            }
        } else {
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
            if (sizeof(digit) <= sizeof(int)) {
                switch (Py_SIZE(x)) {
                    case  0: return 0;
                    case  1: return +(int) ((PyLongObject*)x)->ob_digit[0];
                    case -1: return -(int) ((PyLongObject*)x)->ob_digit[0];
                }
            }
 #endif
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong)
            } else if (sizeof(int) <= sizeof(long long)) {
                __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong)
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else /* PY_VERSION_HEX < 0x03030000 */
        if (PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_DATA_SIZE(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
        return PyUnicode_AsUTF8AndSize(o, length);
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */
#endif /* PY_VERSION_HEX < 0x03030000 */
    } else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII  || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
 #if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
 #endif
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b)))
      return PyInt_AS_LONG(b);
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
     #if CYTHON_USE_PYLONG_INTERNALS
       switch (Py_SIZE(b)) {
       case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0];
       case  0: return 0;
       case  1: return ((PyLongObject*)b)->ob_digit[0];
       }
     #endif
    #endif
  #if PY_VERSION_HEX < 0x02060000
    return PyInt_AsSsize_t(b);
  #else
    return PyLong_AsSsize_t(b);
  #endif
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}


#endif /* Py_PYTHON_H */
