5160898861038fbaeb705e7992b401f1c0ab0155
[platform/upstream/python-lxml.git] / src / lxml / objectify.c
1 /* Generated by Cython 0.29.18 */
2
3 /* BEGIN: Cython Metadata
4 {
5     "distutils": {
6         "define_macros": [
7             [
8                 "CYTHON_CLINE_IN_TRACEBACK",
9                 "0"
10             ]
11         ],
12         "depends": [
13             "/usr/include/libxml2/libxml/HTMLtree.h",
14             "/usr/include/libxml2/libxml/chvalid.h",
15             "/usr/include/libxml2/libxml/encoding.h",
16             "/usr/include/libxml2/libxml/globals.h",
17             "/usr/include/libxml2/libxml/hash.h",
18             "/usr/include/libxml2/libxml/tree.h",
19             "/usr/include/libxml2/libxml/uri.h",
20             "/usr/include/libxml2/libxml/valid.h",
21             "/usr/include/libxml2/libxml/xmlIO.h",
22             "/usr/include/libxml2/libxml/xmlmemory.h",
23             "/usr/include/libxml2/libxml/xmlsave.h",
24             "/usr/include/libxml2/libxml/xmlstring.h",
25             "/usr/include/libxml2/libxml/xmlversion.h",
26             "src/lxml/includes/__init__.pxd",
27             "src/lxml/includes/c14n.pxd",
28             "src/lxml/includes/config.pxd",
29             "src/lxml/includes/dtdvalid.pxd",
30             "src/lxml/includes/etree_defs.h",
31             "src/lxml/includes/etreepublic.pxd",
32             "src/lxml/includes/htmlparser.pxd",
33             "src/lxml/includes/lxml-version.h",
34             "src/lxml/includes/relaxng.pxd",
35             "src/lxml/includes/schematron.pxd",
36             "src/lxml/includes/tree.pxd",
37             "src/lxml/includes/uri.pxd",
38             "src/lxml/includes/xinclude.pxd",
39             "src/lxml/includes/xmlerror.pxd",
40             "src/lxml/includes/xmlparser.pxd",
41             "src/lxml/includes/xmlschema.pxd",
42             "src/lxml/includes/xpath.pxd",
43             "src/lxml/includes/xslt.pxd",
44             "src/lxml/objectpath.pxi"
45         ],
46         "extra_compile_args": [
47             "-w"
48         ],
49         "include_dirs": [
50             "src/lxml/includes",
51             "/usr/include/libxml2",
52             "src"
53         ],
54         "libraries": [
55             "xslt",
56             "exslt",
57             "xml2",
58             "rt",
59             "z",
60             "m"
61         ],
62         "name": "lxml.objectify",
63         "sources": [
64             "src/lxml/objectify.pyx"
65         ]
66     },
67     "module_name": "lxml.objectify"
68 }
69 END: Cython Metadata */
70
71 #define PY_SSIZE_T_CLEAN
72 #include "Python.h"
73 #ifndef Py_PYTHON_H
74     #error Python headers needed to compile C extensions, please install development version of Python.
75 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
76     #error Cython requires Python 2.6+ or Python 3.3+.
77 #else
78 #define CYTHON_ABI "0_29_18"
79 #define CYTHON_HEX_VERSION 0x001D12F0
80 #define CYTHON_FUTURE_DIVISION 0
81 #include <stddef.h>
82 #ifndef offsetof
83   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
84 #endif
85 #if !defined(WIN32) && !defined(MS_WINDOWS)
86   #ifndef __stdcall
87     #define __stdcall
88   #endif
89   #ifndef __cdecl
90     #define __cdecl
91   #endif
92   #ifndef __fastcall
93     #define __fastcall
94   #endif
95 #endif
96 #ifndef DL_IMPORT
97   #define DL_IMPORT(t) t
98 #endif
99 #ifndef DL_EXPORT
100   #define DL_EXPORT(t) t
101 #endif
102 #define __PYX_COMMA ,
103 #ifndef HAVE_LONG_LONG
104   #if PY_VERSION_HEX >= 0x02070000
105     #define HAVE_LONG_LONG
106   #endif
107 #endif
108 #ifndef PY_LONG_LONG
109   #define PY_LONG_LONG LONG_LONG
110 #endif
111 #ifndef Py_HUGE_VAL
112   #define Py_HUGE_VAL HUGE_VAL
113 #endif
114 #ifdef PYPY_VERSION
115   #define CYTHON_COMPILING_IN_PYPY 1
116   #define CYTHON_COMPILING_IN_PYSTON 0
117   #define CYTHON_COMPILING_IN_CPYTHON 0
118   #undef CYTHON_USE_TYPE_SLOTS
119   #define CYTHON_USE_TYPE_SLOTS 0
120   #undef CYTHON_USE_PYTYPE_LOOKUP
121   #define CYTHON_USE_PYTYPE_LOOKUP 0
122   #if PY_VERSION_HEX < 0x03050000
123     #undef CYTHON_USE_ASYNC_SLOTS
124     #define CYTHON_USE_ASYNC_SLOTS 0
125   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
126     #define CYTHON_USE_ASYNC_SLOTS 1
127   #endif
128   #undef CYTHON_USE_PYLIST_INTERNALS
129   #define CYTHON_USE_PYLIST_INTERNALS 0
130   #undef CYTHON_USE_UNICODE_INTERNALS
131   #define CYTHON_USE_UNICODE_INTERNALS 0
132   #undef CYTHON_USE_UNICODE_WRITER
133   #define CYTHON_USE_UNICODE_WRITER 0
134   #undef CYTHON_USE_PYLONG_INTERNALS
135   #define CYTHON_USE_PYLONG_INTERNALS 0
136   #undef CYTHON_AVOID_BORROWED_REFS
137   #define CYTHON_AVOID_BORROWED_REFS 1
138   #undef CYTHON_ASSUME_SAFE_MACROS
139   #define CYTHON_ASSUME_SAFE_MACROS 0
140   #undef CYTHON_UNPACK_METHODS
141   #define CYTHON_UNPACK_METHODS 0
142   #undef CYTHON_FAST_THREAD_STATE
143   #define CYTHON_FAST_THREAD_STATE 0
144   #undef CYTHON_FAST_PYCALL
145   #define CYTHON_FAST_PYCALL 0
146   #undef CYTHON_PEP489_MULTI_PHASE_INIT
147   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
148   #undef CYTHON_USE_TP_FINALIZE
149   #define CYTHON_USE_TP_FINALIZE 0
150   #undef CYTHON_USE_DICT_VERSIONS
151   #define CYTHON_USE_DICT_VERSIONS 0
152   #undef CYTHON_USE_EXC_INFO_STACK
153   #define CYTHON_USE_EXC_INFO_STACK 0
154 #elif defined(PYSTON_VERSION)
155   #define CYTHON_COMPILING_IN_PYPY 0
156   #define CYTHON_COMPILING_IN_PYSTON 1
157   #define CYTHON_COMPILING_IN_CPYTHON 0
158   #ifndef CYTHON_USE_TYPE_SLOTS
159     #define CYTHON_USE_TYPE_SLOTS 1
160   #endif
161   #undef CYTHON_USE_PYTYPE_LOOKUP
162   #define CYTHON_USE_PYTYPE_LOOKUP 0
163   #undef CYTHON_USE_ASYNC_SLOTS
164   #define CYTHON_USE_ASYNC_SLOTS 0
165   #undef CYTHON_USE_PYLIST_INTERNALS
166   #define CYTHON_USE_PYLIST_INTERNALS 0
167   #ifndef CYTHON_USE_UNICODE_INTERNALS
168     #define CYTHON_USE_UNICODE_INTERNALS 1
169   #endif
170   #undef CYTHON_USE_UNICODE_WRITER
171   #define CYTHON_USE_UNICODE_WRITER 0
172   #undef CYTHON_USE_PYLONG_INTERNALS
173   #define CYTHON_USE_PYLONG_INTERNALS 0
174   #ifndef CYTHON_AVOID_BORROWED_REFS
175     #define CYTHON_AVOID_BORROWED_REFS 0
176   #endif
177   #ifndef CYTHON_ASSUME_SAFE_MACROS
178     #define CYTHON_ASSUME_SAFE_MACROS 1
179   #endif
180   #ifndef CYTHON_UNPACK_METHODS
181     #define CYTHON_UNPACK_METHODS 1
182   #endif
183   #undef CYTHON_FAST_THREAD_STATE
184   #define CYTHON_FAST_THREAD_STATE 0
185   #undef CYTHON_FAST_PYCALL
186   #define CYTHON_FAST_PYCALL 0
187   #undef CYTHON_PEP489_MULTI_PHASE_INIT
188   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
189   #undef CYTHON_USE_TP_FINALIZE
190   #define CYTHON_USE_TP_FINALIZE 0
191   #undef CYTHON_USE_DICT_VERSIONS
192   #define CYTHON_USE_DICT_VERSIONS 0
193   #undef CYTHON_USE_EXC_INFO_STACK
194   #define CYTHON_USE_EXC_INFO_STACK 0
195 #else
196   #define CYTHON_COMPILING_IN_PYPY 0
197   #define CYTHON_COMPILING_IN_PYSTON 0
198   #define CYTHON_COMPILING_IN_CPYTHON 1
199   #ifndef CYTHON_USE_TYPE_SLOTS
200     #define CYTHON_USE_TYPE_SLOTS 1
201   #endif
202   #if PY_VERSION_HEX < 0x02070000
203     #undef CYTHON_USE_PYTYPE_LOOKUP
204     #define CYTHON_USE_PYTYPE_LOOKUP 0
205   #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
206     #define CYTHON_USE_PYTYPE_LOOKUP 1
207   #endif
208   #if PY_MAJOR_VERSION < 3
209     #undef CYTHON_USE_ASYNC_SLOTS
210     #define CYTHON_USE_ASYNC_SLOTS 0
211   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
212     #define CYTHON_USE_ASYNC_SLOTS 1
213   #endif
214   #if PY_VERSION_HEX < 0x02070000
215     #undef CYTHON_USE_PYLONG_INTERNALS
216     #define CYTHON_USE_PYLONG_INTERNALS 0
217   #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
218     #define CYTHON_USE_PYLONG_INTERNALS 1
219   #endif
220   #ifndef CYTHON_USE_PYLIST_INTERNALS
221     #define CYTHON_USE_PYLIST_INTERNALS 1
222   #endif
223   #ifndef CYTHON_USE_UNICODE_INTERNALS
224     #define CYTHON_USE_UNICODE_INTERNALS 1
225   #endif
226   #if PY_VERSION_HEX < 0x030300F0
227     #undef CYTHON_USE_UNICODE_WRITER
228     #define CYTHON_USE_UNICODE_WRITER 0
229   #elif !defined(CYTHON_USE_UNICODE_WRITER)
230     #define CYTHON_USE_UNICODE_WRITER 1
231   #endif
232   #ifndef CYTHON_AVOID_BORROWED_REFS
233     #define CYTHON_AVOID_BORROWED_REFS 0
234   #endif
235   #ifndef CYTHON_ASSUME_SAFE_MACROS
236     #define CYTHON_ASSUME_SAFE_MACROS 1
237   #endif
238   #ifndef CYTHON_UNPACK_METHODS
239     #define CYTHON_UNPACK_METHODS 1
240   #endif
241   #ifndef CYTHON_FAST_THREAD_STATE
242     #define CYTHON_FAST_THREAD_STATE 1
243   #endif
244   #ifndef CYTHON_FAST_PYCALL
245     #define CYTHON_FAST_PYCALL 1
246   #endif
247   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
248     #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
249   #endif
250   #ifndef CYTHON_USE_TP_FINALIZE
251     #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
252   #endif
253   #ifndef CYTHON_USE_DICT_VERSIONS
254     #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
255   #endif
256   #ifndef CYTHON_USE_EXC_INFO_STACK
257     #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
258   #endif
259 #endif
260 #if !defined(CYTHON_FAST_PYCCALL)
261 #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
262 #endif
263 #if CYTHON_USE_PYLONG_INTERNALS
264   #include "longintrepr.h"
265   #undef SHIFT
266   #undef BASE
267   #undef MASK
268   #ifdef SIZEOF_VOID_P
269     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
270   #endif
271 #endif
272 #ifndef __has_attribute
273   #define __has_attribute(x) 0
274 #endif
275 #ifndef __has_cpp_attribute
276   #define __has_cpp_attribute(x) 0
277 #endif
278 #ifndef CYTHON_RESTRICT
279   #if defined(__GNUC__)
280     #define CYTHON_RESTRICT __restrict__
281   #elif defined(_MSC_VER) && _MSC_VER >= 1400
282     #define CYTHON_RESTRICT __restrict
283   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
284     #define CYTHON_RESTRICT restrict
285   #else
286     #define CYTHON_RESTRICT
287   #endif
288 #endif
289 #ifndef CYTHON_UNUSED
290 # if defined(__GNUC__)
291 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
292 #     define CYTHON_UNUSED __attribute__ ((__unused__))
293 #   else
294 #     define CYTHON_UNUSED
295 #   endif
296 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
297 #   define CYTHON_UNUSED __attribute__ ((__unused__))
298 # else
299 #   define CYTHON_UNUSED
300 # endif
301 #endif
302 #ifndef CYTHON_MAYBE_UNUSED_VAR
303 #  if defined(__cplusplus)
304      template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
305 #  else
306 #    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
307 #  endif
308 #endif
309 #ifndef CYTHON_NCP_UNUSED
310 # if CYTHON_COMPILING_IN_CPYTHON
311 #  define CYTHON_NCP_UNUSED
312 # else
313 #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
314 # endif
315 #endif
316 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
317 #ifdef _MSC_VER
318     #ifndef _MSC_STDINT_H_
319         #if _MSC_VER < 1300
320            typedef unsigned char     uint8_t;
321            typedef unsigned int      uint32_t;
322         #else
323            typedef unsigned __int8   uint8_t;
324            typedef unsigned __int32  uint32_t;
325         #endif
326     #endif
327 #else
328    #include <stdint.h>
329 #endif
330 #ifndef CYTHON_FALLTHROUGH
331   #if defined(__cplusplus) && __cplusplus >= 201103L
332     #if __has_cpp_attribute(fallthrough)
333       #define CYTHON_FALLTHROUGH [[fallthrough]]
334     #elif __has_cpp_attribute(clang::fallthrough)
335       #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
336     #elif __has_cpp_attribute(gnu::fallthrough)
337       #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
338     #endif
339   #endif
340   #ifndef CYTHON_FALLTHROUGH
341     #if __has_attribute(fallthrough)
342       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
343     #else
344       #define CYTHON_FALLTHROUGH
345     #endif
346   #endif
347   #if defined(__clang__ ) && defined(__apple_build_version__)
348     #if __apple_build_version__ < 7000000
349       #undef  CYTHON_FALLTHROUGH
350       #define CYTHON_FALLTHROUGH
351     #endif
352   #endif
353 #endif
354
355 #ifndef CYTHON_INLINE
356   #if defined(__clang__)
357     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
358   #elif defined(__GNUC__)
359     #define CYTHON_INLINE __inline__
360   #elif defined(_MSC_VER)
361     #define CYTHON_INLINE __inline
362   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
363     #define CYTHON_INLINE inline
364   #else
365     #define CYTHON_INLINE
366   #endif
367 #endif
368
369 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
370   #define Py_OptimizeFlag 0
371 #endif
372 #define __PYX_BUILD_PY_SSIZE_T "n"
373 #define CYTHON_FORMAT_SSIZE_T "z"
374 #if PY_MAJOR_VERSION < 3
375   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
376   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
377           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
378   #define __Pyx_DefaultClassType PyClass_Type
379 #else
380   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
381 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
382   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
383           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
384 #else
385   #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
386           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
387 #endif
388   #define __Pyx_DefaultClassType PyType_Type
389 #endif
390 #ifndef Py_TPFLAGS_CHECKTYPES
391   #define Py_TPFLAGS_CHECKTYPES 0
392 #endif
393 #ifndef Py_TPFLAGS_HAVE_INDEX
394   #define Py_TPFLAGS_HAVE_INDEX 0
395 #endif
396 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
397   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
398 #endif
399 #ifndef Py_TPFLAGS_HAVE_FINALIZE
400   #define Py_TPFLAGS_HAVE_FINALIZE 0
401 #endif
402 #ifndef METH_STACKLESS
403   #define METH_STACKLESS 0
404 #endif
405 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
406   #ifndef METH_FASTCALL
407      #define METH_FASTCALL 0x80
408   #endif
409   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
410   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
411                                                           Py_ssize_t nargs, PyObject *kwnames);
412 #else
413   #define __Pyx_PyCFunctionFast _PyCFunctionFast
414   #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
415 #endif
416 #if CYTHON_FAST_PYCCALL
417 #define __Pyx_PyFastCFunction_Check(func)\
418     ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
419 #else
420 #define __Pyx_PyFastCFunction_Check(func) 0
421 #endif
422 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
423   #define PyObject_Malloc(s)   PyMem_Malloc(s)
424   #define PyObject_Free(p)     PyMem_Free(p)
425   #define PyObject_Realloc(p)  PyMem_Realloc(p)
426 #endif
427 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
428   #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
429   #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
430   #define PyMem_RawFree(p)             PyMem_Free(p)
431 #endif
432 #if CYTHON_COMPILING_IN_PYSTON
433   #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
434   #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
435 #else
436   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
437   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
438 #endif
439 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
440   #define __Pyx_PyThreadState_Current PyThreadState_GET()
441 #elif PY_VERSION_HEX >= 0x03060000
442   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
443 #elif PY_VERSION_HEX >= 0x03000000
444   #define __Pyx_PyThreadState_Current PyThreadState_GET()
445 #else
446   #define __Pyx_PyThreadState_Current _PyThreadState_Current
447 #endif
448 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
449 #include "pythread.h"
450 #define Py_tss_NEEDS_INIT 0
451 typedef int Py_tss_t;
452 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
453   *key = PyThread_create_key();
454   return 0;
455 }
456 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
457   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
458   *key = Py_tss_NEEDS_INIT;
459   return key;
460 }
461 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
462   PyObject_Free(key);
463 }
464 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
465   return *key != Py_tss_NEEDS_INIT;
466 }
467 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
468   PyThread_delete_key(*key);
469   *key = Py_tss_NEEDS_INIT;
470 }
471 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
472   return PyThread_set_key_value(*key, value);
473 }
474 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
475   return PyThread_get_key_value(*key);
476 }
477 #endif
478 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
479 #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
480 #else
481 #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
482 #endif
483 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
484   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
485   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
486 #else
487   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
488   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
489 #endif
490 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
491 #define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
492 #else
493 #define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
494 #endif
495 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
496   #define CYTHON_PEP393_ENABLED 1
497   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
498                                               0 : _PyUnicode_Ready((PyObject *)(op)))
499   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
500   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
501   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
502   #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
503   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
504   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
505   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
506   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
507 #else
508   #define CYTHON_PEP393_ENABLED 0
509   #define PyUnicode_1BYTE_KIND  1
510   #define PyUnicode_2BYTE_KIND  2
511   #define PyUnicode_4BYTE_KIND  4
512   #define __Pyx_PyUnicode_READY(op)       (0)
513   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
514   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
515   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
516   #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
517   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
518   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
519   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
520   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
521 #endif
522 #if CYTHON_COMPILING_IN_PYPY
523   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
524   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
525 #else
526   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
527   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
528       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
529 #endif
530 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
531   #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
532 #endif
533 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
534   #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
535 #endif
536 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
537   #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
538 #endif
539 #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
540 #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
541 #if PY_MAJOR_VERSION >= 3
542   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
543 #else
544   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
545 #endif
546 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
547   #define PyObject_ASCII(o)            PyObject_Repr(o)
548 #endif
549 #if PY_MAJOR_VERSION >= 3
550   #define PyBaseString_Type            PyUnicode_Type
551   #define PyStringObject               PyUnicodeObject
552   #define PyString_Type                PyUnicode_Type
553   #define PyString_Check               PyUnicode_Check
554   #define PyString_CheckExact          PyUnicode_CheckExact
555 #ifndef PyObject_Unicode
556   #define PyObject_Unicode             PyObject_Str
557 #endif
558 #endif
559 #if PY_MAJOR_VERSION >= 3
560   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
561   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
562 #else
563   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
564   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
565 #endif
566 #ifndef PySet_CheckExact
567   #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
568 #endif
569 #if CYTHON_ASSUME_SAFE_MACROS
570   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
571 #else
572   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
573 #endif
574 #if PY_MAJOR_VERSION >= 3
575   #define PyIntObject                  PyLongObject
576   #define PyInt_Type                   PyLong_Type
577   #define PyInt_Check(op)              PyLong_Check(op)
578   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
579   #define PyInt_FromString             PyLong_FromString
580   #define PyInt_FromUnicode            PyLong_FromUnicode
581   #define PyInt_FromLong               PyLong_FromLong
582   #define PyInt_FromSize_t             PyLong_FromSize_t
583   #define PyInt_FromSsize_t            PyLong_FromSsize_t
584   #define PyInt_AsLong                 PyLong_AsLong
585   #define PyInt_AS_LONG                PyLong_AS_LONG
586   #define PyInt_AsSsize_t              PyLong_AsSsize_t
587   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
588   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
589   #define PyNumber_Int                 PyNumber_Long
590 #endif
591 #if PY_MAJOR_VERSION >= 3
592   #define PyBoolObject                 PyLongObject
593 #endif
594 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
595   #ifndef PyUnicode_InternFromString
596     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
597   #endif
598 #endif
599 #if PY_VERSION_HEX < 0x030200A4
600   typedef long Py_hash_t;
601   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
602   #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
603 #else
604   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
605   #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
606 #endif
607 #if PY_MAJOR_VERSION >= 3
608   #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
609 #else
610   #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
611 #endif
612 #if CYTHON_USE_ASYNC_SLOTS
613   #if PY_VERSION_HEX >= 0x030500B1
614     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
615     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
616   #else
617     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
618   #endif
619 #else
620   #define __Pyx_PyType_AsAsync(obj) NULL
621 #endif
622 #ifndef __Pyx_PyAsyncMethodsStruct
623     typedef struct {
624         unaryfunc am_await;
625         unaryfunc am_aiter;
626         unaryfunc am_anext;
627     } __Pyx_PyAsyncMethodsStruct;
628 #endif
629
630 #if defined(WIN32) || defined(MS_WINDOWS)
631   #define _USE_MATH_DEFINESg
632 #endif
633 #include <math.h>
634 #ifdef NAN
635 #define __PYX_NAN() ((float) NAN)
636 #else
637 static CYTHON_INLINE float __PYX_NAN() {
638   float value;
639   memset(&value, 0xFF, sizeof(value));
640   return value;
641 }
642 #endif
643 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
644 #define __Pyx_truncl trunc
645 #else
646 #define __Pyx_truncl truncl
647 #endif
648
649 #define __PYX_MARK_ERR_POS(f_index, lineno) \
650     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
651 #define __PYX_ERR(f_index, lineno, Ln_error) \
652     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
653
654 #ifndef __PYX_EXTERN_C
655   #ifdef __cplusplus
656     #define __PYX_EXTERN_C extern "C"
657   #else
658     #define __PYX_EXTERN_C extern
659   #endif
660 #endif
661
662 #define __PYX_HAVE__lxml__objectify
663 #define __PYX_HAVE_API__lxml__objectify
664 /* Early includes */
665 #include <string.h>
666 #include <stdio.h>
667 #include "lxml-version.h"
668 #include "libxml/xmlversion.h"
669 #include "libxml/xmlstring.h"
670 #include "libxml/encoding.h"
671 #include "libxml/chvalid.h"
672 #include "libxml/hash.h"
673 #include "libxml/tree.h"
674 #include "libxml/uri.h"
675 #include "libxml/HTMLtree.h"
676 #include "libxml/valid.h"
677 #include "libxml/xmlIO.h"
678 #include "libxml/xmlsave.h"
679 #include "libxml/globals.h"
680 #include "libxml/xmlmemory.h"
681 #include "etree_defs.h"
682 #include "etree_api.h"
683 #include "pythread.h"
684 #include "includes/etree_defs.h"
685 #include "lxml_endian.h"
686 #ifdef _OPENMP
687 #include <omp.h>
688 #endif /* _OPENMP */
689
690 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
691 #define CYTHON_WITHOUT_ASSERTIONS
692 #endif
693
694 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
695                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
696
697 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
698 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
699 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
700 #define __PYX_DEFAULT_STRING_ENCODING ""
701 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
702 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
703 #define __Pyx_uchar_cast(c) ((unsigned char)c)
704 #define __Pyx_long_cast(x) ((long)x)
705 #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
706     (sizeof(type) < sizeof(Py_ssize_t))  ||\
707     (sizeof(type) > sizeof(Py_ssize_t) &&\
708           likely(v < (type)PY_SSIZE_T_MAX ||\
709                  v == (type)PY_SSIZE_T_MAX)  &&\
710           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
711                                 v == (type)PY_SSIZE_T_MIN)))  ||\
712     (sizeof(type) == sizeof(Py_ssize_t) &&\
713           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
714                                v == (type)PY_SSIZE_T_MAX)))  )
715 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
716     return (size_t) i < (size_t) limit;
717 }
718 #if defined (__cplusplus) && __cplusplus >= 201103L
719     #include <cstdlib>
720     #define __Pyx_sst_abs(value) std::abs(value)
721 #elif SIZEOF_INT >= SIZEOF_SIZE_T
722     #define __Pyx_sst_abs(value) abs(value)
723 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
724     #define __Pyx_sst_abs(value) labs(value)
725 #elif defined (_MSC_VER)
726     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
727 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
728     #define __Pyx_sst_abs(value) llabs(value)
729 #elif defined (__GNUC__)
730     #define __Pyx_sst_abs(value) __builtin_llabs(value)
731 #else
732     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
733 #endif
734 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
735 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
736 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
737 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
738 #define __Pyx_PyBytes_FromString        PyBytes_FromString
739 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
740 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
741 #if PY_MAJOR_VERSION < 3
742     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
743     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
744 #else
745     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
746     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
747 #endif
748 #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
749 #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
750 #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
751 #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
752 #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
753 #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
754 #define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
755 #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
756 #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
757 #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
758 #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
759 #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
760 #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
761 #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
762 #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
763 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
764 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
765     const Py_UNICODE *u_end = u;
766     while (*u_end++) ;
767     return (size_t)(u_end - u - 1);
768 }
769 #define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
770 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
771 #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
772 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
773 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
774 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
775 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
776 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
777 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
778 #define __Pyx_PySequence_Tuple(obj)\
779     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
780 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
781 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
782 #if CYTHON_ASSUME_SAFE_MACROS
783 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
784 #else
785 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
786 #endif
787 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
788 #if PY_MAJOR_VERSION >= 3
789 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
790 #else
791 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
792 #endif
793 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
794 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
795 static int __Pyx_sys_getdefaultencoding_not_ascii;
796 static int __Pyx_init_sys_getdefaultencoding_params(void) {
797     PyObject* sys;
798     PyObject* default_encoding = NULL;
799     PyObject* ascii_chars_u = NULL;
800     PyObject* ascii_chars_b = NULL;
801     const char* default_encoding_c;
802     sys = PyImport_ImportModule("sys");
803     if (!sys) goto bad;
804     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
805     Py_DECREF(sys);
806     if (!default_encoding) goto bad;
807     default_encoding_c = PyBytes_AsString(default_encoding);
808     if (!default_encoding_c) goto bad;
809     if (strcmp(default_encoding_c, "ascii") == 0) {
810         __Pyx_sys_getdefaultencoding_not_ascii = 0;
811     } else {
812         char ascii_chars[128];
813         int c;
814         for (c = 0; c < 128; c++) {
815             ascii_chars[c] = c;
816         }
817         __Pyx_sys_getdefaultencoding_not_ascii = 1;
818         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
819         if (!ascii_chars_u) goto bad;
820         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
821         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
822             PyErr_Format(
823                 PyExc_ValueError,
824                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
825                 default_encoding_c);
826             goto bad;
827         }
828         Py_DECREF(ascii_chars_u);
829         Py_DECREF(ascii_chars_b);
830     }
831     Py_DECREF(default_encoding);
832     return 0;
833 bad:
834     Py_XDECREF(default_encoding);
835     Py_XDECREF(ascii_chars_u);
836     Py_XDECREF(ascii_chars_b);
837     return -1;
838 }
839 #endif
840 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
841 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
842 #else
843 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
844 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
845 static char* __PYX_DEFAULT_STRING_ENCODING;
846 static int __Pyx_init_sys_getdefaultencoding_params(void) {
847     PyObject* sys;
848     PyObject* default_encoding = NULL;
849     char* default_encoding_c;
850     sys = PyImport_ImportModule("sys");
851     if (!sys) goto bad;
852     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
853     Py_DECREF(sys);
854     if (!default_encoding) goto bad;
855     default_encoding_c = PyBytes_AsString(default_encoding);
856     if (!default_encoding_c) goto bad;
857     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
858     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
859     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
860     Py_DECREF(default_encoding);
861     return 0;
862 bad:
863     Py_XDECREF(default_encoding);
864     return -1;
865 }
866 #endif
867 #endif
868
869
870 /* Test for GCC > 2.95 */
871 #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
872   #define likely(x)   __builtin_expect(!!(x), 1)
873   #define unlikely(x) __builtin_expect(!!(x), 0)
874 #else /* !__GNUC__ or GCC < 2.95 */
875   #define likely(x)   (x)
876   #define unlikely(x) (x)
877 #endif /* __GNUC__ */
878 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
879
880 static PyObject *__pyx_m = NULL;
881 static PyObject *__pyx_d;
882 static PyObject *__pyx_b;
883 static PyObject *__pyx_cython_runtime = NULL;
884 static PyObject *__pyx_empty_tuple;
885 static PyObject *__pyx_empty_bytes;
886 static PyObject *__pyx_empty_unicode;
887 static int __pyx_lineno;
888 static int __pyx_clineno = 0;
889 static const char * __pyx_cfilenm= __FILE__;
890 static const char *__pyx_filename;
891
892
893 static const char *__pyx_f[] = {
894   "src/lxml/objectify.pyx",
895   "src/lxml/objectpath.pxi",
896   "src/lxml/includes/etreepublic.pxd",
897 };
898
899 /*--- Type declarations ---*/
900 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement;
901 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement;
902 struct __pyx_obj_4lxml_9objectify_NumberElement;
903 struct __pyx_obj_4lxml_9objectify_IntElement;
904 struct __pyx_obj_4lxml_9objectify_LongElement;
905 struct __pyx_obj_4lxml_9objectify_FloatElement;
906 struct __pyx_obj_4lxml_9objectify_StringElement;
907 struct __pyx_obj_4lxml_9objectify_NoneElement;
908 struct __pyx_obj_4lxml_9objectify_BoolElement;
909 struct __pyx_obj_4lxml_9objectify_PyType;
910 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller;
911 struct __pyx_obj_4lxml_9objectify_ElementMaker;
912 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup;
913 struct __pyx_obj_4lxml_9objectify_ObjectPath;
914 struct __pyx_t_4lxml_9objectify__ObjectPath;
915 typedef struct __pyx_t_4lxml_9objectify__ObjectPath __pyx_t_4lxml_9objectify__ObjectPath;
916
917 /* "src/lxml/objectpath.pxi":4
918  * # ObjectPath
919  * 
920  * ctypedef struct _ObjectPath:             # <<<<<<<<<<<<<<
921  *     const_xmlChar* href
922  *     const_xmlChar* name
923  */
924 struct __pyx_t_4lxml_9objectify__ObjectPath {
925   const xmlChar *href;
926   const xmlChar *name;
927   Py_ssize_t index;
928 };
929
930 /* "lxml/objectify.pyx":133
931  * # Element class for the main API
932  * 
933  * cdef class ObjectifiedElement(ElementBase):             # <<<<<<<<<<<<<<
934  *     u"""Main XML Element class.
935  * 
936  */
937 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
938   struct LxmlElementBase __pyx_base;
939 };
940
941
942 /* "lxml/objectify.pyx":592
943  * # Data type support in subclasses
944  * 
945  * cdef class ObjectifiedDataElement(ObjectifiedElement):             # <<<<<<<<<<<<<<
946  *     u"""This is the base class for all data type Elements.  Subclasses should
947  *     override the 'pyval' property and possibly the __str__ method.
948  */
949 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
950   struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
951 };
952
953
954 /* "lxml/objectify.pyx":612
955  *         cetree.setNodeText(self._c_node, s)
956  * 
957  * cdef class NumberElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
958  *     cdef object _parse_value
959  *     def _setValueParser(self, function):
960  */
961 struct __pyx_obj_4lxml_9objectify_NumberElement {
962   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
963   PyObject *_parse_value;
964 };
965
966
967 /* "lxml/objectify.pyx":709
968  *         return _numericValueOf(self) ^ _numericValueOf(other)
969  * 
970  * cdef class IntElement(NumberElement):             # <<<<<<<<<<<<<<
971  *     def _init(self):
972  *         self._parse_value = int
973  */
974 struct __pyx_obj_4lxml_9objectify_IntElement {
975   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
976 };
977
978
979 /* "lxml/objectify.pyx":716
980  *         return int(_parseNumber(self))
981  * 
982  * cdef class LongElement(NumberElement):             # <<<<<<<<<<<<<<
983  *     def _init(self):
984  *         self._parse_value = long
985  */
986 struct __pyx_obj_4lxml_9objectify_LongElement {
987   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
988 };
989
990
991 /* "lxml/objectify.pyx":723
992  *         return int(_parseNumber(self))
993  * 
994  * cdef class FloatElement(NumberElement):             # <<<<<<<<<<<<<<
995  *     def _init(self):
996  *         self._parse_value = float
997  */
998 struct __pyx_obj_4lxml_9objectify_FloatElement {
999   struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
1000 };
1001
1002
1003 /* "lxml/objectify.pyx":727
1004  *         self._parse_value = float
1005  * 
1006  * cdef class StringElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
1007  *     u"""String data class.
1008  * 
1009  */
1010 struct __pyx_obj_4lxml_9objectify_StringElement {
1011   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
1012 };
1013
1014
1015 /* "lxml/objectify.pyx":789
1016  *         return complex(textOf(self._c_node))
1017  * 
1018  * cdef class NoneElement(ObjectifiedDataElement):             # <<<<<<<<<<<<<<
1019  *     def __str__(self):
1020  *         return u"None"
1021  */
1022 struct __pyx_obj_4lxml_9objectify_NoneElement {
1023   struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
1024 };
1025
1026
1027 /* "lxml/objectify.pyx":815
1028  * 
1029  * 
1030  * cdef class BoolElement(IntElement):             # <<<<<<<<<<<<<<
1031  *     u"""Boolean type base on string values: 'true' or 'false'.
1032  * 
1033  */
1034 struct __pyx_obj_4lxml_9objectify_BoolElement {
1035   struct __pyx_obj_4lxml_9objectify_IntElement __pyx_base;
1036 };
1037
1038
1039 /* "lxml/objectify.pyx":901
1040  * # Python type registry
1041  * 
1042  * cdef class PyType:             # <<<<<<<<<<<<<<
1043  *     u"""PyType(self, name, type_check, type_class, stringify=None)
1044  *     User defined type.
1045  */
1046 struct __pyx_obj_4lxml_9objectify_PyType {
1047   PyObject_HEAD
1048   PyObject *name;
1049   PyObject *type_check;
1050   PyObject *stringify;
1051   PyObject *_type;
1052   PyObject *_schema_types;
1053 };
1054
1055
1056 /* "lxml/objectify.pyx":1131
1057  * @cython.final
1058  * @cython.internal
1059  * cdef class _ObjectifyElementMakerCaller:             # <<<<<<<<<<<<<<
1060  *     cdef object _tag
1061  *     cdef object _nsmap
1062  */
1063 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
1064   PyObject_HEAD
1065   PyObject *_tag;
1066   PyObject *_nsmap;
1067   PyObject *_element_factory;
1068   int _annotate;
1069 };
1070
1071
1072 /* "lxml/objectify.pyx":1221
1073  *         cetree.setNodeText(elem._c_node, text)
1074  * 
1075  * cdef class ElementMaker:             # <<<<<<<<<<<<<<
1076  *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
1077  * 
1078  */
1079 struct __pyx_obj_4lxml_9objectify_ElementMaker {
1080   PyObject_HEAD
1081   struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker *__pyx_vtab;
1082   PyObject *_makeelement;
1083   PyObject *_namespace;
1084   PyObject *_nsmap;
1085   int _annotate;
1086   PyObject *_cache;
1087 };
1088
1089
1090 /* "lxml/objectify.pyx":1377
1091  * # Element class lookup
1092  * 
1093  * cdef class ObjectifyElementClassLookup(ElementClassLookup):             # <<<<<<<<<<<<<<
1094  *     u"""ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)
1095  *     Element class lookup method that uses the objectify classes.
1096  */
1097 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
1098   struct LxmlElementClassLookup __pyx_base;
1099   PyObject *empty_data_class;
1100   PyObject *tree_class;
1101 };
1102
1103
1104 /* "src/lxml/objectpath.pxi":13
1105  * 
1106  * 
1107  * cdef class ObjectPath:             # <<<<<<<<<<<<<<
1108  *     u"""ObjectPath(path)
1109  *     Immutable object that represents a compiled object path.
1110  */
1111 struct __pyx_obj_4lxml_9objectify_ObjectPath {
1112   PyObject_HEAD
1113   PyObject *find;
1114   PyObject *_path;
1115   PyObject *_path_str;
1116   __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
1117   Py_ssize_t _path_len;
1118 };
1119
1120
1121
1122 /* "lxml/objectify.pyx":1221
1123  *         cetree.setNodeText(elem._c_node, text)
1124  * 
1125  * cdef class ElementMaker:             # <<<<<<<<<<<<<<
1126  *     u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
1127  * 
1128  */
1129
1130 struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker {
1131   PyObject *(*_build_element_maker)(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int);
1132 };
1133 static struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker *__pyx_vtabptr_4lxml_9objectify_ElementMaker;
1134 static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int);
1135
1136 /* --- Runtime support code (head) --- */
1137 /* Refnanny.proto */
1138 #ifndef CYTHON_REFNANNY
1139   #define CYTHON_REFNANNY 0
1140 #endif
1141 #if CYTHON_REFNANNY
1142   typedef struct {
1143     void (*INCREF)(void*, PyObject*, int);
1144     void (*DECREF)(void*, PyObject*, int);
1145     void (*GOTREF)(void*, PyObject*, int);
1146     void (*GIVEREF)(void*, PyObject*, int);
1147     void* (*SetupContext)(const char*, int, const char*);
1148     void (*FinishContext)(void**);
1149   } __Pyx_RefNannyAPIStruct;
1150   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1151   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1152   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1153 #ifdef WITH_THREAD
1154   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1155           if (acquire_gil) {\
1156               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1157               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1158               PyGILState_Release(__pyx_gilstate_save);\
1159           } else {\
1160               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1161           }
1162 #else
1163   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1164           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1165 #endif
1166   #define __Pyx_RefNannyFinishContext()\
1167           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1168   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1169   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1170   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1171   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1172   #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1173   #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1174   #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1175   #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1176 #else
1177   #define __Pyx_RefNannyDeclarations
1178   #define __Pyx_RefNannySetupContext(name, acquire_gil)
1179   #define __Pyx_RefNannyFinishContext()
1180   #define __Pyx_INCREF(r) Py_INCREF(r)
1181   #define __Pyx_DECREF(r) Py_DECREF(r)
1182   #define __Pyx_GOTREF(r)
1183   #define __Pyx_GIVEREF(r)
1184   #define __Pyx_XINCREF(r) Py_XINCREF(r)
1185   #define __Pyx_XDECREF(r) Py_XDECREF(r)
1186   #define __Pyx_XGOTREF(r)
1187   #define __Pyx_XGIVEREF(r)
1188 #endif
1189 #define __Pyx_XDECREF_SET(r, v) do {\
1190         PyObject *tmp = (PyObject *) r;\
1191         r = v; __Pyx_XDECREF(tmp);\
1192     } while (0)
1193 #define __Pyx_DECREF_SET(r, v) do {\
1194         PyObject *tmp = (PyObject *) r;\
1195         r = v; __Pyx_DECREF(tmp);\
1196     } while (0)
1197 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1198 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1199
1200 /* PyObjectGetAttrStr.proto */
1201 #if CYTHON_USE_TYPE_SLOTS
1202 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1203 #else
1204 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1205 #endif
1206
1207 /* GetBuiltinName.proto */
1208 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1209
1210 /* PyCFunctionFastCall.proto */
1211 #if CYTHON_FAST_PYCCALL
1212 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1213 #else
1214 #define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
1215 #endif
1216
1217 /* PyFunctionFastCall.proto */
1218 #if CYTHON_FAST_PYCALL
1219 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1220     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1221 #if 1 || PY_VERSION_HEX < 0x030600B1
1222 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1223 #else
1224 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1225 #endif
1226 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1227     (sizeof(char [1 - 2*!(cond)]) - 1)
1228 #ifndef Py_MEMBER_SIZE
1229 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1230 #endif
1231   static size_t __pyx_pyframe_localsplus_offset = 0;
1232   #include "frameobject.h"
1233   #define __Pxy_PyFrame_Initialize_Offsets()\
1234     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1235      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1236   #define __Pyx_PyFrame_GetLocalsplus(frame)\
1237     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1238 #endif
1239
1240 /* PyObjectCall.proto */
1241 #if CYTHON_COMPILING_IN_CPYTHON
1242 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1243 #else
1244 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1245 #endif
1246
1247 /* PyObjectCall2Args.proto */
1248 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1249
1250 /* PyObjectCallMethO.proto */
1251 #if CYTHON_COMPILING_IN_CPYTHON
1252 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1253 #endif
1254
1255 /* PyObjectCallOneArg.proto */
1256 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1257
1258 /* RaiseDoubleKeywords.proto */
1259 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1260
1261 /* ParseKeywords.proto */
1262 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1263     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1264     const char* function_name);
1265
1266 /* RaiseArgTupleInvalid.proto */
1267 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1268     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1269
1270 /* RaiseTooManyValuesToUnpack.proto */
1271 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1272
1273 /* RaiseNeedMoreValuesToUnpack.proto */
1274 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1275
1276 /* RaiseNoneIterError.proto */
1277 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1278
1279 /* decode_c_string_utf16.proto */
1280 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1281     int byteorder = 0;
1282     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1283 }
1284 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1285     int byteorder = -1;
1286     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1287 }
1288 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1289     int byteorder = 1;
1290     return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1291 }
1292
1293 /* decode_c_bytes.proto */
1294 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
1295          const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
1296          const char* encoding, const char* errors,
1297          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1298
1299 /* decode_bytes.proto */
1300 static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
1301          PyObject* string, Py_ssize_t start, Py_ssize_t stop,
1302          const char* encoding, const char* errors,
1303          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
1304     return __Pyx_decode_c_bytes(
1305         PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
1306         start, stop, encoding, errors, decode_func);
1307 }
1308
1309 /* PyObjectCallNoArg.proto */
1310 #if CYTHON_COMPILING_IN_CPYTHON
1311 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1312 #else
1313 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1314 #endif
1315
1316 /* PyDictVersioning.proto */
1317 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1318 #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
1319 #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
1320 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1321     (version_var) = __PYX_GET_DICT_VERSION(dict);\
1322     (cache_var) = (value);
1323 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1324     static PY_UINT64_T __pyx_dict_version = 0;\
1325     static PyObject *__pyx_dict_cached_value = NULL;\
1326     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1327         (VAR) = __pyx_dict_cached_value;\
1328     } else {\
1329         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1330         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1331     }\
1332 }
1333 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1334 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1335 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1336 #else
1337 #define __PYX_GET_DICT_VERSION(dict)  (0)
1338 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1339 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
1340 #endif
1341
1342 /* GetModuleGlobalName.proto */
1343 #if CYTHON_USE_DICT_VERSIONS
1344 #define __Pyx_GetModuleGlobalName(var, name)  {\
1345     static PY_UINT64_T __pyx_dict_version = 0;\
1346     static PyObject *__pyx_dict_cached_value = NULL;\
1347     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1348         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1349         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1350 }
1351 #define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
1352     PY_UINT64_T __pyx_dict_version;\
1353     PyObject *__pyx_dict_cached_value;\
1354     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1355 }
1356 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1357 #else
1358 #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1359 #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
1360 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1361 #endif
1362
1363 /* ExtTypeTest.proto */
1364 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1365
1366 /* PyDictContains.proto */
1367 static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
1368     int result = PyDict_Contains(dict, item);
1369     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1370 }
1371
1372 /* ListAppend.proto */
1373 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1374 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1375     PyListObject* L = (PyListObject*) list;
1376     Py_ssize_t len = Py_SIZE(list);
1377     if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1378         Py_INCREF(x);
1379         PyList_SET_ITEM(list, len, x);
1380         Py_SIZE(list) = len+1;
1381         return 0;
1382     }
1383     return PyList_Append(list, x);
1384 }
1385 #else
1386 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1387 #endif
1388
1389 /* IncludeStringH.proto */
1390 #include <string.h>
1391
1392 /* BytesEquals.proto */
1393 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1394
1395 /* UnicodeEquals.proto */
1396 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1397
1398 /* PyObjectFormatSimple.proto */
1399 #if CYTHON_COMPILING_IN_PYPY
1400     #define __Pyx_PyObject_FormatSimple(s, f) (\
1401         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1402         PyObject_Format(s, f))
1403 #elif PY_MAJOR_VERSION < 3
1404     #define __Pyx_PyObject_FormatSimple(s, f) (\
1405         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1406         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
1407         PyObject_Format(s, f))
1408 #elif CYTHON_USE_TYPE_SLOTS
1409     #define __Pyx_PyObject_FormatSimple(s, f) (\
1410         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1411         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
1412         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
1413         PyObject_Format(s, f))
1414 #else
1415     #define __Pyx_PyObject_FormatSimple(s, f) (\
1416         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
1417         PyObject_Format(s, f))
1418 #endif
1419
1420 /* JoinPyUnicode.proto */
1421 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
1422                                       Py_UCS4 max_char);
1423
1424 /* PyThreadStateGet.proto */
1425 #if CYTHON_FAST_THREAD_STATE
1426 #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
1427 #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
1428 #define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
1429 #else
1430 #define __Pyx_PyThreadState_declare
1431 #define __Pyx_PyThreadState_assign
1432 #define __Pyx_PyErr_Occurred()  PyErr_Occurred()
1433 #endif
1434
1435 /* PyErrFetchRestore.proto */
1436 #if CYTHON_FAST_THREAD_STATE
1437 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1438 #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1439 #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1440 #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1441 #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1442 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1443 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1444 #if CYTHON_COMPILING_IN_CPYTHON
1445 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1446 #else
1447 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1448 #endif
1449 #else
1450 #define __Pyx_PyErr_Clear() PyErr_Clear()
1451 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1452 #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
1453 #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
1454 #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
1455 #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
1456 #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
1457 #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
1458 #endif
1459
1460 /* RaiseException.proto */
1461 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1462
1463 /* GetItemInt.proto */
1464 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1465     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1466     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1467     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1468                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1469 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1470     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1471     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1472     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1473 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1474                                                               int wraparound, int boundscheck);
1475 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1476     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1477     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1478     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1479 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1480                                                               int wraparound, int boundscheck);
1481 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1482 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1483                                                      int is_list, int wraparound, int boundscheck);
1484
1485 /* ObjectGetItem.proto */
1486 #if CYTHON_USE_TYPE_SLOTS
1487 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1488 #else
1489 #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
1490 #endif
1491
1492 /* PyObject_Unicode.proto */
1493 #if PY_MAJOR_VERSION >= 3
1494 #define __Pyx_PyObject_Unicode(obj)\
1495     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1496 #else
1497 #define __Pyx_PyObject_Unicode(obj)\
1498     (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1499 #endif
1500
1501 /* PyObjectSetAttrStr.proto */
1502 #if CYTHON_USE_TYPE_SLOTS
1503 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
1504 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
1505 #else
1506 #define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
1507 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
1508 #endif
1509
1510 /* SliceObject.proto */
1511 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
1512     __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
1513 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
1514         PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
1515         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1516         int has_cstart, int has_cstop, int wraparound);
1517
1518 /* dict_getitem_default.proto */
1519 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
1520
1521 /* UnpackUnboundCMethod.proto */
1522 typedef struct {
1523     PyObject *type;
1524     PyObject **method_name;
1525     PyCFunction func;
1526     PyObject *method;
1527     int flag;
1528 } __Pyx_CachedCFunction;
1529
1530 /* CallUnboundCMethod1.proto */
1531 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1532 #if CYTHON_COMPILING_IN_CPYTHON
1533 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
1534 #else
1535 #define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
1536 #endif
1537
1538 /* CallUnboundCMethod2.proto */
1539 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
1540 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
1541 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
1542 #else
1543 #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
1544 #endif
1545
1546 /* BuildPyUnicode.proto */
1547 static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
1548                                                 int prepend_sign, char padding_char);
1549
1550 /* CIntToPyUnicode.proto */
1551 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
1552
1553 /* PyIntBinop.proto */
1554 #if !CYTHON_COMPILING_IN_PYPY
1555 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1556 #else
1557 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
1558     (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1559 #endif
1560
1561 /* py_abs.proto */
1562 #if CYTHON_USE_PYLONG_INTERNALS
1563 static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
1564 #define __Pyx_PyNumber_Absolute(x)\
1565     ((likely(PyLong_CheckExact(x))) ?\
1566          (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
1567          PyNumber_Absolute(x))
1568 #else
1569 #define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
1570 #endif
1571
1572 /* StrEquals.proto */
1573 #if PY_MAJOR_VERSION >= 3
1574 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1575 #else
1576 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1577 #endif
1578
1579 /* GetTopmostException.proto */
1580 #if CYTHON_USE_EXC_INFO_STACK
1581 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1582 #endif
1583
1584 /* SaveResetException.proto */
1585 #if CYTHON_FAST_THREAD_STATE
1586 #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1587 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1588 #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1589 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1590 #else
1591 #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
1592 #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
1593 #endif
1594
1595 /* PyErrExceptionMatches.proto */
1596 #if CYTHON_FAST_THREAD_STATE
1597 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1598 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1599 #else
1600 #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
1601 #endif
1602
1603 /* GetAttr.proto */
1604 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1605
1606 /* GetAttr3.proto */
1607 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1608
1609 /* CallableCheck.proto */
1610 #if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3
1611 #define __Pyx_PyCallable_Check(obj)   ((obj)->ob_type->tp_call != NULL)
1612 #else
1613 #define __Pyx_PyCallable_Check(obj)   PyCallable_Check(obj)
1614 #endif
1615
1616 /* IterFinish.proto */
1617 static CYTHON_INLINE int __Pyx_IterFinish(void);
1618
1619 /* UnpackItemEndCheck.proto */
1620 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
1621
1622 /* PyIntBinop.proto */
1623 #if !CYTHON_COMPILING_IN_PYPY
1624 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1625 #else
1626 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1627     (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1628 #endif
1629
1630 /* PyIntCompare.proto */
1631 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1632
1633 /* PySequenceContains.proto */
1634 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1635     int result = PySequence_Contains(seq, item);
1636     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1637 }
1638
1639 /* py_dict_items.proto */
1640 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);
1641
1642 /* CallUnboundCMethod0.proto */
1643 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
1644 #if CYTHON_COMPILING_IN_CPYTHON
1645 #define __Pyx_CallUnboundCMethod0(cfunc, self)\
1646     (likely((cfunc)->func) ?\
1647         (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
1648          (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
1649             (PY_VERSION_HEX >= 0x030700A0 ?\
1650                 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
1651                 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
1652           (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
1653             (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
1654             (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
1655                ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
1656                __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
1657         __Pyx__CallUnboundCMethod0(cfunc, self))
1658 #else
1659 #define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
1660 #endif
1661
1662 /* pyfrozenset_new.proto */
1663 static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);
1664
1665 /* PySetContains.proto */
1666 static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);
1667
1668 /* py_dict_values.proto */
1669 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);
1670
1671 /* KeywordStringCheck.proto */
1672 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1673
1674 /* py_dict_clear.proto */
1675 #define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0)
1676
1677 /* ArgTypeTest.proto */
1678 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1679     ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1680         __Pyx__ArgTypeTest(obj, type, name, exact))
1681 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1682
1683 /* PyUnicode_Unicode.proto */
1684 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);
1685
1686 /* PyObjectFormatAndDecref.proto */
1687 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
1688 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
1689
1690 /* SliceObject.proto */
1691 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
1692         PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
1693         PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
1694         int has_cstart, int has_cstop, int wraparound);
1695
1696 /* Import.proto */
1697 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1698
1699 /* GetException.proto */
1700 #if CYTHON_FAST_THREAD_STATE
1701 #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
1702 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1703 #else
1704 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1705 #endif
1706
1707 /* PyIntCompare.proto */
1708 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1709
1710 /* DelItemInt.proto */
1711 #define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1712     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1713     __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) :\
1714     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1715                __Pyx_DelItem_Generic(o, to_py_func(i))))
1716 static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j);
1717 static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
1718                                                int is_list, int wraparound);
1719
1720 /* CallNextTpDealloc.proto */
1721 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
1722
1723 /* CallNextTpTraverse.proto */
1724 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
1725
1726 /* CallNextTpClear.proto */
1727 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);
1728
1729 /* PyObject_GenericGetAttrNoDict.proto */
1730 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1731 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1732 #else
1733 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1734 #endif
1735
1736 /* PyObject_GenericGetAttr.proto */
1737 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1738 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1739 #else
1740 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1741 #endif
1742
1743 /* TypeImport.proto */
1744 #ifndef __PYX_HAVE_RT_ImportType_proto
1745 #define __PYX_HAVE_RT_ImportType_proto
1746 enum __Pyx_ImportType_CheckSize {
1747    __Pyx_ImportType_CheckSize_Error = 0,
1748    __Pyx_ImportType_CheckSize_Warn = 1,
1749    __Pyx_ImportType_CheckSize_Ignore = 2
1750 };
1751 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1752 #endif
1753
1754 /* SetVTable.proto */
1755 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1756
1757 /* ImportFrom.proto */
1758 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1759
1760 /* FetchCommonType.proto */
1761 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1762
1763 /* CythonFunctionShared.proto */
1764 #define __Pyx_CyFunction_USED 1
1765 #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
1766 #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
1767 #define __Pyx_CYFUNCTION_CCLASS        0x04
1768 #define __Pyx_CyFunction_GetClosure(f)\
1769     (((__pyx_CyFunctionObject *) (f))->func_closure)
1770 #define __Pyx_CyFunction_GetClassObj(f)\
1771     (((__pyx_CyFunctionObject *) (f))->func_classobj)
1772 #define __Pyx_CyFunction_Defaults(type, f)\
1773     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
1774 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
1775     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
1776 typedef struct {
1777     PyCFunctionObject func;
1778 #if PY_VERSION_HEX < 0x030500A0
1779     PyObject *func_weakreflist;
1780 #endif
1781     PyObject *func_dict;
1782     PyObject *func_name;
1783     PyObject *func_qualname;
1784     PyObject *func_doc;
1785     PyObject *func_globals;
1786     PyObject *func_code;
1787     PyObject *func_closure;
1788     PyObject *func_classobj;
1789     void *defaults;
1790     int defaults_pyobjects;
1791     size_t defaults_size;  // used by FusedFunction for copying defaults
1792     int flags;
1793     PyObject *defaults_tuple;
1794     PyObject *defaults_kwdict;
1795     PyObject *(*defaults_getter)(PyObject *);
1796     PyObject *func_annotations;
1797 } __pyx_CyFunctionObject;
1798 static PyTypeObject *__pyx_CyFunctionType = 0;
1799 #define __Pyx_CyFunction_Check(obj)  (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
1800 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
1801                                       int flags, PyObject* qualname,
1802                                       PyObject *self,
1803                                       PyObject *module, PyObject *globals,
1804                                       PyObject* code);
1805 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
1806                                                          size_t size,
1807                                                          int pyobjects);
1808 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
1809                                                             PyObject *tuple);
1810 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
1811                                                              PyObject *dict);
1812 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
1813                                                               PyObject *dict);
1814 static int __pyx_CyFunction_init(void);
1815
1816 /* CythonFunction.proto */
1817 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
1818                                       int flags, PyObject* qualname,
1819                                       PyObject *closure,
1820                                       PyObject *module, PyObject *globals,
1821                                       PyObject* code);
1822
1823 /* RegisterModuleCleanup.proto */
1824 static void __pyx_module_cleanup(PyObject *self);
1825 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
1826 static int __Pyx_RegisterCleanup(void);
1827 #else
1828 #define __Pyx_RegisterCleanup() (0)
1829 #endif
1830
1831 /* CLineInTraceback.proto */
1832 #ifdef CYTHON_CLINE_IN_TRACEBACK
1833 #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1834 #else
1835 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1836 #endif
1837
1838 /* CodeObjectCache.proto */
1839 typedef struct {
1840     PyCodeObject* code_object;
1841     int code_line;
1842 } __Pyx_CodeObjectCacheEntry;
1843 struct __Pyx_CodeObjectCache {
1844     int count;
1845     int max_count;
1846     __Pyx_CodeObjectCacheEntry* entries;
1847 };
1848 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1849 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1850 static PyCodeObject *__pyx_find_code_object(int code_line);
1851 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1852
1853 /* AddTraceback.proto */
1854 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1855                                int py_line, const char *filename);
1856
1857 /* CIntToPy.proto */
1858 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1859
1860 /* CIntToPy.proto */
1861 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1862
1863 /* CIntFromPy.proto */
1864 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1865
1866 /* CIntFromPy.proto */
1867 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1868
1869 /* FastTypeChecks.proto */
1870 #if CYTHON_COMPILING_IN_CPYTHON
1871 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1872 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1873 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1874 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1875 #else
1876 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1877 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1878 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1879 #endif
1880 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1881
1882 /* CheckBinaryVersion.proto */
1883 static int __Pyx_check_binary_version(void);
1884
1885 /* InitStrings.proto */
1886 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1887
1888 static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag, int __pyx_v_caching); /* proto*/
1889
1890 /* Module declarations from 'cython' */
1891
1892 /* Module declarations from 'libc.string' */
1893
1894 /* Module declarations from 'libc' */
1895
1896 /* Module declarations from 'libc.stdio' */
1897
1898 /* Module declarations from 'lxml.includes.tree' */
1899
1900 /* Module declarations from 'lxml.etree' */
1901
1902 /* Module declarations from 'lxml.includes' */
1903
1904 /* Module declarations from 'lxml.includes.etreepublic' */
1905 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Document = 0;
1906 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__Element = 0;
1907 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = 0;
1908 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = 0;
1909 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = 0;
1910 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = 0;
1911 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = 0;
1912 static PyTypeObject *__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = 0;
1913
1914 /* Module declarations from 'lxml' */
1915
1916 /* Module declarations from 'lxml.python' */
1917
1918 /* Module declarations from 'lxml.objectify' */
1919 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
1920 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
1921 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
1922 static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
1923 static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
1924 static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
1925 static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
1926 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
1927 static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
1928 static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
1929 static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
1930 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
1931 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
1932 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
1933 static PyObject *__pyx_v_4lxml_9objectify_etree = 0;
1934 static PyObject *__pyx_v_4lxml_9objectify_re = 0;
1935 static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
1936 static PyObject *__pyx_v_4lxml_9objectify_is_special_method = 0;
1937 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
1938 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
1939 static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
1940 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
1941 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
1942 static const xmlChar *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
1943 static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
1944 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
1945 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
1946 static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
1947 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
1948 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
1949 static const xmlChar *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
1950 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
1951 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
1952 static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
1953 static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
1954 static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
1955 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
1956 static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
1957 static PyObject *__pyx_v_4lxml_9objectify__strip_attributes = 0;
1958 static PyObject *__pyx_v_4lxml_9objectify__cleanup_namespaces = 0;
1959 static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
1960 static PyObject *__pyx_v_4lxml_9objectify_objectify_parser = 0;
1961 static PyObject *__pyx_v_4lxml_9objectify__fromstring = 0;
1962 static PyObject *__pyx_v_4lxml_9objectify__parse = 0;
1963 static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
1964 static PyObject *__pyx_v_4lxml_9objectify__NO_DEFAULT = 0;
1965 static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
1966 static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
1967 static PyObject *__pyx_f_4lxml_9objectify_strrepr(PyObject *); /*proto*/
1968 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
1969 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
1970 static CYTHON_INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, const xmlChar *, const xmlChar *); /*proto*/
1971 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
1972 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, const xmlChar *, const xmlChar *, Py_ssize_t); /*proto*/
1973 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *, PyObject *); /*proto*/
1974 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *, PyObject *); /*proto*/
1975 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *, PyObject *); /*proto*/
1976 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *, PyObject *); /*proto*/
1977 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *, PyObject *, PyObject *); /*proto*/
1978 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *, PyObject *); /*proto*/
1979 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *, struct LxmlElement *, PyObject *); /*proto*/
1980 static int __pyx_f_4lxml_9objectify___parseBool(PyObject *, int __pyx_skip_dispatch); /*proto*/
1981 static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
1982 static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
1983 static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
1984 static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
1985 static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *, PyObject *, int); /*proto*/
1986 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
1987 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
1988 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
1989 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
1990 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *, PyObject *); /*proto*/
1991 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *, int); /*proto*/
1992 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *); /*proto*/
1993 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *, struct LxmlDocument *, xmlNode *); /*proto*/
1994 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
1995 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *, int, int, int, int, PyObject *, PyObject *); /*proto*/
1996 static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *, struct LxmlDocument *, int, int, int, int, PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *, struct __pyx_obj_4lxml_9objectify_PyType *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
1997 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
1998 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_string(PyObject *); /*proto*/
1999 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_list(PyObject *); /*proto*/
2000 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__build_object_path_segments(PyObject *); /*proto*/
2001 static PyObject *__pyx_f_4lxml_9objectify__find_object_path(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, PyObject *); /*proto*/
2002 static PyObject *__pyx_f_4lxml_9objectify__create_object_path(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, int, PyObject *); /*proto*/
2003 static PyObject *__pyx_f_4lxml_9objectify__build_descendant_paths(xmlNode *, PyObject *); /*proto*/
2004 static int __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(xmlNode *, PyObject *, PyObject *); /*proto*/
2005 #define __Pyx_MODULE_NAME "lxml.objectify"
2006 extern int __pyx_module_is_main_lxml__objectify;
2007 int __pyx_module_is_main_lxml__objectify = 0;
2008
2009 /* Implementation of 'lxml.objectify' */
2010 static PyObject *__pyx_builtin_ValueError;
2011 static PyObject *__pyx_builtin_TypeError;
2012 static PyObject *__pyx_builtin_object;
2013 static PyObject *__pyx_builtin_IndexError;
2014 static PyObject *__pyx_builtin_AttributeError;
2015 static PyObject *__pyx_builtin_oct;
2016 static PyObject *__pyx_builtin_hex;
2017 static PyObject *__pyx_builtin_enumerate;
2018 static PyObject *__pyx_builtin_map;
2019 static PyObject *__pyx_builtin_MemoryError;
2020 static const char __pyx_k_[] = "";
2021 static const char __pyx_k_0[] = "0";
2022 static const char __pyx_k_1[] = "1";
2023 static const char __pyx_k_E[] = "E";
2024 static const char __pyx_k_U[] = "U";
2025 static const char __pyx_k_b[] = "b";
2026 static const char __pyx_k_c[] = "c";
2027 static const char __pyx_k_f[] = "f";
2028 static const char __pyx_k_i[] = "i";
2029 static const char __pyx_k_s[] = "{%s}*";
2030 static const char __pyx_k_ID[] = "ID";
2031 static const char __pyx_k__2[] = ".";
2032 static const char __pyx_k__4[] = "'";
2033 static const char __pyx_k__9[] = "{";
2034   static const char __pyx_k_kw[] = "kw";
2035   static const char __pyx_k_ns[] = "ns";
2036   static const char __pyx_k_of[] = "' of '";
2037   static const char __pyx_k_on[] = "on";
2038   static const char __pyx_k_py[] = "py:";
2039   static const char __pyx_k_re[] = "re";
2040   static const char __pyx_k_XML[] = "XML";
2041   static const char __pyx_k__10[] = "    ";
2042   static const char __pyx_k__11[] = " = ";
2043   static const char __pyx_k__12[] = " [";
2044   static const char __pyx_k__13[] = "]\n";
2045   static const char __pyx_k__14[] = "  * ";
2046   static const char __pyx_k__15[] = "\n";
2047   static const char __pyx_k__17[] = ":";
2048   static const char __pyx_k__19[] = "{}";
2049   static const char __pyx_k__20[] = "[";
2050   static const char __pyx_k__21[] = "]";
2051   static const char __pyx_k__23[] = "__.*__$";
2052   static const char __pyx_k_all[] = "__all__";
2053   static const char __pyx_k_end[] = "end";
2054   static const char __pyx_k_get[] = "get";
2055   static const char __pyx_k_got[] = ", got ";
2056   static const char __pyx_k_hex[] = "hex";
2057   static const char __pyx_k_int[] = "int";
2058   static const char __pyx_k_map[] = "map";
2059   static const char __pyx_k_obj[] = "obj";
2060   static const char __pyx_k_oct[] = "oct";
2061   static const char __pyx_k_s_2[] = "{%s}";
2062   static const char __pyx_k_s_3[] = "s";
2063   static const char __pyx_k_set[] = "__set__";
2064   static const char __pyx_k_str[] = "str";
2065   static const char __pyx_k_tag[] = "tag";
2066   static const char __pyx_k_xml[] = "xml";
2067   static const char __pyx_k_xsd[] = "xsd:";
2068   static const char __pyx_k_xsi[] = "xsi:";
2069   static const char __pyx_k_Name[] = "Name";
2070   static const char __pyx_k_None[] = "None";
2071   static const char __pyx_k_TREE[] = "TREE";
2072   static const char __pyx_k_base[] = "base";
2073   static const char __pyx_k_bool[] = "bool";
2074   static const char __pyx_k_byte[] = "byte";
2075   static const char __pyx_k_call[] = "__call__";
2076   static const char __pyx_k_copy[] = "__copy__";
2077   static const char __pyx_k_data[] = "data";
2078   static const char __pyx_k_dump[] = "dump";
2079   static const char __pyx_k_init[] = "_init";
2080   static const char __pyx_k_item[] = "item";
2081   static const char __pyx_k_long[] = "long";
2082   static const char __pyx_k_lxml[] = "lxml";
2083   static const char __pyx_k_main[] = "__main__";
2084   static const char __pyx_k_name[] = "name";
2085   static const char __pyx_k_none[] = "none";
2086   static const char __pyx_k_path[] = "path";
2087   static const char __pyx_k_py_2[] = "py";
2088   static const char __pyx_k_repr[] = "repr";
2089   static const char __pyx_k_root[] = "root";
2090   static const char __pyx_k_self[] = "self";
2091   static const char __pyx_k_tail[] = "tail";
2092   static const char __pyx_k_temp[] = "temp";
2093   static const char __pyx_k_test[] = "__test__";
2094   static const char __pyx_k_text[] = "text";
2095   static const char __pyx_k_true[] = "true";
2096   static const char __pyx_k_IDREF[] = "IDREF";
2097   static const char __pyx_k_after[] = "after";
2098   static const char __pyx_k_check[] = "check";
2099   static const char __pyx_k_entry[] = "entry";
2100   static const char __pyx_k_etree[] = "etree";
2101   static const char __pyx_k_false[] = "false";
2102   static const char __pyx_k_float[] = "float";
2103   static const char __pyx_k_items[] = "items";
2104   static const char __pyx_k_known[] = "known";
2105   static const char __pyx_k_match[] = "match";
2106   static const char __pyx_k_nsmap[] = "nsmap";
2107   static const char __pyx_k_parse[] = "parse";
2108   static const char __pyx_k_pyval[] = "pyval";
2109   static const char __pyx_k_s_nil[] = "{%s}nil";
2110   static const char __pyx_k_short[] = "short";
2111   static const char __pyx_k_split[] = "split";
2112   static const char __pyx_k_strip[] = "strip";
2113   static const char __pyx_k_tag_2[] = "_tag";
2114   static const char __pyx_k_token[] = "token";
2115   static const char __pyx_k_types[] = "types";
2116   static const char __pyx_k_value[] = "value";
2117   static const char __pyx_k_xsd_2[] = "xsd";
2118   static const char __pyx_k_xsi_2[] = "xsi";
2119   static const char __pyx_k_xsi_3[] = "_xsi";
2120   static const char __pyx_k_ENTITY[] = "ENTITY";
2121   static const char __pyx_k_NCName[] = "NCName";
2122   static const char __pyx_k_PyType[] = "PyType";
2123   static const char __pyx_k_attrib[] = "attrib";
2124   static const char __pyx_k_before[] = "before";
2125   static const char __pyx_k_c_node[] = "c_node";
2126   static const char __pyx_k_double[] = "double";
2127   static const char __pyx_k_encode[] = "encode";
2128   static const char __pyx_k_groups[] = "groups";
2129   static const char __pyx_k_import[] = "__import__";
2130   static const char __pyx_k_name_2[] = "__name__";
2131   static const char __pyx_k_object[] = "object";
2132   static const char __pyx_k_parser[] = "parser";
2133   static const char __pyx_k_pickle[] = "pickle";
2134   static const char __pyx_k_prefix[] = "prefix";
2135   static const char __pyx_k_pytype[] = "pytype";
2136   static const char __pyx_k_reduce[] = "__reduce__";
2137   static const char __pyx_k_remove[] = "remove";
2138   static const char __pyx_k_result[] = "result";
2139   static const char __pyx_k_s_type[] = "{%s}type";
2140   static const char __pyx_k_string[] = "string";
2141   static const char __pyx_k_strlen[] = "strlen";
2142   static const char __pyx_k_strval[] = "strval";
2143   static const char __pyx_k_update[] = "update";
2144   static const char __pyx_k_values[] = "values";
2145   static const char __pyx_k_Element[] = "Element";
2146   static const char __pyx_k_NMTOKEN[] = "NMTOKEN";
2147   static const char __pyx_k_addattr[] = "addattr";
2148   static const char __pyx_k_addnext[] = "addnext";
2149   static const char __pyx_k_boolean[] = "boolean";
2150   static const char __pyx_k_compile[] = "compile";
2151   static const char __pyx_k_complex[] = "__complex__";
2152   static const char __pyx_k_copyreg[] = "copyreg";
2153   static const char __pyx_k_element[] = "element";
2154   static const char __pyx_k_getattr[] = "__getattr__";
2155   static const char __pyx_k_getitem[] = "__getitem__";
2156   static const char __pyx_k_hasattr[] = "hasattr";
2157   static const char __pyx_k_integer[] = "integer";
2158   static const char __pyx_k_py_type[] = "py_type";
2159   static const char __pyx_k_replace[] = "replace";
2160   static const char __pyx_k_setText[] = "_setText";
2161   static const char __pyx_k_setattr[] = "setattr";
2162   static const char __pyx_k_value_2[] = "_value";
2163   static const char __pyx_k_version[] = "__version__";
2164   static const char __pyx_k_xs_type[] = "xs_type";
2165   static const char __pyx_k_xsi_nil[] = "xsi_nil";
2166   static const char __pyx_k_NoneType[] = "NoneType";
2167   static const char __pyx_k_annotate[] = "annotate";
2168   static const char __pyx_k_base_url[] = "base_url";
2169   static const char __pyx_k_copy_reg[] = "copy_reg";
2170   static const char __pyx_k_function[] = "function";
2171   static const char __pyx_k_language[] = "language";
2172   static const char __pyx_k_last_pos[] = "last_pos";
2173   static const char __pyx_k_pytype_2[] = "_pytype";
2174   static const char __pyx_k_register[] = "register";
2175   static const char __pyx_k_tostring[] = "tostring";
2176   static const char __pyx_k_TypeError[] = "TypeError";
2177   static const char __pyx_k_XMLParser[] = "XMLParser";
2178   static const char __pyx_k_attribute[] = "attribute '";
2179   static const char __pyx_k_checkBool[] = "__checkBool";
2180   static const char __pyx_k_enumerate[] = "enumerate";
2181   static const char __pyx_k_first_pos[] = "first_pos";
2182   static const char __pyx_k_getparent[] = "getparent";
2183   static const char __pyx_k_namespace[] = "namespace";
2184   static const char __pyx_k_parseBool[] = "__parseBool";
2185   static const char __pyx_k_stringify[] = "stringify";
2186   static const char __pyx_k_IndexError[] = "IndexError";
2187   static const char __pyx_k_IntElement[] = "IntElement";
2188   static const char __pyx_k_ObjectPath[] = "ObjectPath";
2189   static const char __pyx_k_PyType_s_s[] = "PyType(%s, %s)";
2190   static const char __pyx_k_SubElement[] = "SubElement";
2191   static const char __pyx_k_ValueError[] = "ValueError";
2192   static const char __pyx_k_attributes[] = "_attributes";
2193   static const char __pyx_k_deannotate[] = "deannotate";
2194   static const char __pyx_k_empty_type[] = "empty_type";
2195   static const char __pyx_k_fromstring[] = "fromstring";
2196   static const char __pyx_k_ignore_old[] = "ignore_old";
2197   static const char __pyx_k_ignore_xsi[] = "ignore_xsi";
2198   static const char __pyx_k_lower_bool[] = "__lower_bool";
2199   static const char __pyx_k_makeparser[] = "makeparser";
2200   static const char __pyx_k_new_parser[] = "new_parser";
2201   static const char __pyx_k_pyannotate[] = "pyannotate";
2202   static const char __pyx_k_pytypename[] = "pytypename";
2203   static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2204   static const char __pyx_k_tree_class[] = "tree_class";
2205   static const char __pyx_k_type_check[] = "type_check";
2206   static const char __pyx_k_type_class[] = "type_class";
2207   static const char __pyx_k_unregister[] = "unregister";
2208   static const char __pyx_k_BoolElement[] = "BoolElement";
2209   static const char __pyx_k_DataElement[] = "DataElement";
2210   static const char __pyx_k_ElementTree[] = "ElementTree";
2211   static const char __pyx_k_LongElement[] = "LongElement";
2212   static const char __pyx_k_MemoryError[] = "MemoryError";
2213   static const char __pyx_k_NoneElement[] = "NoneElement";
2214   static const char __pyx_k_getchildren[] = "getchildren";
2215   static const char __pyx_k_makeelement[] = "makeelement";
2216   static const char __pyx_k_unsignedInt[] = "unsignedInt";
2217   static const char __pyx_k_xsiannotate[] = "xsiannotate";
2218   static const char __pyx_k_ElementMaker[] = "ElementMaker";
2219   static const char __pyx_k_FloatElement[] = "FloatElement";
2220   static const char __pyx_k_annotate_xsi[] = "annotate_xsi";
2221   static const char __pyx_k_empty_pytype[] = "empty_pytype";
2222   static const char __pyx_k_invalid_path[] = "invalid path";
2223   static const char __pyx_k_iterchildren[] = "iterchildren";
2224   static const char __pyx_k_unsignedByte[] = "unsignedByte";
2225   static const char __pyx_k_unsignedLong[] = "unsignedLong";
2226   static const char __pyx_k_ElementTree_2[] = "_ElementTree";
2227   static const char __pyx_k_Invalid_slice[] = "Invalid slice";
2228   static const char __pyx_k_NumberElement[] = "NumberElement";
2229   static const char __pyx_k_StringElement[] = "StringElement";
2230   static const char __pyx_k_attribute_tag[] = "attribute_tag";
2231   static const char __pyx_k_countchildren[] = "countchildren";
2232   static const char __pyx_k_ignore_pytype[] = "ignore_pytype";
2233   static const char __pyx_k_no_such_child[] = "no such child: ";
2234   static const char __pyx_k_unsignedShort[] = "unsignedShort";
2235   static const char __pyx_k_AttributeError[] = "AttributeError";
2236   static const char __pyx_k_lxml_objectify[] = "lxml.objectify";
2237   static const char __pyx_k_setValueParser[] = "_setValueParser";
2238   static const char __pyx_k_unicode_escape[] = "unicode-escape";
2239   static const char __pyx_k_xmlSchemaTypes[] = "xmlSchemaTypes";
2240   static const char __pyx_k_PyType_register[] = "PyType.register";
2241   static const char __pyx_k_annotate_pytype[] = "annotate_pytype";
2242   static const char __pyx_k_attribute_names[] = "attribute_names";
2243   static const char __pyx_k_descendantpaths[] = "descendantpaths";
2244   static const char __pyx_k_element_or_tree[] = "element_or_tree";
2245   static const char __pyx_k_negativeInteger[] = "negativeInteger";
2246   static const char __pyx_k_positiveInteger[] = "positiveInteger";
2247 static const char __pyx_k_s_s_s_s_s_0_9_s[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
2248 static const char __pyx_k_IntElement__init[] = "IntElement._init";
2249 static const char __pyx_k_PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
2250 static const char __pyx_k_empty_data_class[] = "empty_data_class";
2251 static const char __pyx_k_normalizedString[] = "normalizedString";
2252 static const char __pyx_k_strip_attributes[] = "strip_attributes";
2253 static const char __pyx_k_BoolElement__init[] = "BoolElement._init";
2254 static const char __pyx_k_LongElement__init[] = "LongElement._init";
2255 static const char __pyx_k_PyType_unregister[] = "PyType.unregister";
2256 static const char __pyx_k_remove_blank_text[] = "remove_blank_text";
2257 static const char __pyx_k_FloatElement__init[] = "FloatElement._init";
2258 static const char __pyx_k_ObjectPath_addattr[] = "ObjectPath.addattr";
2259 static const char __pyx_k_ObjectPath_hasattr[] = "ObjectPath.hasattr";
2260 static const char __pyx_k_ObjectPath_setattr[] = "ObjectPath.setattr";
2261 static const char __pyx_k_ObjectifiedElement[] = "ObjectifiedElement";
2262 static const char __pyx_k_cleanup_namespaces[] = "cleanup_namespaces";
2263 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2264 static const char __pyx_k_getRegisteredTypes[] = "getRegisteredTypes";
2265 static const char __pyx_k_nonNegativeInteger[] = "nonNegativeInteger";
2266 static const char __pyx_k_nonPositiveInteger[] = "nonPositiveInteger";
2267 static const char __pyx_k_set_default_parser[] = "set_default_parser";
2268 static const char __pyx_k_unpickleElementTree[] = "__unpickleElementTree";
2269 static const char __pyx_k_ElementChildIterator[] = "ElementChildIterator";
2270 static const char __pyx_k_StringElement_strlen[] = "StringElement.strlen";
2271 static const char __pyx_k_enable_recursive_str[] = "enable_recursive_str";
2272 static const char __pyx_k_Invalid_boolean_value[] = "Invalid boolean value: '";
2273 static const char __pyx_k_ObjectifiedDataElement[] = "ObjectifiedDataElement";
2274 static const char __pyx_k_src_lxml_objectify_pyx[] = "src/lxml/objectify.pyx";
2275 static const char __pyx_k_NumberElement___complex[] = "NumberElement.__complex__";
2276 static const char __pyx_k_StringElement___complex[] = "StringElement.__complex__";
2277 static const char __pyx_k_cannot_update_root_node[] = "cannot update root node";
2278 static const char __pyx_k_objects_is_not_writable[] = "' objects is not writable";
2279 static const char __pyx_k_pickleReduceElementTree[] = "pickleReduceElementTree";
2280 static const char __pyx_k_src_lxml_objectpath_pxi[] = "src/lxml/objectpath.pxi";
2281 static const char __pyx_k_set_element_class_lookup[] = "set_element_class_lookup";
2282 static const char __pyx_k_set_pytype_attribute_tag[] = "set_pytype_attribute_tag";
2283 static const char __pyx_k_Cannot_register_tree_type[] = "Cannot register tree type";
2284 static const char __pyx_k_index_must_be_enclosed_in[] = "index must be enclosed in []";
2285 static const char __pyx_k_to_extended_slice_of_size[] = " to extended slice of size ";
2286 static const char __pyx_k_ObjectifiedElement_addattr[] = "ObjectifiedElement.addattr";
2287 static const char __pyx_k_Type_name_must_be_a_string[] = "Type name must be a string";
2288 static const char __pyx_k_invalid_types_for_operator[] = "invalid types for * operator";
2289 static const char __pyx_k_ObjectifiedElement___reduce[] = "ObjectifiedElement.__reduce__";
2290 static const char __pyx_k_ObjectifyElementClassLookup[] = "ObjectifyElementClassLookup";
2291 static const char __pyx_k_NumberElement__setValueParser[] = "NumberElement._setValueParser";
2292 static const char __pyx_k_ObjectifiedElement_getchildren[] = "ObjectifiedElement.getchildren";
2293 static const char __pyx_k_http_www_w3_org_2001_XMLSchema[] = "http://www.w3.org/2001/XMLSchema";
2294 static const char __pyx_k_index_not_allowed_on_root_node[] = "index not allowed on root node";
2295 static const char __pyx_k_ObjectifiedDataElement__setText[] = "ObjectifiedDataElement._setText";
2296 static const char __pyx_k_The_lxml_objectify_module_imple[] = "\nThe ``lxml.objectify`` module implements a Python object API for XML.\nIt is based on `lxml.etree`.\n";
2297 static const char __pyx_k_deleting_items_not_supported_by[] = "deleting items not supported by root element";
2298 static const char __pyx_k_Data_classes_must_inherit_from_O[] = "Data classes must inherit from ObjectifiedDataElement";
2299 static const char __pyx_k_ObjectifiedElement_countchildren[] = "ObjectifiedElement.countchildren";
2300 static const char __pyx_k_ObjectifiedElement_descendantpat[] = "ObjectifiedElement.descendantpaths";
2301 static const char __pyx_k_Type_check_function_must_be_call[] = "Type check function must be callable (or None)";
2302 static const char __pyx_k_XSD_types_require_the_XSD_namesp[] = "XSD types require the XSD namespace";
2303 static const char __pyx_k_argument_of_makeelement_paramete[] = "argument of 'makeelement' parameter must be callable, got ";
2304 static const char __pyx_k_assignment_to_root_element_is_in[] = "assignment to root element is invalid";
2305 static const char __pyx_k_attempt_to_assign_sequence_of_si[] = "attempt to assign sequence of size ";
2306 static const char __pyx_k_creating_indexed_path_attributes[] = "creating indexed path attributes is not supported";
2307 static const char __pyx_k_http_codespeak_net_lxml_objectif[] = "http://codespeak.net/lxml/objectify/pytype";
2308 static const char __pyx_k_http_www_w3_org_2001_XMLSchema_i[] = "http://www.w3.org/2001/XMLSchema-instance";
2309 static const char __pyx_k_inconsistent_before_after_depend[] = "inconsistent before/after dependencies";
2310 static const char __pyx_k_invalid_number_of_arguments_need[] = "invalid number of arguments: needs one or two";
2311 static const char __pyx_k_parser_must_inherit_from_lxml_et[] = "parser must inherit from lxml.etree.XMLParser";
2312 static const char __pyx_k_root_element_does_not_match_need[] = "root element does not match: need ";
2313 static PyObject *__pyx_kp_s_;
2314 static PyObject *__pyx_kp_u_;
2315 static PyObject *__pyx_kp_s_0;
2316 static PyObject *__pyx_kp_s_1;
2317 static PyObject *__pyx_n_s_AttributeError;
2318 static PyObject *__pyx_n_s_BoolElement;
2319 static PyObject *__pyx_n_u_BoolElement;
2320 static PyObject *__pyx_n_s_BoolElement__init;
2321 static PyObject *__pyx_kp_u_Cannot_register_tree_type;
2322 static PyObject *__pyx_n_s_DataElement;
2323 static PyObject *__pyx_n_u_DataElement;
2324 static PyObject *__pyx_kp_u_Data_classes_must_inherit_from_O;
2325 static PyObject *__pyx_n_s_E;
2326 static PyObject *__pyx_n_u_E;
2327 static PyObject *__pyx_n_u_ENTITY;
2328 static PyObject *__pyx_n_s_Element;
2329 static PyObject *__pyx_n_u_Element;
2330 static PyObject *__pyx_n_s_ElementChildIterator;
2331 static PyObject *__pyx_n_s_ElementMaker;
2332 static PyObject *__pyx_n_u_ElementMaker;
2333 static PyObject *__pyx_n_s_ElementTree;
2334 static PyObject *__pyx_n_s_ElementTree_2;
2335 static PyObject *__pyx_n_s_FloatElement;
2336 static PyObject *__pyx_n_u_FloatElement;
2337 static PyObject *__pyx_n_s_FloatElement__init;
2338 static PyObject *__pyx_n_u_ID;
2339 static PyObject *__pyx_n_u_IDREF;
2340 static PyObject *__pyx_n_s_IndexError;
2341 static PyObject *__pyx_n_s_IntElement;
2342 static PyObject *__pyx_n_u_IntElement;
2343 static PyObject *__pyx_n_s_IntElement__init;
2344 static PyObject *__pyx_kp_u_Invalid_boolean_value;
2345 static PyObject *__pyx_kp_u_Invalid_slice;
2346 static PyObject *__pyx_n_s_LongElement;
2347 static PyObject *__pyx_n_u_LongElement;
2348 static PyObject *__pyx_n_s_LongElement__init;
2349 static PyObject *__pyx_n_s_MemoryError;
2350 static PyObject *__pyx_n_u_NCName;
2351 static PyObject *__pyx_n_u_NMTOKEN;
2352 static PyObject *__pyx_n_u_Name;
2353 static PyObject *__pyx_n_s_None;
2354 static PyObject *__pyx_n_u_None;
2355 static PyObject *__pyx_n_s_NoneElement;
2356 static PyObject *__pyx_n_u_NoneElement;
2357 static PyObject *__pyx_n_s_NoneType;
2358 static PyObject *__pyx_n_u_NoneType;
2359 static PyObject *__pyx_n_s_NumberElement;
2360 static PyObject *__pyx_n_u_NumberElement;
2361 static PyObject *__pyx_n_s_NumberElement___complex;
2362 static PyObject *__pyx_n_s_NumberElement__setValueParser;
2363 static PyObject *__pyx_n_s_ObjectPath;
2364 static PyObject *__pyx_n_u_ObjectPath;
2365 static PyObject *__pyx_n_s_ObjectPath_addattr;
2366 static PyObject *__pyx_n_s_ObjectPath_hasattr;
2367 static PyObject *__pyx_n_s_ObjectPath_setattr;
2368 static PyObject *__pyx_n_s_ObjectifiedDataElement;
2369 static PyObject *__pyx_n_u_ObjectifiedDataElement;
2370 static PyObject *__pyx_n_s_ObjectifiedDataElement__setText;
2371 static PyObject *__pyx_n_s_ObjectifiedElement;
2372 static PyObject *__pyx_n_u_ObjectifiedElement;
2373 static PyObject *__pyx_n_s_ObjectifiedElement___reduce;
2374 static PyObject *__pyx_n_s_ObjectifiedElement_addattr;
2375 static PyObject *__pyx_n_s_ObjectifiedElement_countchildren;
2376 static PyObject *__pyx_n_s_ObjectifiedElement_descendantpat;
2377 static PyObject *__pyx_n_s_ObjectifiedElement_getchildren;
2378 static PyObject *__pyx_n_s_ObjectifyElementClassLookup;
2379 static PyObject *__pyx_n_u_ObjectifyElementClassLookup;
2380 static PyObject *__pyx_n_s_PYTYPE_ATTRIBUTE;
2381 static PyObject *__pyx_n_u_PYTYPE_ATTRIBUTE;
2382 static PyObject *__pyx_n_s_PyType;
2383 static PyObject *__pyx_n_u_PyType;
2384 static PyObject *__pyx_n_s_PyType_register;
2385 static PyObject *__pyx_kp_s_PyType_s_s;
2386 static PyObject *__pyx_n_s_PyType_unregister;
2387 static PyObject *__pyx_n_s_StringElement;
2388 static PyObject *__pyx_n_u_StringElement;
2389 static PyObject *__pyx_n_s_StringElement___complex;
2390 static PyObject *__pyx_n_s_StringElement_strlen;
2391 static PyObject *__pyx_n_s_SubElement;
2392 static PyObject *__pyx_n_u_SubElement;
2393 static PyObject *__pyx_n_u_TREE;
2394 static PyObject *__pyx_n_s_TypeError;
2395 static PyObject *__pyx_kp_u_Type_check_function_must_be_call;
2396 static PyObject *__pyx_kp_u_Type_name_must_be_a_string;
2397 static PyObject *__pyx_n_s_U;
2398 static PyObject *__pyx_n_s_ValueError;
2399 static PyObject *__pyx_n_s_XML;
2400 static PyObject *__pyx_n_u_XML;
2401 static PyObject *__pyx_n_s_XMLParser;
2402 static PyObject *__pyx_kp_u_XSD_types_require_the_XSD_namesp;
2403 static PyObject *__pyx_kp_u__10;
2404 static PyObject *__pyx_kp_u__11;
2405 static PyObject *__pyx_kp_u__12;
2406 static PyObject *__pyx_kp_u__13;
2407 static PyObject *__pyx_kp_u__14;
2408 static PyObject *__pyx_kp_u__15;
2409 static PyObject *__pyx_kp_b__17;
2410 static PyObject *__pyx_kp_u__17;
2411 static PyObject *__pyx_kp_u__19;
2412 static PyObject *__pyx_kp_u__2;
2413 static PyObject *__pyx_kp_u__20;
2414 static PyObject *__pyx_kp_u__21;
2415 static PyObject *__pyx_kp_u__23;
2416 static PyObject *__pyx_kp_u__4;
2417 static PyObject *__pyx_kp_u__9;
2418 static PyObject *__pyx_n_s_addattr;
2419 static PyObject *__pyx_n_s_addnext;
2420 static PyObject *__pyx_n_s_after;
2421 static PyObject *__pyx_n_s_all;
2422 static PyObject *__pyx_n_s_annotate;
2423 static PyObject *__pyx_n_u_annotate;
2424 static PyObject *__pyx_n_s_annotate_pytype;
2425 static PyObject *__pyx_n_s_annotate_xsi;
2426 static PyObject *__pyx_kp_u_argument_of_makeelement_paramete;
2427 static PyObject *__pyx_kp_u_assignment_to_root_element_is_in;
2428 static PyObject *__pyx_kp_u_attempt_to_assign_sequence_of_si;
2429 static PyObject *__pyx_n_s_attrib;
2430 static PyObject *__pyx_kp_u_attribute;
2431 static PyObject *__pyx_n_s_attribute_names;
2432 static PyObject *__pyx_n_s_attribute_tag;
2433 static PyObject *__pyx_n_s_attributes;
2434 static PyObject *__pyx_n_s_b;
2435 static PyObject *__pyx_n_s_base;
2436 static PyObject *__pyx_n_u_base;
2437 static PyObject *__pyx_n_s_base_url;
2438 static PyObject *__pyx_n_s_before;
2439 static PyObject *__pyx_n_u_bool;
2440 static PyObject *__pyx_n_u_boolean;
2441 static PyObject *__pyx_n_u_byte;
2442 static PyObject *__pyx_n_s_c;
2443 static PyObject *__pyx_n_s_c_node;
2444 static PyObject *__pyx_n_s_call;
2445 static PyObject *__pyx_kp_u_cannot_update_root_node;
2446 static PyObject *__pyx_n_s_check;
2447 static PyObject *__pyx_n_s_checkBool;
2448 static PyObject *__pyx_n_s_cleanup_namespaces;
2449 static PyObject *__pyx_n_s_cline_in_traceback;
2450 static PyObject *__pyx_n_s_compile;
2451 static PyObject *__pyx_n_s_complex;
2452 static PyObject *__pyx_n_s_copy;
2453 static PyObject *__pyx_n_s_copy_reg;
2454 static PyObject *__pyx_n_s_copyreg;
2455 static PyObject *__pyx_n_s_countchildren;
2456 static PyObject *__pyx_kp_u_creating_indexed_path_attributes;
2457 static PyObject *__pyx_n_s_data;
2458 static PyObject *__pyx_n_s_deannotate;
2459 static PyObject *__pyx_n_u_deannotate;
2460 static PyObject *__pyx_kp_u_deleting_items_not_supported_by;
2461 static PyObject *__pyx_n_s_descendantpaths;
2462 static PyObject *__pyx_n_u_double;
2463 static PyObject *__pyx_n_s_dump;
2464 static PyObject *__pyx_n_u_dump;
2465 static PyObject *__pyx_n_s_element;
2466 static PyObject *__pyx_n_s_element_or_tree;
2467 static PyObject *__pyx_n_s_empty_data_class;
2468 static PyObject *__pyx_n_s_empty_pytype;
2469 static PyObject *__pyx_n_s_empty_type;
2470 static PyObject *__pyx_n_s_enable_recursive_str;
2471 static PyObject *__pyx_n_u_enable_recursive_str;
2472 static PyObject *__pyx_n_s_encode;
2473 static PyObject *__pyx_n_s_end;
2474 static PyObject *__pyx_n_s_entry;
2475 static PyObject *__pyx_n_s_enumerate;
2476 static PyObject *__pyx_n_s_etree;
2477 static PyObject *__pyx_n_s_f;
2478 static PyObject *__pyx_n_s_false;
2479 static PyObject *__pyx_n_u_false;
2480 static PyObject *__pyx_n_s_first_pos;
2481 static PyObject *__pyx_n_u_float;
2482 static PyObject *__pyx_n_s_fromstring;
2483 static PyObject *__pyx_n_u_fromstring;
2484 static PyObject *__pyx_n_s_function;
2485 static PyObject *__pyx_n_s_get;
2486 static PyObject *__pyx_n_s_getRegisteredTypes;
2487 static PyObject *__pyx_n_u_getRegisteredTypes;
2488 static PyObject *__pyx_n_s_getattr;
2489 static PyObject *__pyx_n_s_getchildren;
2490 static PyObject *__pyx_n_s_getitem;
2491 static PyObject *__pyx_n_s_getparent;
2492 static PyObject *__pyx_kp_u_got;
2493 static PyObject *__pyx_n_s_groups;
2494 static PyObject *__pyx_n_s_hasattr;
2495 static PyObject *__pyx_n_s_hex;
2496 static PyObject *__pyx_kp_u_http_codespeak_net_lxml_objectif;
2497 static PyObject *__pyx_kp_u_http_www_w3_org_2001_XMLSchema;
2498 static PyObject *__pyx_kp_u_http_www_w3_org_2001_XMLSchema_i;
2499 static PyObject *__pyx_n_s_i;
2500 static PyObject *__pyx_n_s_ignore_old;
2501 static PyObject *__pyx_n_s_ignore_pytype;
2502 static PyObject *__pyx_n_s_ignore_xsi;
2503 static PyObject *__pyx_n_s_import;
2504 static PyObject *__pyx_kp_u_inconsistent_before_after_depend;
2505 static PyObject *__pyx_kp_u_index_must_be_enclosed_in;
2506 static PyObject *__pyx_kp_u_index_not_allowed_on_root_node;
2507 static PyObject *__pyx_n_s_init;
2508 static PyObject *__pyx_n_u_int;
2509 static PyObject *__pyx_n_u_integer;
2510 static PyObject *__pyx_kp_u_invalid_number_of_arguments_need;
2511 static PyObject *__pyx_kp_u_invalid_path;
2512 static PyObject *__pyx_kp_u_invalid_types_for_operator;
2513 static PyObject *__pyx_n_s_item;
2514 static PyObject *__pyx_n_s_items;
2515 static PyObject *__pyx_n_s_iterchildren;
2516 static PyObject *__pyx_n_s_known;
2517 static PyObject *__pyx_n_s_kw;
2518 static PyObject *__pyx_n_u_language;
2519 static PyObject *__pyx_n_s_last_pos;
2520 static PyObject *__pyx_n_u_long;
2521 static PyObject *__pyx_n_s_lower_bool;
2522 static PyObject *__pyx_n_s_lxml;
2523 static PyObject *__pyx_n_s_lxml_objectify;
2524 static PyObject *__pyx_n_s_main;
2525 static PyObject *__pyx_n_s_makeelement;
2526 static PyObject *__pyx_n_s_makeparser;
2527 static PyObject *__pyx_n_u_makeparser;
2528 static PyObject *__pyx_n_s_map;
2529 static PyObject *__pyx_n_s_match;
2530 static PyObject *__pyx_n_s_name;
2531 static PyObject *__pyx_n_s_name_2;
2532 static PyObject *__pyx_n_s_namespace;
2533 static PyObject *__pyx_n_u_negativeInteger;
2534 static PyObject *__pyx_n_s_new_parser;
2535 static PyObject *__pyx_kp_u_no_such_child;
2536 static PyObject *__pyx_n_u_nonNegativeInteger;
2537 static PyObject *__pyx_n_u_nonPositiveInteger;
2538 static PyObject *__pyx_n_s_none;
2539 static PyObject *__pyx_n_u_none;
2540 static PyObject *__pyx_n_u_normalizedString;
2541 static PyObject *__pyx_n_s_ns;
2542 static PyObject *__pyx_n_s_nsmap;
2543 static PyObject *__pyx_n_s_obj;
2544 static PyObject *__pyx_n_s_object;
2545 static PyObject *__pyx_kp_u_objects_is_not_writable;
2546 static PyObject *__pyx_n_s_oct;
2547 static PyObject *__pyx_kp_u_of;
2548 static PyObject *__pyx_n_s_on;
2549 static PyObject *__pyx_n_s_parse;
2550 static PyObject *__pyx_n_u_parse;
2551 static PyObject *__pyx_n_s_parseBool;
2552 static PyObject *__pyx_n_s_parser;
2553 static PyObject *__pyx_kp_u_parser_must_inherit_from_lxml_et;
2554 static PyObject *__pyx_n_s_path;
2555 static PyObject *__pyx_n_s_pickle;
2556 static PyObject *__pyx_n_s_pickleReduceElementTree;
2557 static PyObject *__pyx_n_u_positiveInteger;
2558 static PyObject *__pyx_n_s_prefix;
2559 static PyObject *__pyx_kp_u_py;
2560 static PyObject *__pyx_n_s_py_2;
2561 static PyObject *__pyx_n_s_py_type;
2562 static PyObject *__pyx_n_s_pyannotate;
2563 static PyObject *__pyx_n_u_pyannotate;
2564 static PyObject *__pyx_n_s_pytype;
2565 static PyObject *__pyx_n_u_pytype;
2566 static PyObject *__pyx_n_s_pytype_2;
2567 static PyObject *__pyx_n_s_pytypename;
2568 static PyObject *__pyx_n_u_pytypename;
2569 static PyObject *__pyx_n_s_pyval;
2570 static PyObject *__pyx_n_u_pyval;
2571 static PyObject *__pyx_n_s_pyx_vtable;
2572 static PyObject *__pyx_n_s_re;
2573 static PyObject *__pyx_n_s_reduce;
2574 static PyObject *__pyx_n_s_register;
2575 static PyObject *__pyx_n_s_remove;
2576 static PyObject *__pyx_n_s_remove_blank_text;
2577 static PyObject *__pyx_n_s_replace;
2578 static PyObject *__pyx_n_s_repr;
2579 static PyObject *__pyx_n_s_result;
2580 static PyObject *__pyx_n_s_root;
2581 static PyObject *__pyx_kp_u_root_element_does_not_match_need;
2582 static PyObject *__pyx_kp_u_s;
2583 static PyObject *__pyx_kp_u_s_2;
2584 static PyObject *__pyx_n_s_s_3;
2585 static PyObject *__pyx_kp_u_s_nil;
2586 static PyObject *__pyx_kp_u_s_s_s_s_s_0_9_s;
2587 static PyObject *__pyx_kp_u_s_type;
2588 static PyObject *__pyx_n_s_self;
2589 static PyObject *__pyx_n_s_set;
2590 static PyObject *__pyx_n_s_setText;
2591 static PyObject *__pyx_n_s_setValueParser;
2592 static PyObject *__pyx_n_s_set_default_parser;
2593 static PyObject *__pyx_n_u_set_default_parser;
2594 static PyObject *__pyx_n_s_set_element_class_lookup;
2595 static PyObject *__pyx_n_s_set_pytype_attribute_tag;
2596 static PyObject *__pyx_n_u_set_pytype_attribute_tag;
2597 static PyObject *__pyx_n_s_setattr;
2598 static PyObject *__pyx_n_u_short;
2599 static PyObject *__pyx_n_s_split;
2600 static PyObject *__pyx_kp_s_src_lxml_objectify_pyx;
2601 static PyObject *__pyx_kp_s_src_lxml_objectpath_pxi;
2602 static PyObject *__pyx_n_u_str;
2603 static PyObject *__pyx_n_u_string;
2604 static PyObject *__pyx_n_s_stringify;
2605 static PyObject *__pyx_n_s_strip;
2606 static PyObject *__pyx_n_s_strip_attributes;
2607 static PyObject *__pyx_n_s_strlen;
2608 static PyObject *__pyx_n_s_strval;
2609 static PyObject *__pyx_n_s_tag;
2610 static PyObject *__pyx_n_u_tag;
2611 static PyObject *__pyx_n_s_tag_2;
2612 static PyObject *__pyx_n_u_tail;
2613 static PyObject *__pyx_n_s_temp;
2614 static PyObject *__pyx_n_s_test;
2615 static PyObject *__pyx_n_s_text;
2616 static PyObject *__pyx_n_u_text;
2617 static PyObject *__pyx_kp_u_to_extended_slice_of_size;
2618 static PyObject *__pyx_n_u_token;
2619 static PyObject *__pyx_n_s_tostring;
2620 static PyObject *__pyx_n_s_tree_class;
2621 static PyObject *__pyx_n_s_true;
2622 static PyObject *__pyx_n_u_true;
2623 static PyObject *__pyx_n_s_type_check;
2624 static PyObject *__pyx_n_s_type_class;
2625 static PyObject *__pyx_n_s_types;
2626 static PyObject *__pyx_kp_s_unicode_escape;
2627 static PyObject *__pyx_n_s_unpickleElementTree;
2628 static PyObject *__pyx_n_s_unregister;
2629 static PyObject *__pyx_n_u_unsignedByte;
2630 static PyObject *__pyx_n_u_unsignedInt;
2631 static PyObject *__pyx_n_u_unsignedLong;
2632 static PyObject *__pyx_n_u_unsignedShort;
2633 static PyObject *__pyx_n_s_update;
2634 static PyObject *__pyx_n_s_value;
2635 static PyObject *__pyx_n_u_value;
2636 static PyObject *__pyx_n_s_value_2;
2637 static PyObject *__pyx_n_s_values;
2638 static PyObject *__pyx_n_s_version;
2639 static PyObject *__pyx_n_s_xml;
2640 static PyObject *__pyx_n_s_xmlSchemaTypes;
2641 static PyObject *__pyx_n_s_xs_type;
2642 static PyObject *__pyx_kp_u_xsd;
2643 static PyObject *__pyx_n_s_xsd_2;
2644 static PyObject *__pyx_kp_u_xsi;
2645 static PyObject *__pyx_n_s_xsi_2;
2646 static PyObject *__pyx_n_s_xsi_3;
2647 static PyObject *__pyx_n_s_xsi_nil;
2648 static PyObject *__pyx_n_s_xsiannotate;
2649 static PyObject *__pyx_n_u_xsiannotate;
2650 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute_tag); /* proto */
2651 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2652 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2653 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2654 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2655 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2656 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2657 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2658 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self); /* proto */
2659 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2660 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /* proto */
2661 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2662 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /* proto */
2663 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
2664 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */
2665 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
2666 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
2667 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2668 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2669 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self); /* proto */
2670 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s); /* proto */
2671 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
2672 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2673 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2674 #if PY_MAJOR_VERSION < 3
2675 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2676 #endif
2677 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2678 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2679 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_10__str__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2680 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2681 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2682 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2683 #endif
2684 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2685 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2686 #endif
2687 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
2688 static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2689 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2690 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2691 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2692 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2693 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2694 #endif
2695 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2696 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2697 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /* proto */
2698 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2699 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2700 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2701 static int __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2702 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self); /* proto */
2703 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2704 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2705 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2706 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2707 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2708 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self); /* proto */
2709 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement_2__index__(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self); /* proto */
2710 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self); /* proto */
2711 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement_2__index__(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self); /* proto */
2712 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self); /* proto */
2713 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2714 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2715 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2716 static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2717 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
2718 static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2719 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2720 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2721 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2722 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_16__int__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2723 #if PY_MAJOR_VERSION < 3
2724 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2725 #endif
2726 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2727 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_22__complex__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self); /* proto */
2728 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2729 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2730 static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2731 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
2732 static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2733 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self); /* proto */
2734 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2735 static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2736 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */
2737 static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2738 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2739 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2740 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self); /* proto */
2741 static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
2742 static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
2743 static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type_check, PyObject *__pyx_v_type_class, PyObject *__pyx_v_stringify); /* proto */
2744 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2745 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after); /* proto */
2746 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2747 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2748 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
2749 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2750 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2751 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self); /* proto */
2752 static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b); /* proto */
2753 static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2754 static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2755 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_self, PyObject *__pyx_v_children, PyObject *__pyx_v_attrib); /* proto */
2756 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_namespace, PyObject *__pyx_v_nsmap, PyObject *__pyx_v_annotate, PyObject *__pyx_v_makeelement); /* proto */
2757 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag); /* proto */
2758 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
2759 static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_on); /* proto */
2760 static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element); /* proto */
2761 static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
2762 static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2763 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_self, PyObject *__pyx_v_tree_class, PyObject *__pyx_v_empty_data_class); /* proto */
2764 static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype); /* proto */
2765 static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type); /* proto */
2766 static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype, PyObject *__pyx_v_empty_type, PyObject *__pyx_v_annotate_xsi, PyObject *__pyx_v_annotate_pytype); /* proto */
2767 static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, int __pyx_v_pytype, int __pyx_v_xsi, int __pyx_v_xsi_nil, int __pyx_v_cleanup_namespaces); /* proto */
2768 static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_parser); /* proto */
2769 static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw); /* proto */
2770 static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
2771 static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
2772 static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url); /* proto */
2773 static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__attributes); /* proto */
2774 static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__value, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__xsi, PyObject *__pyx_v__attributes); /* proto */
2775 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
2776 static void __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2777 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2778 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v__default); /* proto */
2779 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root); /* proto */
2780 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value); /* proto */
2781 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value); /* proto */
2782 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self); /* proto */
2783 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2784 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2785 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2786 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2787 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2788 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2789 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2790 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2791 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2792 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2793 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2794 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2795 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2796 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2797 static __Pyx_CachedCFunction __pyx_umethod_PyBytes_Type_split = {0, &__pyx_n_s_split, 0, 0, 0};
2798 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0};
2799 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0};
2800 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, &__pyx_n_s_values, 0, 0, 0};
2801 static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_remove = {0, &__pyx_n_s_remove, 0, 0, 0};
2802 static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_strip = {0, &__pyx_n_s_strip, 0, 0, 0};
2803 static PyObject *__pyx_int_0;
2804 static PyObject *__pyx_int_1;
2805 static PyObject *__pyx_int_neg_1;
2806 static PyObject *__pyx_slice__3;
2807 static PyObject *__pyx_tuple__5;
2808 static PyObject *__pyx_tuple__6;
2809 static PyObject *__pyx_tuple__7;
2810 static PyObject *__pyx_tuple__8;
2811 static PyObject *__pyx_slice__16;
2812 static PyObject *__pyx_tuple__18;
2813 static PyObject *__pyx_tuple__22;
2814 static PyObject *__pyx_tuple__24;
2815 static PyObject *__pyx_tuple__25;
2816 static PyObject *__pyx_tuple__27;
2817 static PyObject *__pyx_tuple__28;
2818 static PyObject *__pyx_tuple__30;
2819 static PyObject *__pyx_tuple__32;
2820 static PyObject *__pyx_tuple__34;
2821 static PyObject *__pyx_tuple__36;
2822 static PyObject *__pyx_tuple__38;
2823 static PyObject *__pyx_tuple__40;
2824 static PyObject *__pyx_tuple__42;
2825 static PyObject *__pyx_tuple__44;
2826 static PyObject *__pyx_tuple__46;
2827 static PyObject *__pyx_tuple__48;
2828 static PyObject *__pyx_tuple__50;
2829 static PyObject *__pyx_tuple__52;
2830 static PyObject *__pyx_tuple__54;
2831 static PyObject *__pyx_tuple__56;
2832 static PyObject *__pyx_tuple__58;
2833 static PyObject *__pyx_tuple__60;
2834 static PyObject *__pyx_tuple__62;
2835 static PyObject *__pyx_tuple__64;
2836 static PyObject *__pyx_tuple__66;
2837 static PyObject *__pyx_tuple__68;
2838 static PyObject *__pyx_tuple__70;
2839 static PyObject *__pyx_tuple__72;
2840 static PyObject *__pyx_tuple__73;
2841 static PyObject *__pyx_tuple__75;
2842 static PyObject *__pyx_tuple__77;
2843 static PyObject *__pyx_tuple__79;
2844 static PyObject *__pyx_tuple__81;
2845 static PyObject *__pyx_tuple__83;
2846 static PyObject *__pyx_tuple__85;
2847 static PyObject *__pyx_tuple__87;
2848 static PyObject *__pyx_tuple__89;
2849 static PyObject *__pyx_tuple__90;
2850 static PyObject *__pyx_tuple__92;
2851 static PyObject *__pyx_tuple__94;
2852 static PyObject *__pyx_tuple__95;
2853 static PyObject *__pyx_tuple__97;
2854 static PyObject *__pyx_tuple__98;
2855 static PyObject *__pyx_tuple__100;
2856 static PyObject *__pyx_tuple__101;
2857 static PyObject *__pyx_tuple__103;
2858 static PyObject *__pyx_tuple__104;
2859 static PyObject *__pyx_tuple__106;
2860 static PyObject *__pyx_tuple__107;
2861 static PyObject *__pyx_tuple__109;
2862 static PyObject *__pyx_tuple__111;
2863 static PyObject *__pyx_tuple__113;
2864 static PyObject *__pyx_codeobj__26;
2865 static PyObject *__pyx_codeobj__29;
2866 static PyObject *__pyx_codeobj__31;
2867 static PyObject *__pyx_codeobj__33;
2868 static PyObject *__pyx_codeobj__35;
2869 static PyObject *__pyx_codeobj__37;
2870 static PyObject *__pyx_codeobj__39;
2871 static PyObject *__pyx_codeobj__41;
2872 static PyObject *__pyx_codeobj__43;
2873 static PyObject *__pyx_codeobj__45;
2874 static PyObject *__pyx_codeobj__47;
2875 static PyObject *__pyx_codeobj__49;
2876 static PyObject *__pyx_codeobj__51;
2877 static PyObject *__pyx_codeobj__53;
2878 static PyObject *__pyx_codeobj__55;
2879 static PyObject *__pyx_codeobj__57;
2880 static PyObject *__pyx_codeobj__59;
2881 static PyObject *__pyx_codeobj__61;
2882 static PyObject *__pyx_codeobj__63;
2883 static PyObject *__pyx_codeobj__65;
2884 static PyObject *__pyx_codeobj__67;
2885 static PyObject *__pyx_codeobj__69;
2886 static PyObject *__pyx_codeobj__71;
2887 static PyObject *__pyx_codeobj__74;
2888 static PyObject *__pyx_codeobj__76;
2889 static PyObject *__pyx_codeobj__78;
2890 static PyObject *__pyx_codeobj__80;
2891 static PyObject *__pyx_codeobj__82;
2892 static PyObject *__pyx_codeobj__84;
2893 static PyObject *__pyx_codeobj__86;
2894 static PyObject *__pyx_codeobj__88;
2895 static PyObject *__pyx_codeobj__91;
2896 static PyObject *__pyx_codeobj__93;
2897 static PyObject *__pyx_codeobj__96;
2898 static PyObject *__pyx_codeobj__99;
2899 static PyObject *__pyx_codeobj__102;
2900 static PyObject *__pyx_codeobj__105;
2901 static PyObject *__pyx_codeobj__108;
2902 static PyObject *__pyx_codeobj__110;
2903 static PyObject *__pyx_codeobj__112;
2904 /* Late includes */
2905
2906 /* "lxml/objectify.pyx":50
2907  * # Duplicated from apihelpers.pxi, since dependencies obstruct
2908  * # including apihelpers.pxi.
2909  * cdef strrepr(s):             # <<<<<<<<<<<<<<
2910  *     """Build a representation of strings which we can use in __repr__
2911  *     methods, e.g. _Element.__repr__().
2912  */
2913
2914 static PyObject *__pyx_f_4lxml_9objectify_strrepr(PyObject *__pyx_v_s) {
2915   PyObject *__pyx_r = NULL;
2916   __Pyx_RefNannyDeclarations
2917   PyObject *__pyx_t_1 = NULL;
2918   PyObject *__pyx_t_2 = NULL;
2919   PyObject *__pyx_t_3 = NULL;
2920   PyObject *__pyx_t_4 = NULL;
2921   int __pyx_lineno = 0;
2922   const char *__pyx_filename = NULL;
2923   int __pyx_clineno = 0;
2924   __Pyx_RefNannySetupContext("strrepr", 0);
2925
2926   /* "lxml/objectify.pyx":54
2927  *     methods, e.g. _Element.__repr__().
2928  *     """
2929  *     return s.encode('unicode-escape') if python.IS_PYTHON2 else s             # <<<<<<<<<<<<<<
2930  * 
2931  * 
2932  */
2933   __Pyx_XDECREF(__pyx_r);
2934   if ((IS_PYTHON2 != 0)) {
2935     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
2936     __Pyx_GOTREF(__pyx_t_3);
2937     __pyx_t_4 = NULL;
2938     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
2939       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2940       if (likely(__pyx_t_4)) {
2941         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2942         __Pyx_INCREF(__pyx_t_4);
2943         __Pyx_INCREF(function);
2944         __Pyx_DECREF_SET(__pyx_t_3, function);
2945       }
2946     }
2947     __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_unicode_escape) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_unicode_escape);
2948     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2949     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
2950     __Pyx_GOTREF(__pyx_t_2);
2951     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2952     __pyx_t_1 = __pyx_t_2;
2953     __pyx_t_2 = 0;
2954   } else {
2955     __Pyx_INCREF(__pyx_v_s);
2956     __pyx_t_1 = __pyx_v_s;
2957   }
2958   __pyx_r = __pyx_t_1;
2959   __pyx_t_1 = 0;
2960   goto __pyx_L0;
2961
2962   /* "lxml/objectify.pyx":50
2963  * # Duplicated from apihelpers.pxi, since dependencies obstruct
2964  * # including apihelpers.pxi.
2965  * cdef strrepr(s):             # <<<<<<<<<<<<<<
2966  *     """Build a representation of strings which we can use in __repr__
2967  *     methods, e.g. _Element.__repr__().
2968  */
2969
2970   /* function exit code */
2971   __pyx_L1_error:;
2972   __Pyx_XDECREF(__pyx_t_1);
2973   __Pyx_XDECREF(__pyx_t_2);
2974   __Pyx_XDECREF(__pyx_t_3);
2975   __Pyx_XDECREF(__pyx_t_4);
2976   __Pyx_AddTraceback("lxml.objectify.strrepr", __pyx_clineno, __pyx_lineno, __pyx_filename);
2977   __pyx_r = 0;
2978   __pyx_L0:;
2979   __Pyx_XGIVEREF(__pyx_r);
2980   __Pyx_RefNannyFinishContext();
2981   return __pyx_r;
2982 }
2983
2984 /* "lxml/objectify.pyx":57
2985  * 
2986  * 
2987  * cdef object _typename(object t):             # <<<<<<<<<<<<<<
2988  *     cdef const_char* c_name
2989  *     c_name = python._fqtypename(t)
2990  */
2991
2992 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
2993   const char *__pyx_v_c_name;
2994   char *__pyx_v_s;
2995   PyObject *__pyx_r = NULL;
2996   __Pyx_RefNannyDeclarations
2997   int __pyx_t_1;
2998   PyObject *__pyx_t_2 = NULL;
2999   int __pyx_lineno = 0;
3000   const char *__pyx_filename = NULL;
3001   int __pyx_clineno = 0;
3002   __Pyx_RefNannySetupContext("_typename", 0);
3003
3004   /* "lxml/objectify.pyx":59
3005  * cdef object _typename(object t):
3006  *     cdef const_char* c_name
3007  *     c_name = python._fqtypename(t)             # <<<<<<<<<<<<<<
3008  *     s = cstring_h.strrchr(c_name, c'.')
3009  *     if s is not NULL:
3010  */
3011   __pyx_v_c_name = _fqtypename(__pyx_v_t);
3012
3013   /* "lxml/objectify.pyx":60
3014  *     cdef const_char* c_name
3015  *     c_name = python._fqtypename(t)
3016  *     s = cstring_h.strrchr(c_name, c'.')             # <<<<<<<<<<<<<<
3017  *     if s is not NULL:
3018  *         c_name = s + 1
3019  */
3020   __pyx_v_s = strrchr(__pyx_v_c_name, '.');
3021
3022   /* "lxml/objectify.pyx":61
3023  *     c_name = python._fqtypename(t)
3024  *     s = cstring_h.strrchr(c_name, c'.')
3025  *     if s is not NULL:             # <<<<<<<<<<<<<<
3026  *         c_name = s + 1
3027  *     return pyunicode(<const_xmlChar*>c_name)
3028  */
3029   __pyx_t_1 = ((__pyx_v_s != NULL) != 0);
3030   if (__pyx_t_1) {
3031
3032     /* "lxml/objectify.pyx":62
3033  *     s = cstring_h.strrchr(c_name, c'.')
3034  *     if s is not NULL:
3035  *         c_name = s + 1             # <<<<<<<<<<<<<<
3036  *     return pyunicode(<const_xmlChar*>c_name)
3037  * 
3038  */
3039     __pyx_v_c_name = (__pyx_v_s + 1);
3040
3041     /* "lxml/objectify.pyx":61
3042  *     c_name = python._fqtypename(t)
3043  *     s = cstring_h.strrchr(c_name, c'.')
3044  *     if s is not NULL:             # <<<<<<<<<<<<<<
3045  *         c_name = s + 1
3046  *     return pyunicode(<const_xmlChar*>c_name)
3047  */
3048   }
3049
3050   /* "lxml/objectify.pyx":63
3051  *     if s is not NULL:
3052  *         c_name = s + 1
3053  *     return pyunicode(<const_xmlChar*>c_name)             # <<<<<<<<<<<<<<
3054  * 
3055  * 
3056  */
3057   __Pyx_XDECREF(__pyx_r);
3058   __pyx_t_2 = pyunicode(((const xmlChar *)__pyx_v_c_name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error)
3059   __Pyx_GOTREF(__pyx_t_2);
3060   __pyx_r = __pyx_t_2;
3061   __pyx_t_2 = 0;
3062   goto __pyx_L0;
3063
3064   /* "lxml/objectify.pyx":57
3065  * 
3066  * 
3067  * cdef object _typename(object t):             # <<<<<<<<<<<<<<
3068  *     cdef const_char* c_name
3069  *     c_name = python._fqtypename(t)
3070  */
3071
3072   /* function exit code */
3073   __pyx_L1_error:;
3074   __Pyx_XDECREF(__pyx_t_2);
3075   __Pyx_AddTraceback("lxml.objectify._typename", __pyx_clineno, __pyx_lineno, __pyx_filename);
3076   __pyx_r = 0;
3077   __pyx_L0:;
3078   __Pyx_XGIVEREF(__pyx_r);
3079   __Pyx_RefNannyFinishContext();
3080   return __pyx_r;
3081 }
3082
3083 /* "lxml/objectify.pyx":79
3084  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
3085  * 
3086  * cdef tuple _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
3087  *     return s, python.PyUnicode_AsUTF8String(s)
3088  * 
3089  */
3090
3091 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
3092   PyObject *__pyx_r = NULL;
3093   __Pyx_RefNannyDeclarations
3094   PyObject *__pyx_t_1 = NULL;
3095   PyObject *__pyx_t_2 = NULL;
3096   int __pyx_lineno = 0;
3097   const char *__pyx_filename = NULL;
3098   int __pyx_clineno = 0;
3099   __Pyx_RefNannySetupContext("_unicodeAndUtf8", 0);
3100
3101   /* "lxml/objectify.pyx":80
3102  * 
3103  * cdef tuple _unicodeAndUtf8(s):
3104  *     return s, python.PyUnicode_AsUTF8String(s)             # <<<<<<<<<<<<<<
3105  * 
3106  * def set_pytype_attribute_tag(attribute_tag=None):
3107  */
3108   __Pyx_XDECREF(__pyx_r);
3109   __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
3110   __Pyx_GOTREF(__pyx_t_1);
3111   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
3112   __Pyx_GOTREF(__pyx_t_2);
3113   __Pyx_INCREF(__pyx_v_s);
3114   __Pyx_GIVEREF(__pyx_v_s);
3115   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
3116   __Pyx_GIVEREF(__pyx_t_1);
3117   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
3118   __pyx_t_1 = 0;
3119   __pyx_r = ((PyObject*)__pyx_t_2);
3120   __pyx_t_2 = 0;
3121   goto __pyx_L0;
3122
3123   /* "lxml/objectify.pyx":79
3124  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
3125  * 
3126  * cdef tuple _unicodeAndUtf8(s):             # <<<<<<<<<<<<<<
3127  *     return s, python.PyUnicode_AsUTF8String(s)
3128  * 
3129  */
3130
3131   /* function exit code */
3132   __pyx_L1_error:;
3133   __Pyx_XDECREF(__pyx_t_1);
3134   __Pyx_XDECREF(__pyx_t_2);
3135   __Pyx_AddTraceback("lxml.objectify._unicodeAndUtf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
3136   __pyx_r = 0;
3137   __pyx_L0:;
3138   __Pyx_XGIVEREF(__pyx_r);
3139   __Pyx_RefNannyFinishContext();
3140   return __pyx_r;
3141 }
3142
3143 /* "lxml/objectify.pyx":82
3144  *     return s, python.PyUnicode_AsUTF8String(s)
3145  * 
3146  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
3147  *     u"""set_pytype_attribute_tag(attribute_tag=None)
3148  *     Change name and namespace of the XML attribute that holds Python type
3149  */
3150
3151 /* Python wrapper */
3152 static PyObject *__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3153 static char __pyx_doc_4lxml_9objectify_set_pytype_attribute_tag[] = "set_pytype_attribute_tag(attribute_tag=None)\n    Change name and namespace of the XML attribute that holds Python type\n    information.\n\n    Do not use this unless you know what you are doing.\n\n    Reset by calling without argument.\n\n    Default: \"{http://codespeak.net/lxml/objectify/pytype}pytype\"\n    ";
3154 static PyMethodDef __pyx_mdef_4lxml_9objectify_1set_pytype_attribute_tag = {"set_pytype_attribute_tag", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_set_pytype_attribute_tag};
3155 static PyObject *__pyx_pw_4lxml_9objectify_1set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3156   PyObject *__pyx_v_attribute_tag = 0;
3157   int __pyx_lineno = 0;
3158   const char *__pyx_filename = NULL;
3159   int __pyx_clineno = 0;
3160   PyObject *__pyx_r = 0;
3161   __Pyx_RefNannyDeclarations
3162   __Pyx_RefNannySetupContext("set_pytype_attribute_tag (wrapper)", 0);
3163   {
3164     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_attribute_tag,0};
3165     PyObject* values[1] = {0};
3166     values[0] = ((PyObject *)((PyObject *)Py_None));
3167     if (unlikely(__pyx_kwds)) {
3168       Py_ssize_t kw_args;
3169       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3170       switch (pos_args) {
3171         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3172         CYTHON_FALLTHROUGH;
3173         case  0: break;
3174         default: goto __pyx_L5_argtuple_error;
3175       }
3176       kw_args = PyDict_Size(__pyx_kwds);
3177       switch (pos_args) {
3178         case  0:
3179         if (kw_args > 0) {
3180           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attribute_tag);
3181           if (value) { values[0] = value; kw_args--; }
3182         }
3183       }
3184       if (unlikely(kw_args > 0)) {
3185         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_pytype_attribute_tag") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)
3186       }
3187     } else {
3188       switch (PyTuple_GET_SIZE(__pyx_args)) {
3189         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3190         CYTHON_FALLTHROUGH;
3191         case  0: break;
3192         default: goto __pyx_L5_argtuple_error;
3193       }
3194     }
3195     __pyx_v_attribute_tag = values[0];
3196   }
3197   goto __pyx_L4_argument_unpacking_done;
3198   __pyx_L5_argtuple_error:;
3199   __Pyx_RaiseArgtupleInvalid("set_pytype_attribute_tag", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
3200   __pyx_L3_error:;
3201   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
3202   __Pyx_RefNannyFinishContext();
3203   return NULL;
3204   __pyx_L4_argument_unpacking_done:;
3205   __pyx_r = __pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(__pyx_self, __pyx_v_attribute_tag);
3206
3207   /* function exit code */
3208   __Pyx_RefNannyFinishContext();
3209   return __pyx_r;
3210 }
3211
3212 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_attribute_tag) {
3213   PyObject *__pyx_r = NULL;
3214   __Pyx_RefNannyDeclarations
3215   int __pyx_t_1;
3216   int __pyx_t_2;
3217   PyObject *__pyx_t_3 = NULL;
3218   PyObject *__pyx_t_4 = NULL;
3219   PyObject *__pyx_t_5 = NULL;
3220   const xmlChar *__pyx_t_6;
3221   int __pyx_lineno = 0;
3222   const char *__pyx_filename = NULL;
3223   int __pyx_clineno = 0;
3224   __Pyx_RefNannySetupContext("set_pytype_attribute_tag", 0);
3225
3226   /* "lxml/objectify.pyx":96
3227  *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
3228  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3229  *     if attribute_tag is None:             # <<<<<<<<<<<<<<
3230  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3231  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3232  */
3233   __pyx_t_1 = (__pyx_v_attribute_tag == Py_None);
3234   __pyx_t_2 = (__pyx_t_1 != 0);
3235   if (__pyx_t_2) {
3236
3237     /* "lxml/objectify.pyx":98
3238  *     if attribute_tag is None:
3239  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3240  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")             # <<<<<<<<<<<<<<
3241  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3242  *             _unicodeAndUtf8(u"pytype")
3243  */
3244     __pyx_t_3 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_kp_u_http_codespeak_net_lxml_objectif); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)
3245     __Pyx_GOTREF(__pyx_t_3);
3246     if (likely(__pyx_t_3 != Py_None)) {
3247       PyObject* sequence = __pyx_t_3;
3248       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3249       if (unlikely(size != 2)) {
3250         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3251         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3252         __PYX_ERR(0, 97, __pyx_L1_error)
3253       }
3254       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3255       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
3256       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
3257       __Pyx_INCREF(__pyx_t_4);
3258       __Pyx_INCREF(__pyx_t_5);
3259       #else
3260       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error)
3261       __Pyx_GOTREF(__pyx_t_4);
3262       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error)
3263       __Pyx_GOTREF(__pyx_t_5);
3264       #endif
3265       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3266     } else {
3267       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 97, __pyx_L1_error)
3268     }
3269
3270     /* "lxml/objectify.pyx":97
3271  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3272  *     if attribute_tag is None:
3273  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \             # <<<<<<<<<<<<<<
3274  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3275  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3276  */
3277     if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 97, __pyx_L1_error)
3278     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
3279     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE, __pyx_t_4);
3280     __Pyx_GIVEREF(__pyx_t_4);
3281     __pyx_t_4 = 0;
3282     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
3283     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, ((PyObject*)__pyx_t_5));
3284     __Pyx_GIVEREF(__pyx_t_5);
3285     __pyx_t_5 = 0;
3286
3287     /* "lxml/objectify.pyx":100
3288  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3289  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3290  *             _unicodeAndUtf8(u"pytype")             # <<<<<<<<<<<<<<
3291  *     else:
3292  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3293  */
3294     __pyx_t_3 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_n_u_pytype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
3295     __Pyx_GOTREF(__pyx_t_3);
3296     if (likely(__pyx_t_3 != Py_None)) {
3297       PyObject* sequence = __pyx_t_3;
3298       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3299       if (unlikely(size != 2)) {
3300         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3301         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3302         __PYX_ERR(0, 99, __pyx_L1_error)
3303       }
3304       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3305       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
3306       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
3307       __Pyx_INCREF(__pyx_t_5);
3308       __Pyx_INCREF(__pyx_t_4);
3309       #else
3310       __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
3311       __Pyx_GOTREF(__pyx_t_5);
3312       __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error)
3313       __Pyx_GOTREF(__pyx_t_4);
3314       #endif
3315       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3316     } else {
3317       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 99, __pyx_L1_error)
3318     }
3319
3320     /* "lxml/objectify.pyx":99
3321  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3322  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3323  *         PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3324  *             _unicodeAndUtf8(u"pytype")
3325  *     else:
3326  */
3327     if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 99, __pyx_L1_error)
3328     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
3329     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME, __pyx_t_5);
3330     __Pyx_GIVEREF(__pyx_t_5);
3331     __pyx_t_5 = 0;
3332     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
3333     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, ((PyObject*)__pyx_t_4));
3334     __Pyx_GIVEREF(__pyx_t_4);
3335     __pyx_t_4 = 0;
3336
3337     /* "lxml/objectify.pyx":96
3338  *     global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
3339  *     global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
3340  *     if attribute_tag is None:             # <<<<<<<<<<<<<<
3341  *         PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
3342  *             _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
3343  */
3344     goto __pyx_L3;
3345   }
3346
3347   /* "lxml/objectify.pyx":102
3348  *             _unicodeAndUtf8(u"pytype")
3349  *     else:
3350  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3351  *             cetree.getNsTag(attribute_tag)
3352  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3353  */
3354   /*else*/ {
3355
3356     /* "lxml/objectify.pyx":103
3357  *     else:
3358  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3359  *             cetree.getNsTag(attribute_tag)             # <<<<<<<<<<<<<<
3360  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3361  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3362  */
3363     __pyx_t_3 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
3364     __Pyx_GOTREF(__pyx_t_3);
3365     if (likely(__pyx_t_3 != Py_None)) {
3366       PyObject* sequence = __pyx_t_3;
3367       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
3368       if (unlikely(size != 2)) {
3369         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
3370         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
3371         __PYX_ERR(0, 102, __pyx_L1_error)
3372       }
3373       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3374       __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
3375       __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
3376       __Pyx_INCREF(__pyx_t_4);
3377       __Pyx_INCREF(__pyx_t_5);
3378       #else
3379       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error)
3380       __Pyx_GOTREF(__pyx_t_4);
3381       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error)
3382       __Pyx_GOTREF(__pyx_t_5);
3383       #endif
3384       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3385     } else {
3386       __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 102, __pyx_L1_error)
3387     }
3388
3389     /* "lxml/objectify.pyx":102
3390  *             _unicodeAndUtf8(u"pytype")
3391  *     else:
3392  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \             # <<<<<<<<<<<<<<
3393  *             cetree.getNsTag(attribute_tag)
3394  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3395  */
3396     if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 102, __pyx_L1_error)
3397     if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 102, __pyx_L1_error)
3398     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
3399     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, ((PyObject*)__pyx_t_4));
3400     __Pyx_GIVEREF(__pyx_t_4);
3401     __pyx_t_4 = 0;
3402     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
3403     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, ((PyObject*)__pyx_t_5));
3404     __Pyx_GIVEREF(__pyx_t_5);
3405     __pyx_t_5 = 0;
3406
3407     /* "lxml/objectify.pyx":104
3408  *         PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
3409  *             cetree.getNsTag(attribute_tag)
3410  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')             # <<<<<<<<<<<<<<
3411  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3412  * 
3413  */
3414     if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 == Py_None)) {
3415       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
3416       __PYX_ERR(0, 104, __pyx_L1_error)
3417     }
3418     __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
3419     __Pyx_GOTREF(__pyx_t_3);
3420     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
3421     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE, __pyx_t_3);
3422     __Pyx_GIVEREF(__pyx_t_3);
3423     __pyx_t_3 = 0;
3424
3425     /* "lxml/objectify.pyx":105
3426  *             cetree.getNsTag(attribute_tag)
3427  *         PYTYPE_NAMESPACE = PYTYPE_NAMESPACE_UTF8.decode('utf8')
3428  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')             # <<<<<<<<<<<<<<
3429  * 
3430  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3431  */
3432     if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 == Py_None)) {
3433       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
3434       __PYX_ERR(0, 105, __pyx_L1_error)
3435     }
3436     __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
3437     __Pyx_GOTREF(__pyx_t_3);
3438     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
3439     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME, __pyx_t_3);
3440     __Pyx_GIVEREF(__pyx_t_3);
3441     __pyx_t_3 = 0;
3442   }
3443   __pyx_L3:;
3444
3445   /* "lxml/objectify.pyx":107
3446  *         PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8.decode('utf8')
3447  * 
3448  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8             # <<<<<<<<<<<<<<
3449  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8
3450  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
3451  */
3452   if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 == Py_None)) {
3453     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3454     __PYX_ERR(0, 107, __pyx_L1_error)
3455   }
3456   __pyx_t_6 = __Pyx_PyBytes_AsUString(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 107, __pyx_L1_error)
3457   __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = __pyx_t_6;
3458
3459   /* "lxml/objectify.pyx":108
3460  * 
3461  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3462  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8             # <<<<<<<<<<<<<<
3463  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
3464  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
3465  */
3466   if (unlikely(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 == Py_None)) {
3467     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
3468     __PYX_ERR(0, 108, __pyx_L1_error)
3469   }
3470   __pyx_t_6 = __Pyx_PyBytes_AsUString(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error)
3471   __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = __pyx_t_6;
3472
3473   /* "lxml/objectify.pyx":109
3474  *     _PYTYPE_NAMESPACE      = PYTYPE_NAMESPACE_UTF8
3475  *     _PYTYPE_ATTRIBUTE_NAME = PYTYPE_ATTRIBUTE_NAME_UTF8
3476  *     PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(             # <<<<<<<<<<<<<<
3477  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
3478  * 
3479  */
3480   __pyx_t_3 = namespacedNameFromNsName(__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
3481   __Pyx_GOTREF(__pyx_t_3);
3482   if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTYPE_ATTRIBUTE, __pyx_t_3) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
3483   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3484
3485   /* "lxml/objectify.pyx":82
3486  *     return s, python.PyUnicode_AsUTF8String(s)
3487  * 
3488  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
3489  *     u"""set_pytype_attribute_tag(attribute_tag=None)
3490  *     Change name and namespace of the XML attribute that holds Python type
3491  */
3492
3493   /* function exit code */
3494   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3495   goto __pyx_L0;
3496   __pyx_L1_error:;
3497   __Pyx_XDECREF(__pyx_t_3);
3498   __Pyx_XDECREF(__pyx_t_4);
3499   __Pyx_XDECREF(__pyx_t_5);
3500   __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag", __pyx_clineno, __pyx_lineno, __pyx_filename);
3501   __pyx_r = NULL;
3502   __pyx_L0:;
3503   __Pyx_XGIVEREF(__pyx_r);
3504   __Pyx_RefNannyFinishContext();
3505   return __pyx_r;
3506 }
3507
3508 /* "lxml/objectify.pyx":147
3509  *     subclasses.
3510  *     """
3511  *     def __iter__(self):             # <<<<<<<<<<<<<<
3512  *         u"""Iterate over self and all siblings with the same tag.
3513  *         """
3514  */
3515
3516 /* Python wrapper */
3517 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self); /*proto*/
3518 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n        ";
3519 #if CYTHON_COMPILING_IN_CPYTHON
3520 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
3521 #endif
3522 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__(PyObject *__pyx_v_self) {
3523   PyObject *__pyx_r = 0;
3524   __Pyx_RefNannyDeclarations
3525   __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
3526   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3527
3528   /* function exit code */
3529   __Pyx_RefNannyFinishContext();
3530   return __pyx_r;
3531 }
3532
3533 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3534   PyObject *__pyx_v_parent = NULL;
3535   PyObject *__pyx_r = NULL;
3536   __Pyx_RefNannyDeclarations
3537   PyObject *__pyx_t_1 = NULL;
3538   PyObject *__pyx_t_2 = NULL;
3539   PyObject *__pyx_t_3 = NULL;
3540   int __pyx_t_4;
3541   int __pyx_t_5;
3542   PyObject *__pyx_t_6 = NULL;
3543   int __pyx_lineno = 0;
3544   const char *__pyx_filename = NULL;
3545   int __pyx_clineno = 0;
3546   __Pyx_RefNannySetupContext("__iter__", 0);
3547
3548   /* "lxml/objectify.pyx":150
3549  *         u"""Iterate over self and all siblings with the same tag.
3550  *         """
3551  *         parent = self.getparent()             # <<<<<<<<<<<<<<
3552  *         if parent is None:
3553  *             return iter([self])
3554  */
3555   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getparent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
3556   __Pyx_GOTREF(__pyx_t_2);
3557   __pyx_t_3 = NULL;
3558   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3559     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3560     if (likely(__pyx_t_3)) {
3561       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3562       __Pyx_INCREF(__pyx_t_3);
3563       __Pyx_INCREF(function);
3564       __Pyx_DECREF_SET(__pyx_t_2, function);
3565     }
3566   }
3567   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
3568   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3569   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
3570   __Pyx_GOTREF(__pyx_t_1);
3571   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3572   __pyx_v_parent = __pyx_t_1;
3573   __pyx_t_1 = 0;
3574
3575   /* "lxml/objectify.pyx":151
3576  *         """
3577  *         parent = self.getparent()
3578  *         if parent is None:             # <<<<<<<<<<<<<<
3579  *             return iter([self])
3580  *         return etree.ElementChildIterator(parent, tag=self.tag)
3581  */
3582   __pyx_t_4 = (__pyx_v_parent == Py_None);
3583   __pyx_t_5 = (__pyx_t_4 != 0);
3584   if (__pyx_t_5) {
3585
3586     /* "lxml/objectify.pyx":152
3587  *         parent = self.getparent()
3588  *         if parent is None:
3589  *             return iter([self])             # <<<<<<<<<<<<<<
3590  *         return etree.ElementChildIterator(parent, tag=self.tag)
3591  * 
3592  */
3593     __Pyx_XDECREF(__pyx_r);
3594     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
3595     __Pyx_GOTREF(__pyx_t_1);
3596     __Pyx_INCREF(((PyObject *)__pyx_v_self));
3597     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
3598     PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
3599     __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
3600     __Pyx_GOTREF(__pyx_t_2);
3601     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3602     __pyx_r = __pyx_t_2;
3603     __pyx_t_2 = 0;
3604     goto __pyx_L0;
3605
3606     /* "lxml/objectify.pyx":151
3607  *         """
3608  *         parent = self.getparent()
3609  *         if parent is None:             # <<<<<<<<<<<<<<
3610  *             return iter([self])
3611  *         return etree.ElementChildIterator(parent, tag=self.tag)
3612  */
3613   }
3614
3615   /* "lxml/objectify.pyx":153
3616  *         if parent is None:
3617  *             return iter([self])
3618  *         return etree.ElementChildIterator(parent, tag=self.tag)             # <<<<<<<<<<<<<<
3619  * 
3620  *     def __str__(self):
3621  */
3622   __Pyx_XDECREF(__pyx_r);
3623   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementChildIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
3624   __Pyx_GOTREF(__pyx_t_2);
3625   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
3626   __Pyx_GOTREF(__pyx_t_1);
3627   __Pyx_INCREF(__pyx_v_parent);
3628   __Pyx_GIVEREF(__pyx_v_parent);
3629   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_parent);
3630   __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
3631   __Pyx_GOTREF(__pyx_t_3);
3632   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
3633   __Pyx_GOTREF(__pyx_t_6);
3634   if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_tag, __pyx_t_6) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
3635   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3636   __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
3637   __Pyx_GOTREF(__pyx_t_6);
3638   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3639   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3640   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3641   __pyx_r = __pyx_t_6;
3642   __pyx_t_6 = 0;
3643   goto __pyx_L0;
3644
3645   /* "lxml/objectify.pyx":147
3646  *     subclasses.
3647  *     """
3648  *     def __iter__(self):             # <<<<<<<<<<<<<<
3649  *         u"""Iterate over self and all siblings with the same tag.
3650  *         """
3651  */
3652
3653   /* function exit code */
3654   __pyx_L1_error:;
3655   __Pyx_XDECREF(__pyx_t_1);
3656   __Pyx_XDECREF(__pyx_t_2);
3657   __Pyx_XDECREF(__pyx_t_3);
3658   __Pyx_XDECREF(__pyx_t_6);
3659   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3660   __pyx_r = NULL;
3661   __pyx_L0:;
3662   __Pyx_XDECREF(__pyx_v_parent);
3663   __Pyx_XGIVEREF(__pyx_r);
3664   __Pyx_RefNannyFinishContext();
3665   return __pyx_r;
3666 }
3667
3668 /* "lxml/objectify.pyx":155
3669  *         return etree.ElementChildIterator(parent, tag=self.tag)
3670  * 
3671  *     def __str__(self):             # <<<<<<<<<<<<<<
3672  *         if __RECURSIVE_STR:
3673  *             return _dump(self, 0)
3674  */
3675
3676 /* Python wrapper */
3677 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self); /*proto*/
3678 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__(PyObject *__pyx_v_self) {
3679   PyObject *__pyx_r = 0;
3680   __Pyx_RefNannyDeclarations
3681   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
3682   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3683
3684   /* function exit code */
3685   __Pyx_RefNannyFinishContext();
3686   return __pyx_r;
3687 }
3688
3689 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_2__str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3690   PyObject *__pyx_r = NULL;
3691   __Pyx_RefNannyDeclarations
3692   int __pyx_t_1;
3693   PyObject *__pyx_t_2 = NULL;
3694   PyObject *__pyx_t_3 = NULL;
3695   int __pyx_lineno = 0;
3696   const char *__pyx_filename = NULL;
3697   int __pyx_clineno = 0;
3698   __Pyx_RefNannySetupContext("__str__", 0);
3699
3700   /* "lxml/objectify.pyx":156
3701  * 
3702  *     def __str__(self):
3703  *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
3704  *             return _dump(self, 0)
3705  *         else:
3706  */
3707   __pyx_t_1 = (__pyx_v_4lxml_9objectify___RECURSIVE_STR != 0);
3708   if (__pyx_t_1) {
3709
3710     /* "lxml/objectify.pyx":157
3711  *     def __str__(self):
3712  *         if __RECURSIVE_STR:
3713  *             return _dump(self, 0)             # <<<<<<<<<<<<<<
3714  *         else:
3715  *             return textOf(self._c_node) or u''
3716  */
3717     __Pyx_XDECREF(__pyx_r);
3718     __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
3719     __Pyx_GOTREF(__pyx_t_2);
3720     __pyx_r = __pyx_t_2;
3721     __pyx_t_2 = 0;
3722     goto __pyx_L0;
3723
3724     /* "lxml/objectify.pyx":156
3725  * 
3726  *     def __str__(self):
3727  *         if __RECURSIVE_STR:             # <<<<<<<<<<<<<<
3728  *             return _dump(self, 0)
3729  *         else:
3730  */
3731   }
3732
3733   /* "lxml/objectify.pyx":159
3734  *             return _dump(self, 0)
3735  *         else:
3736  *             return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
3737  * 
3738  *     # pickle support for objectified Element
3739  */
3740   /*else*/ {
3741     __Pyx_XDECREF(__pyx_r);
3742     __pyx_t_3 = textOf(__pyx_v_self->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
3743     __Pyx_GOTREF(__pyx_t_3);
3744     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
3745     if (!__pyx_t_1) {
3746       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3747     } else {
3748       __Pyx_INCREF(__pyx_t_3);
3749       __pyx_t_2 = __pyx_t_3;
3750       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3751       goto __pyx_L4_bool_binop_done;
3752     }
3753     __Pyx_INCREF(__pyx_kp_u_);
3754     __pyx_t_2 = __pyx_kp_u_;
3755     __pyx_L4_bool_binop_done:;
3756     __pyx_r = __pyx_t_2;
3757     __pyx_t_2 = 0;
3758     goto __pyx_L0;
3759   }
3760
3761   /* "lxml/objectify.pyx":155
3762  *         return etree.ElementChildIterator(parent, tag=self.tag)
3763  * 
3764  *     def __str__(self):             # <<<<<<<<<<<<<<
3765  *         if __RECURSIVE_STR:
3766  *             return _dump(self, 0)
3767  */
3768
3769   /* function exit code */
3770   __pyx_L1_error:;
3771   __Pyx_XDECREF(__pyx_t_2);
3772   __Pyx_XDECREF(__pyx_t_3);
3773   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3774   __pyx_r = NULL;
3775   __pyx_L0:;
3776   __Pyx_XGIVEREF(__pyx_r);
3777   __Pyx_RefNannyFinishContext();
3778   return __pyx_r;
3779 }
3780
3781 /* "lxml/objectify.pyx":162
3782  * 
3783  *     # pickle support for objectified Element
3784  *     def __reduce__(self):             # <<<<<<<<<<<<<<
3785  *         return fromstring, (etree.tostring(self),)
3786  * 
3787  */
3788
3789 /* Python wrapper */
3790 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3791 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_5__reduce__ = {"__reduce__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__, METH_NOARGS, 0};
3792 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3793   PyObject *__pyx_r = 0;
3794   __Pyx_RefNannyDeclarations
3795   __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
3796   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3797
3798   /* function exit code */
3799   __Pyx_RefNannyFinishContext();
3800   return __pyx_r;
3801 }
3802
3803 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3804   PyObject *__pyx_r = NULL;
3805   __Pyx_RefNannyDeclarations
3806   PyObject *__pyx_t_1 = NULL;
3807   PyObject *__pyx_t_2 = NULL;
3808   PyObject *__pyx_t_3 = NULL;
3809   PyObject *__pyx_t_4 = NULL;
3810   int __pyx_lineno = 0;
3811   const char *__pyx_filename = NULL;
3812   int __pyx_clineno = 0;
3813   __Pyx_RefNannySetupContext("__reduce__", 0);
3814
3815   /* "lxml/objectify.pyx":163
3816  *     # pickle support for objectified Element
3817  *     def __reduce__(self):
3818  *         return fromstring, (etree.tostring(self),)             # <<<<<<<<<<<<<<
3819  * 
3820  *     @property
3821  */
3822   __Pyx_XDECREF(__pyx_r);
3823   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
3824   __Pyx_GOTREF(__pyx_t_1);
3825   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_tostring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
3826   __Pyx_GOTREF(__pyx_t_3);
3827   __pyx_t_4 = NULL;
3828   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
3829     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3830     if (likely(__pyx_t_4)) {
3831       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3832       __Pyx_INCREF(__pyx_t_4);
3833       __Pyx_INCREF(function);
3834       __Pyx_DECREF_SET(__pyx_t_3, function);
3835     }
3836   }
3837   __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
3838   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3839   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
3840   __Pyx_GOTREF(__pyx_t_2);
3841   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3842   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
3843   __Pyx_GOTREF(__pyx_t_3);
3844   __Pyx_GIVEREF(__pyx_t_2);
3845   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
3846   __pyx_t_2 = 0;
3847   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
3848   __Pyx_GOTREF(__pyx_t_2);
3849   __Pyx_GIVEREF(__pyx_t_1);
3850   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
3851   __Pyx_GIVEREF(__pyx_t_3);
3852   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
3853   __pyx_t_1 = 0;
3854   __pyx_t_3 = 0;
3855   __pyx_r = __pyx_t_2;
3856   __pyx_t_2 = 0;
3857   goto __pyx_L0;
3858
3859   /* "lxml/objectify.pyx":162
3860  * 
3861  *     # pickle support for objectified Element
3862  *     def __reduce__(self):             # <<<<<<<<<<<<<<
3863  *         return fromstring, (etree.tostring(self),)
3864  * 
3865  */
3866
3867   /* function exit code */
3868   __pyx_L1_error:;
3869   __Pyx_XDECREF(__pyx_t_1);
3870   __Pyx_XDECREF(__pyx_t_2);
3871   __Pyx_XDECREF(__pyx_t_3);
3872   __Pyx_XDECREF(__pyx_t_4);
3873   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3874   __pyx_r = NULL;
3875   __pyx_L0:;
3876   __Pyx_XGIVEREF(__pyx_r);
3877   __Pyx_RefNannyFinishContext();
3878   return __pyx_r;
3879 }
3880
3881 /* "lxml/objectify.pyx":166
3882  * 
3883  *     @property
3884  *     def text(self):             # <<<<<<<<<<<<<<
3885  *         return textOf(self._c_node)
3886  * 
3887  */
3888
3889 /* Python wrapper */
3890 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self); /*proto*/
3891 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(PyObject *__pyx_v_self) {
3892   PyObject *__pyx_r = 0;
3893   __Pyx_RefNannyDeclarations
3894   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3895   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3896
3897   /* function exit code */
3898   __Pyx_RefNannyFinishContext();
3899   return __pyx_r;
3900 }
3901
3902 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3903   PyObject *__pyx_r = NULL;
3904   __Pyx_RefNannyDeclarations
3905   PyObject *__pyx_t_1 = NULL;
3906   int __pyx_lineno = 0;
3907   const char *__pyx_filename = NULL;
3908   int __pyx_clineno = 0;
3909   __Pyx_RefNannySetupContext("__get__", 0);
3910
3911   /* "lxml/objectify.pyx":167
3912  *     @property
3913  *     def text(self):
3914  *         return textOf(self._c_node)             # <<<<<<<<<<<<<<
3915  * 
3916  *     @property
3917  */
3918   __Pyx_XDECREF(__pyx_r);
3919   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
3920   __Pyx_GOTREF(__pyx_t_1);
3921   __pyx_r = __pyx_t_1;
3922   __pyx_t_1 = 0;
3923   goto __pyx_L0;
3924
3925   /* "lxml/objectify.pyx":166
3926  * 
3927  *     @property
3928  *     def text(self):             # <<<<<<<<<<<<<<
3929  *         return textOf(self._c_node)
3930  * 
3931  */
3932
3933   /* function exit code */
3934   __pyx_L1_error:;
3935   __Pyx_XDECREF(__pyx_t_1);
3936   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3937   __pyx_r = NULL;
3938   __pyx_L0:;
3939   __Pyx_XGIVEREF(__pyx_r);
3940   __Pyx_RefNannyFinishContext();
3941   return __pyx_r;
3942 }
3943
3944 /* "lxml/objectify.pyx":170
3945  * 
3946  *     @property
3947  *     def __dict__(self):             # <<<<<<<<<<<<<<
3948  *         """A fake implementation for __dict__ to support dir() etc.
3949  * 
3950  */
3951
3952 /* Python wrapper */
3953 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self); /*proto*/
3954 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(PyObject *__pyx_v_self) {
3955   PyObject *__pyx_r = 0;
3956   __Pyx_RefNannyDeclarations
3957   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
3958   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
3959
3960   /* function exit code */
3961   __Pyx_RefNannyFinishContext();
3962   return __pyx_r;
3963 }
3964
3965 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
3966   struct LxmlElement *__pyx_v_child = 0;
3967   PyObject *__pyx_v_children = 0;
3968   const xmlChar *__pyx_v_c_ns;
3969   PyObject *__pyx_v_tag = NULL;
3970   PyObject *__pyx_v_name = NULL;
3971   PyObject *__pyx_r = NULL;
3972   __Pyx_RefNannyDeclarations
3973   PyObject *__pyx_t_1 = NULL;
3974   PyObject *__pyx_t_2 = NULL;
3975   PyObject *__pyx_t_3 = NULL;
3976   PyObject *__pyx_t_4 = NULL;
3977   Py_ssize_t __pyx_t_5;
3978   PyObject *(*__pyx_t_6)(PyObject *);
3979   int __pyx_t_7;
3980   int __pyx_t_8;
3981   int __pyx_lineno = 0;
3982   const char *__pyx_filename = NULL;
3983   int __pyx_clineno = 0;
3984   __Pyx_RefNannySetupContext("__get__", 0);
3985
3986   /* "lxml/objectify.pyx":177
3987  *         cdef _Element child
3988  *         cdef dict children
3989  *         c_ns = tree._getNs(self._c_node)             # <<<<<<<<<<<<<<
3990  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
3991  *         children = {}
3992  */
3993   __pyx_v_c_ns = _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node);
3994
3995   /* "lxml/objectify.pyx":178
3996  *         cdef dict children
3997  *         c_ns = tree._getNs(self._c_node)
3998  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None             # <<<<<<<<<<<<<<
3999  *         children = {}
4000  *         for child in etree.ElementChildIterator(self, tag=tag):
4001  */
4002   if (((__pyx_v_c_ns != NULL) != 0)) {
4003     __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
4004     __Pyx_GOTREF(__pyx_t_2);
4005     __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
4006     __Pyx_GOTREF(__pyx_t_3);
4007     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4008     __pyx_t_1 = __pyx_t_3;
4009     __pyx_t_3 = 0;
4010   } else {
4011     __Pyx_INCREF(Py_None);
4012     __pyx_t_1 = Py_None;
4013   }
4014   __pyx_v_tag = __pyx_t_1;
4015   __pyx_t_1 = 0;
4016
4017   /* "lxml/objectify.pyx":179
4018  *         c_ns = tree._getNs(self._c_node)
4019  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4020  *         children = {}             # <<<<<<<<<<<<<<
4021  *         for child in etree.ElementChildIterator(self, tag=tag):
4022  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4023  */
4024   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
4025   __Pyx_GOTREF(__pyx_t_1);
4026   __pyx_v_children = ((PyObject*)__pyx_t_1);
4027   __pyx_t_1 = 0;
4028
4029   /* "lxml/objectify.pyx":180
4030  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4031  *         children = {}
4032  *         for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
4033  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4034  *                 continue
4035  */
4036   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementChildIterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
4037   __Pyx_GOTREF(__pyx_t_1);
4038   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error)
4039   __Pyx_GOTREF(__pyx_t_3);
4040   __Pyx_INCREF(((PyObject *)__pyx_v_self));
4041   __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4042   PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
4043   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
4044   __Pyx_GOTREF(__pyx_t_2);
4045   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
4046   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
4047   __Pyx_GOTREF(__pyx_t_4);
4048   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4049   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4050   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4051   if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
4052     __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4053     __pyx_t_6 = NULL;
4054   } else {
4055     __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
4056     __Pyx_GOTREF(__pyx_t_2);
4057     __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 180, __pyx_L1_error)
4058   }
4059   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4060   for (;;) {
4061     if (likely(!__pyx_t_6)) {
4062       if (likely(PyList_CheckExact(__pyx_t_2))) {
4063         if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4064         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4065         __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_ERR(0, 180, __pyx_L1_error)
4066         #else
4067         __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
4068         __Pyx_GOTREF(__pyx_t_4);
4069         #endif
4070       } else {
4071         if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4072         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4073         __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_ERR(0, 180, __pyx_L1_error)
4074         #else
4075         __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
4076         __Pyx_GOTREF(__pyx_t_4);
4077         #endif
4078       }
4079     } else {
4080       __pyx_t_4 = __pyx_t_6(__pyx_t_2);
4081       if (unlikely(!__pyx_t_4)) {
4082         PyObject* exc_type = PyErr_Occurred();
4083         if (exc_type) {
4084           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4085           else __PYX_ERR(0, 180, __pyx_L1_error)
4086         }
4087         break;
4088       }
4089       __Pyx_GOTREF(__pyx_t_4);
4090     }
4091     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 180, __pyx_L1_error)
4092     __Pyx_XDECREF_SET(__pyx_v_child, ((struct LxmlElement *)__pyx_t_4));
4093     __pyx_t_4 = 0;
4094
4095     /* "lxml/objectify.pyx":181
4096  *         children = {}
4097  *         for child in etree.ElementChildIterator(self, tag=tag):
4098  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
4099  *                 continue
4100  *             name = pyunicode(child._c_node.name)
4101  */
4102     __pyx_t_8 = ((__pyx_v_c_ns == NULL) != 0);
4103     if (__pyx_t_8) {
4104     } else {
4105       __pyx_t_7 = __pyx_t_8;
4106       goto __pyx_L6_bool_binop_done;
4107     }
4108     __pyx_t_8 = ((_getNs(__pyx_v_child->_c_node) != NULL) != 0);
4109     __pyx_t_7 = __pyx_t_8;
4110     __pyx_L6_bool_binop_done:;
4111     if (__pyx_t_7) {
4112
4113       /* "lxml/objectify.pyx":182
4114  *         for child in etree.ElementChildIterator(self, tag=tag):
4115  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4116  *                 continue             # <<<<<<<<<<<<<<
4117  *             name = pyunicode(child._c_node.name)
4118  *             if name not in children:
4119  */
4120       goto __pyx_L3_continue;
4121
4122       /* "lxml/objectify.pyx":181
4123  *         children = {}
4124  *         for child in etree.ElementChildIterator(self, tag=tag):
4125  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:             # <<<<<<<<<<<<<<
4126  *                 continue
4127  *             name = pyunicode(child._c_node.name)
4128  */
4129     }
4130
4131     /* "lxml/objectify.pyx":183
4132  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4133  *                 continue
4134  *             name = pyunicode(child._c_node.name)             # <<<<<<<<<<<<<<
4135  *             if name not in children:
4136  *                 children[name] = child
4137  */
4138     __pyx_t_4 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error)
4139     __Pyx_GOTREF(__pyx_t_4);
4140     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
4141     __pyx_t_4 = 0;
4142
4143     /* "lxml/objectify.pyx":184
4144  *                 continue
4145  *             name = pyunicode(child._c_node.name)
4146  *             if name not in children:             # <<<<<<<<<<<<<<
4147  *                 children[name] = child
4148  *         return children
4149  */
4150     __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_children, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 184, __pyx_L1_error)
4151     __pyx_t_8 = (__pyx_t_7 != 0);
4152     if (__pyx_t_8) {
4153
4154       /* "lxml/objectify.pyx":185
4155  *             name = pyunicode(child._c_node.name)
4156  *             if name not in children:
4157  *                 children[name] = child             # <<<<<<<<<<<<<<
4158  *         return children
4159  * 
4160  */
4161       if (unlikely(PyDict_SetItem(__pyx_v_children, __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
4162
4163       /* "lxml/objectify.pyx":184
4164  *                 continue
4165  *             name = pyunicode(child._c_node.name)
4166  *             if name not in children:             # <<<<<<<<<<<<<<
4167  *                 children[name] = child
4168  *         return children
4169  */
4170     }
4171
4172     /* "lxml/objectify.pyx":180
4173  *         tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None
4174  *         children = {}
4175  *         for child in etree.ElementChildIterator(self, tag=tag):             # <<<<<<<<<<<<<<
4176  *             if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
4177  *                 continue
4178  */
4179     __pyx_L3_continue:;
4180   }
4181   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4182
4183   /* "lxml/objectify.pyx":186
4184  *             if name not in children:
4185  *                 children[name] = child
4186  *         return children             # <<<<<<<<<<<<<<
4187  * 
4188  *     def __len__(self):
4189  */
4190   __Pyx_XDECREF(__pyx_r);
4191   __Pyx_INCREF(__pyx_v_children);
4192   __pyx_r = __pyx_v_children;
4193   goto __pyx_L0;
4194
4195   /* "lxml/objectify.pyx":170
4196  * 
4197  *     @property
4198  *     def __dict__(self):             # <<<<<<<<<<<<<<
4199  *         """A fake implementation for __dict__ to support dir() etc.
4200  * 
4201  */
4202
4203   /* function exit code */
4204   __pyx_L1_error:;
4205   __Pyx_XDECREF(__pyx_t_1);
4206   __Pyx_XDECREF(__pyx_t_2);
4207   __Pyx_XDECREF(__pyx_t_3);
4208   __Pyx_XDECREF(__pyx_t_4);
4209   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4210   __pyx_r = NULL;
4211   __pyx_L0:;
4212   __Pyx_XDECREF((PyObject *)__pyx_v_child);
4213   __Pyx_XDECREF(__pyx_v_children);
4214   __Pyx_XDECREF(__pyx_v_tag);
4215   __Pyx_XDECREF(__pyx_v_name);
4216   __Pyx_XGIVEREF(__pyx_r);
4217   __Pyx_RefNannyFinishContext();
4218   return __pyx_r;
4219 }
4220
4221 /* "lxml/objectify.pyx":188
4222  *         return children
4223  * 
4224  *     def __len__(self):             # <<<<<<<<<<<<<<
4225  *         u"""Count self and siblings with the same tag.
4226  *         """
4227  */
4228
4229 /* Python wrapper */
4230 static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self); /*proto*/
4231 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__[] = "Count self and siblings with the same tag.\n        ";
4232 #if CYTHON_COMPILING_IN_CPYTHON
4233 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
4234 #endif
4235 static Py_ssize_t __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__(PyObject *__pyx_v_self) {
4236   Py_ssize_t __pyx_r;
4237   __Pyx_RefNannyDeclarations
4238   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
4239   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4240
4241   /* function exit code */
4242   __Pyx_RefNannyFinishContext();
4243   return __pyx_r;
4244 }
4245
4246 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4247   Py_ssize_t __pyx_r;
4248   __Pyx_RefNannyDeclarations
4249   __Pyx_RefNannySetupContext("__len__", 0);
4250
4251   /* "lxml/objectify.pyx":191
4252  *         u"""Count self and siblings with the same tag.
4253  *         """
4254  *         return _countSiblings(self._c_node)             # <<<<<<<<<<<<<<
4255  * 
4256  *     def countchildren(self):
4257  */
4258   __pyx_r = __pyx_f_4lxml_9objectify__countSiblings(__pyx_v_self->__pyx_base.__pyx_base._c_node);
4259   goto __pyx_L0;
4260
4261   /* "lxml/objectify.pyx":188
4262  *         return children
4263  * 
4264  *     def __len__(self):             # <<<<<<<<<<<<<<
4265  *         u"""Count self and siblings with the same tag.
4266  *         """
4267  */
4268
4269   /* function exit code */
4270   __pyx_L0:;
4271   __Pyx_RefNannyFinishContext();
4272   return __pyx_r;
4273 }
4274
4275 /* "lxml/objectify.pyx":193
4276  *         return _countSiblings(self._c_node)
4277  * 
4278  *     def countchildren(self):             # <<<<<<<<<<<<<<
4279  *         u"""countchildren(self)
4280  * 
4281  */
4282
4283 /* Python wrapper */
4284 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4285 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren[] = "countchildren(self)\n\n        Return the number of children of this element, regardless of their\n        name.\n        ";
4286 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_9countchildren = {"countchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren};
4287 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4288   PyObject *__pyx_r = 0;
4289   __Pyx_RefNannyDeclarations
4290   __Pyx_RefNannySetupContext("countchildren (wrapper)", 0);
4291   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4292
4293   /* function exit code */
4294   __Pyx_RefNannyFinishContext();
4295   return __pyx_r;
4296 }
4297
4298 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8countchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4299   Py_ssize_t __pyx_v_c;
4300   xmlNode *__pyx_v_c_node;
4301   PyObject *__pyx_r = NULL;
4302   __Pyx_RefNannyDeclarations
4303   xmlNode *__pyx_t_1;
4304   int __pyx_t_2;
4305   PyObject *__pyx_t_3 = NULL;
4306   int __pyx_lineno = 0;
4307   const char *__pyx_filename = NULL;
4308   int __pyx_clineno = 0;
4309   __Pyx_RefNannySetupContext("countchildren", 0);
4310
4311   /* "lxml/objectify.pyx":202
4312  *         cdef Py_ssize_t c
4313  *         cdef tree.xmlNode* c_node
4314  *         c = 0             # <<<<<<<<<<<<<<
4315  *         c_node = self._c_node.children
4316  *         while c_node is not NULL:
4317  */
4318   __pyx_v_c = 0;
4319
4320   /* "lxml/objectify.pyx":203
4321  *         cdef tree.xmlNode* c_node
4322  *         c = 0
4323  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
4324  *         while c_node is not NULL:
4325  *             if tree._isElement(c_node):
4326  */
4327   __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;
4328   __pyx_v_c_node = __pyx_t_1;
4329
4330   /* "lxml/objectify.pyx":204
4331  *         c = 0
4332  *         c_node = self._c_node.children
4333  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
4334  *             if tree._isElement(c_node):
4335  *                 c += 1
4336  */
4337   while (1) {
4338     __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0);
4339     if (!__pyx_t_2) break;
4340
4341     /* "lxml/objectify.pyx":205
4342  *         c_node = self._c_node.children
4343  *         while c_node is not NULL:
4344  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4345  *                 c += 1
4346  *             c_node = c_node.next
4347  */
4348     __pyx_t_2 = (_isElement(__pyx_v_c_node) != 0);
4349     if (__pyx_t_2) {
4350
4351       /* "lxml/objectify.pyx":206
4352  *         while c_node is not NULL:
4353  *             if tree._isElement(c_node):
4354  *                 c += 1             # <<<<<<<<<<<<<<
4355  *             c_node = c_node.next
4356  *         return c
4357  */
4358       __pyx_v_c = (__pyx_v_c + 1);
4359
4360       /* "lxml/objectify.pyx":205
4361  *         c_node = self._c_node.children
4362  *         while c_node is not NULL:
4363  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4364  *                 c += 1
4365  *             c_node = c_node.next
4366  */
4367     }
4368
4369     /* "lxml/objectify.pyx":207
4370  *             if tree._isElement(c_node):
4371  *                 c += 1
4372  *             c_node = c_node.next             # <<<<<<<<<<<<<<
4373  *         return c
4374  * 
4375  */
4376     __pyx_t_1 = __pyx_v_c_node->next;
4377     __pyx_v_c_node = __pyx_t_1;
4378   }
4379
4380   /* "lxml/objectify.pyx":208
4381  *                 c += 1
4382  *             c_node = c_node.next
4383  *         return c             # <<<<<<<<<<<<<<
4384  * 
4385  *     def getchildren(self):
4386  */
4387   __Pyx_XDECREF(__pyx_r);
4388   __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error)
4389   __Pyx_GOTREF(__pyx_t_3);
4390   __pyx_r = __pyx_t_3;
4391   __pyx_t_3 = 0;
4392   goto __pyx_L0;
4393
4394   /* "lxml/objectify.pyx":193
4395  *         return _countSiblings(self._c_node)
4396  * 
4397  *     def countchildren(self):             # <<<<<<<<<<<<<<
4398  *         u"""countchildren(self)
4399  * 
4400  */
4401
4402   /* function exit code */
4403   __pyx_L1_error:;
4404   __Pyx_XDECREF(__pyx_t_3);
4405   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
4406   __pyx_r = NULL;
4407   __pyx_L0:;
4408   __Pyx_XGIVEREF(__pyx_r);
4409   __Pyx_RefNannyFinishContext();
4410   return __pyx_r;
4411 }
4412
4413 /* "lxml/objectify.pyx":210
4414  *         return c
4415  * 
4416  *     def getchildren(self):             # <<<<<<<<<<<<<<
4417  *         u"""getchildren(self)
4418  * 
4419  */
4420
4421 /* Python wrapper */
4422 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4423 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren[] = "getchildren(self)\n\n        Returns a sequence of all direct children.  The elements are\n        returned in document order.\n        ";
4424 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_11getchildren = {"getchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren};
4425 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4426   PyObject *__pyx_r = 0;
4427   __Pyx_RefNannyDeclarations
4428   __Pyx_RefNannySetupContext("getchildren (wrapper)", 0);
4429   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self));
4430
4431   /* function exit code */
4432   __Pyx_RefNannyFinishContext();
4433   return __pyx_r;
4434 }
4435
4436 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_10getchildren(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self) {
4437   xmlNode *__pyx_v_c_node;
4438   PyObject *__pyx_v_result = NULL;
4439   PyObject *__pyx_r = NULL;
4440   __Pyx_RefNannyDeclarations
4441   PyObject *__pyx_t_1 = NULL;
4442   xmlNode *__pyx_t_2;
4443   int __pyx_t_3;
4444   PyObject *__pyx_t_4 = NULL;
4445   int __pyx_t_5;
4446   int __pyx_lineno = 0;
4447   const char *__pyx_filename = NULL;
4448   int __pyx_clineno = 0;
4449   __Pyx_RefNannySetupContext("getchildren", 0);
4450
4451   /* "lxml/objectify.pyx":217
4452  *         """
4453  *         cdef tree.xmlNode* c_node
4454  *         result = []             # <<<<<<<<<<<<<<
4455  *         c_node = self._c_node.children
4456  *         while c_node is not NULL:
4457  */
4458   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
4459   __Pyx_GOTREF(__pyx_t_1);
4460   __pyx_v_result = ((PyObject*)__pyx_t_1);
4461   __pyx_t_1 = 0;
4462
4463   /* "lxml/objectify.pyx":218
4464  *         cdef tree.xmlNode* c_node
4465  *         result = []
4466  *         c_node = self._c_node.children             # <<<<<<<<<<<<<<
4467  *         while c_node is not NULL:
4468  *             if tree._isElement(c_node):
4469  */
4470   __pyx_t_2 = __pyx_v_self->__pyx_base.__pyx_base._c_node->children;
4471   __pyx_v_c_node = __pyx_t_2;
4472
4473   /* "lxml/objectify.pyx":219
4474  *         result = []
4475  *         c_node = self._c_node.children
4476  *         while c_node is not NULL:             # <<<<<<<<<<<<<<
4477  *             if tree._isElement(c_node):
4478  *                 result.append(cetree.elementFactory(self._doc, c_node))
4479  */
4480   while (1) {
4481     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
4482     if (!__pyx_t_3) break;
4483
4484     /* "lxml/objectify.pyx":220
4485  *         c_node = self._c_node.children
4486  *         while c_node is not NULL:
4487  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4488  *                 result.append(cetree.elementFactory(self._doc, c_node))
4489  *             c_node = c_node.next
4490  */
4491     __pyx_t_3 = (_isElement(__pyx_v_c_node) != 0);
4492     if (__pyx_t_3) {
4493
4494       /* "lxml/objectify.pyx":221
4495  *         while c_node is not NULL:
4496  *             if tree._isElement(c_node):
4497  *                 result.append(cetree.elementFactory(self._doc, c_node))             # <<<<<<<<<<<<<<
4498  *             c_node = c_node.next
4499  *         return result
4500  */
4501       __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
4502       __Pyx_INCREF(__pyx_t_1);
4503       __pyx_t_4 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
4504       __Pyx_GOTREF(__pyx_t_4);
4505       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4506       __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 221, __pyx_L1_error)
4507       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4508
4509       /* "lxml/objectify.pyx":220
4510  *         c_node = self._c_node.children
4511  *         while c_node is not NULL:
4512  *             if tree._isElement(c_node):             # <<<<<<<<<<<<<<
4513  *                 result.append(cetree.elementFactory(self._doc, c_node))
4514  *             c_node = c_node.next
4515  */
4516     }
4517
4518     /* "lxml/objectify.pyx":222
4519  *             if tree._isElement(c_node):
4520  *                 result.append(cetree.elementFactory(self._doc, c_node))
4521  *             c_node = c_node.next             # <<<<<<<<<<<<<<
4522  *         return result
4523  * 
4524  */
4525     __pyx_t_2 = __pyx_v_c_node->next;
4526     __pyx_v_c_node = __pyx_t_2;
4527   }
4528
4529   /* "lxml/objectify.pyx":223
4530  *                 result.append(cetree.elementFactory(self._doc, c_node))
4531  *             c_node = c_node.next
4532  *         return result             # <<<<<<<<<<<<<<
4533  * 
4534  *     def __getattr__(self, tag):
4535  */
4536   __Pyx_XDECREF(__pyx_r);
4537   __Pyx_INCREF(__pyx_v_result);
4538   __pyx_r = __pyx_v_result;
4539   goto __pyx_L0;
4540
4541   /* "lxml/objectify.pyx":210
4542  *         return c
4543  * 
4544  *     def getchildren(self):             # <<<<<<<<<<<<<<
4545  *         u"""getchildren(self)
4546  * 
4547  */
4548
4549   /* function exit code */
4550   __pyx_L1_error:;
4551   __Pyx_XDECREF(__pyx_t_1);
4552   __Pyx_XDECREF(__pyx_t_4);
4553   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren", __pyx_clineno, __pyx_lineno, __pyx_filename);
4554   __pyx_r = NULL;
4555   __pyx_L0:;
4556   __Pyx_XDECREF(__pyx_v_result);
4557   __Pyx_XGIVEREF(__pyx_r);
4558   __Pyx_RefNannyFinishContext();
4559   return __pyx_r;
4560 }
4561
4562 /* "lxml/objectify.pyx":225
4563  *         return result
4564  * 
4565  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
4566  *         u"""Return the (first) child with the given tag name.  If no namespace
4567  *         is provided, the child will be looked up in the same one as self.
4568  */
4569
4570 /* Python wrapper */
4571 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
4572 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__[] = "Return the (first) child with the given tag name.  If no namespace\n        is provided, the child will be looked up in the same one as self.\n        ";
4573 #if CYTHON_COMPILING_IN_CPYTHON
4574 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
4575 #endif
4576 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
4577   PyObject *__pyx_r = 0;
4578   __Pyx_RefNannyDeclarations
4579   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
4580   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
4581
4582   /* function exit code */
4583   __Pyx_RefNannyFinishContext();
4584   return __pyx_r;
4585 }
4586
4587 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_12__getattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
4588   PyObject *__pyx_r = NULL;
4589   __Pyx_RefNannyDeclarations
4590   PyObject *__pyx_t_1 = NULL;
4591   PyObject *__pyx_t_2 = NULL;
4592   PyObject *__pyx_t_3 = NULL;
4593   int __pyx_t_4;
4594   int __pyx_t_5;
4595   PyObject *__pyx_t_6 = NULL;
4596   int __pyx_lineno = 0;
4597   const char *__pyx_filename = NULL;
4598   int __pyx_clineno = 0;
4599   __Pyx_RefNannySetupContext("__getattr__", 0);
4600
4601   /* "lxml/objectify.pyx":229
4602  *         is provided, the child will be looked up in the same one as self.
4603  *         """
4604  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
4605  *             return object.__getattr__(self, tag)
4606  *         return _lookupChildOrRaise(self, tag)
4607  */
4608   __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
4609   __pyx_t_2 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_3 = NULL;
4610   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4611     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4612     if (likely(__pyx_t_3)) {
4613       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4614       __Pyx_INCREF(__pyx_t_3);
4615       __Pyx_INCREF(function);
4616       __Pyx_DECREF_SET(__pyx_t_2, function);
4617     }
4618   }
4619   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tag);
4620   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4621   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
4622   __Pyx_GOTREF(__pyx_t_1);
4623   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4624   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 229, __pyx_L1_error)
4625   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4626   if (__pyx_t_4) {
4627
4628     /* "lxml/objectify.pyx":230
4629  *         """
4630  *         if is_special_method(tag):
4631  *             return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
4632  *         return _lookupChildOrRaise(self, tag)
4633  * 
4634  */
4635     __Pyx_XDECREF(__pyx_r);
4636     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_getattr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
4637     __Pyx_GOTREF(__pyx_t_2);
4638     __pyx_t_3 = NULL;
4639     __pyx_t_5 = 0;
4640     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4641       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4642       if (likely(__pyx_t_3)) {
4643         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4644         __Pyx_INCREF(__pyx_t_3);
4645         __Pyx_INCREF(function);
4646         __Pyx_DECREF_SET(__pyx_t_2, function);
4647         __pyx_t_5 = 1;
4648       }
4649     }
4650     #if CYTHON_FAST_PYCALL
4651     if (PyFunction_Check(__pyx_t_2)) {
4652       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag};
4653       __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4654       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4655       __Pyx_GOTREF(__pyx_t_1);
4656     } else
4657     #endif
4658     #if CYTHON_FAST_PYCCALL
4659     if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
4660       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_tag};
4661       __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4662       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4663       __Pyx_GOTREF(__pyx_t_1);
4664     } else
4665     #endif
4666     {
4667       __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L1_error)
4668       __Pyx_GOTREF(__pyx_t_6);
4669       if (__pyx_t_3) {
4670         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
4671       }
4672       __Pyx_INCREF(((PyObject *)__pyx_v_self));
4673       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4674       PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self));
4675       __Pyx_INCREF(__pyx_v_tag);
4676       __Pyx_GIVEREF(__pyx_v_tag);
4677       PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_tag);
4678       __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
4679       __Pyx_GOTREF(__pyx_t_1);
4680       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4681     }
4682     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4683     __pyx_r = __pyx_t_1;
4684     __pyx_t_1 = 0;
4685     goto __pyx_L0;
4686
4687     /* "lxml/objectify.pyx":229
4688  *         is provided, the child will be looked up in the same one as self.
4689  *         """
4690  *         if is_special_method(tag):             # <<<<<<<<<<<<<<
4691  *             return object.__getattr__(self, tag)
4692  *         return _lookupChildOrRaise(self, tag)
4693  */
4694   }
4695
4696   /* "lxml/objectify.pyx":231
4697  *         if is_special_method(tag):
4698  *             return object.__getattr__(self, tag)
4699  *         return _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
4700  * 
4701  *     def __setattr__(self, tag, value):
4702  */
4703   __Pyx_XDECREF(__pyx_r);
4704   __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error)
4705   __Pyx_GOTREF(__pyx_t_1);
4706   __pyx_r = __pyx_t_1;
4707   __pyx_t_1 = 0;
4708   goto __pyx_L0;
4709
4710   /* "lxml/objectify.pyx":225
4711  *         return result
4712  * 
4713  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
4714  *         u"""Return the (first) child with the given tag name.  If no namespace
4715  *         is provided, the child will be looked up in the same one as self.
4716  */
4717
4718   /* function exit code */
4719   __pyx_L1_error:;
4720   __Pyx_XDECREF(__pyx_t_1);
4721   __Pyx_XDECREF(__pyx_t_2);
4722   __Pyx_XDECREF(__pyx_t_3);
4723   __Pyx_XDECREF(__pyx_t_6);
4724   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4725   __pyx_r = NULL;
4726   __pyx_L0:;
4727   __Pyx_XGIVEREF(__pyx_r);
4728   __Pyx_RefNannyFinishContext();
4729   return __pyx_r;
4730 }
4731
4732 /* "lxml/objectify.pyx":233
4733  *         return _lookupChildOrRaise(self, tag)
4734  * 
4735  *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
4736  *         u"""Set the value of the (first) child with the given tag name.  If no
4737  *         namespace is provided, the child will be looked up in the same one as
4738  */
4739
4740 /* Python wrapper */
4741 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
4742 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_14__setattr__[] = "Set the value of the (first) child with the given tag name.  If no\n        namespace is provided, the child will be looked up in the same one as\n        self.\n        ";
4743 #if CYTHON_COMPILING_IN_CPYTHON
4744 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
4745 #endif
4746 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
4747   int __pyx_r;
4748   __Pyx_RefNannyDeclarations
4749   __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
4750   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag), ((PyObject *)__pyx_v_value));
4751
4752   /* function exit code */
4753   __Pyx_RefNannyFinishContext();
4754   return __pyx_r;
4755 }
4756
4757 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_14__setattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
4758   struct LxmlElement *__pyx_v_element = 0;
4759   int __pyx_r;
4760   __Pyx_RefNannyDeclarations
4761   int __pyx_t_1;
4762   int __pyx_t_2;
4763   PyObject *__pyx_t_3 = NULL;
4764   Py_ssize_t __pyx_t_4;
4765   Py_UCS4 __pyx_t_5;
4766   PyObject *__pyx_t_6 = NULL;
4767   PyObject *__pyx_t_7 = NULL;
4768   int __pyx_t_8;
4769   PyObject *__pyx_t_9 = NULL;
4770   int __pyx_lineno = 0;
4771   const char *__pyx_filename = NULL;
4772   int __pyx_clineno = 0;
4773   __Pyx_RefNannySetupContext("__setattr__", 0);
4774   __Pyx_INCREF(__pyx_v_tag);
4775
4776   /* "lxml/objectify.pyx":240
4777  *         cdef _Element element
4778  *         # properties are looked up /after/ __setattr__, so we must emulate them
4779  *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
4780  *             # read-only !
4781  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4782  */
4783   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_text, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
4784   if (!__pyx_t_2) {
4785   } else {
4786     __pyx_t_1 = __pyx_t_2;
4787     goto __pyx_L4_bool_binop_done;
4788   }
4789   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_pyval, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
4790   __pyx_t_1 = __pyx_t_2;
4791   __pyx_L4_bool_binop_done:;
4792   if (unlikely(__pyx_t_1)) {
4793
4794     /* "lxml/objectify.pyx":242
4795  *         if tag == u'text' or tag == u'pyval':
4796  *             # read-only !
4797  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"             # <<<<<<<<<<<<<<
4798  *         elif tag == u'tail':
4799  *             cetree.setTailText(self._c_node, value)
4800  */
4801     __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
4802     __Pyx_GOTREF(__pyx_t_3);
4803     __pyx_t_4 = 0;
4804     __pyx_t_5 = 127;
4805     __Pyx_INCREF(__pyx_kp_u_attribute);
4806     __pyx_t_4 += 11;
4807     __Pyx_GIVEREF(__pyx_kp_u_attribute);
4808     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_attribute);
4809     __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
4810     __Pyx_GOTREF(__pyx_t_6);
4811     __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
4812     __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
4813     __Pyx_GIVEREF(__pyx_t_6);
4814     PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
4815     __pyx_t_6 = 0;
4816     __Pyx_INCREF(__pyx_kp_u_of);
4817     __pyx_t_4 += 6;
4818     __Pyx_GIVEREF(__pyx_kp_u_of);
4819     PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_of);
4820     __pyx_t_6 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 242, __pyx_L1_error)
4821     __Pyx_GOTREF(__pyx_t_6);
4822     __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
4823     __Pyx_GOTREF(__pyx_t_7);
4824     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4825     __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5;
4826     __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
4827     __Pyx_GIVEREF(__pyx_t_7);
4828     PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
4829     __pyx_t_7 = 0;
4830     __Pyx_INCREF(__pyx_kp_u_objects_is_not_writable);
4831     __pyx_t_4 += 25;
4832     __Pyx_GIVEREF(__pyx_kp_u_objects_is_not_writable);
4833     PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_objects_is_not_writable);
4834     __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 242, __pyx_L1_error)
4835     __Pyx_GOTREF(__pyx_t_7);
4836     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4837     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
4838     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4839     __PYX_ERR(0, 242, __pyx_L1_error)
4840
4841     /* "lxml/objectify.pyx":240
4842  *         cdef _Element element
4843  *         # properties are looked up /after/ __setattr__, so we must emulate them
4844  *         if tag == u'text' or tag == u'pyval':             # <<<<<<<<<<<<<<
4845  *             # read-only !
4846  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4847  */
4848   }
4849
4850   /* "lxml/objectify.pyx":243
4851  *             # read-only !
4852  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4853  *         elif tag == u'tail':             # <<<<<<<<<<<<<<
4854  *             cetree.setTailText(self._c_node, value)
4855  *             return
4856  */
4857   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_tail, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 243, __pyx_L1_error)
4858   if (__pyx_t_1) {
4859
4860     /* "lxml/objectify.pyx":244
4861  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4862  *         elif tag == u'tail':
4863  *             cetree.setTailText(self._c_node, value)             # <<<<<<<<<<<<<<
4864  *             return
4865  *         elif tag == u'tag':
4866  */
4867     __pyx_t_8 = setTailText(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_value); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 244, __pyx_L1_error)
4868
4869     /* "lxml/objectify.pyx":245
4870  *         elif tag == u'tail':
4871  *             cetree.setTailText(self._c_node, value)
4872  *             return             # <<<<<<<<<<<<<<
4873  *         elif tag == u'tag':
4874  *             ElementBase.tag.__set__(self, value)
4875  */
4876     __pyx_r = 0;
4877     goto __pyx_L0;
4878
4879     /* "lxml/objectify.pyx":243
4880  *             # read-only !
4881  *             raise TypeError, f"attribute '{tag}' of '{_typename(self)}' objects is not writable"
4882  *         elif tag == u'tail':             # <<<<<<<<<<<<<<
4883  *             cetree.setTailText(self._c_node, value)
4884  *             return
4885  */
4886   }
4887
4888   /* "lxml/objectify.pyx":246
4889  *             cetree.setTailText(self._c_node, value)
4890  *             return
4891  *         elif tag == u'tag':             # <<<<<<<<<<<<<<
4892  *             ElementBase.tag.__set__(self, value)
4893  *             return
4894  */
4895   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_tag, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 246, __pyx_L1_error)
4896   if (__pyx_t_1) {
4897
4898     /* "lxml/objectify.pyx":247
4899  *             return
4900  *         elif tag == u'tag':
4901  *             ElementBase.tag.__set__(self, value)             # <<<<<<<<<<<<<<
4902  *             return
4903  *         elif tag == u'base':
4904  */
4905     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase), __pyx_n_s_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error)
4906     __Pyx_GOTREF(__pyx_t_3);
4907     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error)
4908     __Pyx_GOTREF(__pyx_t_6);
4909     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4910     __pyx_t_3 = NULL;
4911     __pyx_t_8 = 0;
4912     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
4913       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
4914       if (likely(__pyx_t_3)) {
4915         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
4916         __Pyx_INCREF(__pyx_t_3);
4917         __Pyx_INCREF(function);
4918         __Pyx_DECREF_SET(__pyx_t_6, function);
4919         __pyx_t_8 = 1;
4920       }
4921     }
4922     #if CYTHON_FAST_PYCALL
4923     if (PyFunction_Check(__pyx_t_6)) {
4924       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_value};
4925       __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 247, __pyx_L1_error)
4926       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4927       __Pyx_GOTREF(__pyx_t_7);
4928     } else
4929     #endif
4930     #if CYTHON_FAST_PYCCALL
4931     if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
4932       PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_value};
4933       __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 247, __pyx_L1_error)
4934       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4935       __Pyx_GOTREF(__pyx_t_7);
4936     } else
4937     #endif
4938     {
4939       __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 247, __pyx_L1_error)
4940       __Pyx_GOTREF(__pyx_t_9);
4941       if (__pyx_t_3) {
4942         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __pyx_t_3 = NULL;
4943       }
4944       __Pyx_INCREF(((PyObject *)__pyx_v_self));
4945       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
4946       PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
4947       __Pyx_INCREF(__pyx_v_value);
4948       __Pyx_GIVEREF(__pyx_v_value);
4949       PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_value);
4950       __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 247, __pyx_L1_error)
4951       __Pyx_GOTREF(__pyx_t_7);
4952       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
4953     }
4954     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4955     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4956
4957     /* "lxml/objectify.pyx":248
4958  *         elif tag == u'tag':
4959  *             ElementBase.tag.__set__(self, value)
4960  *             return             # <<<<<<<<<<<<<<
4961  *         elif tag == u'base':
4962  *             ElementBase.base.__set__(self, value)
4963  */
4964     __pyx_r = 0;
4965     goto __pyx_L0;
4966
4967     /* "lxml/objectify.pyx":246
4968  *             cetree.setTailText(self._c_node, value)
4969  *             return
4970  *         elif tag == u'tag':             # <<<<<<<<<<<<<<
4971  *             ElementBase.tag.__set__(self, value)
4972  *             return
4973  */
4974   }
4975
4976   /* "lxml/objectify.pyx":249
4977  *             ElementBase.tag.__set__(self, value)
4978  *             return
4979  *         elif tag == u'base':             # <<<<<<<<<<<<<<
4980  *             ElementBase.base.__set__(self, value)
4981  *             return
4982  */
4983   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_tag, __pyx_n_u_base, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 249, __pyx_L1_error)
4984   if (__pyx_t_1) {
4985
4986     /* "lxml/objectify.pyx":250
4987  *             return
4988  *         elif tag == u'base':
4989  *             ElementBase.base.__set__(self, value)             # <<<<<<<<<<<<<<
4990  *             return
4991  *         tag = _buildChildTag(self, tag)
4992  */
4993     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase), __pyx_n_s_base); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
4994     __Pyx_GOTREF(__pyx_t_6);
4995     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_set); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 250, __pyx_L1_error)
4996     __Pyx_GOTREF(__pyx_t_9);
4997     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4998     __pyx_t_6 = NULL;
4999     __pyx_t_8 = 0;
5000     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
5001       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
5002       if (likely(__pyx_t_6)) {
5003         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
5004         __Pyx_INCREF(__pyx_t_6);
5005         __Pyx_INCREF(function);
5006         __Pyx_DECREF_SET(__pyx_t_9, function);
5007         __pyx_t_8 = 1;
5008       }
5009     }
5010     #if CYTHON_FAST_PYCALL
5011     if (PyFunction_Check(__pyx_t_9)) {
5012       PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_value};
5013       __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
5014       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5015       __Pyx_GOTREF(__pyx_t_7);
5016     } else
5017     #endif
5018     #if CYTHON_FAST_PYCCALL
5019     if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
5020       PyObject *__pyx_temp[3] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_value};
5021       __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
5022       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
5023       __Pyx_GOTREF(__pyx_t_7);
5024     } else
5025     #endif
5026     {
5027       __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
5028       __Pyx_GOTREF(__pyx_t_3);
5029       if (__pyx_t_6) {
5030         __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
5031       }
5032       __Pyx_INCREF(((PyObject *)__pyx_v_self));
5033       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
5034       PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, ((PyObject *)__pyx_v_self));
5035       __Pyx_INCREF(__pyx_v_value);
5036       __Pyx_GIVEREF(__pyx_v_value);
5037       PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_value);
5038       __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 250, __pyx_L1_error)
5039       __Pyx_GOTREF(__pyx_t_7);
5040       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5041     }
5042     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
5043     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5044
5045     /* "lxml/objectify.pyx":251
5046  *         elif tag == u'base':
5047  *             ElementBase.base.__set__(self, value)
5048  *             return             # <<<<<<<<<<<<<<
5049  *         tag = _buildChildTag(self, tag)
5050  *         element = _lookupChild(self, tag)
5051  */
5052     __pyx_r = 0;
5053     goto __pyx_L0;
5054
5055     /* "lxml/objectify.pyx":249
5056  *             ElementBase.tag.__set__(self, value)
5057  *             return
5058  *         elif tag == u'base':             # <<<<<<<<<<<<<<
5059  *             ElementBase.base.__set__(self, value)
5060  *             return
5061  */
5062   }
5063
5064   /* "lxml/objectify.pyx":252
5065  *             ElementBase.base.__set__(self, value)
5066  *             return
5067  *         tag = _buildChildTag(self, tag)             # <<<<<<<<<<<<<<
5068  *         element = _lookupChild(self, tag)
5069  *         if element is None:
5070  */
5071   __pyx_t_7 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 252, __pyx_L1_error)
5072   __Pyx_GOTREF(__pyx_t_7);
5073   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_7);
5074   __pyx_t_7 = 0;
5075
5076   /* "lxml/objectify.pyx":253
5077  *             return
5078  *         tag = _buildChildTag(self, tag)
5079  *         element = _lookupChild(self, tag)             # <<<<<<<<<<<<<<
5080  *         if element is None:
5081  *             _appendValue(self, tag, value)
5082  */
5083   __pyx_t_7 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 253, __pyx_L1_error)
5084   __Pyx_GOTREF(__pyx_t_7);
5085   if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 253, __pyx_L1_error)
5086   __pyx_v_element = ((struct LxmlElement *)__pyx_t_7);
5087   __pyx_t_7 = 0;
5088
5089   /* "lxml/objectify.pyx":254
5090  *         tag = _buildChildTag(self, tag)
5091  *         element = _lookupChild(self, tag)
5092  *         if element is None:             # <<<<<<<<<<<<<<
5093  *             _appendValue(self, tag, value)
5094  *         else:
5095  */
5096   __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
5097   __pyx_t_2 = (__pyx_t_1 != 0);
5098   if (__pyx_t_2) {
5099
5100     /* "lxml/objectify.pyx":255
5101  *         element = _lookupChild(self, tag)
5102  *         if element is None:
5103  *             _appendValue(self, tag, value)             # <<<<<<<<<<<<<<
5104  *         else:
5105  *             _replaceElement(element, value)
5106  */
5107     __pyx_t_7 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error)
5108     __Pyx_GOTREF(__pyx_t_7);
5109     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5110
5111     /* "lxml/objectify.pyx":254
5112  *         tag = _buildChildTag(self, tag)
5113  *         element = _lookupChild(self, tag)
5114  *         if element is None:             # <<<<<<<<<<<<<<
5115  *             _appendValue(self, tag, value)
5116  *         else:
5117  */
5118     goto __pyx_L6;
5119   }
5120
5121   /* "lxml/objectify.pyx":257
5122  *             _appendValue(self, tag, value)
5123  *         else:
5124  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
5125  * 
5126  *     def __delattr__(self, tag):
5127  */
5128   /*else*/ {
5129     __pyx_t_7 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 257, __pyx_L1_error)
5130     __Pyx_GOTREF(__pyx_t_7);
5131     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5132   }
5133   __pyx_L6:;
5134
5135   /* "lxml/objectify.pyx":233
5136  *         return _lookupChildOrRaise(self, tag)
5137  * 
5138  *     def __setattr__(self, tag, value):             # <<<<<<<<<<<<<<
5139  *         u"""Set the value of the (first) child with the given tag name.  If no
5140  *         namespace is provided, the child will be looked up in the same one as
5141  */
5142
5143   /* function exit code */
5144   __pyx_r = 0;
5145   goto __pyx_L0;
5146   __pyx_L1_error:;
5147   __Pyx_XDECREF(__pyx_t_3);
5148   __Pyx_XDECREF(__pyx_t_6);
5149   __Pyx_XDECREF(__pyx_t_7);
5150   __Pyx_XDECREF(__pyx_t_9);
5151   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5152   __pyx_r = -1;
5153   __pyx_L0:;
5154   __Pyx_XDECREF((PyObject *)__pyx_v_element);
5155   __Pyx_XDECREF(__pyx_v_tag);
5156   __Pyx_RefNannyFinishContext();
5157   return __pyx_r;
5158 }
5159
5160 /* "lxml/objectify.pyx":259
5161  *             _replaceElement(element, value)
5162  * 
5163  *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
5164  *         child = _lookupChildOrRaise(self, tag)
5165  *         self.remove(child)
5166  */
5167
5168 /* Python wrapper */
5169 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
5170 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
5171   int __pyx_r;
5172   __Pyx_RefNannyDeclarations
5173   __Pyx_RefNannySetupContext("__delattr__ (wrapper)", 0);
5174   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
5175
5176   /* function exit code */
5177   __Pyx_RefNannyFinishContext();
5178   return __pyx_r;
5179 }
5180
5181 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_16__delattr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag) {
5182   PyObject *__pyx_v_child = NULL;
5183   int __pyx_r;
5184   __Pyx_RefNannyDeclarations
5185   PyObject *__pyx_t_1 = NULL;
5186   PyObject *__pyx_t_2 = NULL;
5187   PyObject *__pyx_t_3 = NULL;
5188   int __pyx_lineno = 0;
5189   const char *__pyx_filename = NULL;
5190   int __pyx_clineno = 0;
5191   __Pyx_RefNannySetupContext("__delattr__", 0);
5192
5193   /* "lxml/objectify.pyx":260
5194  * 
5195  *     def __delattr__(self, tag):
5196  *         child = _lookupChildOrRaise(self, tag)             # <<<<<<<<<<<<<<
5197  *         self.remove(child)
5198  * 
5199  */
5200   __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
5201   __Pyx_GOTREF(__pyx_t_1);
5202   __pyx_v_child = __pyx_t_1;
5203   __pyx_t_1 = 0;
5204
5205   /* "lxml/objectify.pyx":261
5206  *     def __delattr__(self, tag):
5207  *         child = _lookupChildOrRaise(self, tag)
5208  *         self.remove(child)             # <<<<<<<<<<<<<<
5209  * 
5210  *     def addattr(self, tag, value):
5211  */
5212   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
5213   __Pyx_GOTREF(__pyx_t_2);
5214   __pyx_t_3 = NULL;
5215   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5216     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5217     if (likely(__pyx_t_3)) {
5218       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5219       __Pyx_INCREF(__pyx_t_3);
5220       __Pyx_INCREF(function);
5221       __Pyx_DECREF_SET(__pyx_t_2, function);
5222     }
5223   }
5224   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_child);
5225   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5226   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
5227   __Pyx_GOTREF(__pyx_t_1);
5228   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5229   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5230
5231   /* "lxml/objectify.pyx":259
5232  *             _replaceElement(element, value)
5233  * 
5234  *     def __delattr__(self, tag):             # <<<<<<<<<<<<<<
5235  *         child = _lookupChildOrRaise(self, tag)
5236  *         self.remove(child)
5237  */
5238
5239   /* function exit code */
5240   __pyx_r = 0;
5241   goto __pyx_L0;
5242   __pyx_L1_error:;
5243   __Pyx_XDECREF(__pyx_t_1);
5244   __Pyx_XDECREF(__pyx_t_2);
5245   __Pyx_XDECREF(__pyx_t_3);
5246   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5247   __pyx_r = -1;
5248   __pyx_L0:;
5249   __Pyx_XDECREF(__pyx_v_child);
5250   __Pyx_RefNannyFinishContext();
5251   return __pyx_r;
5252 }
5253
5254 /* "lxml/objectify.pyx":263
5255  *         self.remove(child)
5256  * 
5257  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
5258  *         u"""addattr(self, tag, value)
5259  * 
5260  */
5261
5262 /* Python wrapper */
5263 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5264 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr[] = "addattr(self, tag, value)\n\n        Add a child value to the element.\n\n        As opposed to append(), it sets a data value, not an element.\n        ";
5265 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_19addattr = {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr};
5266 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5267   PyObject *__pyx_v_tag = 0;
5268   PyObject *__pyx_v_value = 0;
5269   int __pyx_lineno = 0;
5270   const char *__pyx_filename = NULL;
5271   int __pyx_clineno = 0;
5272   PyObject *__pyx_r = 0;
5273   __Pyx_RefNannyDeclarations
5274   __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
5275   {
5276     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,&__pyx_n_s_value,0};
5277     PyObject* values[2] = {0,0};
5278     if (unlikely(__pyx_kwds)) {
5279       Py_ssize_t kw_args;
5280       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5281       switch (pos_args) {
5282         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5283         CYTHON_FALLTHROUGH;
5284         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5285         CYTHON_FALLTHROUGH;
5286         case  0: break;
5287         default: goto __pyx_L5_argtuple_error;
5288       }
5289       kw_args = PyDict_Size(__pyx_kwds);
5290       switch (pos_args) {
5291         case  0:
5292         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
5293         else goto __pyx_L5_argtuple_error;
5294         CYTHON_FALLTHROUGH;
5295         case  1:
5296         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
5297         else {
5298           __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); __PYX_ERR(0, 263, __pyx_L3_error)
5299         }
5300       }
5301       if (unlikely(kw_args > 0)) {
5302         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) __PYX_ERR(0, 263, __pyx_L3_error)
5303       }
5304     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5305       goto __pyx_L5_argtuple_error;
5306     } else {
5307       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5308       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5309     }
5310     __pyx_v_tag = values[0];
5311     __pyx_v_value = values[1];
5312   }
5313   goto __pyx_L4_argument_unpacking_done;
5314   __pyx_L5_argtuple_error:;
5315   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 263, __pyx_L3_error)
5316   __pyx_L3_error:;
5317   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5318   __Pyx_RefNannyFinishContext();
5319   return NULL;
5320   __pyx_L4_argument_unpacking_done:;
5321   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value);
5322
5323   /* function exit code */
5324   __Pyx_RefNannyFinishContext();
5325   return __pyx_r;
5326 }
5327
5328 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_18addattr(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
5329   PyObject *__pyx_r = NULL;
5330   __Pyx_RefNannyDeclarations
5331   PyObject *__pyx_t_1 = NULL;
5332   PyObject *__pyx_t_2 = NULL;
5333   int __pyx_lineno = 0;
5334   const char *__pyx_filename = NULL;
5335   int __pyx_clineno = 0;
5336   __Pyx_RefNannySetupContext("addattr", 0);
5337
5338   /* "lxml/objectify.pyx":270
5339  *         As opposed to append(), it sets a data value, not an element.
5340  *         """
5341  *         _appendValue(self, _buildChildTag(self, tag), value)             # <<<<<<<<<<<<<<
5342  * 
5343  *     def __getitem__(self, key):
5344  */
5345   __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
5346   __Pyx_GOTREF(__pyx_t_1);
5347   __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error)
5348   __Pyx_GOTREF(__pyx_t_2);
5349   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5350   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5351
5352   /* "lxml/objectify.pyx":263
5353  *         self.remove(child)
5354  * 
5355  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
5356  *         u"""addattr(self, tag, value)
5357  * 
5358  */
5359
5360   /* function exit code */
5361   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5362   goto __pyx_L0;
5363   __pyx_L1_error:;
5364   __Pyx_XDECREF(__pyx_t_1);
5365   __Pyx_XDECREF(__pyx_t_2);
5366   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
5367   __pyx_r = NULL;
5368   __pyx_L0:;
5369   __Pyx_XGIVEREF(__pyx_r);
5370   __Pyx_RefNannyFinishContext();
5371   return __pyx_r;
5372 }
5373
5374 /* "lxml/objectify.pyx":272
5375  *         _appendValue(self, _buildChildTag(self, tag), value)
5376  * 
5377  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
5378  *         u"""Return a sibling, counting from the first child of the parent.  The
5379  *         method behaves like both a dict and a sequence.
5380  */
5381
5382 /* Python wrapper */
5383 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
5384 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_20__getitem__[] = "Return a sibling, counting from the first child of the parent.  The\n        method behaves like both a dict and a sequence.\n\n        * If argument is an integer, returns the sibling at that position.\n\n        * If argument is a string, does the same as getattr().  This can be\n          used to provide namespaces for element lookup, or to look up\n          children with special names (``text`` etc.).\n\n        * If argument is a slice object, returns the matching slice.\n        ";
5385 #if CYTHON_COMPILING_IN_CPYTHON
5386 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
5387 #endif
5388 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
5389   PyObject *__pyx_r = 0;
5390   __Pyx_RefNannyDeclarations
5391   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
5392   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
5393
5394   /* function exit code */
5395   __Pyx_RefNannyFinishContext();
5396   return __pyx_r;
5397 }
5398
5399 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_20__getitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
5400   xmlNode *__pyx_v_c_self_node;
5401   xmlNode *__pyx_v_c_parent;
5402   xmlNode *__pyx_v_c_node;
5403   Py_ssize_t __pyx_v_c_index;
5404   PyObject *__pyx_r = NULL;
5405   __Pyx_RefNannyDeclarations
5406   int __pyx_t_1;
5407   PyObject *__pyx_t_2 = NULL;
5408   int __pyx_t_3;
5409   PyObject *__pyx_t_4 = NULL;
5410   Py_ssize_t __pyx_t_5;
5411   xmlNode *__pyx_t_6;
5412   int __pyx_lineno = 0;
5413   const char *__pyx_filename = NULL;
5414   int __pyx_clineno = 0;
5415   __Pyx_RefNannySetupContext("__getitem__", 0);
5416
5417   /* "lxml/objectify.pyx":288
5418  *         cdef tree.xmlNode* c_node
5419  *         cdef Py_ssize_t c_index
5420  *         if python._isString(key):             # <<<<<<<<<<<<<<
5421  *             return _lookupChildOrRaise(self, key)
5422  *         elif isinstance(key, slice):
5423  */
5424   __pyx_t_1 = (_isString(__pyx_v_key) != 0);
5425   if (__pyx_t_1) {
5426
5427     /* "lxml/objectify.pyx":289
5428  *         cdef Py_ssize_t c_index
5429  *         if python._isString(key):
5430  *             return _lookupChildOrRaise(self, key)             # <<<<<<<<<<<<<<
5431  *         elif isinstance(key, slice):
5432  *             return list(self)[key]
5433  */
5434     __Pyx_XDECREF(__pyx_r);
5435     __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
5436     __Pyx_GOTREF(__pyx_t_2);
5437     __pyx_r = __pyx_t_2;
5438     __pyx_t_2 = 0;
5439     goto __pyx_L0;
5440
5441     /* "lxml/objectify.pyx":288
5442  *         cdef tree.xmlNode* c_node
5443  *         cdef Py_ssize_t c_index
5444  *         if python._isString(key):             # <<<<<<<<<<<<<<
5445  *             return _lookupChildOrRaise(self, key)
5446  *         elif isinstance(key, slice):
5447  */
5448   }
5449
5450   /* "lxml/objectify.pyx":290
5451  *         if python._isString(key):
5452  *             return _lookupChildOrRaise(self, key)
5453  *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
5454  *             return list(self)[key]
5455  *         # normal item access
5456  */
5457   __pyx_t_1 = PySlice_Check(__pyx_v_key); 
5458   __pyx_t_3 = (__pyx_t_1 != 0);
5459   if (__pyx_t_3) {
5460
5461     /* "lxml/objectify.pyx":291
5462  *             return _lookupChildOrRaise(self, key)
5463  *         elif isinstance(key, slice):
5464  *             return list(self)[key]             # <<<<<<<<<<<<<<
5465  *         # normal item access
5466  *         c_index = key   # raises TypeError if necessary
5467  */
5468     __Pyx_XDECREF(__pyx_r);
5469     __pyx_t_2 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
5470     __Pyx_GOTREF(__pyx_t_2);
5471     __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
5472     __Pyx_GOTREF(__pyx_t_4);
5473     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5474     __pyx_r = __pyx_t_4;
5475     __pyx_t_4 = 0;
5476     goto __pyx_L0;
5477
5478     /* "lxml/objectify.pyx":290
5479  *         if python._isString(key):
5480  *             return _lookupChildOrRaise(self, key)
5481  *         elif isinstance(key, slice):             # <<<<<<<<<<<<<<
5482  *             return list(self)[key]
5483  *         # normal item access
5484  */
5485   }
5486
5487   /* "lxml/objectify.pyx":293
5488  *             return list(self)[key]
5489  *         # normal item access
5490  *         c_index = key   # raises TypeError if necessary             # <<<<<<<<<<<<<<
5491  *         c_self_node = self._c_node
5492  *         c_parent = c_self_node.parent
5493  */
5494   __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L1_error)
5495   __pyx_v_c_index = __pyx_t_5;
5496
5497   /* "lxml/objectify.pyx":294
5498  *         # normal item access
5499  *         c_index = key   # raises TypeError if necessary
5500  *         c_self_node = self._c_node             # <<<<<<<<<<<<<<
5501  *         c_parent = c_self_node.parent
5502  *         if c_parent is NULL:
5503  */
5504   __pyx_t_6 = __pyx_v_self->__pyx_base.__pyx_base._c_node;
5505   __pyx_v_c_self_node = __pyx_t_6;
5506
5507   /* "lxml/objectify.pyx":295
5508  *         c_index = key   # raises TypeError if necessary
5509  *         c_self_node = self._c_node
5510  *         c_parent = c_self_node.parent             # <<<<<<<<<<<<<<
5511  *         if c_parent is NULL:
5512  *             if c_index == 0 or c_index == -1:
5513  */
5514   __pyx_t_6 = __pyx_v_c_self_node->parent;
5515   __pyx_v_c_parent = __pyx_t_6;
5516
5517   /* "lxml/objectify.pyx":296
5518  *         c_self_node = self._c_node
5519  *         c_parent = c_self_node.parent
5520  *         if c_parent is NULL:             # <<<<<<<<<<<<<<
5521  *             if c_index == 0 or c_index == -1:
5522  *                 return self
5523  */
5524   __pyx_t_3 = ((__pyx_v_c_parent == NULL) != 0);
5525   if (__pyx_t_3) {
5526
5527     /* "lxml/objectify.pyx":297
5528  *         c_parent = c_self_node.parent
5529  *         if c_parent is NULL:
5530  *             if c_index == 0 or c_index == -1:             # <<<<<<<<<<<<<<
5531  *                 return self
5532  *             raise IndexError, unicode(key)
5533  */
5534     switch (__pyx_v_c_index) {
5535       case 0:
5536       case -1L:
5537
5538       /* "lxml/objectify.pyx":298
5539  *         if c_parent is NULL:
5540  *             if c_index == 0 or c_index == -1:
5541  *                 return self             # <<<<<<<<<<<<<<
5542  *             raise IndexError, unicode(key)
5543  *         if c_index < 0:
5544  */
5545       __Pyx_XDECREF(__pyx_r);
5546       __Pyx_INCREF(((PyObject *)__pyx_v_self));
5547       __pyx_r = ((PyObject *)__pyx_v_self);
5548       goto __pyx_L0;
5549
5550       /* "lxml/objectify.pyx":297
5551  *         c_parent = c_self_node.parent
5552  *         if c_parent is NULL:
5553  *             if c_index == 0 or c_index == -1:             # <<<<<<<<<<<<<<
5554  *                 return self
5555  *             raise IndexError, unicode(key)
5556  */
5557       break;
5558       default: break;
5559     }
5560
5561     /* "lxml/objectify.pyx":299
5562  *             if c_index == 0 or c_index == -1:
5563  *                 return self
5564  *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5565  *         if c_index < 0:
5566  *             c_node = c_parent.last
5567  */
5568     __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error)
5569     __Pyx_GOTREF(__pyx_t_4);
5570     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0, 0);
5571     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5572     __PYX_ERR(0, 299, __pyx_L1_error)
5573
5574     /* "lxml/objectify.pyx":296
5575  *         c_self_node = self._c_node
5576  *         c_parent = c_self_node.parent
5577  *         if c_parent is NULL:             # <<<<<<<<<<<<<<
5578  *             if c_index == 0 or c_index == -1:
5579  *                 return self
5580  */
5581   }
5582
5583   /* "lxml/objectify.pyx":300
5584  *                 return self
5585  *             raise IndexError, unicode(key)
5586  *         if c_index < 0:             # <<<<<<<<<<<<<<
5587  *             c_node = c_parent.last
5588  *         else:
5589  */
5590   __pyx_t_3 = ((__pyx_v_c_index < 0) != 0);
5591   if (__pyx_t_3) {
5592
5593     /* "lxml/objectify.pyx":301
5594  *             raise IndexError, unicode(key)
5595  *         if c_index < 0:
5596  *             c_node = c_parent.last             # <<<<<<<<<<<<<<
5597  *         else:
5598  *             c_node = c_parent.children
5599  */
5600     __pyx_t_6 = __pyx_v_c_parent->last;
5601     __pyx_v_c_node = __pyx_t_6;
5602
5603     /* "lxml/objectify.pyx":300
5604  *                 return self
5605  *             raise IndexError, unicode(key)
5606  *         if c_index < 0:             # <<<<<<<<<<<<<<
5607  *             c_node = c_parent.last
5608  *         else:
5609  */
5610     goto __pyx_L5;
5611   }
5612
5613   /* "lxml/objectify.pyx":303
5614  *             c_node = c_parent.last
5615  *         else:
5616  *             c_node = c_parent.children             # <<<<<<<<<<<<<<
5617  *         c_node = _findFollowingSibling(
5618  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5619  */
5620   /*else*/ {
5621     __pyx_t_6 = __pyx_v_c_parent->children;
5622     __pyx_v_c_node = __pyx_t_6;
5623   }
5624   __pyx_L5:;
5625
5626   /* "lxml/objectify.pyx":304
5627  *         else:
5628  *             c_node = c_parent.children
5629  *         c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
5630  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5631  *         if c_node is NULL:
5632  */
5633   __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_c_self_node), __pyx_v_c_self_node->name, __pyx_v_c_index);
5634
5635   /* "lxml/objectify.pyx":306
5636  *         c_node = _findFollowingSibling(
5637  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5638  *         if c_node is NULL:             # <<<<<<<<<<<<<<
5639  *             raise IndexError, unicode(key)
5640  *         return elementFactory(self._doc, c_node)
5641  */
5642   __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0);
5643   if (unlikely(__pyx_t_3)) {
5644
5645     /* "lxml/objectify.pyx":307
5646  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5647  *         if c_node is NULL:
5648  *             raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5649  *         return elementFactory(self._doc, c_node)
5650  * 
5651  */
5652     __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
5653     __Pyx_GOTREF(__pyx_t_4);
5654     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0, 0);
5655     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5656     __PYX_ERR(0, 307, __pyx_L1_error)
5657
5658     /* "lxml/objectify.pyx":306
5659  *         c_node = _findFollowingSibling(
5660  *             c_node, tree._getNs(c_self_node), c_self_node.name, c_index)
5661  *         if c_node is NULL:             # <<<<<<<<<<<<<<
5662  *             raise IndexError, unicode(key)
5663  *         return elementFactory(self._doc, c_node)
5664  */
5665   }
5666
5667   /* "lxml/objectify.pyx":308
5668  *         if c_node is NULL:
5669  *             raise IndexError, unicode(key)
5670  *         return elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
5671  * 
5672  *     def __setitem__(self, key, value):
5673  */
5674   __Pyx_XDECREF(__pyx_r);
5675   __pyx_t_4 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
5676   __Pyx_INCREF(__pyx_t_4);
5677   __pyx_t_2 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
5678   __Pyx_GOTREF(__pyx_t_2);
5679   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5680   __pyx_r = __pyx_t_2;
5681   __pyx_t_2 = 0;
5682   goto __pyx_L0;
5683
5684   /* "lxml/objectify.pyx":272
5685  *         _appendValue(self, _buildChildTag(self, tag), value)
5686  * 
5687  *     def __getitem__(self, key):             # <<<<<<<<<<<<<<
5688  *         u"""Return a sibling, counting from the first child of the parent.  The
5689  *         method behaves like both a dict and a sequence.
5690  */
5691
5692   /* function exit code */
5693   __pyx_L1_error:;
5694   __Pyx_XDECREF(__pyx_t_2);
5695   __Pyx_XDECREF(__pyx_t_4);
5696   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5697   __pyx_r = NULL;
5698   __pyx_L0:;
5699   __Pyx_XGIVEREF(__pyx_r);
5700   __Pyx_RefNannyFinishContext();
5701   return __pyx_r;
5702 }
5703
5704 /* "lxml/objectify.pyx":310
5705  *         return elementFactory(self._doc, c_node)
5706  * 
5707  *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
5708  *         u"""Set the value of a sibling, counting from the first child of the
5709  *         parent.  Implements key assignment, item assignment and slice
5710  */
5711
5712 /* Python wrapper */
5713 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
5714 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_22__setitem__[] = "Set the value of a sibling, counting from the first child of the\n        parent.  Implements key assignment, item assignment and slice\n        assignment.\n\n        * If argument is an integer, sets the sibling at that position.\n\n        * If argument is a string, does the same as setattr().  This is used\n          to provide namespaces for element lookup.\n\n        * If argument is a sequence (list, tuple, etc.), assign the contained\n          items to the siblings.\n        ";
5715 #if CYTHON_COMPILING_IN_CPYTHON
5716 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
5717 #endif
5718 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
5719   int __pyx_r;
5720   __Pyx_RefNannyDeclarations
5721   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
5722   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value));
5723
5724   /* function exit code */
5725   __Pyx_RefNannyFinishContext();
5726   return __pyx_r;
5727 }
5728
5729 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_22__setitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
5730   struct LxmlElement *__pyx_v_element = 0;
5731   xmlNode *__pyx_v_c_node;
5732   int __pyx_r;
5733   __Pyx_RefNannyDeclarations
5734   int __pyx_t_1;
5735   PyObject *__pyx_t_2 = NULL;
5736   int __pyx_t_3;
5737   xmlNode *__pyx_t_4;
5738   Py_ssize_t __pyx_t_5;
5739   PyObject *__pyx_t_6 = NULL;
5740   int __pyx_lineno = 0;
5741   const char *__pyx_filename = NULL;
5742   int __pyx_clineno = 0;
5743   __Pyx_RefNannySetupContext("__setitem__", 0);
5744   __Pyx_INCREF(__pyx_v_key);
5745
5746   /* "lxml/objectify.pyx":325
5747  *         cdef _Element element
5748  *         cdef tree.xmlNode* c_node
5749  *         if python._isString(key):             # <<<<<<<<<<<<<<
5750  *             key = _buildChildTag(self, key)
5751  *             element = _lookupChild(self, key)
5752  */
5753   __pyx_t_1 = (_isString(__pyx_v_key) != 0);
5754   if (__pyx_t_1) {
5755
5756     /* "lxml/objectify.pyx":326
5757  *         cdef tree.xmlNode* c_node
5758  *         if python._isString(key):
5759  *             key = _buildChildTag(self, key)             # <<<<<<<<<<<<<<
5760  *             element = _lookupChild(self, key)
5761  *             if element is None:
5762  */
5763     __pyx_t_2 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
5764     __Pyx_GOTREF(__pyx_t_2);
5765     __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2);
5766     __pyx_t_2 = 0;
5767
5768     /* "lxml/objectify.pyx":327
5769  *         if python._isString(key):
5770  *             key = _buildChildTag(self, key)
5771  *             element = _lookupChild(self, key)             # <<<<<<<<<<<<<<
5772  *             if element is None:
5773  *                 _appendValue(self, key, value)
5774  */
5775     __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
5776     __Pyx_GOTREF(__pyx_t_2);
5777     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 327, __pyx_L1_error)
5778     __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
5779     __pyx_t_2 = 0;
5780
5781     /* "lxml/objectify.pyx":328
5782  *             key = _buildChildTag(self, key)
5783  *             element = _lookupChild(self, key)
5784  *             if element is None:             # <<<<<<<<<<<<<<
5785  *                 _appendValue(self, key, value)
5786  *             else:
5787  */
5788     __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
5789     __pyx_t_3 = (__pyx_t_1 != 0);
5790     if (__pyx_t_3) {
5791
5792       /* "lxml/objectify.pyx":329
5793  *             element = _lookupChild(self, key)
5794  *             if element is None:
5795  *                 _appendValue(self, key, value)             # <<<<<<<<<<<<<<
5796  *             else:
5797  *                 _replaceElement(element, value)
5798  */
5799       __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error)
5800       __Pyx_GOTREF(__pyx_t_2);
5801       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5802
5803       /* "lxml/objectify.pyx":328
5804  *             key = _buildChildTag(self, key)
5805  *             element = _lookupChild(self, key)
5806  *             if element is None:             # <<<<<<<<<<<<<<
5807  *                 _appendValue(self, key, value)
5808  *             else:
5809  */
5810       goto __pyx_L4;
5811     }
5812
5813     /* "lxml/objectify.pyx":331
5814  *                 _appendValue(self, key, value)
5815  *             else:
5816  *                 _replaceElement(element, value)             # <<<<<<<<<<<<<<
5817  *             return
5818  * 
5819  */
5820     /*else*/ {
5821       __pyx_t_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error)
5822       __Pyx_GOTREF(__pyx_t_2);
5823       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5824     }
5825     __pyx_L4:;
5826
5827     /* "lxml/objectify.pyx":332
5828  *             else:
5829  *                 _replaceElement(element, value)
5830  *             return             # <<<<<<<<<<<<<<
5831  * 
5832  *         if self._c_node.parent is NULL:
5833  */
5834     __pyx_r = 0;
5835     goto __pyx_L0;
5836
5837     /* "lxml/objectify.pyx":325
5838  *         cdef _Element element
5839  *         cdef tree.xmlNode* c_node
5840  *         if python._isString(key):             # <<<<<<<<<<<<<<
5841  *             key = _buildChildTag(self, key)
5842  *             element = _lookupChild(self, key)
5843  */
5844   }
5845
5846   /* "lxml/objectify.pyx":334
5847  *             return
5848  * 
5849  *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
5850  *             # the 'root[i] = ...' case
5851  *             raise TypeError, u"assignment to root element is invalid"
5852  */
5853   __pyx_t_3 = ((__pyx_v_self->__pyx_base.__pyx_base._c_node->parent == NULL) != 0);
5854   if (unlikely(__pyx_t_3)) {
5855
5856     /* "lxml/objectify.pyx":336
5857  *         if self._c_node.parent is NULL:
5858  *             # the 'root[i] = ...' case
5859  *             raise TypeError, u"assignment to root element is invalid"             # <<<<<<<<<<<<<<
5860  * 
5861  *         if isinstance(key, slice):
5862  */
5863     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_assignment_to_root_element_is_in, 0, 0);
5864     __PYX_ERR(0, 336, __pyx_L1_error)
5865
5866     /* "lxml/objectify.pyx":334
5867  *             return
5868  * 
5869  *         if self._c_node.parent is NULL:             # <<<<<<<<<<<<<<
5870  *             # the 'root[i] = ...' case
5871  *             raise TypeError, u"assignment to root element is invalid"
5872  */
5873   }
5874
5875   /* "lxml/objectify.pyx":338
5876  *             raise TypeError, u"assignment to root element is invalid"
5877  * 
5878  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
5879  *             # slice assignment
5880  *             _setSlice(key, self, value)
5881  */
5882   __pyx_t_3 = PySlice_Check(__pyx_v_key); 
5883   __pyx_t_1 = (__pyx_t_3 != 0);
5884   if (__pyx_t_1) {
5885
5886     /* "lxml/objectify.pyx":340
5887  *         if isinstance(key, slice):
5888  *             # slice assignment
5889  *             _setSlice(key, self, value)             # <<<<<<<<<<<<<<
5890  *         else:
5891  *             # normal index assignment
5892  */
5893     __pyx_t_2 = __pyx_f_4lxml_9objectify__setSlice(__pyx_v_key, ((struct LxmlElement *)__pyx_v_self), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
5894     __Pyx_GOTREF(__pyx_t_2);
5895     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5896
5897     /* "lxml/objectify.pyx":338
5898  *             raise TypeError, u"assignment to root element is invalid"
5899  * 
5900  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
5901  *             # slice assignment
5902  *             _setSlice(key, self, value)
5903  */
5904     goto __pyx_L6;
5905   }
5906
5907   /* "lxml/objectify.pyx":343
5908  *         else:
5909  *             # normal index assignment
5910  *             if key < 0:             # <<<<<<<<<<<<<<
5911  *                 c_node = self._c_node.parent.last
5912  *             else:
5913  */
5914   /*else*/ {
5915     __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
5916     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 343, __pyx_L1_error)
5917     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5918     if (__pyx_t_1) {
5919
5920       /* "lxml/objectify.pyx":344
5921  *             # normal index assignment
5922  *             if key < 0:
5923  *                 c_node = self._c_node.parent.last             # <<<<<<<<<<<<<<
5924  *             else:
5925  *                 c_node = self._c_node.parent.children
5926  */
5927       __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->last;
5928       __pyx_v_c_node = __pyx_t_4;
5929
5930       /* "lxml/objectify.pyx":343
5931  *         else:
5932  *             # normal index assignment
5933  *             if key < 0:             # <<<<<<<<<<<<<<
5934  *                 c_node = self._c_node.parent.last
5935  *             else:
5936  */
5937       goto __pyx_L7;
5938     }
5939
5940     /* "lxml/objectify.pyx":346
5941  *                 c_node = self._c_node.parent.last
5942  *             else:
5943  *                 c_node = self._c_node.parent.children             # <<<<<<<<<<<<<<
5944  *             c_node = _findFollowingSibling(
5945  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5946  */
5947     /*else*/ {
5948       __pyx_t_4 = __pyx_v_self->__pyx_base.__pyx_base._c_node->parent->children;
5949       __pyx_v_c_node = __pyx_t_4;
5950     }
5951     __pyx_L7:;
5952
5953     /* "lxml/objectify.pyx":348
5954  *                 c_node = self._c_node.parent.children
5955  *             c_node = _findFollowingSibling(
5956  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)             # <<<<<<<<<<<<<<
5957  *             if c_node is NULL:
5958  *                 raise IndexError, unicode(key)
5959  */
5960     __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 348, __pyx_L1_error)
5961
5962     /* "lxml/objectify.pyx":347
5963  *             else:
5964  *                 c_node = self._c_node.parent.children
5965  *             c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
5966  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5967  *             if c_node is NULL:
5968  */
5969     __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node), __pyx_v_self->__pyx_base.__pyx_base._c_node->name, __pyx_t_5);
5970
5971     /* "lxml/objectify.pyx":349
5972  *             c_node = _findFollowingSibling(
5973  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5974  *             if c_node is NULL:             # <<<<<<<<<<<<<<
5975  *                 raise IndexError, unicode(key)
5976  *             element = elementFactory(self._doc, c_node)
5977  */
5978     __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
5979     if (unlikely(__pyx_t_1)) {
5980
5981       /* "lxml/objectify.pyx":350
5982  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5983  *             if c_node is NULL:
5984  *                 raise IndexError, unicode(key)             # <<<<<<<<<<<<<<
5985  *             element = elementFactory(self._doc, c_node)
5986  *             _replaceElement(element, value)
5987  */
5988       __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error)
5989       __Pyx_GOTREF(__pyx_t_2);
5990       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_2, 0, 0);
5991       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5992       __PYX_ERR(0, 350, __pyx_L1_error)
5993
5994       /* "lxml/objectify.pyx":349
5995  *             c_node = _findFollowingSibling(
5996  *                 c_node, tree._getNs(self._c_node), self._c_node.name, key)
5997  *             if c_node is NULL:             # <<<<<<<<<<<<<<
5998  *                 raise IndexError, unicode(key)
5999  *             element = elementFactory(self._doc, c_node)
6000  */
6001     }
6002
6003     /* "lxml/objectify.pyx":351
6004  *             if c_node is NULL:
6005  *                 raise IndexError, unicode(key)
6006  *             element = elementFactory(self._doc, c_node)             # <<<<<<<<<<<<<<
6007  *             _replaceElement(element, value)
6008  * 
6009  */
6010     __pyx_t_2 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._doc);
6011     __Pyx_INCREF(__pyx_t_2);
6012     __pyx_t_6 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error)
6013     __Pyx_GOTREF(__pyx_t_6);
6014     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6015     __pyx_v_element = ((struct LxmlElement *)__pyx_t_6);
6016     __pyx_t_6 = 0;
6017
6018     /* "lxml/objectify.pyx":352
6019  *                 raise IndexError, unicode(key)
6020  *             element = elementFactory(self._doc, c_node)
6021  *             _replaceElement(element, value)             # <<<<<<<<<<<<<<
6022  * 
6023  *     def __delitem__(self, key):
6024  */
6025     __pyx_t_6 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error)
6026     __Pyx_GOTREF(__pyx_t_6);
6027     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6028   }
6029   __pyx_L6:;
6030
6031   /* "lxml/objectify.pyx":310
6032  *         return elementFactory(self._doc, c_node)
6033  * 
6034  *     def __setitem__(self, key, value):             # <<<<<<<<<<<<<<
6035  *         u"""Set the value of a sibling, counting from the first child of the
6036  *         parent.  Implements key assignment, item assignment and slice
6037  */
6038
6039   /* function exit code */
6040   __pyx_r = 0;
6041   goto __pyx_L0;
6042   __pyx_L1_error:;
6043   __Pyx_XDECREF(__pyx_t_2);
6044   __Pyx_XDECREF(__pyx_t_6);
6045   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6046   __pyx_r = -1;
6047   __pyx_L0:;
6048   __Pyx_XDECREF((PyObject *)__pyx_v_element);
6049   __Pyx_XDECREF(__pyx_v_key);
6050   __Pyx_RefNannyFinishContext();
6051   return __pyx_r;
6052 }
6053
6054 /* "lxml/objectify.pyx":354
6055  *             _replaceElement(element, value)
6056  * 
6057  *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
6058  *         parent = self.getparent()
6059  *         if parent is None:
6060  */
6061
6062 /* Python wrapper */
6063 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
6064 static int __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
6065   int __pyx_r;
6066   __Pyx_RefNannyDeclarations
6067   __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
6068   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), ((PyObject *)__pyx_v_key));
6069
6070   /* function exit code */
6071   __Pyx_RefNannyFinishContext();
6072   return __pyx_r;
6073 }
6074
6075 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement_24__delitem__(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_key) {
6076   PyObject *__pyx_v_parent = NULL;
6077   PyObject *__pyx_v_del_items = NULL;
6078   PyObject *__pyx_v_remove = NULL;
6079   PyObject *__pyx_v_el = NULL;
6080   PyObject *__pyx_v_sibling = NULL;
6081   int __pyx_r;
6082   __Pyx_RefNannyDeclarations
6083   PyObject *__pyx_t_1 = NULL;
6084   PyObject *__pyx_t_2 = NULL;
6085   PyObject *__pyx_t_3 = NULL;
6086   int __pyx_t_4;
6087   int __pyx_t_5;
6088   Py_ssize_t __pyx_t_6;
6089   PyObject *(*__pyx_t_7)(PyObject *);
6090   PyObject *__pyx_t_8 = NULL;
6091   int __pyx_lineno = 0;
6092   const char *__pyx_filename = NULL;
6093   int __pyx_clineno = 0;
6094   __Pyx_RefNannySetupContext("__delitem__", 0);
6095
6096   /* "lxml/objectify.pyx":355
6097  * 
6098  *     def __delitem__(self, key):
6099  *         parent = self.getparent()             # <<<<<<<<<<<<<<
6100  *         if parent is None:
6101  *             raise TypeError, u"deleting items not supported by root element"
6102  */
6103   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getparent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
6104   __Pyx_GOTREF(__pyx_t_2);
6105   __pyx_t_3 = NULL;
6106   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
6107     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
6108     if (likely(__pyx_t_3)) {
6109       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
6110       __Pyx_INCREF(__pyx_t_3);
6111       __Pyx_INCREF(function);
6112       __Pyx_DECREF_SET(__pyx_t_2, function);
6113     }
6114   }
6115   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
6116   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6117   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error)
6118   __Pyx_GOTREF(__pyx_t_1);
6119   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6120   __pyx_v_parent = __pyx_t_1;
6121   __pyx_t_1 = 0;
6122
6123   /* "lxml/objectify.pyx":356
6124  *     def __delitem__(self, key):
6125  *         parent = self.getparent()
6126  *         if parent is None:             # <<<<<<<<<<<<<<
6127  *             raise TypeError, u"deleting items not supported by root element"
6128  *         if isinstance(key, slice):
6129  */
6130   __pyx_t_4 = (__pyx_v_parent == Py_None);
6131   __pyx_t_5 = (__pyx_t_4 != 0);
6132   if (unlikely(__pyx_t_5)) {
6133
6134     /* "lxml/objectify.pyx":357
6135  *         parent = self.getparent()
6136  *         if parent is None:
6137  *             raise TypeError, u"deleting items not supported by root element"             # <<<<<<<<<<<<<<
6138  *         if isinstance(key, slice):
6139  *             # slice deletion
6140  */
6141     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_deleting_items_not_supported_by, 0, 0);
6142     __PYX_ERR(0, 357, __pyx_L1_error)
6143
6144     /* "lxml/objectify.pyx":356
6145  *     def __delitem__(self, key):
6146  *         parent = self.getparent()
6147  *         if parent is None:             # <<<<<<<<<<<<<<
6148  *             raise TypeError, u"deleting items not supported by root element"
6149  *         if isinstance(key, slice):
6150  */
6151   }
6152
6153   /* "lxml/objectify.pyx":358
6154  *         if parent is None:
6155  *             raise TypeError, u"deleting items not supported by root element"
6156  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
6157  *             # slice deletion
6158  *             del_items = list(self)[key]
6159  */
6160   __pyx_t_5 = PySlice_Check(__pyx_v_key); 
6161   __pyx_t_4 = (__pyx_t_5 != 0);
6162   if (__pyx_t_4) {
6163
6164     /* "lxml/objectify.pyx":360
6165  *         if isinstance(key, slice):
6166  *             # slice deletion
6167  *             del_items = list(self)[key]             # <<<<<<<<<<<<<<
6168  *             remove = parent.remove
6169  *             for el in del_items:
6170  */
6171     __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
6172     __Pyx_GOTREF(__pyx_t_1);
6173     __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
6174     __Pyx_GOTREF(__pyx_t_2);
6175     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6176     __pyx_v_del_items = __pyx_t_2;
6177     __pyx_t_2 = 0;
6178
6179     /* "lxml/objectify.pyx":361
6180  *             # slice deletion
6181  *             del_items = list(self)[key]
6182  *             remove = parent.remove             # <<<<<<<<<<<<<<
6183  *             for el in del_items:
6184  *                 remove(el)
6185  */
6186     __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
6187     __Pyx_GOTREF(__pyx_t_2);
6188     __pyx_v_remove = __pyx_t_2;
6189     __pyx_t_2 = 0;
6190
6191     /* "lxml/objectify.pyx":362
6192  *             del_items = list(self)[key]
6193  *             remove = parent.remove
6194  *             for el in del_items:             # <<<<<<<<<<<<<<
6195  *                 remove(el)
6196  *         else:
6197  */
6198     if (likely(PyList_CheckExact(__pyx_v_del_items)) || PyTuple_CheckExact(__pyx_v_del_items)) {
6199       __pyx_t_2 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
6200       __pyx_t_7 = NULL;
6201     } else {
6202       __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
6203       __Pyx_GOTREF(__pyx_t_2);
6204       __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 362, __pyx_L1_error)
6205     }
6206     for (;;) {
6207       if (likely(!__pyx_t_7)) {
6208         if (likely(PyList_CheckExact(__pyx_t_2))) {
6209           if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
6210           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6211           __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
6212           #else
6213           __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
6214           __Pyx_GOTREF(__pyx_t_1);
6215           #endif
6216         } else {
6217           if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
6218           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6219           __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 362, __pyx_L1_error)
6220           #else
6221           __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
6222           __Pyx_GOTREF(__pyx_t_1);
6223           #endif
6224         }
6225       } else {
6226         __pyx_t_1 = __pyx_t_7(__pyx_t_2);
6227         if (unlikely(!__pyx_t_1)) {
6228           PyObject* exc_type = PyErr_Occurred();
6229           if (exc_type) {
6230             if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6231             else __PYX_ERR(0, 362, __pyx_L1_error)
6232           }
6233           break;
6234         }
6235         __Pyx_GOTREF(__pyx_t_1);
6236       }
6237       __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_1);
6238       __pyx_t_1 = 0;
6239
6240       /* "lxml/objectify.pyx":363
6241  *             remove = parent.remove
6242  *             for el in del_items:
6243  *                 remove(el)             # <<<<<<<<<<<<<<
6244  *         else:
6245  *             # normal index deletion
6246  */
6247       __Pyx_INCREF(__pyx_v_remove);
6248       __pyx_t_3 = __pyx_v_remove; __pyx_t_8 = NULL;
6249       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
6250         __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
6251         if (likely(__pyx_t_8)) {
6252           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6253           __Pyx_INCREF(__pyx_t_8);
6254           __Pyx_INCREF(function);
6255           __Pyx_DECREF_SET(__pyx_t_3, function);
6256         }
6257       }
6258       __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_el) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_el);
6259       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6260       if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
6261       __Pyx_GOTREF(__pyx_t_1);
6262       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6263       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6264
6265       /* "lxml/objectify.pyx":362
6266  *             del_items = list(self)[key]
6267  *             remove = parent.remove
6268  *             for el in del_items:             # <<<<<<<<<<<<<<
6269  *                 remove(el)
6270  *         else:
6271  */
6272     }
6273     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6274
6275     /* "lxml/objectify.pyx":358
6276  *         if parent is None:
6277  *             raise TypeError, u"deleting items not supported by root element"
6278  *         if isinstance(key, slice):             # <<<<<<<<<<<<<<
6279  *             # slice deletion
6280  *             del_items = list(self)[key]
6281  */
6282     goto __pyx_L4;
6283   }
6284
6285   /* "lxml/objectify.pyx":366
6286  *         else:
6287  *             # normal index deletion
6288  *             sibling = self.__getitem__(key)             # <<<<<<<<<<<<<<
6289  *             parent.remove(sibling)
6290  * 
6291  */
6292   /*else*/ {
6293     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getitem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
6294     __Pyx_GOTREF(__pyx_t_1);
6295     __pyx_t_3 = NULL;
6296     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6297       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
6298       if (likely(__pyx_t_3)) {
6299         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6300         __Pyx_INCREF(__pyx_t_3);
6301         __Pyx_INCREF(function);
6302         __Pyx_DECREF_SET(__pyx_t_1, function);
6303       }
6304     }
6305     __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_key);
6306     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6307     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error)
6308     __Pyx_GOTREF(__pyx_t_2);
6309     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6310     __pyx_v_sibling = __pyx_t_2;
6311     __pyx_t_2 = 0;
6312
6313     /* "lxml/objectify.pyx":367
6314  *             # normal index deletion
6315  *             sibling = self.__getitem__(key)
6316  *             parent.remove(sibling)             # <<<<<<<<<<<<<<
6317  * 
6318  *     def descendantpaths(self, prefix=None):
6319  */
6320     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_parent, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 367, __pyx_L1_error)
6321     __Pyx_GOTREF(__pyx_t_1);
6322     __pyx_t_3 = NULL;
6323     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
6324       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
6325       if (likely(__pyx_t_3)) {
6326         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
6327         __Pyx_INCREF(__pyx_t_3);
6328         __Pyx_INCREF(function);
6329         __Pyx_DECREF_SET(__pyx_t_1, function);
6330       }
6331     }
6332     __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_sibling) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_sibling);
6333     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6334     if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error)
6335     __Pyx_GOTREF(__pyx_t_2);
6336     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6337     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6338   }
6339   __pyx_L4:;
6340
6341   /* "lxml/objectify.pyx":354
6342  *             _replaceElement(element, value)
6343  * 
6344  *     def __delitem__(self, key):             # <<<<<<<<<<<<<<
6345  *         parent = self.getparent()
6346  *         if parent is None:
6347  */
6348
6349   /* function exit code */
6350   __pyx_r = 0;
6351   goto __pyx_L0;
6352   __pyx_L1_error:;
6353   __Pyx_XDECREF(__pyx_t_1);
6354   __Pyx_XDECREF(__pyx_t_2);
6355   __Pyx_XDECREF(__pyx_t_3);
6356   __Pyx_XDECREF(__pyx_t_8);
6357   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6358   __pyx_r = -1;
6359   __pyx_L0:;
6360   __Pyx_XDECREF(__pyx_v_parent);
6361   __Pyx_XDECREF(__pyx_v_del_items);
6362   __Pyx_XDECREF(__pyx_v_remove);
6363   __Pyx_XDECREF(__pyx_v_el);
6364   __Pyx_XDECREF(__pyx_v_sibling);
6365   __Pyx_RefNannyFinishContext();
6366   return __pyx_r;
6367 }
6368
6369 /* "lxml/objectify.pyx":369
6370  *             parent.remove(sibling)
6371  * 
6372  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
6373  *         u"""descendantpaths(self, prefix=None)
6374  * 
6375  */
6376
6377 /* Python wrapper */
6378 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6379 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths[] = "descendantpaths(self, prefix=None)\n\n        Returns a list of object path expressions for all descendants.\n        ";
6380 static PyMethodDef __pyx_mdef_4lxml_9objectify_18ObjectifiedElement_27descendantpaths = {"descendantpaths", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths};
6381 static PyObject *__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6382   PyObject *__pyx_v_prefix = 0;
6383   int __pyx_lineno = 0;
6384   const char *__pyx_filename = NULL;
6385   int __pyx_clineno = 0;
6386   PyObject *__pyx_r = 0;
6387   __Pyx_RefNannyDeclarations
6388   __Pyx_RefNannySetupContext("descendantpaths (wrapper)", 0);
6389   {
6390     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
6391     PyObject* values[1] = {0};
6392     values[0] = ((PyObject *)Py_None);
6393     if (unlikely(__pyx_kwds)) {
6394       Py_ssize_t kw_args;
6395       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6396       switch (pos_args) {
6397         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6398         CYTHON_FALLTHROUGH;
6399         case  0: break;
6400         default: goto __pyx_L5_argtuple_error;
6401       }
6402       kw_args = PyDict_Size(__pyx_kwds);
6403       switch (pos_args) {
6404         case  0:
6405         if (kw_args > 0) {
6406           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix);
6407           if (value) { values[0] = value; kw_args--; }
6408         }
6409       }
6410       if (unlikely(kw_args > 0)) {
6411         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "descendantpaths") < 0)) __PYX_ERR(0, 369, __pyx_L3_error)
6412       }
6413     } else {
6414       switch (PyTuple_GET_SIZE(__pyx_args)) {
6415         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6416         CYTHON_FALLTHROUGH;
6417         case  0: break;
6418         default: goto __pyx_L5_argtuple_error;
6419       }
6420     }
6421     __pyx_v_prefix = values[0];
6422   }
6423   goto __pyx_L4_argument_unpacking_done;
6424   __pyx_L5_argtuple_error:;
6425   __Pyx_RaiseArgtupleInvalid("descendantpaths", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 369, __pyx_L3_error)
6426   __pyx_L3_error:;
6427   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
6428   __Pyx_RefNannyFinishContext();
6429   return NULL;
6430   __pyx_L4_argument_unpacking_done:;
6431   __pyx_r = __pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self), __pyx_v_prefix);
6432
6433   /* function exit code */
6434   __Pyx_RefNannyFinishContext();
6435   return __pyx_r;
6436 }
6437
6438 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_26descendantpaths(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *__pyx_v_self, PyObject *__pyx_v_prefix) {
6439   PyObject *__pyx_r = NULL;
6440   __Pyx_RefNannyDeclarations
6441   int __pyx_t_1;
6442   int __pyx_t_2;
6443   int __pyx_t_3;
6444   PyObject *__pyx_t_4 = NULL;
6445   int __pyx_lineno = 0;
6446   const char *__pyx_filename = NULL;
6447   int __pyx_clineno = 0;
6448   __Pyx_RefNannySetupContext("descendantpaths", 0);
6449   __Pyx_INCREF(__pyx_v_prefix);
6450
6451   /* "lxml/objectify.pyx":374
6452  *         Returns a list of object path expressions for all descendants.
6453  *         """
6454  *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
6455  *             prefix = u'.'.join(prefix)
6456  *         return _build_descendant_paths(self._c_node, prefix)
6457  */
6458   __pyx_t_2 = (__pyx_v_prefix != Py_None);
6459   __pyx_t_3 = (__pyx_t_2 != 0);
6460   if (__pyx_t_3) {
6461   } else {
6462     __pyx_t_1 = __pyx_t_3;
6463     goto __pyx_L4_bool_binop_done;
6464   }
6465   __pyx_t_3 = ((!(_isString(__pyx_v_prefix) != 0)) != 0);
6466   __pyx_t_1 = __pyx_t_3;
6467   __pyx_L4_bool_binop_done:;
6468   if (__pyx_t_1) {
6469
6470     /* "lxml/objectify.pyx":375
6471  *         """
6472  *         if prefix is not None and not python._isString(prefix):
6473  *             prefix = u'.'.join(prefix)             # <<<<<<<<<<<<<<
6474  *         return _build_descendant_paths(self._c_node, prefix)
6475  * 
6476  */
6477     __pyx_t_4 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 375, __pyx_L1_error)
6478     __Pyx_GOTREF(__pyx_t_4);
6479     __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_4);
6480     __pyx_t_4 = 0;
6481
6482     /* "lxml/objectify.pyx":374
6483  *         Returns a list of object path expressions for all descendants.
6484  *         """
6485  *         if prefix is not None and not python._isString(prefix):             # <<<<<<<<<<<<<<
6486  *             prefix = u'.'.join(prefix)
6487  *         return _build_descendant_paths(self._c_node, prefix)
6488  */
6489   }
6490
6491   /* "lxml/objectify.pyx":376
6492  *         if prefix is not None and not python._isString(prefix):
6493  *             prefix = u'.'.join(prefix)
6494  *         return _build_descendant_paths(self._c_node, prefix)             # <<<<<<<<<<<<<<
6495  * 
6496  * 
6497  */
6498   __Pyx_XDECREF(__pyx_r);
6499   __pyx_t_4 = __pyx_f_4lxml_9objectify__build_descendant_paths(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_prefix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 376, __pyx_L1_error)
6500   __Pyx_GOTREF(__pyx_t_4);
6501   __pyx_r = __pyx_t_4;
6502   __pyx_t_4 = 0;
6503   goto __pyx_L0;
6504
6505   /* "lxml/objectify.pyx":369
6506  *             parent.remove(sibling)
6507  * 
6508  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
6509  *         u"""descendantpaths(self, prefix=None)
6510  * 
6511  */
6512
6513   /* function exit code */
6514   __pyx_L1_error:;
6515   __Pyx_XDECREF(__pyx_t_4);
6516   __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths", __pyx_clineno, __pyx_lineno, __pyx_filename);
6517   __pyx_r = NULL;
6518   __pyx_L0:;
6519   __Pyx_XDECREF(__pyx_v_prefix);
6520   __Pyx_XGIVEREF(__pyx_r);
6521   __Pyx_RefNannyFinishContext();
6522   return __pyx_r;
6523 }
6524
6525 /* "lxml/objectify.pyx":379
6526  * 
6527  * 
6528  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):             # <<<<<<<<<<<<<<
6529  *     if c_node.name != c_name:
6530  *         return 0
6531  */
6532
6533 static CYTHON_INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_c_href, const xmlChar *__pyx_v_c_name) {
6534   const xmlChar *__pyx_v_c_node_href;
6535   int __pyx_r;
6536   __Pyx_RefNannyDeclarations
6537   int __pyx_t_1;
6538   __Pyx_RefNannySetupContext("_tagMatches", 0);
6539
6540   /* "lxml/objectify.pyx":380
6541  * 
6542  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
6543  *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
6544  *         return 0
6545  *     if c_href == NULL:
6546  */
6547   __pyx_t_1 = ((__pyx_v_c_node->name != __pyx_v_c_name) != 0);
6548   if (__pyx_t_1) {
6549
6550     /* "lxml/objectify.pyx":381
6551  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
6552  *     if c_node.name != c_name:
6553  *         return 0             # <<<<<<<<<<<<<<
6554  *     if c_href == NULL:
6555  *         return 1
6556  */
6557     __pyx_r = 0;
6558     goto __pyx_L0;
6559
6560     /* "lxml/objectify.pyx":380
6561  * 
6562  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):
6563  *     if c_node.name != c_name:             # <<<<<<<<<<<<<<
6564  *         return 0
6565  *     if c_href == NULL:
6566  */
6567   }
6568
6569   /* "lxml/objectify.pyx":382
6570  *     if c_node.name != c_name:
6571  *         return 0
6572  *     if c_href == NULL:             # <<<<<<<<<<<<<<
6573  *         return 1
6574  *     c_node_href = tree._getNs(c_node)
6575  */
6576   __pyx_t_1 = ((__pyx_v_c_href == NULL) != 0);
6577   if (__pyx_t_1) {
6578
6579     /* "lxml/objectify.pyx":383
6580  *         return 0
6581  *     if c_href == NULL:
6582  *         return 1             # <<<<<<<<<<<<<<
6583  *     c_node_href = tree._getNs(c_node)
6584  *     if c_node_href == NULL:
6585  */
6586     __pyx_r = 1;
6587     goto __pyx_L0;
6588
6589     /* "lxml/objectify.pyx":382
6590  *     if c_node.name != c_name:
6591  *         return 0
6592  *     if c_href == NULL:             # <<<<<<<<<<<<<<
6593  *         return 1
6594  *     c_node_href = tree._getNs(c_node)
6595  */
6596   }
6597
6598   /* "lxml/objectify.pyx":384
6599  *     if c_href == NULL:
6600  *         return 1
6601  *     c_node_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
6602  *     if c_node_href == NULL:
6603  *         return c_href[0] == c'\0'
6604  */
6605   __pyx_v_c_node_href = _getNs(__pyx_v_c_node);
6606
6607   /* "lxml/objectify.pyx":385
6608  *         return 1
6609  *     c_node_href = tree._getNs(c_node)
6610  *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
6611  *         return c_href[0] == c'\0'
6612  *     return tree.xmlStrcmp(c_node_href, c_href) == 0
6613  */
6614   __pyx_t_1 = ((__pyx_v_c_node_href == NULL) != 0);
6615   if (__pyx_t_1) {
6616
6617     /* "lxml/objectify.pyx":386
6618  *     c_node_href = tree._getNs(c_node)
6619  *     if c_node_href == NULL:
6620  *         return c_href[0] == c'\0'             # <<<<<<<<<<<<<<
6621  *     return tree.xmlStrcmp(c_node_href, c_href) == 0
6622  * 
6623  */
6624     __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
6625     goto __pyx_L0;
6626
6627     /* "lxml/objectify.pyx":385
6628  *         return 1
6629  *     c_node_href = tree._getNs(c_node)
6630  *     if c_node_href == NULL:             # <<<<<<<<<<<<<<
6631  *         return c_href[0] == c'\0'
6632  *     return tree.xmlStrcmp(c_node_href, c_href) == 0
6633  */
6634   }
6635
6636   /* "lxml/objectify.pyx":387
6637  *     if c_node_href == NULL:
6638  *         return c_href[0] == c'\0'
6639  *     return tree.xmlStrcmp(c_node_href, c_href) == 0             # <<<<<<<<<<<<<<
6640  * 
6641  * 
6642  */
6643   __pyx_r = (xmlStrcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
6644   goto __pyx_L0;
6645
6646   /* "lxml/objectify.pyx":379
6647  * 
6648  * 
6649  * cdef inline bint _tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name):             # <<<<<<<<<<<<<<
6650  *     if c_node.name != c_name:
6651  *         return 0
6652  */
6653
6654   /* function exit code */
6655   __pyx_L0:;
6656   __Pyx_RefNannyFinishContext();
6657   return __pyx_r;
6658 }
6659
6660 /* "lxml/objectify.pyx":390
6661  * 
6662  * 
6663  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
6664  *     cdef tree.xmlNode* c_node
6665  *     cdef Py_ssize_t count
6666  */
6667
6668 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
6669   xmlNode *__pyx_v_c_node;
6670   Py_ssize_t __pyx_v_count;
6671   const xmlChar *__pyx_v_c_tag;
6672   const xmlChar *__pyx_v_c_href;
6673   Py_ssize_t __pyx_r;
6674   __Pyx_RefNannyDeclarations
6675   const xmlChar *__pyx_t_1;
6676   xmlNode *__pyx_t_2;
6677   int __pyx_t_3;
6678   int __pyx_t_4;
6679   __Pyx_RefNannySetupContext("_countSiblings", 0);
6680
6681   /* "lxml/objectify.pyx":393
6682  *     cdef tree.xmlNode* c_node
6683  *     cdef Py_ssize_t count
6684  *     c_tag  = c_start_node.name             # <<<<<<<<<<<<<<
6685  *     c_href = tree._getNs(c_start_node)
6686  *     count = 1
6687  */
6688   __pyx_t_1 = __pyx_v_c_start_node->name;
6689   __pyx_v_c_tag = __pyx_t_1;
6690
6691   /* "lxml/objectify.pyx":394
6692  *     cdef Py_ssize_t count
6693  *     c_tag  = c_start_node.name
6694  *     c_href = tree._getNs(c_start_node)             # <<<<<<<<<<<<<<
6695  *     count = 1
6696  *     c_node = c_start_node.next
6697  */
6698   __pyx_v_c_href = _getNs(__pyx_v_c_start_node);
6699
6700   /* "lxml/objectify.pyx":395
6701  *     c_tag  = c_start_node.name
6702  *     c_href = tree._getNs(c_start_node)
6703  *     count = 1             # <<<<<<<<<<<<<<
6704  *     c_node = c_start_node.next
6705  *     while c_node is not NULL:
6706  */
6707   __pyx_v_count = 1;
6708
6709   /* "lxml/objectify.pyx":396
6710  *     c_href = tree._getNs(c_start_node)
6711  *     count = 1
6712  *     c_node = c_start_node.next             # <<<<<<<<<<<<<<
6713  *     while c_node is not NULL:
6714  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6715  */
6716   __pyx_t_2 = __pyx_v_c_start_node->next;
6717   __pyx_v_c_node = __pyx_t_2;
6718
6719   /* "lxml/objectify.pyx":397
6720  *     count = 1
6721  *     c_node = c_start_node.next
6722  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6723  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6724  *                _tagMatches(c_node, c_href, c_tag):
6725  */
6726   while (1) {
6727     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
6728     if (!__pyx_t_3) break;
6729
6730     /* "lxml/objectify.pyx":398
6731  *     c_node = c_start_node.next
6732  *     while c_node is not NULL:
6733  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6734  *                _tagMatches(c_node, c_href, c_tag):
6735  *             count += 1
6736  */
6737     __pyx_t_4 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6738     if (__pyx_t_4) {
6739     } else {
6740       __pyx_t_3 = __pyx_t_4;
6741       goto __pyx_L6_bool_binop_done;
6742     }
6743
6744     /* "lxml/objectify.pyx":399
6745  *     while c_node is not NULL:
6746  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6747  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
6748  *             count += 1
6749  *         c_node = c_node.next
6750  */
6751     __pyx_t_4 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag) != 0);
6752     __pyx_t_3 = __pyx_t_4;
6753     __pyx_L6_bool_binop_done:;
6754
6755     /* "lxml/objectify.pyx":398
6756  *     c_node = c_start_node.next
6757  *     while c_node is not NULL:
6758  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6759  *                _tagMatches(c_node, c_href, c_tag):
6760  *             count += 1
6761  */
6762     if (__pyx_t_3) {
6763
6764       /* "lxml/objectify.pyx":400
6765  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6766  *                _tagMatches(c_node, c_href, c_tag):
6767  *             count += 1             # <<<<<<<<<<<<<<
6768  *         c_node = c_node.next
6769  *     c_node = c_start_node.prev
6770  */
6771       __pyx_v_count = (__pyx_v_count + 1);
6772
6773       /* "lxml/objectify.pyx":398
6774  *     c_node = c_start_node.next
6775  *     while c_node is not NULL:
6776  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6777  *                _tagMatches(c_node, c_href, c_tag):
6778  *             count += 1
6779  */
6780     }
6781
6782     /* "lxml/objectify.pyx":401
6783  *                _tagMatches(c_node, c_href, c_tag):
6784  *             count += 1
6785  *         c_node = c_node.next             # <<<<<<<<<<<<<<
6786  *     c_node = c_start_node.prev
6787  *     while c_node is not NULL:
6788  */
6789     __pyx_t_2 = __pyx_v_c_node->next;
6790     __pyx_v_c_node = __pyx_t_2;
6791   }
6792
6793   /* "lxml/objectify.pyx":402
6794  *             count += 1
6795  *         c_node = c_node.next
6796  *     c_node = c_start_node.prev             # <<<<<<<<<<<<<<
6797  *     while c_node is not NULL:
6798  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6799  */
6800   __pyx_t_2 = __pyx_v_c_start_node->prev;
6801   __pyx_v_c_node = __pyx_t_2;
6802
6803   /* "lxml/objectify.pyx":403
6804  *         c_node = c_node.next
6805  *     c_node = c_start_node.prev
6806  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6807  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6808  *                _tagMatches(c_node, c_href, c_tag):
6809  */
6810   while (1) {
6811     __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
6812     if (!__pyx_t_3) break;
6813
6814     /* "lxml/objectify.pyx":404
6815  *     c_node = c_start_node.prev
6816  *     while c_node is not NULL:
6817  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6818  *                _tagMatches(c_node, c_href, c_tag):
6819  *             count += 1
6820  */
6821     __pyx_t_4 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6822     if (__pyx_t_4) {
6823     } else {
6824       __pyx_t_3 = __pyx_t_4;
6825       goto __pyx_L11_bool_binop_done;
6826     }
6827
6828     /* "lxml/objectify.pyx":405
6829  *     while c_node is not NULL:
6830  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6831  *                _tagMatches(c_node, c_href, c_tag):             # <<<<<<<<<<<<<<
6832  *             count += 1
6833  *         c_node = c_node.prev
6834  */
6835     __pyx_t_4 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag) != 0);
6836     __pyx_t_3 = __pyx_t_4;
6837     __pyx_L11_bool_binop_done:;
6838
6839     /* "lxml/objectify.pyx":404
6840  *     c_node = c_start_node.prev
6841  *     while c_node is not NULL:
6842  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6843  *                _tagMatches(c_node, c_href, c_tag):
6844  *             count += 1
6845  */
6846     if (__pyx_t_3) {
6847
6848       /* "lxml/objectify.pyx":406
6849  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6850  *                _tagMatches(c_node, c_href, c_tag):
6851  *             count += 1             # <<<<<<<<<<<<<<
6852  *         c_node = c_node.prev
6853  *     return count
6854  */
6855       __pyx_v_count = (__pyx_v_count + 1);
6856
6857       /* "lxml/objectify.pyx":404
6858  *     c_node = c_start_node.prev
6859  *     while c_node is not NULL:
6860  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6861  *                _tagMatches(c_node, c_href, c_tag):
6862  *             count += 1
6863  */
6864     }
6865
6866     /* "lxml/objectify.pyx":407
6867  *                _tagMatches(c_node, c_href, c_tag):
6868  *             count += 1
6869  *         c_node = c_node.prev             # <<<<<<<<<<<<<<
6870  *     return count
6871  * 
6872  */
6873     __pyx_t_2 = __pyx_v_c_node->prev;
6874     __pyx_v_c_node = __pyx_t_2;
6875   }
6876
6877   /* "lxml/objectify.pyx":408
6878  *             count += 1
6879  *         c_node = c_node.prev
6880  *     return count             # <<<<<<<<<<<<<<
6881  * 
6882  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
6883  */
6884   __pyx_r = __pyx_v_count;
6885   goto __pyx_L0;
6886
6887   /* "lxml/objectify.pyx":390
6888  * 
6889  * 
6890  * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):             # <<<<<<<<<<<<<<
6891  *     cdef tree.xmlNode* c_node
6892  *     cdef Py_ssize_t count
6893  */
6894
6895   /* function exit code */
6896   __pyx_L0:;
6897   __Pyx_RefNannyFinishContext();
6898   return __pyx_r;
6899 }
6900
6901 /* "lxml/objectify.pyx":410
6902  *     return count
6903  * 
6904  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
6905  *                                          const_xmlChar* href, const_xmlChar* name,
6906  *                                          Py_ssize_t index):
6907  */
6908
6909 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *__pyx_v_c_node, const xmlChar *__pyx_v_href, const xmlChar *__pyx_v_name, Py_ssize_t __pyx_v_index) {
6910   xmlNode *(*__pyx_v_next)(xmlNode *);
6911   xmlNode *__pyx_r;
6912   __Pyx_RefNannyDeclarations
6913   int __pyx_t_1;
6914   int __pyx_t_2;
6915   __Pyx_RefNannySetupContext("_findFollowingSibling", 0);
6916
6917   /* "lxml/objectify.pyx":414
6918  *                                          Py_ssize_t index):
6919  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6920  *     if index >= 0:             # <<<<<<<<<<<<<<
6921  *         next = cetree.nextElement
6922  *     else:
6923  */
6924   __pyx_t_1 = ((__pyx_v_index >= 0) != 0);
6925   if (__pyx_t_1) {
6926
6927     /* "lxml/objectify.pyx":415
6928  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6929  *     if index >= 0:
6930  *         next = cetree.nextElement             # <<<<<<<<<<<<<<
6931  *     else:
6932  *         index = -1 - index
6933  */
6934     __pyx_v_next = nextElement;
6935
6936     /* "lxml/objectify.pyx":414
6937  *                                          Py_ssize_t index):
6938  *     cdef tree.xmlNode* (*next)(tree.xmlNode*)
6939  *     if index >= 0:             # <<<<<<<<<<<<<<
6940  *         next = cetree.nextElement
6941  *     else:
6942  */
6943     goto __pyx_L3;
6944   }
6945
6946   /* "lxml/objectify.pyx":417
6947  *         next = cetree.nextElement
6948  *     else:
6949  *         index = -1 - index             # <<<<<<<<<<<<<<
6950  *         next = cetree.previousElement
6951  *     while c_node is not NULL:
6952  */
6953   /*else*/ {
6954     __pyx_v_index = (-1L - __pyx_v_index);
6955
6956     /* "lxml/objectify.pyx":418
6957  *     else:
6958  *         index = -1 - index
6959  *         next = cetree.previousElement             # <<<<<<<<<<<<<<
6960  *     while c_node is not NULL:
6961  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6962  */
6963     __pyx_v_next = previousElement;
6964   }
6965   __pyx_L3:;
6966
6967   /* "lxml/objectify.pyx":419
6968  *         index = -1 - index
6969  *         next = cetree.previousElement
6970  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
6971  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6972  *                _tagMatches(c_node, href, name):
6973  */
6974   while (1) {
6975     __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0);
6976     if (!__pyx_t_1) break;
6977
6978     /* "lxml/objectify.pyx":420
6979  *         next = cetree.previousElement
6980  *     while c_node is not NULL:
6981  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
6982  *                _tagMatches(c_node, href, name):
6983  *             index = index - 1
6984  */
6985     __pyx_t_2 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
6986     if (__pyx_t_2) {
6987     } else {
6988       __pyx_t_1 = __pyx_t_2;
6989       goto __pyx_L7_bool_binop_done;
6990     }
6991
6992     /* "lxml/objectify.pyx":421
6993  *     while c_node is not NULL:
6994  *         if c_node.type == tree.XML_ELEMENT_NODE and \
6995  *                _tagMatches(c_node, href, name):             # <<<<<<<<<<<<<<
6996  *             index = index - 1
6997  *             if index < 0:
6998  */
6999     __pyx_t_2 = (__pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name) != 0);
7000     __pyx_t_1 = __pyx_t_2;
7001     __pyx_L7_bool_binop_done:;
7002
7003     /* "lxml/objectify.pyx":420
7004  *         next = cetree.previousElement
7005  *     while c_node is not NULL:
7006  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
7007  *                _tagMatches(c_node, href, name):
7008  *             index = index - 1
7009  */
7010     if (__pyx_t_1) {
7011
7012       /* "lxml/objectify.pyx":422
7013  *         if c_node.type == tree.XML_ELEMENT_NODE and \
7014  *                _tagMatches(c_node, href, name):
7015  *             index = index - 1             # <<<<<<<<<<<<<<
7016  *             if index < 0:
7017  *                 return c_node
7018  */
7019       __pyx_v_index = (__pyx_v_index - 1);
7020
7021       /* "lxml/objectify.pyx":423
7022  *                _tagMatches(c_node, href, name):
7023  *             index = index - 1
7024  *             if index < 0:             # <<<<<<<<<<<<<<
7025  *                 return c_node
7026  *         c_node = next(c_node)
7027  */
7028       __pyx_t_1 = ((__pyx_v_index < 0) != 0);
7029       if (__pyx_t_1) {
7030
7031         /* "lxml/objectify.pyx":424
7032  *             index = index - 1
7033  *             if index < 0:
7034  *                 return c_node             # <<<<<<<<<<<<<<
7035  *         c_node = next(c_node)
7036  *     return NULL
7037  */
7038         __pyx_r = __pyx_v_c_node;
7039         goto __pyx_L0;
7040
7041         /* "lxml/objectify.pyx":423
7042  *                _tagMatches(c_node, href, name):
7043  *             index = index - 1
7044  *             if index < 0:             # <<<<<<<<<<<<<<
7045  *                 return c_node
7046  *         c_node = next(c_node)
7047  */
7048       }
7049
7050       /* "lxml/objectify.pyx":420
7051  *         next = cetree.previousElement
7052  *     while c_node is not NULL:
7053  *         if c_node.type == tree.XML_ELEMENT_NODE and \             # <<<<<<<<<<<<<<
7054  *                _tagMatches(c_node, href, name):
7055  *             index = index - 1
7056  */
7057     }
7058
7059     /* "lxml/objectify.pyx":425
7060  *             if index < 0:
7061  *                 return c_node
7062  *         c_node = next(c_node)             # <<<<<<<<<<<<<<
7063  *     return NULL
7064  * 
7065  */
7066     __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
7067   }
7068
7069   /* "lxml/objectify.pyx":426
7070  *                 return c_node
7071  *         c_node = next(c_node)
7072  *     return NULL             # <<<<<<<<<<<<<<
7073  * 
7074  * cdef object _lookupChild(_Element parent, tag):
7075  */
7076   __pyx_r = NULL;
7077   goto __pyx_L0;
7078
7079   /* "lxml/objectify.pyx":410
7080  *     return count
7081  * 
7082  * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
7083  *                                          const_xmlChar* href, const_xmlChar* name,
7084  *                                          Py_ssize_t index):
7085  */
7086
7087   /* function exit code */
7088   __pyx_L0:;
7089   __Pyx_RefNannyFinishContext();
7090   return __pyx_r;
7091 }
7092
7093 /* "lxml/objectify.pyx":428
7094  *     return NULL
7095  * 
7096  * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
7097  *     cdef tree.xmlNode* c_result
7098  *     cdef tree.xmlNode* c_node
7099  */
7100
7101 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7102   xmlNode *__pyx_v_c_result;
7103   xmlNode *__pyx_v_c_node;
7104   PyObject *__pyx_v_ns = NULL;
7105   const xmlChar *__pyx_v_c_tag;
7106   const xmlChar *__pyx_v_c_href;
7107   PyObject *__pyx_r = NULL;
7108   __Pyx_RefNannyDeclarations
7109   xmlNode *__pyx_t_1;
7110   PyObject *__pyx_t_2 = NULL;
7111   PyObject *__pyx_t_3 = NULL;
7112   PyObject *__pyx_t_4 = NULL;
7113   int __pyx_t_5;
7114   int __pyx_t_6;
7115   const xmlChar *__pyx_t_7;
7116   const xmlChar *__pyx_t_8;
7117   int __pyx_lineno = 0;
7118   const char *__pyx_filename = NULL;
7119   int __pyx_clineno = 0;
7120   __Pyx_RefNannySetupContext("_lookupChild", 0);
7121   __Pyx_INCREF(__pyx_v_tag);
7122
7123   /* "lxml/objectify.pyx":431
7124  *     cdef tree.xmlNode* c_result
7125  *     cdef tree.xmlNode* c_node
7126  *     c_node = parent._c_node             # <<<<<<<<<<<<<<
7127  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
7128  *     c_tag = tree.xmlDictExists(
7129  */
7130   __pyx_t_1 = __pyx_v_parent->_c_node;
7131   __pyx_v_c_node = __pyx_t_1;
7132
7133   /* "lxml/objectify.pyx":432
7134  *     cdef tree.xmlNode* c_node
7135  *     c_node = parent._c_node
7136  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)             # <<<<<<<<<<<<<<
7137  *     c_tag = tree.xmlDictExists(
7138  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7139  */
7140   __pyx_t_2 = getNsTagWithEmptyNs(__pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error)
7141   __Pyx_GOTREF(__pyx_t_2);
7142   if (likely(__pyx_t_2 != Py_None)) {
7143     PyObject* sequence = __pyx_t_2;
7144     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7145     if (unlikely(size != 2)) {
7146       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7147       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7148       __PYX_ERR(0, 432, __pyx_L1_error)
7149     }
7150     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7151     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
7152     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
7153     __Pyx_INCREF(__pyx_t_3);
7154     __Pyx_INCREF(__pyx_t_4);
7155     #else
7156     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
7157     __Pyx_GOTREF(__pyx_t_3);
7158     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error)
7159     __Pyx_GOTREF(__pyx_t_4);
7160     #endif
7161     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7162   } else {
7163     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 432, __pyx_L1_error)
7164   }
7165   __pyx_v_ns = __pyx_t_3;
7166   __pyx_t_3 = 0;
7167   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4);
7168   __pyx_t_4 = 0;
7169
7170   /* "lxml/objectify.pyx":433
7171  *     c_node = parent._c_node
7172  *     ns, tag = cetree.getNsTagWithEmptyNs(tag)
7173  *     c_tag = tree.xmlDictExists(             # <<<<<<<<<<<<<<
7174  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7175  *     if c_tag is NULL:
7176  */
7177   __pyx_v_c_tag = xmlDictExists(__pyx_v_c_node->doc->dict, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag), PyBytes_GET_SIZE(__pyx_v_tag));
7178
7179   /* "lxml/objectify.pyx":435
7180  *     c_tag = tree.xmlDictExists(
7181  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7182  *     if c_tag is NULL:             # <<<<<<<<<<<<<<
7183  *         return None # not in the hash map => not in the tree
7184  *     if ns is None:
7185  */
7186   __pyx_t_5 = ((__pyx_v_c_tag == NULL) != 0);
7187   if (__pyx_t_5) {
7188
7189     /* "lxml/objectify.pyx":436
7190  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7191  *     if c_tag is NULL:
7192  *         return None # not in the hash map => not in the tree             # <<<<<<<<<<<<<<
7193  *     if ns is None:
7194  *         # either inherit ns from parent or use empty (i.e. no) namespace
7195  */
7196     __Pyx_XDECREF(__pyx_r);
7197     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7198     goto __pyx_L0;
7199
7200     /* "lxml/objectify.pyx":435
7201  *     c_tag = tree.xmlDictExists(
7202  *         c_node.doc.dict, _xcstr(tag), python.PyBytes_GET_SIZE(tag))
7203  *     if c_tag is NULL:             # <<<<<<<<<<<<<<
7204  *         return None # not in the hash map => not in the tree
7205  *     if ns is None:
7206  */
7207   }
7208
7209   /* "lxml/objectify.pyx":437
7210  *     if c_tag is NULL:
7211  *         return None # not in the hash map => not in the tree
7212  *     if ns is None:             # <<<<<<<<<<<<<<
7213  *         # either inherit ns from parent or use empty (i.e. no) namespace
7214  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
7215  */
7216   __pyx_t_5 = (__pyx_v_ns == Py_None);
7217   __pyx_t_6 = (__pyx_t_5 != 0);
7218   if (__pyx_t_6) {
7219
7220     /* "lxml/objectify.pyx":439
7221  *     if ns is None:
7222  *         # either inherit ns from parent or use empty (i.e. no) namespace
7223  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''             # <<<<<<<<<<<<<<
7224  *     else:
7225  *         c_href = _xcstr(ns)
7226  */
7227     __pyx_t_8 = _getNs(__pyx_v_c_node);
7228     if (!__pyx_t_8) {
7229     } else {
7230       __pyx_t_7 = __pyx_t_8;
7231       goto __pyx_L5_bool_binop_done;
7232     }
7233     __pyx_t_8 = ((const xmlChar *)((const xmlChar *)((char const *)"")));
7234     __pyx_t_7 = __pyx_t_8;
7235     __pyx_L5_bool_binop_done:;
7236     __pyx_v_c_href = __pyx_t_7;
7237
7238     /* "lxml/objectify.pyx":437
7239  *     if c_tag is NULL:
7240  *         return None # not in the hash map => not in the tree
7241  *     if ns is None:             # <<<<<<<<<<<<<<
7242  *         # either inherit ns from parent or use empty (i.e. no) namespace
7243  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
7244  */
7245     goto __pyx_L4;
7246   }
7247
7248   /* "lxml/objectify.pyx":441
7249  *         c_href = tree._getNs(c_node) or <const_xmlChar*>''
7250  *     else:
7251  *         c_href = _xcstr(ns)             # <<<<<<<<<<<<<<
7252  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7253  *     if c_result is NULL:
7254  */
7255   /*else*/ {
7256     __pyx_v_c_href = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
7257   }
7258   __pyx_L4:;
7259
7260   /* "lxml/objectify.pyx":442
7261  *     else:
7262  *         c_href = _xcstr(ns)
7263  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)             # <<<<<<<<<<<<<<
7264  *     if c_result is NULL:
7265  *         return None
7266  */
7267   __pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children, __pyx_v_c_href, __pyx_v_c_tag, 0);
7268
7269   /* "lxml/objectify.pyx":443
7270  *         c_href = _xcstr(ns)
7271  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7272  *     if c_result is NULL:             # <<<<<<<<<<<<<<
7273  *         return None
7274  *     return elementFactory(parent._doc, c_result)
7275  */
7276   __pyx_t_6 = ((__pyx_v_c_result == NULL) != 0);
7277   if (__pyx_t_6) {
7278
7279     /* "lxml/objectify.pyx":444
7280  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7281  *     if c_result is NULL:
7282  *         return None             # <<<<<<<<<<<<<<
7283  *     return elementFactory(parent._doc, c_result)
7284  * 
7285  */
7286     __Pyx_XDECREF(__pyx_r);
7287     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7288     goto __pyx_L0;
7289
7290     /* "lxml/objectify.pyx":443
7291  *         c_href = _xcstr(ns)
7292  *     c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
7293  *     if c_result is NULL:             # <<<<<<<<<<<<<<
7294  *         return None
7295  *     return elementFactory(parent._doc, c_result)
7296  */
7297   }
7298
7299   /* "lxml/objectify.pyx":445
7300  *     if c_result is NULL:
7301  *         return None
7302  *     return elementFactory(parent._doc, c_result)             # <<<<<<<<<<<<<<
7303  * 
7304  * cdef object _lookupChildOrRaise(_Element parent, tag):
7305  */
7306   __Pyx_XDECREF(__pyx_r);
7307   __pyx_t_2 = ((PyObject *)__pyx_v_parent->_doc);
7308   __Pyx_INCREF(__pyx_t_2);
7309   __pyx_t_4 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_result)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 445, __pyx_L1_error)
7310   __Pyx_GOTREF(__pyx_t_4);
7311   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7312   __pyx_r = __pyx_t_4;
7313   __pyx_t_4 = 0;
7314   goto __pyx_L0;
7315
7316   /* "lxml/objectify.pyx":428
7317  *     return NULL
7318  * 
7319  * cdef object _lookupChild(_Element parent, tag):             # <<<<<<<<<<<<<<
7320  *     cdef tree.xmlNode* c_result
7321  *     cdef tree.xmlNode* c_node
7322  */
7323
7324   /* function exit code */
7325   __pyx_L1_error:;
7326   __Pyx_XDECREF(__pyx_t_2);
7327   __Pyx_XDECREF(__pyx_t_3);
7328   __Pyx_XDECREF(__pyx_t_4);
7329   __Pyx_AddTraceback("lxml.objectify._lookupChild", __pyx_clineno, __pyx_lineno, __pyx_filename);
7330   __pyx_r = 0;
7331   __pyx_L0:;
7332   __Pyx_XDECREF(__pyx_v_ns);
7333   __Pyx_XDECREF(__pyx_v_tag);
7334   __Pyx_XGIVEREF(__pyx_r);
7335   __Pyx_RefNannyFinishContext();
7336   return __pyx_r;
7337 }
7338
7339 /* "lxml/objectify.pyx":447
7340  *     return elementFactory(parent._doc, c_result)
7341  * 
7342  * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
7343  *     element = _lookupChild(parent, tag)
7344  *     if element is None:
7345  */
7346
7347 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7348   PyObject *__pyx_v_element = NULL;
7349   PyObject *__pyx_r = NULL;
7350   __Pyx_RefNannyDeclarations
7351   PyObject *__pyx_t_1 = NULL;
7352   int __pyx_t_2;
7353   int __pyx_t_3;
7354   PyObject *__pyx_t_4 = NULL;
7355   int __pyx_lineno = 0;
7356   const char *__pyx_filename = NULL;
7357   int __pyx_clineno = 0;
7358   __Pyx_RefNannySetupContext("_lookupChildOrRaise", 0);
7359
7360   /* "lxml/objectify.pyx":448
7361  * 
7362  * cdef object _lookupChildOrRaise(_Element parent, tag):
7363  *     element = _lookupChild(parent, tag)             # <<<<<<<<<<<<<<
7364  *     if element is None:
7365  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7366  */
7367   __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChild(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)
7368   __Pyx_GOTREF(__pyx_t_1);
7369   __pyx_v_element = __pyx_t_1;
7370   __pyx_t_1 = 0;
7371
7372   /* "lxml/objectify.pyx":449
7373  * cdef object _lookupChildOrRaise(_Element parent, tag):
7374  *     element = _lookupChild(parent, tag)
7375  *     if element is None:             # <<<<<<<<<<<<<<
7376  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7377  *     return element
7378  */
7379   __pyx_t_2 = (__pyx_v_element == Py_None);
7380   __pyx_t_3 = (__pyx_t_2 != 0);
7381   if (unlikely(__pyx_t_3)) {
7382
7383     /* "lxml/objectify.pyx":450
7384  *     element = _lookupChild(parent, tag)
7385  *     if element is None:
7386  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)             # <<<<<<<<<<<<<<
7387  *     return element
7388  * 
7389  */
7390     __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
7391     __Pyx_GOTREF(__pyx_t_1);
7392     __pyx_t_4 = PyNumber_Add(__pyx_kp_u_no_such_child, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)
7393     __Pyx_GOTREF(__pyx_t_4);
7394     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7395     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_4, 0, 0);
7396     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7397     __PYX_ERR(0, 450, __pyx_L1_error)
7398
7399     /* "lxml/objectify.pyx":449
7400  * cdef object _lookupChildOrRaise(_Element parent, tag):
7401  *     element = _lookupChild(parent, tag)
7402  *     if element is None:             # <<<<<<<<<<<<<<
7403  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7404  *     return element
7405  */
7406   }
7407
7408   /* "lxml/objectify.pyx":451
7409  *     if element is None:
7410  *         raise AttributeError, u"no such child: " + _buildChildTag(parent, tag)
7411  *     return element             # <<<<<<<<<<<<<<
7412  * 
7413  * cdef object _buildChildTag(_Element parent, tag):
7414  */
7415   __Pyx_XDECREF(__pyx_r);
7416   __Pyx_INCREF(__pyx_v_element);
7417   __pyx_r = __pyx_v_element;
7418   goto __pyx_L0;
7419
7420   /* "lxml/objectify.pyx":447
7421  *     return elementFactory(parent._doc, c_result)
7422  * 
7423  * cdef object _lookupChildOrRaise(_Element parent, tag):             # <<<<<<<<<<<<<<
7424  *     element = _lookupChild(parent, tag)
7425  *     if element is None:
7426  */
7427
7428   /* function exit code */
7429   __pyx_L1_error:;
7430   __Pyx_XDECREF(__pyx_t_1);
7431   __Pyx_XDECREF(__pyx_t_4);
7432   __Pyx_AddTraceback("lxml.objectify._lookupChildOrRaise", __pyx_clineno, __pyx_lineno, __pyx_filename);
7433   __pyx_r = 0;
7434   __pyx_L0:;
7435   __Pyx_XDECREF(__pyx_v_element);
7436   __Pyx_XGIVEREF(__pyx_r);
7437   __Pyx_RefNannyFinishContext();
7438   return __pyx_r;
7439 }
7440
7441 /* "lxml/objectify.pyx":453
7442  *     return element
7443  * 
7444  * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
7445  *     ns, tag = cetree.getNsTag(tag)
7446  *     c_tag = _xcstr(tag)
7447  */
7448
7449 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
7450   PyObject *__pyx_v_ns = NULL;
7451   const xmlChar *__pyx_v_c_tag;
7452   const xmlChar *__pyx_v_c_href;
7453   PyObject *__pyx_r = NULL;
7454   __Pyx_RefNannyDeclarations
7455   PyObject *__pyx_t_1 = NULL;
7456   PyObject *__pyx_t_2 = NULL;
7457   PyObject *__pyx_t_3 = NULL;
7458   const xmlChar *__pyx_t_4;
7459   int __pyx_t_5;
7460   int __pyx_lineno = 0;
7461   const char *__pyx_filename = NULL;
7462   int __pyx_clineno = 0;
7463   __Pyx_RefNannySetupContext("_buildChildTag", 0);
7464   __Pyx_INCREF(__pyx_v_tag);
7465
7466   /* "lxml/objectify.pyx":454
7467  * 
7468  * cdef object _buildChildTag(_Element parent, tag):
7469  *     ns, tag = cetree.getNsTag(tag)             # <<<<<<<<<<<<<<
7470  *     c_tag = _xcstr(tag)
7471  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7472  */
7473   __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
7474   __Pyx_GOTREF(__pyx_t_1);
7475   if (likely(__pyx_t_1 != Py_None)) {
7476     PyObject* sequence = __pyx_t_1;
7477     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
7478     if (unlikely(size != 2)) {
7479       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
7480       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
7481       __PYX_ERR(0, 454, __pyx_L1_error)
7482     }
7483     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7484     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
7485     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
7486     __Pyx_INCREF(__pyx_t_2);
7487     __Pyx_INCREF(__pyx_t_3);
7488     #else
7489     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
7490     __Pyx_GOTREF(__pyx_t_2);
7491     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L1_error)
7492     __Pyx_GOTREF(__pyx_t_3);
7493     #endif
7494     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7495   } else {
7496     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 454, __pyx_L1_error)
7497   }
7498   __pyx_v_ns = __pyx_t_2;
7499   __pyx_t_2 = 0;
7500   __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_3);
7501   __pyx_t_3 = 0;
7502
7503   /* "lxml/objectify.pyx":455
7504  * cdef object _buildChildTag(_Element parent, tag):
7505  *     ns, tag = cetree.getNsTag(tag)
7506  *     c_tag = _xcstr(tag)             # <<<<<<<<<<<<<<
7507  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7508  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7509  */
7510   __pyx_v_c_tag = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_tag);
7511
7512   /* "lxml/objectify.pyx":456
7513  *     ns, tag = cetree.getNsTag(tag)
7514  *     c_tag = _xcstr(tag)
7515  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)             # <<<<<<<<<<<<<<
7516  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7517  * 
7518  */
7519   __pyx_t_5 = (__pyx_v_ns == Py_None);
7520   if ((__pyx_t_5 != 0)) {
7521     __pyx_t_4 = _getNs(__pyx_v_parent->_c_node);
7522   } else {
7523     __pyx_t_4 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns);
7524   }
7525   __pyx_v_c_href = __pyx_t_4;
7526
7527   /* "lxml/objectify.pyx":457
7528  *     c_tag = _xcstr(tag)
7529  *     c_href = tree._getNs(parent._c_node) if ns is None else _xcstr(ns)
7530  *     return cetree.namespacedNameFromNsName(c_href, c_tag)             # <<<<<<<<<<<<<<
7531  * 
7532  * cdef _replaceElement(_Element element, value):
7533  */
7534   __Pyx_XDECREF(__pyx_r);
7535   __pyx_t_1 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
7536   __Pyx_GOTREF(__pyx_t_1);
7537   __pyx_r = __pyx_t_1;
7538   __pyx_t_1 = 0;
7539   goto __pyx_L0;
7540
7541   /* "lxml/objectify.pyx":453
7542  *     return element
7543  * 
7544  * cdef object _buildChildTag(_Element parent, tag):             # <<<<<<<<<<<<<<
7545  *     ns, tag = cetree.getNsTag(tag)
7546  *     c_tag = _xcstr(tag)
7547  */
7548
7549   /* function exit code */
7550   __pyx_L1_error:;
7551   __Pyx_XDECREF(__pyx_t_1);
7552   __Pyx_XDECREF(__pyx_t_2);
7553   __Pyx_XDECREF(__pyx_t_3);
7554   __Pyx_AddTraceback("lxml.objectify._buildChildTag", __pyx_clineno, __pyx_lineno, __pyx_filename);
7555   __pyx_r = 0;
7556   __pyx_L0:;
7557   __Pyx_XDECREF(__pyx_v_ns);
7558   __Pyx_XDECREF(__pyx_v_tag);
7559   __Pyx_XGIVEREF(__pyx_r);
7560   __Pyx_RefNannyFinishContext();
7561   return __pyx_r;
7562 }
7563
7564 /* "lxml/objectify.pyx":459
7565  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7566  * 
7567  * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
7568  *     cdef _Element new_element
7569  *     if isinstance(value, _Element):
7570  */
7571
7572 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
7573   struct LxmlElement *__pyx_v_new_element = 0;
7574   PyObject *__pyx_r = NULL;
7575   __Pyx_RefNannyDeclarations
7576   int __pyx_t_1;
7577   int __pyx_t_2;
7578   PyObject *__pyx_t_3 = NULL;
7579   PyObject *__pyx_t_4 = NULL;
7580   int __pyx_t_5;
7581   PyObject *__pyx_t_6 = NULL;
7582   PyObject *__pyx_t_7 = NULL;
7583   int __pyx_t_8;
7584   int __pyx_lineno = 0;
7585   const char *__pyx_filename = NULL;
7586   int __pyx_clineno = 0;
7587   __Pyx_RefNannySetupContext("_replaceElement", 0);
7588
7589   /* "lxml/objectify.pyx":461
7590  * cdef _replaceElement(_Element element, value):
7591  *     cdef _Element new_element
7592  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7593  *         # deep copy the new element
7594  *         new_element = cetree.deepcopyNodeToDocument(
7595  */
7596   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
7597   __pyx_t_2 = (__pyx_t_1 != 0);
7598   if (__pyx_t_2) {
7599
7600     /* "lxml/objectify.pyx":464
7601  *         # deep copy the new element
7602  *         new_element = cetree.deepcopyNodeToDocument(
7603  *             element._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
7604  *         new_element.tag = element.tag
7605  *     elif isinstance(value, (list, tuple)):
7606  */
7607     __pyx_t_3 = ((PyObject *)__pyx_v_element->_doc);
7608     __Pyx_INCREF(__pyx_t_3);
7609
7610     /* "lxml/objectify.pyx":463
7611  *     if isinstance(value, _Element):
7612  *         # deep copy the new element
7613  *         new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
7614  *             element._doc, (<_Element>value)._c_node)
7615  *         new_element.tag = element.tag
7616  */
7617     __pyx_t_4 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_3), ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error)
7618     __Pyx_GOTREF(__pyx_t_4);
7619     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7620     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7621     __pyx_t_4 = 0;
7622
7623     /* "lxml/objectify.pyx":465
7624  *         new_element = cetree.deepcopyNodeToDocument(
7625  *             element._doc, (<_Element>value)._c_node)
7626  *         new_element.tag = element.tag             # <<<<<<<<<<<<<<
7627  *     elif isinstance(value, (list, tuple)):
7628  *         element[:] = value
7629  */
7630     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
7631     __Pyx_GOTREF(__pyx_t_4);
7632     if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_t_4) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
7633     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7634
7635     /* "lxml/objectify.pyx":461
7636  * cdef _replaceElement(_Element element, value):
7637  *     cdef _Element new_element
7638  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7639  *         # deep copy the new element
7640  *         new_element = cetree.deepcopyNodeToDocument(
7641  */
7642     goto __pyx_L3;
7643   }
7644
7645   /* "lxml/objectify.pyx":466
7646  *             element._doc, (<_Element>value)._c_node)
7647  *         new_element.tag = element.tag
7648  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7649  *         element[:] = value
7650  *         return
7651  */
7652   __pyx_t_1 = PyList_Check(__pyx_v_value); 
7653   __pyx_t_5 = (__pyx_t_1 != 0);
7654   if (!__pyx_t_5) {
7655   } else {
7656     __pyx_t_2 = __pyx_t_5;
7657     goto __pyx_L4_bool_binop_done;
7658   }
7659   __pyx_t_5 = PyTuple_Check(__pyx_v_value); 
7660   __pyx_t_1 = (__pyx_t_5 != 0);
7661   __pyx_t_2 = __pyx_t_1;
7662   __pyx_L4_bool_binop_done:;
7663   __pyx_t_1 = (__pyx_t_2 != 0);
7664   if (__pyx_t_1) {
7665
7666     /* "lxml/objectify.pyx":467
7667  *         new_element.tag = element.tag
7668  *     elif isinstance(value, (list, tuple)):
7669  *         element[:] = value             # <<<<<<<<<<<<<<
7670  *         return
7671  *     else:
7672  */
7673     if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_element), __pyx_v_value, 0, 0, NULL, NULL, &__pyx_slice__3, 0, 0, 1) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
7674
7675     /* "lxml/objectify.pyx":468
7676  *     elif isinstance(value, (list, tuple)):
7677  *         element[:] = value
7678  *         return             # <<<<<<<<<<<<<<
7679  *     else:
7680  *         new_element = element.makeelement(element.tag)
7681  */
7682     __Pyx_XDECREF(__pyx_r);
7683     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7684     goto __pyx_L0;
7685
7686     /* "lxml/objectify.pyx":466
7687  *             element._doc, (<_Element>value)._c_node)
7688  *         new_element.tag = element.tag
7689  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7690  *         element[:] = value
7691  *         return
7692  */
7693   }
7694
7695   /* "lxml/objectify.pyx":470
7696  *         return
7697  *     else:
7698  *         new_element = element.makeelement(element.tag)             # <<<<<<<<<<<<<<
7699  *         _setElementValue(new_element, value)
7700  *     element.getparent().replace(element, new_element)
7701  */
7702   /*else*/ {
7703     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_makeelement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error)
7704     __Pyx_GOTREF(__pyx_t_3);
7705     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L1_error)
7706     __Pyx_GOTREF(__pyx_t_6);
7707     __pyx_t_7 = NULL;
7708     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
7709       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
7710       if (likely(__pyx_t_7)) {
7711         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
7712         __Pyx_INCREF(__pyx_t_7);
7713         __Pyx_INCREF(function);
7714         __Pyx_DECREF_SET(__pyx_t_3, function);
7715       }
7716     }
7717     __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
7718     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7719     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7720     if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error)
7721     __Pyx_GOTREF(__pyx_t_4);
7722     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7723     if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 470, __pyx_L1_error)
7724     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7725     __pyx_t_4 = 0;
7726
7727     /* "lxml/objectify.pyx":471
7728  *     else:
7729  *         new_element = element.makeelement(element.tag)
7730  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
7731  *     element.getparent().replace(element, new_element)
7732  * 
7733  */
7734     __pyx_t_4 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
7735     __Pyx_GOTREF(__pyx_t_4);
7736     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7737   }
7738   __pyx_L3:;
7739
7740   /* "lxml/objectify.pyx":472
7741  *         new_element = element.makeelement(element.tag)
7742  *         _setElementValue(new_element, value)
7743  *     element.getparent().replace(element, new_element)             # <<<<<<<<<<<<<<
7744  * 
7745  * cdef _appendValue(_Element parent, tag, value):
7746  */
7747   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_getparent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
7748   __Pyx_GOTREF(__pyx_t_6);
7749   __pyx_t_7 = NULL;
7750   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
7751     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
7752     if (likely(__pyx_t_7)) {
7753       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7754       __Pyx_INCREF(__pyx_t_7);
7755       __Pyx_INCREF(function);
7756       __Pyx_DECREF_SET(__pyx_t_6, function);
7757     }
7758   }
7759   __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
7760   __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
7761   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
7762   __Pyx_GOTREF(__pyx_t_3);
7763   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7764   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 472, __pyx_L1_error)
7765   __Pyx_GOTREF(__pyx_t_6);
7766   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7767   __pyx_t_3 = NULL;
7768   __pyx_t_8 = 0;
7769   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
7770     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
7771     if (likely(__pyx_t_3)) {
7772       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7773       __Pyx_INCREF(__pyx_t_3);
7774       __Pyx_INCREF(function);
7775       __Pyx_DECREF_SET(__pyx_t_6, function);
7776       __pyx_t_8 = 1;
7777     }
7778   }
7779   #if CYTHON_FAST_PYCALL
7780   if (PyFunction_Check(__pyx_t_6)) {
7781     PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_element), ((PyObject *)__pyx_v_new_element)};
7782     __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
7783     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7784     __Pyx_GOTREF(__pyx_t_4);
7785   } else
7786   #endif
7787   #if CYTHON_FAST_PYCCALL
7788   if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
7789     PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_element), ((PyObject *)__pyx_v_new_element)};
7790     __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
7791     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7792     __Pyx_GOTREF(__pyx_t_4);
7793   } else
7794   #endif
7795   {
7796     __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 472, __pyx_L1_error)
7797     __Pyx_GOTREF(__pyx_t_7);
7798     if (__pyx_t_3) {
7799       __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
7800     }
7801     __Pyx_INCREF(((PyObject *)__pyx_v_element));
7802     __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
7803     PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, ((PyObject *)__pyx_v_element));
7804     __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
7805     __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
7806     PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, ((PyObject *)__pyx_v_new_element));
7807     __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error)
7808     __Pyx_GOTREF(__pyx_t_4);
7809     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7810   }
7811   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7812   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7813
7814   /* "lxml/objectify.pyx":459
7815  *     return cetree.namespacedNameFromNsName(c_href, c_tag)
7816  * 
7817  * cdef _replaceElement(_Element element, value):             # <<<<<<<<<<<<<<
7818  *     cdef _Element new_element
7819  *     if isinstance(value, _Element):
7820  */
7821
7822   /* function exit code */
7823   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7824   goto __pyx_L0;
7825   __pyx_L1_error:;
7826   __Pyx_XDECREF(__pyx_t_3);
7827   __Pyx_XDECREF(__pyx_t_4);
7828   __Pyx_XDECREF(__pyx_t_6);
7829   __Pyx_XDECREF(__pyx_t_7);
7830   __Pyx_AddTraceback("lxml.objectify._replaceElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
7831   __pyx_r = 0;
7832   __pyx_L0:;
7833   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
7834   __Pyx_XGIVEREF(__pyx_r);
7835   __Pyx_RefNannyFinishContext();
7836   return __pyx_r;
7837 }
7838
7839 /* "lxml/objectify.pyx":474
7840  *     element.getparent().replace(element, new_element)
7841  * 
7842  * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
7843  *     cdef _Element new_element
7844  *     if isinstance(value, _Element):
7845  */
7846
7847 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
7848   struct LxmlElement *__pyx_v_new_element = 0;
7849   PyObject *__pyx_v_item = NULL;
7850   PyObject *__pyx_r = NULL;
7851   __Pyx_RefNannyDeclarations
7852   int __pyx_t_1;
7853   int __pyx_t_2;
7854   PyObject *__pyx_t_3 = NULL;
7855   PyObject *__pyx_t_4 = NULL;
7856   int __pyx_t_5;
7857   int __pyx_t_6;
7858   Py_ssize_t __pyx_t_7;
7859   PyObject *(*__pyx_t_8)(PyObject *);
7860   int __pyx_lineno = 0;
7861   const char *__pyx_filename = NULL;
7862   int __pyx_clineno = 0;
7863   __Pyx_RefNannySetupContext("_appendValue", 0);
7864
7865   /* "lxml/objectify.pyx":476
7866  * cdef _appendValue(_Element parent, tag, value):
7867  *     cdef _Element new_element
7868  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7869  *         # deep copy the new element
7870  *         new_element = cetree.deepcopyNodeToDocument(
7871  */
7872   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
7873   __pyx_t_2 = (__pyx_t_1 != 0);
7874   if (__pyx_t_2) {
7875
7876     /* "lxml/objectify.pyx":479
7877  *         # deep copy the new element
7878  *         new_element = cetree.deepcopyNodeToDocument(
7879  *             parent._doc, (<_Element>value)._c_node)             # <<<<<<<<<<<<<<
7880  *         new_element.tag = tag
7881  *         cetree.appendChildToElement(parent, new_element)
7882  */
7883     __pyx_t_3 = ((PyObject *)__pyx_v_parent->_doc);
7884     __Pyx_INCREF(__pyx_t_3);
7885
7886     /* "lxml/objectify.pyx":478
7887  *     if isinstance(value, _Element):
7888  *         # deep copy the new element
7889  *         new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
7890  *             parent._doc, (<_Element>value)._c_node)
7891  *         new_element.tag = tag
7892  */
7893     __pyx_t_4 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_3), ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error)
7894     __Pyx_GOTREF(__pyx_t_4);
7895     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7896     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_4);
7897     __pyx_t_4 = 0;
7898
7899     /* "lxml/objectify.pyx":480
7900  *         new_element = cetree.deepcopyNodeToDocument(
7901  *             parent._doc, (<_Element>value)._c_node)
7902  *         new_element.tag = tag             # <<<<<<<<<<<<<<
7903  *         cetree.appendChildToElement(parent, new_element)
7904  *     elif isinstance(value, (list, tuple)):
7905  */
7906     if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
7907
7908     /* "lxml/objectify.pyx":481
7909  *             parent._doc, (<_Element>value)._c_node)
7910  *         new_element.tag = tag
7911  *         cetree.appendChildToElement(parent, new_element)             # <<<<<<<<<<<<<<
7912  *     elif isinstance(value, (list, tuple)):
7913  *         for item in value:
7914  */
7915     __pyx_t_5 = appendChildToElement(__pyx_v_parent, __pyx_v_new_element); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L1_error)
7916
7917     /* "lxml/objectify.pyx":476
7918  * cdef _appendValue(_Element parent, tag, value):
7919  *     cdef _Element new_element
7920  *     if isinstance(value, _Element):             # <<<<<<<<<<<<<<
7921  *         # deep copy the new element
7922  *         new_element = cetree.deepcopyNodeToDocument(
7923  */
7924     goto __pyx_L3;
7925   }
7926
7927   /* "lxml/objectify.pyx":482
7928  *         new_element.tag = tag
7929  *         cetree.appendChildToElement(parent, new_element)
7930  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
7931  *         for item in value:
7932  *             _appendValue(parent, tag, item)
7933  */
7934   __pyx_t_1 = PyList_Check(__pyx_v_value); 
7935   __pyx_t_6 = (__pyx_t_1 != 0);
7936   if (!__pyx_t_6) {
7937   } else {
7938     __pyx_t_2 = __pyx_t_6;
7939     goto __pyx_L4_bool_binop_done;
7940   }
7941   __pyx_t_6 = PyTuple_Check(__pyx_v_value); 
7942   __pyx_t_1 = (__pyx_t_6 != 0);
7943   __pyx_t_2 = __pyx_t_1;
7944   __pyx_L4_bool_binop_done:;
7945   __pyx_t_1 = (__pyx_t_2 != 0);
7946   if (__pyx_t_1) {
7947
7948     /* "lxml/objectify.pyx":483
7949  *         cetree.appendChildToElement(parent, new_element)
7950  *     elif isinstance(value, (list, tuple)):
7951  *         for item in value:             # <<<<<<<<<<<<<<
7952  *             _appendValue(parent, tag, item)
7953  *     else:
7954  */
7955     if (likely(PyList_CheckExact(__pyx_v_value)) || PyTuple_CheckExact(__pyx_v_value)) {
7956       __pyx_t_4 = __pyx_v_value; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
7957       __pyx_t_8 = NULL;
7958     } else {
7959       __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 483, __pyx_L1_error)
7960       __Pyx_GOTREF(__pyx_t_4);
7961       __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 483, __pyx_L1_error)
7962     }
7963     for (;;) {
7964       if (likely(!__pyx_t_8)) {
7965         if (likely(PyList_CheckExact(__pyx_t_4))) {
7966           if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
7967           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7968           __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
7969           #else
7970           __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
7971           __Pyx_GOTREF(__pyx_t_3);
7972           #endif
7973         } else {
7974           if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
7975           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
7976           __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 483, __pyx_L1_error)
7977           #else
7978           __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
7979           __Pyx_GOTREF(__pyx_t_3);
7980           #endif
7981         }
7982       } else {
7983         __pyx_t_3 = __pyx_t_8(__pyx_t_4);
7984         if (unlikely(!__pyx_t_3)) {
7985           PyObject* exc_type = PyErr_Occurred();
7986           if (exc_type) {
7987             if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
7988             else __PYX_ERR(0, 483, __pyx_L1_error)
7989           }
7990           break;
7991         }
7992         __Pyx_GOTREF(__pyx_t_3);
7993       }
7994       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
7995       __pyx_t_3 = 0;
7996
7997       /* "lxml/objectify.pyx":484
7998  *     elif isinstance(value, (list, tuple)):
7999  *         for item in value:
8000  *             _appendValue(parent, tag, item)             # <<<<<<<<<<<<<<
8001  *     else:
8002  *         new_element = cetree.makeElement(
8003  */
8004       __pyx_t_3 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent, __pyx_v_tag, __pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error)
8005       __Pyx_GOTREF(__pyx_t_3);
8006       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8007
8008       /* "lxml/objectify.pyx":483
8009  *         cetree.appendChildToElement(parent, new_element)
8010  *     elif isinstance(value, (list, tuple)):
8011  *         for item in value:             # <<<<<<<<<<<<<<
8012  *             _appendValue(parent, tag, item)
8013  *     else:
8014  */
8015     }
8016     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8017
8018     /* "lxml/objectify.pyx":482
8019  *         new_element.tag = tag
8020  *         cetree.appendChildToElement(parent, new_element)
8021  *     elif isinstance(value, (list, tuple)):             # <<<<<<<<<<<<<<
8022  *         for item in value:
8023  *             _appendValue(parent, tag, item)
8024  */
8025     goto __pyx_L3;
8026   }
8027
8028   /* "lxml/objectify.pyx":486
8029  *             _appendValue(parent, tag, item)
8030  *     else:
8031  *         new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8032  *             tag, parent._doc, None, None, None, None, None)
8033  *         _setElementValue(new_element, value)
8034  */
8035   /*else*/ {
8036
8037     /* "lxml/objectify.pyx":487
8038  *     else:
8039  *         new_element = cetree.makeElement(
8040  *             tag, parent._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
8041  *         _setElementValue(new_element, value)
8042  *         cetree.appendChildToElement(parent, new_element)
8043  */
8044     __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc);
8045     __Pyx_INCREF(__pyx_t_4);
8046
8047     /* "lxml/objectify.pyx":486
8048  *             _appendValue(parent, tag, item)
8049  *     else:
8050  *         new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8051  *             tag, parent._doc, None, None, None, None, None)
8052  *         _setElementValue(new_element, value)
8053  */
8054     __pyx_t_3 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)__pyx_t_4), Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)
8055     __Pyx_GOTREF(__pyx_t_3);
8056     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8057     __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
8058     __pyx_t_3 = 0;
8059
8060     /* "lxml/objectify.pyx":488
8061  *         new_element = cetree.makeElement(
8062  *             tag, parent._doc, None, None, None, None, None)
8063  *         _setElementValue(new_element, value)             # <<<<<<<<<<<<<<
8064  *         cetree.appendChildToElement(parent, new_element)
8065  * 
8066  */
8067     __pyx_t_3 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
8068     __Pyx_GOTREF(__pyx_t_3);
8069     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8070
8071     /* "lxml/objectify.pyx":489
8072  *             tag, parent._doc, None, None, None, None, None)
8073  *         _setElementValue(new_element, value)
8074  *         cetree.appendChildToElement(parent, new_element)             # <<<<<<<<<<<<<<
8075  * 
8076  * cdef _setElementValue(_Element element, value):
8077  */
8078     __pyx_t_5 = appendChildToElement(__pyx_v_parent, __pyx_v_new_element); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 489, __pyx_L1_error)
8079   }
8080   __pyx_L3:;
8081
8082   /* "lxml/objectify.pyx":474
8083  *     element.getparent().replace(element, new_element)
8084  * 
8085  * cdef _appendValue(_Element parent, tag, value):             # <<<<<<<<<<<<<<
8086  *     cdef _Element new_element
8087  *     if isinstance(value, _Element):
8088  */
8089
8090   /* function exit code */
8091   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8092   goto __pyx_L0;
8093   __pyx_L1_error:;
8094   __Pyx_XDECREF(__pyx_t_3);
8095   __Pyx_XDECREF(__pyx_t_4);
8096   __Pyx_AddTraceback("lxml.objectify._appendValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
8097   __pyx_r = 0;
8098   __pyx_L0:;
8099   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
8100   __Pyx_XDECREF(__pyx_v_item);
8101   __Pyx_XGIVEREF(__pyx_r);
8102   __Pyx_RefNannyFinishContext();
8103   return __pyx_r;
8104 }
8105
8106 /* "lxml/objectify.pyx":491
8107  *         cetree.appendChildToElement(parent, new_element)
8108  * 
8109  * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
8110  *     if value is None:
8111  *         cetree.setAttributeValue(
8112  */
8113
8114 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
8115   PyObject *__pyx_v_pytype_name = NULL;
8116   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
8117   PyObject *__pyx_r = NULL;
8118   __Pyx_RefNannyDeclarations
8119   int __pyx_t_1;
8120   int __pyx_t_2;
8121   PyObject *__pyx_t_3 = NULL;
8122   int __pyx_t_4;
8123   PyObject *__pyx_t_5 = NULL;
8124   PyObject *__pyx_t_6 = NULL;
8125   int __pyx_lineno = 0;
8126   const char *__pyx_filename = NULL;
8127   int __pyx_clineno = 0;
8128   __Pyx_RefNannySetupContext("_setElementValue", 0);
8129   __Pyx_INCREF(__pyx_v_value);
8130
8131   /* "lxml/objectify.pyx":492
8132  * 
8133  * cdef _setElementValue(_Element element, value):
8134  *     if value is None:             # <<<<<<<<<<<<<<
8135  *         cetree.setAttributeValue(
8136  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8137  */
8138   __pyx_t_1 = (__pyx_v_value == Py_None);
8139   __pyx_t_2 = (__pyx_t_1 != 0);
8140   if (__pyx_t_2) {
8141
8142     /* "lxml/objectify.pyx":494
8143  *     if value is None:
8144  *         cetree.setAttributeValue(
8145  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
8146  *     elif isinstance(value, _Element):
8147  *         _replaceElement(element, value)
8148  */
8149     __pyx_t_3 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
8150     __Pyx_INCREF(__pyx_t_3);
8151
8152     /* "lxml/objectify.pyx":493
8153  * cdef _setElementValue(_Element element, value):
8154  *     if value is None:
8155  *         cetree.setAttributeValue(             # <<<<<<<<<<<<<<
8156  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8157  *     elif isinstance(value, _Element):
8158  */
8159     __pyx_t_4 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_n_u_true); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 493, __pyx_L1_error)
8160     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8161
8162     /* "lxml/objectify.pyx":492
8163  * 
8164  * cdef _setElementValue(_Element element, value):
8165  *     if value is None:             # <<<<<<<<<<<<<<
8166  *         cetree.setAttributeValue(
8167  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8168  */
8169     goto __pyx_L3;
8170   }
8171
8172   /* "lxml/objectify.pyx":495
8173  *         cetree.setAttributeValue(
8174  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8175  *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
8176  *         _replaceElement(element, value)
8177  *         return
8178  */
8179   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_value, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
8180   __pyx_t_1 = (__pyx_t_2 != 0);
8181   if (__pyx_t_1) {
8182
8183     /* "lxml/objectify.pyx":496
8184  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8185  *     elif isinstance(value, _Element):
8186  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
8187  *         return
8188  *     else:
8189  */
8190     __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error)
8191     __Pyx_GOTREF(__pyx_t_3);
8192     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8193
8194     /* "lxml/objectify.pyx":497
8195  *     elif isinstance(value, _Element):
8196  *         _replaceElement(element, value)
8197  *         return             # <<<<<<<<<<<<<<
8198  *     else:
8199  *         cetree.delAttributeFromNsName(
8200  */
8201     __Pyx_XDECREF(__pyx_r);
8202     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8203     goto __pyx_L0;
8204
8205     /* "lxml/objectify.pyx":495
8206  *         cetree.setAttributeValue(
8207  *             element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
8208  *     elif isinstance(value, _Element):             # <<<<<<<<<<<<<<
8209  *         _replaceElement(element, value)
8210  *         return
8211  */
8212   }
8213
8214   /* "lxml/objectify.pyx":499
8215  *         return
8216  *     else:
8217  *         cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
8218  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8219  *         if python._isString(value):
8220  */
8221   /*else*/ {
8222
8223     /* "lxml/objectify.pyx":500
8224  *     else:
8225  *         cetree.delAttributeFromNsName(
8226  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")             # <<<<<<<<<<<<<<
8227  *         if python._isString(value):
8228  *             pytype_name = u"str"
8229  */
8230     (void)(delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))));
8231
8232     /* "lxml/objectify.pyx":501
8233  *         cetree.delAttributeFromNsName(
8234  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8235  *         if python._isString(value):             # <<<<<<<<<<<<<<
8236  *             pytype_name = u"str"
8237  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8238  */
8239     __pyx_t_1 = (_isString(__pyx_v_value) != 0);
8240     if (__pyx_t_1) {
8241
8242       /* "lxml/objectify.pyx":502
8243  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8244  *         if python._isString(value):
8245  *             pytype_name = u"str"             # <<<<<<<<<<<<<<
8246  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8247  *         else:
8248  */
8249       __Pyx_INCREF(__pyx_n_u_str);
8250       __pyx_v_pytype_name = __pyx_n_u_str;
8251
8252       /* "lxml/objectify.pyx":503
8253  *         if python._isString(value):
8254  *             pytype_name = u"str"
8255  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)             # <<<<<<<<<<<<<<
8256  *         else:
8257  *             pytype_name = _typename(value)
8258  */
8259       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
8260         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
8261         __PYX_ERR(0, 503, __pyx_L1_error)
8262       }
8263       __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_pytype_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
8264       __Pyx_GOTREF(__pyx_t_3);
8265       __pyx_t_5 = __pyx_t_3;
8266       __Pyx_INCREF(__pyx_t_5);
8267       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8268       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5);
8269       __pyx_t_5 = 0;
8270
8271       /* "lxml/objectify.pyx":501
8272  *         cetree.delAttributeFromNsName(
8273  *             element._c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil")
8274  *         if python._isString(value):             # <<<<<<<<<<<<<<
8275  *             pytype_name = u"str"
8276  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8277  */
8278       goto __pyx_L4;
8279     }
8280
8281     /* "lxml/objectify.pyx":505
8282  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8283  *         else:
8284  *             pytype_name = _typename(value)             # <<<<<<<<<<<<<<
8285  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8286  *             if py_type is not None:
8287  */
8288     /*else*/ {
8289       __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
8290       __Pyx_GOTREF(__pyx_t_5);
8291       __pyx_v_pytype_name = __pyx_t_5;
8292       __pyx_t_5 = 0;
8293
8294       /* "lxml/objectify.pyx":506
8295  *         else:
8296  *             pytype_name = _typename(value)
8297  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)             # <<<<<<<<<<<<<<
8298  *             if py_type is not None:
8299  *                 value = py_type.stringify(value)
8300  */
8301       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
8302         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
8303         __PYX_ERR(0, 506, __pyx_L1_error)
8304       }
8305       __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_pytype_name, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
8306       __Pyx_GOTREF(__pyx_t_5);
8307       __pyx_t_3 = __pyx_t_5;
8308       __Pyx_INCREF(__pyx_t_3);
8309       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8310       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
8311       __pyx_t_3 = 0;
8312
8313       /* "lxml/objectify.pyx":507
8314  *             pytype_name = _typename(value)
8315  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8316  *             if py_type is not None:             # <<<<<<<<<<<<<<
8317  *                 value = py_type.stringify(value)
8318  *             else:
8319  */
8320       __pyx_t_1 = (((PyObject *)__pyx_v_py_type) != Py_None);
8321       __pyx_t_2 = (__pyx_t_1 != 0);
8322       if (__pyx_t_2) {
8323
8324         /* "lxml/objectify.pyx":508
8325  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8326  *             if py_type is not None:
8327  *                 value = py_type.stringify(value)             # <<<<<<<<<<<<<<
8328  *             else:
8329  *                 value = unicode(value)
8330  */
8331         __Pyx_INCREF(__pyx_v_py_type->stringify);
8332         __pyx_t_5 = __pyx_v_py_type->stringify; __pyx_t_6 = NULL;
8333         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
8334           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
8335           if (likely(__pyx_t_6)) {
8336             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
8337             __Pyx_INCREF(__pyx_t_6);
8338             __Pyx_INCREF(function);
8339             __Pyx_DECREF_SET(__pyx_t_5, function);
8340           }
8341         }
8342         __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value);
8343         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
8344         if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 508, __pyx_L1_error)
8345         __Pyx_GOTREF(__pyx_t_3);
8346         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8347         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
8348         __pyx_t_3 = 0;
8349
8350         /* "lxml/objectify.pyx":507
8351  *             pytype_name = _typename(value)
8352  *             py_type = <PyType>_PYTYPE_DICT.get(pytype_name)
8353  *             if py_type is not None:             # <<<<<<<<<<<<<<
8354  *                 value = py_type.stringify(value)
8355  *             else:
8356  */
8357         goto __pyx_L5;
8358       }
8359
8360       /* "lxml/objectify.pyx":510
8361  *                 value = py_type.stringify(value)
8362  *             else:
8363  *                 value = unicode(value)             # <<<<<<<<<<<<<<
8364  *         if py_type is not None:
8365  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8366  */
8367       /*else*/ {
8368         __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)
8369         __Pyx_GOTREF(__pyx_t_3);
8370         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3);
8371         __pyx_t_3 = 0;
8372       }
8373       __pyx_L5:;
8374     }
8375     __pyx_L4:;
8376
8377     /* "lxml/objectify.pyx":511
8378  *             else:
8379  *                 value = unicode(value)
8380  *         if py_type is not None:             # <<<<<<<<<<<<<<
8381  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8382  *         else:
8383  */
8384     __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
8385     __pyx_t_1 = (__pyx_t_2 != 0);
8386     if (__pyx_t_1) {
8387
8388       /* "lxml/objectify.pyx":512
8389  *                 value = unicode(value)
8390  *         if py_type is not None:
8391  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
8392  *         else:
8393  *             cetree.delAttributeFromNsName(
8394  */
8395       __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error)
8396       __Pyx_GOTREF(__pyx_t_3);
8397       __pyx_t_4 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 512, __pyx_L1_error)
8398       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8399
8400       /* "lxml/objectify.pyx":511
8401  *             else:
8402  *                 value = unicode(value)
8403  *         if py_type is not None:             # <<<<<<<<<<<<<<
8404  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8405  *         else:
8406  */
8407       goto __pyx_L6;
8408     }
8409
8410     /* "lxml/objectify.pyx":514
8411  *             cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
8412  *         else:
8413  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
8414  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
8415  *     cetree.setNodeText(element._c_node, value)
8416  */
8417     /*else*/ {
8418
8419       /* "lxml/objectify.pyx":515
8420  *         else:
8421  *             cetree.delAttributeFromNsName(
8422  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)             # <<<<<<<<<<<<<<
8423  *     cetree.setNodeText(element._c_node, value)
8424  * 
8425  */
8426       (void)(delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME));
8427     }
8428     __pyx_L6:;
8429   }
8430   __pyx_L3:;
8431
8432   /* "lxml/objectify.pyx":516
8433  *             cetree.delAttributeFromNsName(
8434  *                 element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
8435  *     cetree.setNodeText(element._c_node, value)             # <<<<<<<<<<<<<<
8436  * 
8437  * cdef _setSlice(sliceobject, _Element target, items):
8438  */
8439   __pyx_t_4 = setNodeText(__pyx_v_element->_c_node, __pyx_v_value); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 516, __pyx_L1_error)
8440
8441   /* "lxml/objectify.pyx":491
8442  *         cetree.appendChildToElement(parent, new_element)
8443  * 
8444  * cdef _setElementValue(_Element element, value):             # <<<<<<<<<<<<<<
8445  *     if value is None:
8446  *         cetree.setAttributeValue(
8447  */
8448
8449   /* function exit code */
8450   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8451   goto __pyx_L0;
8452   __pyx_L1_error:;
8453   __Pyx_XDECREF(__pyx_t_3);
8454   __Pyx_XDECREF(__pyx_t_5);
8455   __Pyx_XDECREF(__pyx_t_6);
8456   __Pyx_AddTraceback("lxml.objectify._setElementValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
8457   __pyx_r = 0;
8458   __pyx_L0:;
8459   __Pyx_XDECREF(__pyx_v_pytype_name);
8460   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
8461   __Pyx_XDECREF(__pyx_v_value);
8462   __Pyx_XGIVEREF(__pyx_r);
8463   __Pyx_RefNannyFinishContext();
8464   return __pyx_r;
8465 }
8466
8467 /* "lxml/objectify.pyx":518
8468  *     cetree.setNodeText(element._c_node, value)
8469  * 
8470  * cdef _setSlice(sliceobject, _Element target, items):             # <<<<<<<<<<<<<<
8471  *     cdef _Element parent
8472  *     cdef tree.xmlNode* c_node
8473  */
8474
8475 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_sliceobject, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
8476   struct LxmlElement *__pyx_v_parent = 0;
8477   xmlNode *__pyx_v_c_node;
8478   Py_ssize_t __pyx_v_c_step;
8479   Py_ssize_t __pyx_v_pos;
8480   PyObject *__pyx_v_del_items = 0;
8481   PyObject *__pyx_v_new_items = NULL;
8482   PyObject *__pyx_v_tag = NULL;
8483   PyObject *__pyx_v_item = NULL;
8484   struct LxmlElement *__pyx_v_new_element = NULL;
8485   PyObject *__pyx_v_replace = NULL;
8486   PyObject *__pyx_v_remove = NULL;
8487   PyObject *__pyx_v_add = NULL;
8488   PyObject *__pyx_r = NULL;
8489   __Pyx_RefNannyDeclarations
8490   int __pyx_t_1;
8491   int __pyx_t_2;
8492   Py_ssize_t __pyx_t_3;
8493   PyObject *__pyx_t_4 = NULL;
8494   PyObject *(*__pyx_t_5)(PyObject *);
8495   PyObject *__pyx_t_6 = NULL;
8496   PyObject *__pyx_t_7 = NULL;
8497   int __pyx_t_8;
8498   Py_ssize_t __pyx_t_9;
8499   Py_UCS4 __pyx_t_10;
8500   PyObject *__pyx_t_11 = NULL;
8501   PyObject *__pyx_t_12 = NULL;
8502   int __pyx_t_13;
8503   PyObject *__pyx_t_14 = NULL;
8504   xmlNode *__pyx_t_15;
8505   int __pyx_lineno = 0;
8506   const char *__pyx_filename = NULL;
8507   int __pyx_clineno = 0;
8508   __Pyx_RefNannySetupContext("_setSlice", 0);
8509
8510   /* "lxml/objectify.pyx":523
8511  *     cdef Py_ssize_t c_step, c_start, pos
8512  *     # collect existing slice
8513  *     if (<slice>sliceobject).step is None:             # <<<<<<<<<<<<<<
8514  *         c_step = 1
8515  *     else:
8516  */
8517   __pyx_t_1 = (((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->step == Py_None);
8518   __pyx_t_2 = (__pyx_t_1 != 0);
8519   if (__pyx_t_2) {
8520
8521     /* "lxml/objectify.pyx":524
8522  *     # collect existing slice
8523  *     if (<slice>sliceobject).step is None:
8524  *         c_step = 1             # <<<<<<<<<<<<<<
8525  *     else:
8526  *         c_step = (<slice>sliceobject).step
8527  */
8528     __pyx_v_c_step = 1;
8529
8530     /* "lxml/objectify.pyx":523
8531  *     cdef Py_ssize_t c_step, c_start, pos
8532  *     # collect existing slice
8533  *     if (<slice>sliceobject).step is None:             # <<<<<<<<<<<<<<
8534  *         c_step = 1
8535  *     else:
8536  */
8537     goto __pyx_L3;
8538   }
8539
8540   /* "lxml/objectify.pyx":526
8541  *         c_step = 1
8542  *     else:
8543  *         c_step = (<slice>sliceobject).step             # <<<<<<<<<<<<<<
8544  *     if c_step == 0:
8545  *         raise ValueError, u"Invalid slice"
8546  */
8547   /*else*/ {
8548     __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->step); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error)
8549     __pyx_v_c_step = __pyx_t_3;
8550   }
8551   __pyx_L3:;
8552
8553   /* "lxml/objectify.pyx":527
8554  *     else:
8555  *         c_step = (<slice>sliceobject).step
8556  *     if c_step == 0:             # <<<<<<<<<<<<<<
8557  *         raise ValueError, u"Invalid slice"
8558  *     cdef list del_items = target[sliceobject]
8559  */
8560   __pyx_t_2 = ((__pyx_v_c_step == 0) != 0);
8561   if (unlikely(__pyx_t_2)) {
8562
8563     /* "lxml/objectify.pyx":528
8564  *         c_step = (<slice>sliceobject).step
8565  *     if c_step == 0:
8566  *         raise ValueError, u"Invalid slice"             # <<<<<<<<<<<<<<
8567  *     cdef list del_items = target[sliceobject]
8568  * 
8569  */
8570     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Invalid_slice, 0, 0);
8571     __PYX_ERR(0, 528, __pyx_L1_error)
8572
8573     /* "lxml/objectify.pyx":527
8574  *     else:
8575  *         c_step = (<slice>sliceobject).step
8576  *     if c_step == 0:             # <<<<<<<<<<<<<<
8577  *         raise ValueError, u"Invalid slice"
8578  *     cdef list del_items = target[sliceobject]
8579  */
8580   }
8581
8582   /* "lxml/objectify.pyx":529
8583  *     if c_step == 0:
8584  *         raise ValueError, u"Invalid slice"
8585  *     cdef list del_items = target[sliceobject]             # <<<<<<<<<<<<<<
8586  * 
8587  *     # collect new values
8588  */
8589   __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_target), __pyx_v_sliceobject); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
8590   __Pyx_GOTREF(__pyx_t_4);
8591   if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 529, __pyx_L1_error)
8592   __pyx_v_del_items = ((PyObject*)__pyx_t_4);
8593   __pyx_t_4 = 0;
8594
8595   /* "lxml/objectify.pyx":532
8596  * 
8597  *     # collect new values
8598  *     new_items = []             # <<<<<<<<<<<<<<
8599  *     tag = target.tag
8600  *     for item in items:
8601  */
8602   __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
8603   __Pyx_GOTREF(__pyx_t_4);
8604   __pyx_v_new_items = ((PyObject*)__pyx_t_4);
8605   __pyx_t_4 = 0;
8606
8607   /* "lxml/objectify.pyx":533
8608  *     # collect new values
8609  *     new_items = []
8610  *     tag = target.tag             # <<<<<<<<<<<<<<
8611  *     for item in items:
8612  *         if isinstance(item, _Element):
8613  */
8614   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target), __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error)
8615   __Pyx_GOTREF(__pyx_t_4);
8616   __pyx_v_tag = __pyx_t_4;
8617   __pyx_t_4 = 0;
8618
8619   /* "lxml/objectify.pyx":534
8620  *     new_items = []
8621  *     tag = target.tag
8622  *     for item in items:             # <<<<<<<<<<<<<<
8623  *         if isinstance(item, _Element):
8624  *             # deep copy the new element
8625  */
8626   if (likely(PyList_CheckExact(__pyx_v_items)) || PyTuple_CheckExact(__pyx_v_items)) {
8627     __pyx_t_4 = __pyx_v_items; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = 0;
8628     __pyx_t_5 = NULL;
8629   } else {
8630     __pyx_t_3 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error)
8631     __Pyx_GOTREF(__pyx_t_4);
8632     __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
8633   }
8634   for (;;) {
8635     if (likely(!__pyx_t_5)) {
8636       if (likely(PyList_CheckExact(__pyx_t_4))) {
8637         if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_4)) break;
8638         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8639         __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8640         #else
8641         __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error)
8642         __Pyx_GOTREF(__pyx_t_6);
8643         #endif
8644       } else {
8645         if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
8646         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8647         __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
8648         #else
8649         __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error)
8650         __Pyx_GOTREF(__pyx_t_6);
8651         #endif
8652       }
8653     } else {
8654       __pyx_t_6 = __pyx_t_5(__pyx_t_4);
8655       if (unlikely(!__pyx_t_6)) {
8656         PyObject* exc_type = PyErr_Occurred();
8657         if (exc_type) {
8658           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8659           else __PYX_ERR(0, 534, __pyx_L1_error)
8660         }
8661         break;
8662       }
8663       __Pyx_GOTREF(__pyx_t_6);
8664     }
8665     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
8666     __pyx_t_6 = 0;
8667
8668     /* "lxml/objectify.pyx":535
8669  *     tag = target.tag
8670  *     for item in items:
8671  *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
8672  *             # deep copy the new element
8673  *             new_element = cetree.deepcopyNodeToDocument(
8674  */
8675     __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_item, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
8676     __pyx_t_1 = (__pyx_t_2 != 0);
8677     if (__pyx_t_1) {
8678
8679       /* "lxml/objectify.pyx":538
8680  *             # deep copy the new element
8681  *             new_element = cetree.deepcopyNodeToDocument(
8682  *                 target._doc, (<_Element>item)._c_node)             # <<<<<<<<<<<<<<
8683  *             new_element.tag = tag
8684  *         else:
8685  */
8686       __pyx_t_6 = ((PyObject *)__pyx_v_target->_doc);
8687       __Pyx_INCREF(__pyx_t_6);
8688
8689       /* "lxml/objectify.pyx":537
8690  *         if isinstance(item, _Element):
8691  *             # deep copy the new element
8692  *             new_element = cetree.deepcopyNodeToDocument(             # <<<<<<<<<<<<<<
8693  *                 target._doc, (<_Element>item)._c_node)
8694  *             new_element.tag = tag
8695  */
8696       __pyx_t_7 = ((PyObject *)deepcopyNodeToDocument(((struct LxmlDocument *)__pyx_t_6), ((struct LxmlElement *)__pyx_v_item)->_c_node)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 537, __pyx_L1_error)
8697       __Pyx_GOTREF(__pyx_t_7);
8698       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8699       __Pyx_XDECREF_SET(__pyx_v_new_element, ((struct LxmlElement *)__pyx_t_7));
8700       __pyx_t_7 = 0;
8701
8702       /* "lxml/objectify.pyx":539
8703  *             new_element = cetree.deepcopyNodeToDocument(
8704  *                 target._doc, (<_Element>item)._c_node)
8705  *             new_element.tag = tag             # <<<<<<<<<<<<<<
8706  *         else:
8707  *             new_element = cetree.makeElement(
8708  */
8709       if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_new_element), __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
8710
8711       /* "lxml/objectify.pyx":535
8712  *     tag = target.tag
8713  *     for item in items:
8714  *         if isinstance(item, _Element):             # <<<<<<<<<<<<<<
8715  *             # deep copy the new element
8716  *             new_element = cetree.deepcopyNodeToDocument(
8717  */
8718       goto __pyx_L7;
8719     }
8720
8721     /* "lxml/objectify.pyx":541
8722  *             new_element.tag = tag
8723  *         else:
8724  *             new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8725  *                 tag, target._doc, None, None, None, None, None)
8726  *             _setElementValue(new_element, item)
8727  */
8728     /*else*/ {
8729
8730       /* "lxml/objectify.pyx":542
8731  *         else:
8732  *             new_element = cetree.makeElement(
8733  *                 tag, target._doc, None, None, None, None, None)             # <<<<<<<<<<<<<<
8734  *             _setElementValue(new_element, item)
8735  *         new_items.append(new_element)
8736  */
8737       __pyx_t_7 = ((PyObject *)__pyx_v_target->_doc);
8738       __Pyx_INCREF(__pyx_t_7);
8739
8740       /* "lxml/objectify.pyx":541
8741  *             new_element.tag = tag
8742  *         else:
8743  *             new_element = cetree.makeElement(             # <<<<<<<<<<<<<<
8744  *                 tag, target._doc, None, None, None, None, None)
8745  *             _setElementValue(new_element, item)
8746  */
8747       __pyx_t_6 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)__pyx_t_7), Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 541, __pyx_L1_error)
8748       __Pyx_GOTREF(__pyx_t_6);
8749       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8750       __Pyx_XDECREF_SET(__pyx_v_new_element, ((struct LxmlElement *)__pyx_t_6));
8751       __pyx_t_6 = 0;
8752
8753       /* "lxml/objectify.pyx":543
8754  *             new_element = cetree.makeElement(
8755  *                 tag, target._doc, None, None, None, None, None)
8756  *             _setElementValue(new_element, item)             # <<<<<<<<<<<<<<
8757  *         new_items.append(new_element)
8758  * 
8759  */
8760       __pyx_t_6 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L1_error)
8761       __Pyx_GOTREF(__pyx_t_6);
8762       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8763     }
8764     __pyx_L7:;
8765
8766     /* "lxml/objectify.pyx":544
8767  *                 tag, target._doc, None, None, None, None, None)
8768  *             _setElementValue(new_element, item)
8769  *         new_items.append(new_element)             # <<<<<<<<<<<<<<
8770  * 
8771  *     # sanity check - raise what a list would raise
8772  */
8773     __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_new_items, ((PyObject *)__pyx_v_new_element)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 544, __pyx_L1_error)
8774
8775     /* "lxml/objectify.pyx":534
8776  *     new_items = []
8777  *     tag = target.tag
8778  *     for item in items:             # <<<<<<<<<<<<<<
8779  *         if isinstance(item, _Element):
8780  *             # deep copy the new element
8781  */
8782   }
8783   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8784
8785   /* "lxml/objectify.pyx":547
8786  * 
8787  *     # sanity check - raise what a list would raise
8788  *     if c_step != 1 and len(del_items) != len(new_items):             # <<<<<<<<<<<<<<
8789  *         raise ValueError, \
8790  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"
8791  */
8792   __pyx_t_2 = ((__pyx_v_c_step != 1) != 0);
8793   if (__pyx_t_2) {
8794   } else {
8795     __pyx_t_1 = __pyx_t_2;
8796     goto __pyx_L9_bool_binop_done;
8797   }
8798   if (unlikely(__pyx_v_del_items == Py_None)) {
8799     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8800     __PYX_ERR(0, 547, __pyx_L1_error)
8801   }
8802   __pyx_t_3 = PyList_GET_SIZE(__pyx_v_del_items); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 547, __pyx_L1_error)
8803   __pyx_t_9 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 547, __pyx_L1_error)
8804   __pyx_t_2 = ((__pyx_t_3 != __pyx_t_9) != 0);
8805   __pyx_t_1 = __pyx_t_2;
8806   __pyx_L9_bool_binop_done:;
8807   if (unlikely(__pyx_t_1)) {
8808
8809     /* "lxml/objectify.pyx":549
8810  *     if c_step != 1 and len(del_items) != len(new_items):
8811  *         raise ValueError, \
8812  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"             # <<<<<<<<<<<<<<
8813  * 
8814  *     # replace existing items
8815  */
8816     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error)
8817     __Pyx_GOTREF(__pyx_t_4);
8818     __pyx_t_9 = 0;
8819     __pyx_t_10 = 127;
8820     __Pyx_INCREF(__pyx_kp_u_attempt_to_assign_sequence_of_si);
8821     __pyx_t_9 += 35;
8822     __Pyx_GIVEREF(__pyx_kp_u_attempt_to_assign_sequence_of_si);
8823     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_attempt_to_assign_sequence_of_si);
8824     __pyx_t_3 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 549, __pyx_L1_error)
8825     __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_3, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 549, __pyx_L1_error)
8826     __Pyx_GOTREF(__pyx_t_6);
8827     __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
8828     __Pyx_GIVEREF(__pyx_t_6);
8829     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6);
8830     __pyx_t_6 = 0;
8831     __Pyx_INCREF(__pyx_kp_u_to_extended_slice_of_size);
8832     __pyx_t_9 += 27;
8833     __Pyx_GIVEREF(__pyx_kp_u_to_extended_slice_of_size);
8834     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_to_extended_slice_of_size);
8835     if (unlikely(__pyx_v_del_items == Py_None)) {
8836       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8837       __PYX_ERR(0, 549, __pyx_L1_error)
8838     }
8839     __pyx_t_3 = PyList_GET_SIZE(__pyx_v_del_items); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 549, __pyx_L1_error)
8840     __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_3, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 549, __pyx_L1_error)
8841     __Pyx_GOTREF(__pyx_t_6);
8842     __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
8843     __Pyx_GIVEREF(__pyx_t_6);
8844     PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_6);
8845     __pyx_t_6 = 0;
8846     __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 549, __pyx_L1_error)
8847     __Pyx_GOTREF(__pyx_t_6);
8848     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8849     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
8850     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
8851     __PYX_ERR(0, 548, __pyx_L1_error)
8852
8853     /* "lxml/objectify.pyx":547
8854  * 
8855  *     # sanity check - raise what a list would raise
8856  *     if c_step != 1 and len(del_items) != len(new_items):             # <<<<<<<<<<<<<<
8857  *         raise ValueError, \
8858  *             f"attempt to assign sequence of size {len(new_items)} to extended slice of size {len(del_items)}"
8859  */
8860   }
8861
8862   /* "lxml/objectify.pyx":552
8863  * 
8864  *     # replace existing items
8865  *     pos = 0             # <<<<<<<<<<<<<<
8866  *     parent = target.getparent()
8867  *     replace = parent.replace
8868  */
8869   __pyx_v_pos = 0;
8870
8871   /* "lxml/objectify.pyx":553
8872  *     # replace existing items
8873  *     pos = 0
8874  *     parent = target.getparent()             # <<<<<<<<<<<<<<
8875  *     replace = parent.replace
8876  *     while pos < len(new_items) and pos < len(del_items):
8877  */
8878   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_target), __pyx_n_s_getparent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error)
8879   __Pyx_GOTREF(__pyx_t_4);
8880   __pyx_t_7 = NULL;
8881   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
8882     __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
8883     if (likely(__pyx_t_7)) {
8884       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
8885       __Pyx_INCREF(__pyx_t_7);
8886       __Pyx_INCREF(function);
8887       __Pyx_DECREF_SET(__pyx_t_4, function);
8888     }
8889   }
8890   __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
8891   __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
8892   if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 553, __pyx_L1_error)
8893   __Pyx_GOTREF(__pyx_t_6);
8894   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8895   if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 553, __pyx_L1_error)
8896   __pyx_v_parent = ((struct LxmlElement *)__pyx_t_6);
8897   __pyx_t_6 = 0;
8898
8899   /* "lxml/objectify.pyx":554
8900  *     pos = 0
8901  *     parent = target.getparent()
8902  *     replace = parent.replace             # <<<<<<<<<<<<<<
8903  *     while pos < len(new_items) and pos < len(del_items):
8904  *         replace(del_items[pos], new_items[pos])
8905  */
8906   __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parent), __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 554, __pyx_L1_error)
8907   __Pyx_GOTREF(__pyx_t_6);
8908   __pyx_v_replace = __pyx_t_6;
8909   __pyx_t_6 = 0;
8910
8911   /* "lxml/objectify.pyx":555
8912  *     parent = target.getparent()
8913  *     replace = parent.replace
8914  *     while pos < len(new_items) and pos < len(del_items):             # <<<<<<<<<<<<<<
8915  *         replace(del_items[pos], new_items[pos])
8916  *         pos += 1
8917  */
8918   while (1) {
8919     __pyx_t_9 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 555, __pyx_L1_error)
8920     __pyx_t_2 = ((__pyx_v_pos < __pyx_t_9) != 0);
8921     if (__pyx_t_2) {
8922     } else {
8923       __pyx_t_1 = __pyx_t_2;
8924       goto __pyx_L13_bool_binop_done;
8925     }
8926     if (unlikely(__pyx_v_del_items == Py_None)) {
8927       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
8928       __PYX_ERR(0, 555, __pyx_L1_error)
8929     }
8930     __pyx_t_9 = PyList_GET_SIZE(__pyx_v_del_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 555, __pyx_L1_error)
8931     __pyx_t_2 = ((__pyx_v_pos < __pyx_t_9) != 0);
8932     __pyx_t_1 = __pyx_t_2;
8933     __pyx_L13_bool_binop_done:;
8934     if (!__pyx_t_1) break;
8935
8936     /* "lxml/objectify.pyx":556
8937  *     replace = parent.replace
8938  *     while pos < len(new_items) and pos < len(del_items):
8939  *         replace(del_items[pos], new_items[pos])             # <<<<<<<<<<<<<<
8940  *         pos += 1
8941  *     # remove leftover items
8942  */
8943     if (unlikely(__pyx_v_del_items == Py_None)) {
8944       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
8945       __PYX_ERR(0, 556, __pyx_L1_error)
8946     }
8947     __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_del_items, __pyx_v_pos, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error)
8948     __Pyx_GOTREF(__pyx_t_4);
8949     __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_new_items, __pyx_v_pos, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 556, __pyx_L1_error)
8950     __Pyx_GOTREF(__pyx_t_7);
8951     __Pyx_INCREF(__pyx_v_replace);
8952     __pyx_t_11 = __pyx_v_replace; __pyx_t_12 = NULL;
8953     __pyx_t_13 = 0;
8954     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
8955       __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
8956       if (likely(__pyx_t_12)) {
8957         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
8958         __Pyx_INCREF(__pyx_t_12);
8959         __Pyx_INCREF(function);
8960         __Pyx_DECREF_SET(__pyx_t_11, function);
8961         __pyx_t_13 = 1;
8962       }
8963     }
8964     #if CYTHON_FAST_PYCALL
8965     if (PyFunction_Check(__pyx_t_11)) {
8966       PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
8967       __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 556, __pyx_L1_error)
8968       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
8969       __Pyx_GOTREF(__pyx_t_6);
8970       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8971       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8972     } else
8973     #endif
8974     #if CYTHON_FAST_PYCCALL
8975     if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
8976       PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_t_4, __pyx_t_7};
8977       __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 556, __pyx_L1_error)
8978       __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
8979       __Pyx_GOTREF(__pyx_t_6);
8980       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8981       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
8982     } else
8983     #endif
8984     {
8985       __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 556, __pyx_L1_error)
8986       __Pyx_GOTREF(__pyx_t_14);
8987       if (__pyx_t_12) {
8988         __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_12); __pyx_t_12 = NULL;
8989       }
8990       __Pyx_GIVEREF(__pyx_t_4);
8991       PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_4);
8992       __Pyx_GIVEREF(__pyx_t_7);
8993       PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_7);
8994       __pyx_t_4 = 0;
8995       __pyx_t_7 = 0;
8996       __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 556, __pyx_L1_error)
8997       __Pyx_GOTREF(__pyx_t_6);
8998       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
8999     }
9000     __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9001     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9002
9003     /* "lxml/objectify.pyx":557
9004  *     while pos < len(new_items) and pos < len(del_items):
9005  *         replace(del_items[pos], new_items[pos])
9006  *         pos += 1             # <<<<<<<<<<<<<<
9007  *     # remove leftover items
9008  *     if pos < len(del_items):
9009  */
9010     __pyx_v_pos = (__pyx_v_pos + 1);
9011   }
9012
9013   /* "lxml/objectify.pyx":559
9014  *         pos += 1
9015  *     # remove leftover items
9016  *     if pos < len(del_items):             # <<<<<<<<<<<<<<
9017  *         remove = parent.remove
9018  *         while pos < len(del_items):
9019  */
9020   if (unlikely(__pyx_v_del_items == Py_None)) {
9021     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9022     __PYX_ERR(0, 559, __pyx_L1_error)
9023   }
9024   __pyx_t_9 = PyList_GET_SIZE(__pyx_v_del_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 559, __pyx_L1_error)
9025   __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9026   if (__pyx_t_1) {
9027
9028     /* "lxml/objectify.pyx":560
9029  *     # remove leftover items
9030  *     if pos < len(del_items):
9031  *         remove = parent.remove             # <<<<<<<<<<<<<<
9032  *         while pos < len(del_items):
9033  *             remove(del_items[pos])
9034  */
9035     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parent), __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 560, __pyx_L1_error)
9036     __Pyx_GOTREF(__pyx_t_6);
9037     __pyx_v_remove = __pyx_t_6;
9038     __pyx_t_6 = 0;
9039
9040     /* "lxml/objectify.pyx":561
9041  *     if pos < len(del_items):
9042  *         remove = parent.remove
9043  *         while pos < len(del_items):             # <<<<<<<<<<<<<<
9044  *             remove(del_items[pos])
9045  *             pos += 1
9046  */
9047     while (1) {
9048       if (unlikely(__pyx_v_del_items == Py_None)) {
9049         PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
9050         __PYX_ERR(0, 561, __pyx_L1_error)
9051       }
9052       __pyx_t_9 = PyList_GET_SIZE(__pyx_v_del_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 561, __pyx_L1_error)
9053       __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9054       if (!__pyx_t_1) break;
9055
9056       /* "lxml/objectify.pyx":562
9057  *         remove = parent.remove
9058  *         while pos < len(del_items):
9059  *             remove(del_items[pos])             # <<<<<<<<<<<<<<
9060  *             pos += 1
9061  *     # append remaining new items
9062  */
9063       if (unlikely(__pyx_v_del_items == Py_None)) {
9064         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
9065         __PYX_ERR(0, 562, __pyx_L1_error)
9066       }
9067       __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_del_items, __pyx_v_pos, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 562, __pyx_L1_error)
9068       __Pyx_GOTREF(__pyx_t_11);
9069       __Pyx_INCREF(__pyx_v_remove);
9070       __pyx_t_14 = __pyx_v_remove; __pyx_t_7 = NULL;
9071       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
9072         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_14);
9073         if (likely(__pyx_t_7)) {
9074           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
9075           __Pyx_INCREF(__pyx_t_7);
9076           __Pyx_INCREF(function);
9077           __Pyx_DECREF_SET(__pyx_t_14, function);
9078         }
9079       }
9080       __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_7, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_11);
9081       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
9082       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9083       if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
9084       __Pyx_GOTREF(__pyx_t_6);
9085       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9086       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9087
9088       /* "lxml/objectify.pyx":563
9089  *         while pos < len(del_items):
9090  *             remove(del_items[pos])
9091  *             pos += 1             # <<<<<<<<<<<<<<
9092  *     # append remaining new items
9093  *     if pos < len(new_items):
9094  */
9095       __pyx_v_pos = (__pyx_v_pos + 1);
9096     }
9097
9098     /* "lxml/objectify.pyx":559
9099  *         pos += 1
9100  *     # remove leftover items
9101  *     if pos < len(del_items):             # <<<<<<<<<<<<<<
9102  *         remove = parent.remove
9103  *         while pos < len(del_items):
9104  */
9105   }
9106
9107   /* "lxml/objectify.pyx":565
9108  *             pos += 1
9109  *     # append remaining new items
9110  *     if pos < len(new_items):             # <<<<<<<<<<<<<<
9111  *         # the sanity check above guarantees (step == 1)
9112  *         if pos > 0:
9113  */
9114   __pyx_t_9 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 565, __pyx_L1_error)
9115   __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9116   if (__pyx_t_1) {
9117
9118     /* "lxml/objectify.pyx":567
9119  *     if pos < len(new_items):
9120  *         # the sanity check above guarantees (step == 1)
9121  *         if pos > 0:             # <<<<<<<<<<<<<<
9122  *             item = new_items[pos-1]
9123  *         else:
9124  */
9125     __pyx_t_1 = ((__pyx_v_pos > 0) != 0);
9126     if (__pyx_t_1) {
9127
9128       /* "lxml/objectify.pyx":568
9129  *         # the sanity check above guarantees (step == 1)
9130  *         if pos > 0:
9131  *             item = new_items[pos-1]             # <<<<<<<<<<<<<<
9132  *         else:
9133  *             if (<slice>sliceobject).start > 0:
9134  */
9135       __pyx_t_9 = (__pyx_v_pos - 1);
9136       __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_new_items, __pyx_t_9, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
9137       __Pyx_GOTREF(__pyx_t_6);
9138       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6);
9139       __pyx_t_6 = 0;
9140
9141       /* "lxml/objectify.pyx":567
9142  *     if pos < len(new_items):
9143  *         # the sanity check above guarantees (step == 1)
9144  *         if pos > 0:             # <<<<<<<<<<<<<<
9145  *             item = new_items[pos-1]
9146  *         else:
9147  */
9148       goto __pyx_L19;
9149     }
9150
9151     /* "lxml/objectify.pyx":570
9152  *             item = new_items[pos-1]
9153  *         else:
9154  *             if (<slice>sliceobject).start > 0:             # <<<<<<<<<<<<<<
9155  *                 c_node = parent._c_node.children
9156  *             else:
9157  */
9158     /*else*/ {
9159       __pyx_t_6 = PyObject_RichCompare(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->start, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 570, __pyx_L1_error)
9160       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 570, __pyx_L1_error)
9161       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9162       if (__pyx_t_1) {
9163
9164         /* "lxml/objectify.pyx":571
9165  *         else:
9166  *             if (<slice>sliceobject).start > 0:
9167  *                 c_node = parent._c_node.children             # <<<<<<<<<<<<<<
9168  *             else:
9169  *                 c_node = parent._c_node.last
9170  */
9171         __pyx_t_15 = __pyx_v_parent->_c_node->children;
9172         __pyx_v_c_node = __pyx_t_15;
9173
9174         /* "lxml/objectify.pyx":570
9175  *             item = new_items[pos-1]
9176  *         else:
9177  *             if (<slice>sliceobject).start > 0:             # <<<<<<<<<<<<<<
9178  *                 c_node = parent._c_node.children
9179  *             else:
9180  */
9181         goto __pyx_L20;
9182       }
9183
9184       /* "lxml/objectify.pyx":573
9185  *                 c_node = parent._c_node.children
9186  *             else:
9187  *                 c_node = parent._c_node.last             # <<<<<<<<<<<<<<
9188  *             c_node = _findFollowingSibling(
9189  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9190  */
9191       /*else*/ {
9192         __pyx_t_15 = __pyx_v_parent->_c_node->last;
9193         __pyx_v_c_node = __pyx_t_15;
9194       }
9195       __pyx_L20:;
9196
9197       /* "lxml/objectify.pyx":576
9198  *             c_node = _findFollowingSibling(
9199  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9200  *                 (<slice>sliceobject).start - 1)             # <<<<<<<<<<<<<<
9201  *             if c_node is NULL:
9202  *                 while pos < len(new_items):
9203  */
9204       __pyx_t_6 = __Pyx_PyInt_SubtractObjC(((PySliceObject*)((PyObject*)__pyx_v_sliceobject))->start, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error)
9205       __Pyx_GOTREF(__pyx_t_6);
9206       __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L1_error)
9207       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9208
9209       /* "lxml/objectify.pyx":574
9210  *             else:
9211  *                 c_node = parent._c_node.last
9212  *             c_node = _findFollowingSibling(             # <<<<<<<<<<<<<<
9213  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9214  *                 (<slice>sliceobject).start - 1)
9215  */
9216       __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_target->_c_node), __pyx_v_target->_c_node->name, __pyx_t_9);
9217
9218       /* "lxml/objectify.pyx":577
9219  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9220  *                 (<slice>sliceobject).start - 1)
9221  *             if c_node is NULL:             # <<<<<<<<<<<<<<
9222  *                 while pos < len(new_items):
9223  *                     cetree.appendChildToElement(parent, new_items[pos])
9224  */
9225       __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
9226       if (__pyx_t_1) {
9227
9228         /* "lxml/objectify.pyx":578
9229  *                 (<slice>sliceobject).start - 1)
9230  *             if c_node is NULL:
9231  *                 while pos < len(new_items):             # <<<<<<<<<<<<<<
9232  *                     cetree.appendChildToElement(parent, new_items[pos])
9233  *                     pos += 1
9234  */
9235         while (1) {
9236           __pyx_t_9 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
9237           __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9238           if (!__pyx_t_1) break;
9239
9240           /* "lxml/objectify.pyx":579
9241  *             if c_node is NULL:
9242  *                 while pos < len(new_items):
9243  *                     cetree.appendChildToElement(parent, new_items[pos])             # <<<<<<<<<<<<<<
9244  *                     pos += 1
9245  *                 return
9246  */
9247           __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_new_items, __pyx_v_pos, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L1_error)
9248           __Pyx_GOTREF(__pyx_t_6);
9249           if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 579, __pyx_L1_error)
9250           __pyx_t_13 = appendChildToElement(__pyx_v_parent, ((struct LxmlElement *)__pyx_t_6)); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 579, __pyx_L1_error)
9251           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9252
9253           /* "lxml/objectify.pyx":580
9254  *                 while pos < len(new_items):
9255  *                     cetree.appendChildToElement(parent, new_items[pos])
9256  *                     pos += 1             # <<<<<<<<<<<<<<
9257  *                 return
9258  *             item = cetree.elementFactory(parent._doc, c_node)
9259  */
9260           __pyx_v_pos = (__pyx_v_pos + 1);
9261         }
9262
9263         /* "lxml/objectify.pyx":581
9264  *                     cetree.appendChildToElement(parent, new_items[pos])
9265  *                     pos += 1
9266  *                 return             # <<<<<<<<<<<<<<
9267  *             item = cetree.elementFactory(parent._doc, c_node)
9268  *         while pos < len(new_items):
9269  */
9270         __Pyx_XDECREF(__pyx_r);
9271         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9272         goto __pyx_L0;
9273
9274         /* "lxml/objectify.pyx":577
9275  *                 c_node, tree._getNs(target._c_node), target._c_node.name,
9276  *                 (<slice>sliceobject).start - 1)
9277  *             if c_node is NULL:             # <<<<<<<<<<<<<<
9278  *                 while pos < len(new_items):
9279  *                     cetree.appendChildToElement(parent, new_items[pos])
9280  */
9281       }
9282
9283       /* "lxml/objectify.pyx":582
9284  *                     pos += 1
9285  *                 return
9286  *             item = cetree.elementFactory(parent._doc, c_node)             # <<<<<<<<<<<<<<
9287  *         while pos < len(new_items):
9288  *             add = item.addnext
9289  */
9290       __pyx_t_6 = ((PyObject *)__pyx_v_parent->_doc);
9291       __Pyx_INCREF(__pyx_t_6);
9292       __pyx_t_14 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_6), __pyx_v_c_node)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 582, __pyx_L1_error)
9293       __Pyx_GOTREF(__pyx_t_14);
9294       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9295       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_14);
9296       __pyx_t_14 = 0;
9297     }
9298     __pyx_L19:;
9299
9300     /* "lxml/objectify.pyx":583
9301  *                 return
9302  *             item = cetree.elementFactory(parent._doc, c_node)
9303  *         while pos < len(new_items):             # <<<<<<<<<<<<<<
9304  *             add = item.addnext
9305  *             item = new_items[pos]
9306  */
9307     while (1) {
9308       __pyx_t_9 = PyList_GET_SIZE(__pyx_v_new_items); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 583, __pyx_L1_error)
9309       __pyx_t_1 = ((__pyx_v_pos < __pyx_t_9) != 0);
9310       if (!__pyx_t_1) break;
9311
9312       /* "lxml/objectify.pyx":584
9313  *             item = cetree.elementFactory(parent._doc, c_node)
9314  *         while pos < len(new_items):
9315  *             add = item.addnext             # <<<<<<<<<<<<<<
9316  *             item = new_items[pos]
9317  *             add(item)
9318  */
9319       __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_addnext); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 584, __pyx_L1_error)
9320       __Pyx_GOTREF(__pyx_t_14);
9321       __Pyx_XDECREF_SET(__pyx_v_add, __pyx_t_14);
9322       __pyx_t_14 = 0;
9323
9324       /* "lxml/objectify.pyx":585
9325  *         while pos < len(new_items):
9326  *             add = item.addnext
9327  *             item = new_items[pos]             # <<<<<<<<<<<<<<
9328  *             add(item)
9329  *             pos += 1
9330  */
9331       __pyx_t_14 = __Pyx_GetItemInt_List(__pyx_v_new_items, __pyx_v_pos, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 585, __pyx_L1_error)
9332       __Pyx_GOTREF(__pyx_t_14);
9333       __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_14);
9334       __pyx_t_14 = 0;
9335
9336       /* "lxml/objectify.pyx":586
9337  *             add = item.addnext
9338  *             item = new_items[pos]
9339  *             add(item)             # <<<<<<<<<<<<<<
9340  *             pos += 1
9341  * 
9342  */
9343       __Pyx_INCREF(__pyx_v_add);
9344       __pyx_t_6 = __pyx_v_add; __pyx_t_11 = NULL;
9345       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
9346         __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
9347         if (likely(__pyx_t_11)) {
9348           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
9349           __Pyx_INCREF(__pyx_t_11);
9350           __Pyx_INCREF(function);
9351           __Pyx_DECREF_SET(__pyx_t_6, function);
9352         }
9353       }
9354       __pyx_t_14 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_item) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_item);
9355       __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
9356       if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 586, __pyx_L1_error)
9357       __Pyx_GOTREF(__pyx_t_14);
9358       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9359       __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9360
9361       /* "lxml/objectify.pyx":587
9362  *             item = new_items[pos]
9363  *             add(item)
9364  *             pos += 1             # <<<<<<<<<<<<<<
9365  * 
9366  * ################################################################################
9367  */
9368       __pyx_v_pos = (__pyx_v_pos + 1);
9369     }
9370
9371     /* "lxml/objectify.pyx":565
9372  *             pos += 1
9373  *     # append remaining new items
9374  *     if pos < len(new_items):             # <<<<<<<<<<<<<<
9375  *         # the sanity check above guarantees (step == 1)
9376  *         if pos > 0:
9377  */
9378   }
9379
9380   /* "lxml/objectify.pyx":518
9381  *     cetree.setNodeText(element._c_node, value)
9382  * 
9383  * cdef _setSlice(sliceobject, _Element target, items):             # <<<<<<<<<<<<<<
9384  *     cdef _Element parent
9385  *     cdef tree.xmlNode* c_node
9386  */
9387
9388   /* function exit code */
9389   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9390   goto __pyx_L0;
9391   __pyx_L1_error:;
9392   __Pyx_XDECREF(__pyx_t_4);
9393   __Pyx_XDECREF(__pyx_t_6);
9394   __Pyx_XDECREF(__pyx_t_7);
9395   __Pyx_XDECREF(__pyx_t_11);
9396   __Pyx_XDECREF(__pyx_t_12);
9397   __Pyx_XDECREF(__pyx_t_14);
9398   __Pyx_AddTraceback("lxml.objectify._setSlice", __pyx_clineno, __pyx_lineno, __pyx_filename);
9399   __pyx_r = 0;
9400   __pyx_L0:;
9401   __Pyx_XDECREF((PyObject *)__pyx_v_parent);
9402   __Pyx_XDECREF(__pyx_v_del_items);
9403   __Pyx_XDECREF(__pyx_v_new_items);
9404   __Pyx_XDECREF(__pyx_v_tag);
9405   __Pyx_XDECREF(__pyx_v_item);
9406   __Pyx_XDECREF((PyObject *)__pyx_v_new_element);
9407   __Pyx_XDECREF(__pyx_v_replace);
9408   __Pyx_XDECREF(__pyx_v_remove);
9409   __Pyx_XDECREF(__pyx_v_add);
9410   __Pyx_XGIVEREF(__pyx_r);
9411   __Pyx_RefNannyFinishContext();
9412   return __pyx_r;
9413 }
9414
9415 /* "lxml/objectify.pyx":597
9416  *     """
9417  *     @property
9418  *     def pyval(self):             # <<<<<<<<<<<<<<
9419  *         return textOf(self._c_node)
9420  * 
9421  */
9422
9423 /* Python wrapper */
9424 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
9425 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(PyObject *__pyx_v_self) {
9426   PyObject *__pyx_r = 0;
9427   __Pyx_RefNannyDeclarations
9428   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9429   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9430
9431   /* function exit code */
9432   __Pyx_RefNannyFinishContext();
9433   return __pyx_r;
9434 }
9435
9436 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9437   PyObject *__pyx_r = NULL;
9438   __Pyx_RefNannyDeclarations
9439   PyObject *__pyx_t_1 = NULL;
9440   int __pyx_lineno = 0;
9441   const char *__pyx_filename = NULL;
9442   int __pyx_clineno = 0;
9443   __Pyx_RefNannySetupContext("__get__", 0);
9444
9445   /* "lxml/objectify.pyx":598
9446  *     @property
9447  *     def pyval(self):
9448  *         return textOf(self._c_node)             # <<<<<<<<<<<<<<
9449  * 
9450  *     def __str__(self):
9451  */
9452   __Pyx_XDECREF(__pyx_r);
9453   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
9454   __Pyx_GOTREF(__pyx_t_1);
9455   __pyx_r = __pyx_t_1;
9456   __pyx_t_1 = 0;
9457   goto __pyx_L0;
9458
9459   /* "lxml/objectify.pyx":597
9460  *     """
9461  *     @property
9462  *     def pyval(self):             # <<<<<<<<<<<<<<
9463  *         return textOf(self._c_node)
9464  * 
9465  */
9466
9467   /* function exit code */
9468   __pyx_L1_error:;
9469   __Pyx_XDECREF(__pyx_t_1);
9470   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9471   __pyx_r = NULL;
9472   __pyx_L0:;
9473   __Pyx_XGIVEREF(__pyx_r);
9474   __Pyx_RefNannyFinishContext();
9475   return __pyx_r;
9476 }
9477
9478 /* "lxml/objectify.pyx":600
9479  *         return textOf(self._c_node)
9480  * 
9481  *     def __str__(self):             # <<<<<<<<<<<<<<
9482  *         return textOf(self._c_node) or ''
9483  * 
9484  */
9485
9486 /* Python wrapper */
9487 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self); /*proto*/
9488 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__(PyObject *__pyx_v_self) {
9489   PyObject *__pyx_r = 0;
9490   __Pyx_RefNannyDeclarations
9491   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
9492   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9493
9494   /* function exit code */
9495   __Pyx_RefNannyFinishContext();
9496   return __pyx_r;
9497 }
9498
9499 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9500   PyObject *__pyx_r = NULL;
9501   __Pyx_RefNannyDeclarations
9502   PyObject *__pyx_t_1 = NULL;
9503   PyObject *__pyx_t_2 = NULL;
9504   int __pyx_t_3;
9505   int __pyx_lineno = 0;
9506   const char *__pyx_filename = NULL;
9507   int __pyx_clineno = 0;
9508   __Pyx_RefNannySetupContext("__str__", 0);
9509
9510   /* "lxml/objectify.pyx":601
9511  * 
9512  *     def __str__(self):
9513  *         return textOf(self._c_node) or ''             # <<<<<<<<<<<<<<
9514  * 
9515  *     def __repr__(self):
9516  */
9517   __Pyx_XDECREF(__pyx_r);
9518   __pyx_t_2 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
9519   __Pyx_GOTREF(__pyx_t_2);
9520   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
9521   if (!__pyx_t_3) {
9522     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9523   } else {
9524     __Pyx_INCREF(__pyx_t_2);
9525     __pyx_t_1 = __pyx_t_2;
9526     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9527     goto __pyx_L3_bool_binop_done;
9528   }
9529   __Pyx_INCREF(__pyx_kp_s_);
9530   __pyx_t_1 = __pyx_kp_s_;
9531   __pyx_L3_bool_binop_done:;
9532   __pyx_r = __pyx_t_1;
9533   __pyx_t_1 = 0;
9534   goto __pyx_L0;
9535
9536   /* "lxml/objectify.pyx":600
9537  *         return textOf(self._c_node)
9538  * 
9539  *     def __str__(self):             # <<<<<<<<<<<<<<
9540  *         return textOf(self._c_node) or ''
9541  * 
9542  */
9543
9544   /* function exit code */
9545   __pyx_L1_error:;
9546   __Pyx_XDECREF(__pyx_t_1);
9547   __Pyx_XDECREF(__pyx_t_2);
9548   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9549   __pyx_r = NULL;
9550   __pyx_L0:;
9551   __Pyx_XGIVEREF(__pyx_r);
9552   __Pyx_RefNannyFinishContext();
9553   return __pyx_r;
9554 }
9555
9556 /* "lxml/objectify.pyx":603
9557  *         return textOf(self._c_node) or ''
9558  * 
9559  *     def __repr__(self):             # <<<<<<<<<<<<<<
9560  *         return strrepr(textOf(self._c_node) or '')
9561  * 
9562  */
9563
9564 /* Python wrapper */
9565 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
9566 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__(PyObject *__pyx_v_self) {
9567   PyObject *__pyx_r = 0;
9568   __Pyx_RefNannyDeclarations
9569   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
9570   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self));
9571
9572   /* function exit code */
9573   __Pyx_RefNannyFinishContext();
9574   return __pyx_r;
9575 }
9576
9577 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_2__repr__(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self) {
9578   PyObject *__pyx_r = NULL;
9579   __Pyx_RefNannyDeclarations
9580   PyObject *__pyx_t_1 = NULL;
9581   PyObject *__pyx_t_2 = NULL;
9582   int __pyx_t_3;
9583   int __pyx_lineno = 0;
9584   const char *__pyx_filename = NULL;
9585   int __pyx_clineno = 0;
9586   __Pyx_RefNannySetupContext("__repr__", 0);
9587
9588   /* "lxml/objectify.pyx":604
9589  * 
9590  *     def __repr__(self):
9591  *         return strrepr(textOf(self._c_node) or '')             # <<<<<<<<<<<<<<
9592  * 
9593  *     def _setText(self, s):
9594  */
9595   __Pyx_XDECREF(__pyx_r);
9596   __pyx_t_2 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
9597   __Pyx_GOTREF(__pyx_t_2);
9598   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 604, __pyx_L1_error)
9599   if (!__pyx_t_3) {
9600     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9601   } else {
9602     __Pyx_INCREF(__pyx_t_2);
9603     __pyx_t_1 = __pyx_t_2;
9604     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9605     goto __pyx_L3_bool_binop_done;
9606   }
9607   __Pyx_INCREF(__pyx_kp_s_);
9608   __pyx_t_1 = __pyx_kp_s_;
9609   __pyx_L3_bool_binop_done:;
9610   __pyx_t_2 = __pyx_f_4lxml_9objectify_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
9611   __Pyx_GOTREF(__pyx_t_2);
9612   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9613   __pyx_r = __pyx_t_2;
9614   __pyx_t_2 = 0;
9615   goto __pyx_L0;
9616
9617   /* "lxml/objectify.pyx":603
9618  *         return textOf(self._c_node) or ''
9619  * 
9620  *     def __repr__(self):             # <<<<<<<<<<<<<<
9621  *         return strrepr(textOf(self._c_node) or '')
9622  * 
9623  */
9624
9625   /* function exit code */
9626   __pyx_L1_error:;
9627   __Pyx_XDECREF(__pyx_t_1);
9628   __Pyx_XDECREF(__pyx_t_2);
9629   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9630   __pyx_r = NULL;
9631   __pyx_L0:;
9632   __Pyx_XGIVEREF(__pyx_r);
9633   __Pyx_RefNannyFinishContext();
9634   return __pyx_r;
9635 }
9636
9637 /* "lxml/objectify.pyx":606
9638  *         return strrepr(textOf(self._c_node) or '')
9639  * 
9640  *     def _setText(self, s):             # <<<<<<<<<<<<<<
9641  *         u"""For use in subclasses only. Don't use unless you know what you are
9642  *         doing.
9643  */
9644
9645 /* Python wrapper */
9646 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
9647 static char __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText[] = "For use in subclasses only. Don't use unless you know what you are\n        doing.\n        ";
9648 static PyMethodDef __pyx_mdef_4lxml_9objectify_22ObjectifiedDataElement_5_setText = {"_setText", (PyCFunction)__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText, METH_O, __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText};
9649 static PyObject *__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
9650   PyObject *__pyx_r = 0;
9651   __Pyx_RefNannyDeclarations
9652   __Pyx_RefNannySetupContext("_setText (wrapper)", 0);
9653   __pyx_r = __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self), ((PyObject *)__pyx_v_s));
9654
9655   /* function exit code */
9656   __Pyx_RefNannyFinishContext();
9657   return __pyx_r;
9658 }
9659
9660 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_4_setText(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *__pyx_v_self, PyObject *__pyx_v_s) {
9661   PyObject *__pyx_r = NULL;
9662   __Pyx_RefNannyDeclarations
9663   int __pyx_t_1;
9664   int __pyx_lineno = 0;
9665   const char *__pyx_filename = NULL;
9666   int __pyx_clineno = 0;
9667   __Pyx_RefNannySetupContext("_setText", 0);
9668
9669   /* "lxml/objectify.pyx":610
9670  *         doing.
9671  *         """
9672  *         cetree.setNodeText(self._c_node, s)             # <<<<<<<<<<<<<<
9673  * 
9674  * cdef class NumberElement(ObjectifiedDataElement):
9675  */
9676   __pyx_t_1 = setNodeText(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._c_node, __pyx_v_s); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 610, __pyx_L1_error)
9677
9678   /* "lxml/objectify.pyx":606
9679  *         return strrepr(textOf(self._c_node) or '')
9680  * 
9681  *     def _setText(self, s):             # <<<<<<<<<<<<<<
9682  *         u"""For use in subclasses only. Don't use unless you know what you are
9683  *         doing.
9684  */
9685
9686   /* function exit code */
9687   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9688   goto __pyx_L0;
9689   __pyx_L1_error:;
9690   __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText", __pyx_clineno, __pyx_lineno, __pyx_filename);
9691   __pyx_r = NULL;
9692   __pyx_L0:;
9693   __Pyx_XGIVEREF(__pyx_r);
9694   __Pyx_RefNannyFinishContext();
9695   return __pyx_r;
9696 }
9697
9698 /* "lxml/objectify.pyx":614
9699  * cdef class NumberElement(ObjectifiedDataElement):
9700  *     cdef object _parse_value
9701  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
9702  *         u"""Set the function that parses the Python value from a string.
9703  * 
9704  */
9705
9706 /* Python wrapper */
9707 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
9708 static char __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser[] = "Set the function that parses the Python value from a string.\n\n        Do not use this unless you know what you are doing.\n        ";
9709 static PyMethodDef __pyx_mdef_4lxml_9objectify_13NumberElement_1_setValueParser = {"_setValueParser", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser, METH_O, __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser};
9710 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
9711   PyObject *__pyx_r = 0;
9712   __Pyx_RefNannyDeclarations
9713   __Pyx_RefNannySetupContext("_setValueParser (wrapper)", 0);
9714   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self), ((PyObject *)__pyx_v_function));
9715
9716   /* function exit code */
9717   __Pyx_RefNannyFinishContext();
9718   return __pyx_r;
9719 }
9720
9721 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_function) {
9722   PyObject *__pyx_r = NULL;
9723   __Pyx_RefNannyDeclarations
9724   __Pyx_RefNannySetupContext("_setValueParser", 0);
9725
9726   /* "lxml/objectify.pyx":619
9727  *         Do not use this unless you know what you are doing.
9728  *         """
9729  *         self._parse_value = function             # <<<<<<<<<<<<<<
9730  * 
9731  *     @property
9732  */
9733   __Pyx_INCREF(__pyx_v_function);
9734   __Pyx_GIVEREF(__pyx_v_function);
9735   __Pyx_GOTREF(__pyx_v_self->_parse_value);
9736   __Pyx_DECREF(__pyx_v_self->_parse_value);
9737   __pyx_v_self->_parse_value = __pyx_v_function;
9738
9739   /* "lxml/objectify.pyx":614
9740  * cdef class NumberElement(ObjectifiedDataElement):
9741  *     cdef object _parse_value
9742  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
9743  *         u"""Set the function that parses the Python value from a string.
9744  * 
9745  */
9746
9747   /* function exit code */
9748   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9749   __Pyx_XGIVEREF(__pyx_r);
9750   __Pyx_RefNannyFinishContext();
9751   return __pyx_r;
9752 }
9753
9754 /* "lxml/objectify.pyx":622
9755  * 
9756  *     @property
9757  *     def pyval(self):             # <<<<<<<<<<<<<<
9758  *         return _parseNumber(self)
9759  * 
9760  */
9761
9762 /* Python wrapper */
9763 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
9764 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(PyObject *__pyx_v_self) {
9765   PyObject *__pyx_r = 0;
9766   __Pyx_RefNannyDeclarations
9767   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9768   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9769
9770   /* function exit code */
9771   __Pyx_RefNannyFinishContext();
9772   return __pyx_r;
9773 }
9774
9775 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9776   PyObject *__pyx_r = NULL;
9777   __Pyx_RefNannyDeclarations
9778   PyObject *__pyx_t_1 = NULL;
9779   int __pyx_lineno = 0;
9780   const char *__pyx_filename = NULL;
9781   int __pyx_clineno = 0;
9782   __Pyx_RefNannySetupContext("__get__", 0);
9783
9784   /* "lxml/objectify.pyx":623
9785  *     @property
9786  *     def pyval(self):
9787  *         return _parseNumber(self)             # <<<<<<<<<<<<<<
9788  * 
9789  *     def __int__(self):
9790  */
9791   __Pyx_XDECREF(__pyx_r);
9792   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
9793   __Pyx_GOTREF(__pyx_t_1);
9794   __pyx_r = __pyx_t_1;
9795   __pyx_t_1 = 0;
9796   goto __pyx_L0;
9797
9798   /* "lxml/objectify.pyx":622
9799  * 
9800  *     @property
9801  *     def pyval(self):             # <<<<<<<<<<<<<<
9802  *         return _parseNumber(self)
9803  * 
9804  */
9805
9806   /* function exit code */
9807   __pyx_L1_error:;
9808   __Pyx_XDECREF(__pyx_t_1);
9809   __Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9810   __pyx_r = NULL;
9811   __pyx_L0:;
9812   __Pyx_XGIVEREF(__pyx_r);
9813   __Pyx_RefNannyFinishContext();
9814   return __pyx_r;
9815 }
9816
9817 /* "lxml/objectify.pyx":625
9818  *         return _parseNumber(self)
9819  * 
9820  *     def __int__(self):             # <<<<<<<<<<<<<<
9821  *         return int(_parseNumber(self))
9822  * 
9823  */
9824
9825 /* Python wrapper */
9826 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self); /*proto*/
9827 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_3__int__(PyObject *__pyx_v_self) {
9828   PyObject *__pyx_r = 0;
9829   __Pyx_RefNannyDeclarations
9830   __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
9831   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_2__int__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9832
9833   /* function exit code */
9834   __Pyx_RefNannyFinishContext();
9835   return __pyx_r;
9836 }
9837
9838 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9839   PyObject *__pyx_r = NULL;
9840   __Pyx_RefNannyDeclarations
9841   PyObject *__pyx_t_1 = NULL;
9842   PyObject *__pyx_t_2 = NULL;
9843   int __pyx_lineno = 0;
9844   const char *__pyx_filename = NULL;
9845   int __pyx_clineno = 0;
9846   __Pyx_RefNannySetupContext("__int__", 0);
9847
9848   /* "lxml/objectify.pyx":626
9849  * 
9850  *     def __int__(self):
9851  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
9852  * 
9853  *     def __long__(self):
9854  */
9855   __Pyx_XDECREF(__pyx_r);
9856   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
9857   __Pyx_GOTREF(__pyx_t_1);
9858   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
9859   __Pyx_GOTREF(__pyx_t_2);
9860   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9861   __pyx_r = __pyx_t_2;
9862   __pyx_t_2 = 0;
9863   goto __pyx_L0;
9864
9865   /* "lxml/objectify.pyx":625
9866  *         return _parseNumber(self)
9867  * 
9868  *     def __int__(self):             # <<<<<<<<<<<<<<
9869  *         return int(_parseNumber(self))
9870  * 
9871  */
9872
9873   /* function exit code */
9874   __pyx_L1_error:;
9875   __Pyx_XDECREF(__pyx_t_1);
9876   __Pyx_XDECREF(__pyx_t_2);
9877   __Pyx_AddTraceback("lxml.objectify.NumberElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9878   __pyx_r = NULL;
9879   __pyx_L0:;
9880   __Pyx_XGIVEREF(__pyx_r);
9881   __Pyx_RefNannyFinishContext();
9882   return __pyx_r;
9883 }
9884
9885 /* "lxml/objectify.pyx":628
9886  *         return int(_parseNumber(self))
9887  * 
9888  *     def __long__(self):             # <<<<<<<<<<<<<<
9889  *         return long(_parseNumber(self))
9890  * 
9891  */
9892
9893 /* Python wrapper */
9894 #if PY_MAJOR_VERSION < 3
9895 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self); /*proto*/
9896 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_5__long__(PyObject *__pyx_v_self) {
9897   PyObject *__pyx_r = 0;
9898   __Pyx_RefNannyDeclarations
9899   __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
9900   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_4__long__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9901
9902   /* function exit code */
9903   __Pyx_RefNannyFinishContext();
9904   return __pyx_r;
9905 }
9906 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
9907
9908 #if PY_MAJOR_VERSION < 3
9909 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_4__long__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9910   PyObject *__pyx_r = NULL;
9911   __Pyx_RefNannyDeclarations
9912   PyObject *__pyx_t_1 = NULL;
9913   PyObject *__pyx_t_2 = NULL;
9914   int __pyx_lineno = 0;
9915   const char *__pyx_filename = NULL;
9916   int __pyx_clineno = 0;
9917   __Pyx_RefNannySetupContext("__long__", 0);
9918
9919   /* "lxml/objectify.pyx":629
9920  * 
9921  *     def __long__(self):
9922  *         return long(_parseNumber(self))             # <<<<<<<<<<<<<<
9923  * 
9924  *     def __float__(self):
9925  */
9926   __Pyx_XDECREF(__pyx_r);
9927   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
9928   __Pyx_GOTREF(__pyx_t_1);
9929   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyLong_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error)
9930   __Pyx_GOTREF(__pyx_t_2);
9931   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9932   __pyx_r = __pyx_t_2;
9933   __pyx_t_2 = 0;
9934   goto __pyx_L0;
9935
9936   /* "lxml/objectify.pyx":628
9937  *         return int(_parseNumber(self))
9938  * 
9939  *     def __long__(self):             # <<<<<<<<<<<<<<
9940  *         return long(_parseNumber(self))
9941  * 
9942  */
9943
9944   /* function exit code */
9945   __pyx_L1_error:;
9946   __Pyx_XDECREF(__pyx_t_1);
9947   __Pyx_XDECREF(__pyx_t_2);
9948   __Pyx_AddTraceback("lxml.objectify.NumberElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9949   __pyx_r = NULL;
9950   __pyx_L0:;
9951   __Pyx_XGIVEREF(__pyx_r);
9952   __Pyx_RefNannyFinishContext();
9953   return __pyx_r;
9954 }
9955 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
9956
9957 /* "lxml/objectify.pyx":631
9958  *         return long(_parseNumber(self))
9959  * 
9960  *     def __float__(self):             # <<<<<<<<<<<<<<
9961  *         return float(_parseNumber(self))
9962  * 
9963  */
9964
9965 /* Python wrapper */
9966 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self); /*proto*/
9967 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_7__float__(PyObject *__pyx_v_self) {
9968   PyObject *__pyx_r = 0;
9969   __Pyx_RefNannyDeclarations
9970   __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
9971   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_6__float__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
9972
9973   /* function exit code */
9974   __Pyx_RefNannyFinishContext();
9975   return __pyx_r;
9976 }
9977
9978 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_6__float__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
9979   PyObject *__pyx_r = NULL;
9980   __Pyx_RefNannyDeclarations
9981   PyObject *__pyx_t_1 = NULL;
9982   PyObject *__pyx_t_2 = NULL;
9983   int __pyx_lineno = 0;
9984   const char *__pyx_filename = NULL;
9985   int __pyx_clineno = 0;
9986   __Pyx_RefNannySetupContext("__float__", 0);
9987
9988   /* "lxml/objectify.pyx":632
9989  * 
9990  *     def __float__(self):
9991  *         return float(_parseNumber(self))             # <<<<<<<<<<<<<<
9992  * 
9993  *     def __complex__(self):
9994  */
9995   __Pyx_XDECREF(__pyx_r);
9996   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
9997   __Pyx_GOTREF(__pyx_t_1);
9998   __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error)
9999   __Pyx_GOTREF(__pyx_t_2);
10000   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10001   __pyx_r = __pyx_t_2;
10002   __pyx_t_2 = 0;
10003   goto __pyx_L0;
10004
10005   /* "lxml/objectify.pyx":631
10006  *         return long(_parseNumber(self))
10007  * 
10008  *     def __float__(self):             # <<<<<<<<<<<<<<
10009  *         return float(_parseNumber(self))
10010  * 
10011  */
10012
10013   /* function exit code */
10014   __pyx_L1_error:;
10015   __Pyx_XDECREF(__pyx_t_1);
10016   __Pyx_XDECREF(__pyx_t_2);
10017   __Pyx_AddTraceback("lxml.objectify.NumberElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10018   __pyx_r = NULL;
10019   __pyx_L0:;
10020   __Pyx_XGIVEREF(__pyx_r);
10021   __Pyx_RefNannyFinishContext();
10022   return __pyx_r;
10023 }
10024
10025 /* "lxml/objectify.pyx":634
10026  *         return float(_parseNumber(self))
10027  * 
10028  *     def __complex__(self):             # <<<<<<<<<<<<<<
10029  *         return complex(_parseNumber(self))
10030  * 
10031  */
10032
10033 /* Python wrapper */
10034 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10035 static PyMethodDef __pyx_mdef_4lxml_9objectify_13NumberElement_9__complex__ = {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__, METH_NOARGS, 0};
10036 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10037   PyObject *__pyx_r = 0;
10038   __Pyx_RefNannyDeclarations
10039   __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
10040   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10041
10042   /* function exit code */
10043   __Pyx_RefNannyFinishContext();
10044   return __pyx_r;
10045 }
10046
10047 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_8__complex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10048   PyObject *__pyx_r = NULL;
10049   __Pyx_RefNannyDeclarations
10050   PyObject *__pyx_t_1 = NULL;
10051   PyObject *__pyx_t_2 = NULL;
10052   int __pyx_lineno = 0;
10053   const char *__pyx_filename = NULL;
10054   int __pyx_clineno = 0;
10055   __Pyx_RefNannySetupContext("__complex__", 0);
10056
10057   /* "lxml/objectify.pyx":635
10058  * 
10059  *     def __complex__(self):
10060  *         return complex(_parseNumber(self))             # <<<<<<<<<<<<<<
10061  * 
10062  *     def __str__(self):
10063  */
10064   __Pyx_XDECREF(__pyx_r);
10065   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
10066   __Pyx_GOTREF(__pyx_t_1);
10067   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
10068   __Pyx_GOTREF(__pyx_t_2);
10069   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10070   __pyx_r = __pyx_t_2;
10071   __pyx_t_2 = 0;
10072   goto __pyx_L0;
10073
10074   /* "lxml/objectify.pyx":634
10075  *         return float(_parseNumber(self))
10076  * 
10077  *     def __complex__(self):             # <<<<<<<<<<<<<<
10078  *         return complex(_parseNumber(self))
10079  * 
10080  */
10081
10082   /* function exit code */
10083   __pyx_L1_error:;
10084   __Pyx_XDECREF(__pyx_t_1);
10085   __Pyx_XDECREF(__pyx_t_2);
10086   __Pyx_AddTraceback("lxml.objectify.NumberElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10087   __pyx_r = NULL;
10088   __pyx_L0:;
10089   __Pyx_XGIVEREF(__pyx_r);
10090   __Pyx_RefNannyFinishContext();
10091   return __pyx_r;
10092 }
10093
10094 /* "lxml/objectify.pyx":637
10095  *         return complex(_parseNumber(self))
10096  * 
10097  *     def __str__(self):             # <<<<<<<<<<<<<<
10098  *         return unicode(_parseNumber(self))
10099  * 
10100  */
10101
10102 /* Python wrapper */
10103 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self); /*proto*/
10104 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_11__str__(PyObject *__pyx_v_self) {
10105   PyObject *__pyx_r = 0;
10106   __Pyx_RefNannyDeclarations
10107   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10108   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_10__str__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10109
10110   /* function exit code */
10111   __Pyx_RefNannyFinishContext();
10112   return __pyx_r;
10113 }
10114
10115 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_10__str__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10116   PyObject *__pyx_r = NULL;
10117   __Pyx_RefNannyDeclarations
10118   PyObject *__pyx_t_1 = NULL;
10119   PyObject *__pyx_t_2 = NULL;
10120   int __pyx_lineno = 0;
10121   const char *__pyx_filename = NULL;
10122   int __pyx_clineno = 0;
10123   __Pyx_RefNannySetupContext("__str__", 0);
10124
10125   /* "lxml/objectify.pyx":638
10126  * 
10127  *     def __str__(self):
10128  *         return unicode(_parseNumber(self))             # <<<<<<<<<<<<<<
10129  * 
10130  *     def __repr__(self):
10131  */
10132   __Pyx_XDECREF(__pyx_r);
10133   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
10134   __Pyx_GOTREF(__pyx_t_1);
10135   __pyx_t_2 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
10136   __Pyx_GOTREF(__pyx_t_2);
10137   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10138   __pyx_r = __pyx_t_2;
10139   __pyx_t_2 = 0;
10140   goto __pyx_L0;
10141
10142   /* "lxml/objectify.pyx":637
10143  *         return complex(_parseNumber(self))
10144  * 
10145  *     def __str__(self):             # <<<<<<<<<<<<<<
10146  *         return unicode(_parseNumber(self))
10147  * 
10148  */
10149
10150   /* function exit code */
10151   __pyx_L1_error:;
10152   __Pyx_XDECREF(__pyx_t_1);
10153   __Pyx_XDECREF(__pyx_t_2);
10154   __Pyx_AddTraceback("lxml.objectify.NumberElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10155   __pyx_r = NULL;
10156   __pyx_L0:;
10157   __Pyx_XGIVEREF(__pyx_r);
10158   __Pyx_RefNannyFinishContext();
10159   return __pyx_r;
10160 }
10161
10162 /* "lxml/objectify.pyx":640
10163  *         return unicode(_parseNumber(self))
10164  * 
10165  *     def __repr__(self):             # <<<<<<<<<<<<<<
10166  *         return repr(_parseNumber(self))
10167  * 
10168  */
10169
10170 /* Python wrapper */
10171 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self); /*proto*/
10172 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_13__repr__(PyObject *__pyx_v_self) {
10173   PyObject *__pyx_r = 0;
10174   __Pyx_RefNannyDeclarations
10175   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10176   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10177
10178   /* function exit code */
10179   __Pyx_RefNannyFinishContext();
10180   return __pyx_r;
10181 }
10182
10183 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_12__repr__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10184   PyObject *__pyx_r = NULL;
10185   __Pyx_RefNannyDeclarations
10186   PyObject *__pyx_t_1 = NULL;
10187   PyObject *__pyx_t_2 = NULL;
10188   int __pyx_lineno = 0;
10189   const char *__pyx_filename = NULL;
10190   int __pyx_clineno = 0;
10191   __Pyx_RefNannySetupContext("__repr__", 0);
10192
10193   /* "lxml/objectify.pyx":641
10194  * 
10195  *     def __repr__(self):
10196  *         return repr(_parseNumber(self))             # <<<<<<<<<<<<<<
10197  * 
10198  *     def __oct__(self):
10199  */
10200   __Pyx_XDECREF(__pyx_r);
10201   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
10202   __Pyx_GOTREF(__pyx_t_1);
10203   __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
10204   __Pyx_GOTREF(__pyx_t_2);
10205   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10206   __pyx_r = __pyx_t_2;
10207   __pyx_t_2 = 0;
10208   goto __pyx_L0;
10209
10210   /* "lxml/objectify.pyx":640
10211  *         return unicode(_parseNumber(self))
10212  * 
10213  *     def __repr__(self):             # <<<<<<<<<<<<<<
10214  *         return repr(_parseNumber(self))
10215  * 
10216  */
10217
10218   /* function exit code */
10219   __pyx_L1_error:;
10220   __Pyx_XDECREF(__pyx_t_1);
10221   __Pyx_XDECREF(__pyx_t_2);
10222   __Pyx_AddTraceback("lxml.objectify.NumberElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10223   __pyx_r = NULL;
10224   __pyx_L0:;
10225   __Pyx_XGIVEREF(__pyx_r);
10226   __Pyx_RefNannyFinishContext();
10227   return __pyx_r;
10228 }
10229
10230 /* "lxml/objectify.pyx":643
10231  *         return repr(_parseNumber(self))
10232  * 
10233  *     def __oct__(self):             # <<<<<<<<<<<<<<
10234  *         return oct(_parseNumber(self))
10235  * 
10236  */
10237
10238 /* Python wrapper */
10239 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10240 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self); /*proto*/
10241 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_15__oct__(PyObject *__pyx_v_self) {
10242   PyObject *__pyx_r = 0;
10243   __Pyx_RefNannyDeclarations
10244   __Pyx_RefNannySetupContext("__oct__ (wrapper)", 0);
10245   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10246
10247   /* function exit code */
10248   __Pyx_RefNannyFinishContext();
10249   return __pyx_r;
10250 }
10251 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10252
10253 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10254 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_14__oct__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10255   PyObject *__pyx_r = NULL;
10256   __Pyx_RefNannyDeclarations
10257   PyObject *__pyx_t_1 = NULL;
10258   PyObject *__pyx_t_2 = NULL;
10259   int __pyx_lineno = 0;
10260   const char *__pyx_filename = NULL;
10261   int __pyx_clineno = 0;
10262   __Pyx_RefNannySetupContext("__oct__", 0);
10263
10264   /* "lxml/objectify.pyx":644
10265  * 
10266  *     def __oct__(self):
10267  *         return oct(_parseNumber(self))             # <<<<<<<<<<<<<<
10268  * 
10269  *     def __hex__(self):
10270  */
10271   __Pyx_XDECREF(__pyx_r);
10272   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
10273   __Pyx_GOTREF(__pyx_t_1);
10274   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_oct, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
10275   __Pyx_GOTREF(__pyx_t_2);
10276   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10277   __pyx_r = __pyx_t_2;
10278   __pyx_t_2 = 0;
10279   goto __pyx_L0;
10280
10281   /* "lxml/objectify.pyx":643
10282  *         return repr(_parseNumber(self))
10283  * 
10284  *     def __oct__(self):             # <<<<<<<<<<<<<<
10285  *         return oct(_parseNumber(self))
10286  * 
10287  */
10288
10289   /* function exit code */
10290   __pyx_L1_error:;
10291   __Pyx_XDECREF(__pyx_t_1);
10292   __Pyx_XDECREF(__pyx_t_2);
10293   __Pyx_AddTraceback("lxml.objectify.NumberElement.__oct__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10294   __pyx_r = NULL;
10295   __pyx_L0:;
10296   __Pyx_XGIVEREF(__pyx_r);
10297   __Pyx_RefNannyFinishContext();
10298   return __pyx_r;
10299 }
10300 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10301
10302 /* "lxml/objectify.pyx":646
10303  *         return oct(_parseNumber(self))
10304  * 
10305  *     def __hex__(self):             # <<<<<<<<<<<<<<
10306  *         return hex(_parseNumber(self))
10307  * 
10308  */
10309
10310 /* Python wrapper */
10311 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10312 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self); /*proto*/
10313 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_17__hex__(PyObject *__pyx_v_self) {
10314   PyObject *__pyx_r = 0;
10315   __Pyx_RefNannyDeclarations
10316   __Pyx_RefNannySetupContext("__hex__ (wrapper)", 0);
10317   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10318
10319   /* function exit code */
10320   __Pyx_RefNannyFinishContext();
10321   return __pyx_r;
10322 }
10323 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10324
10325 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10326 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_16__hex__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10327   PyObject *__pyx_r = NULL;
10328   __Pyx_RefNannyDeclarations
10329   PyObject *__pyx_t_1 = NULL;
10330   PyObject *__pyx_t_2 = NULL;
10331   int __pyx_lineno = 0;
10332   const char *__pyx_filename = NULL;
10333   int __pyx_clineno = 0;
10334   __Pyx_RefNannySetupContext("__hex__", 0);
10335
10336   /* "lxml/objectify.pyx":647
10337  * 
10338  *     def __hex__(self):
10339  *         return hex(_parseNumber(self))             # <<<<<<<<<<<<<<
10340  * 
10341  *     def __richcmp__(self, other, int op):
10342  */
10343   __Pyx_XDECREF(__pyx_r);
10344   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
10345   __Pyx_GOTREF(__pyx_t_1);
10346   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
10347   __Pyx_GOTREF(__pyx_t_2);
10348   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10349   __pyx_r = __pyx_t_2;
10350   __pyx_t_2 = 0;
10351   goto __pyx_L0;
10352
10353   /* "lxml/objectify.pyx":646
10354  *         return oct(_parseNumber(self))
10355  * 
10356  *     def __hex__(self):             # <<<<<<<<<<<<<<
10357  *         return hex(_parseNumber(self))
10358  * 
10359  */
10360
10361   /* function exit code */
10362   __pyx_L1_error:;
10363   __Pyx_XDECREF(__pyx_t_1);
10364   __Pyx_XDECREF(__pyx_t_2);
10365   __Pyx_AddTraceback("lxml.objectify.NumberElement.__hex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10366   __pyx_r = NULL;
10367   __pyx_L0:;
10368   __Pyx_XGIVEREF(__pyx_r);
10369   __Pyx_RefNannyFinishContext();
10370   return __pyx_r;
10371 }
10372 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10373
10374 /* "lxml/objectify.pyx":649
10375  *         return hex(_parseNumber(self))
10376  * 
10377  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
10378  *         return _richcmpPyvals(self, other, op)
10379  * 
10380  */
10381
10382 /* Python wrapper */
10383 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
10384 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
10385   PyObject *__pyx_r = 0;
10386   __Pyx_RefNannyDeclarations
10387   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
10388   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
10389
10390   /* function exit code */
10391   __Pyx_RefNannyFinishContext();
10392   return __pyx_r;
10393 }
10394
10395 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_18__richcmp__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
10396   PyObject *__pyx_r = NULL;
10397   __Pyx_RefNannyDeclarations
10398   PyObject *__pyx_t_1 = NULL;
10399   int __pyx_lineno = 0;
10400   const char *__pyx_filename = NULL;
10401   int __pyx_clineno = 0;
10402   __Pyx_RefNannySetupContext("__richcmp__", 0);
10403
10404   /* "lxml/objectify.pyx":650
10405  * 
10406  *     def __richcmp__(self, other, int op):
10407  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
10408  * 
10409  *     def __hash__(self):
10410  */
10411   __Pyx_XDECREF(__pyx_r);
10412   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
10413   __Pyx_GOTREF(__pyx_t_1);
10414   __pyx_r = __pyx_t_1;
10415   __pyx_t_1 = 0;
10416   goto __pyx_L0;
10417
10418   /* "lxml/objectify.pyx":649
10419  *         return hex(_parseNumber(self))
10420  * 
10421  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
10422  *         return _richcmpPyvals(self, other, op)
10423  * 
10424  */
10425
10426   /* function exit code */
10427   __pyx_L1_error:;
10428   __Pyx_XDECREF(__pyx_t_1);
10429   __Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10430   __pyx_r = NULL;
10431   __pyx_L0:;
10432   __Pyx_XGIVEREF(__pyx_r);
10433   __Pyx_RefNannyFinishContext();
10434   return __pyx_r;
10435 }
10436
10437 /* "lxml/objectify.pyx":652
10438  *         return _richcmpPyvals(self, other, op)
10439  * 
10440  *     def __hash__(self):             # <<<<<<<<<<<<<<
10441  *         return hash(_parseNumber(self))
10442  * 
10443  */
10444
10445 /* Python wrapper */
10446 static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self); /*proto*/
10447 static Py_hash_t __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__(PyObject *__pyx_v_self) {
10448   Py_hash_t __pyx_r;
10449   __Pyx_RefNannyDeclarations
10450   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
10451   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
10452
10453   /* function exit code */
10454   __Pyx_RefNannyFinishContext();
10455   return __pyx_r;
10456 }
10457
10458 static Py_hash_t __pyx_pf_4lxml_9objectify_13NumberElement_20__hash__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
10459   Py_hash_t __pyx_r;
10460   __Pyx_RefNannyDeclarations
10461   PyObject *__pyx_t_1 = NULL;
10462   Py_hash_t __pyx_t_2;
10463   int __pyx_lineno = 0;
10464   const char *__pyx_filename = NULL;
10465   int __pyx_clineno = 0;
10466   __Pyx_RefNannySetupContext("__hash__", 0);
10467
10468   /* "lxml/objectify.pyx":653
10469  * 
10470  *     def __hash__(self):
10471  *         return hash(_parseNumber(self))             # <<<<<<<<<<<<<<
10472  * 
10473  *     def __add__(self, other):
10474  */
10475   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
10476   __Pyx_GOTREF(__pyx_t_1);
10477   __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 653, __pyx_L1_error)
10478   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10479   __pyx_r = __pyx_t_2;
10480   goto __pyx_L0;
10481
10482   /* "lxml/objectify.pyx":652
10483  *         return _richcmpPyvals(self, other, op)
10484  * 
10485  *     def __hash__(self):             # <<<<<<<<<<<<<<
10486  *         return hash(_parseNumber(self))
10487  * 
10488  */
10489
10490   /* function exit code */
10491   __pyx_L1_error:;
10492   __Pyx_XDECREF(__pyx_t_1);
10493   __Pyx_AddTraceback("lxml.objectify.NumberElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10494   __pyx_r = -1;
10495   __pyx_L0:;
10496   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
10497   __Pyx_RefNannyFinishContext();
10498   return __pyx_r;
10499 }
10500
10501 /* "lxml/objectify.pyx":655
10502  *         return hash(_parseNumber(self))
10503  * 
10504  *     def __add__(self, other):             # <<<<<<<<<<<<<<
10505  *         return _numericValueOf(self) + _numericValueOf(other)
10506  * 
10507  */
10508
10509 /* Python wrapper */
10510 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10511 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_23__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10512   PyObject *__pyx_r = 0;
10513   __Pyx_RefNannyDeclarations
10514   __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
10515   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_22__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10516
10517   /* function exit code */
10518   __Pyx_RefNannyFinishContext();
10519   return __pyx_r;
10520 }
10521
10522 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_22__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10523   PyObject *__pyx_r = NULL;
10524   __Pyx_RefNannyDeclarations
10525   PyObject *__pyx_t_1 = NULL;
10526   PyObject *__pyx_t_2 = NULL;
10527   PyObject *__pyx_t_3 = NULL;
10528   int __pyx_lineno = 0;
10529   const char *__pyx_filename = NULL;
10530   int __pyx_clineno = 0;
10531   __Pyx_RefNannySetupContext("__add__", 0);
10532
10533   /* "lxml/objectify.pyx":656
10534  * 
10535  *     def __add__(self, other):
10536  *         return _numericValueOf(self) + _numericValueOf(other)             # <<<<<<<<<<<<<<
10537  * 
10538  *     def __sub__(self, other):
10539  */
10540   __Pyx_XDECREF(__pyx_r);
10541   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
10542   __Pyx_GOTREF(__pyx_t_1);
10543   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
10544   __Pyx_GOTREF(__pyx_t_2);
10545   __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
10546   __Pyx_GOTREF(__pyx_t_3);
10547   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10548   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10549   __pyx_r = __pyx_t_3;
10550   __pyx_t_3 = 0;
10551   goto __pyx_L0;
10552
10553   /* "lxml/objectify.pyx":655
10554  *         return hash(_parseNumber(self))
10555  * 
10556  *     def __add__(self, other):             # <<<<<<<<<<<<<<
10557  *         return _numericValueOf(self) + _numericValueOf(other)
10558  * 
10559  */
10560
10561   /* function exit code */
10562   __pyx_L1_error:;
10563   __Pyx_XDECREF(__pyx_t_1);
10564   __Pyx_XDECREF(__pyx_t_2);
10565   __Pyx_XDECREF(__pyx_t_3);
10566   __Pyx_AddTraceback("lxml.objectify.NumberElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10567   __pyx_r = NULL;
10568   __pyx_L0:;
10569   __Pyx_XGIVEREF(__pyx_r);
10570   __Pyx_RefNannyFinishContext();
10571   return __pyx_r;
10572 }
10573
10574 /* "lxml/objectify.pyx":658
10575  *         return _numericValueOf(self) + _numericValueOf(other)
10576  * 
10577  *     def __sub__(self, other):             # <<<<<<<<<<<<<<
10578  *         return _numericValueOf(self) - _numericValueOf(other)
10579  * 
10580  */
10581
10582 /* Python wrapper */
10583 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10584 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_25__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10585   PyObject *__pyx_r = 0;
10586   __Pyx_RefNannyDeclarations
10587   __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
10588   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10589
10590   /* function exit code */
10591   __Pyx_RefNannyFinishContext();
10592   return __pyx_r;
10593 }
10594
10595 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_24__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10596   PyObject *__pyx_r = NULL;
10597   __Pyx_RefNannyDeclarations
10598   PyObject *__pyx_t_1 = NULL;
10599   PyObject *__pyx_t_2 = NULL;
10600   PyObject *__pyx_t_3 = NULL;
10601   int __pyx_lineno = 0;
10602   const char *__pyx_filename = NULL;
10603   int __pyx_clineno = 0;
10604   __Pyx_RefNannySetupContext("__sub__", 0);
10605
10606   /* "lxml/objectify.pyx":659
10607  * 
10608  *     def __sub__(self, other):
10609  *         return _numericValueOf(self) - _numericValueOf(other)             # <<<<<<<<<<<<<<
10610  * 
10611  *     def __mul__(self, other):
10612  */
10613   __Pyx_XDECREF(__pyx_r);
10614   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
10615   __Pyx_GOTREF(__pyx_t_1);
10616   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
10617   __Pyx_GOTREF(__pyx_t_2);
10618   __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
10619   __Pyx_GOTREF(__pyx_t_3);
10620   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10621   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10622   __pyx_r = __pyx_t_3;
10623   __pyx_t_3 = 0;
10624   goto __pyx_L0;
10625
10626   /* "lxml/objectify.pyx":658
10627  *         return _numericValueOf(self) + _numericValueOf(other)
10628  * 
10629  *     def __sub__(self, other):             # <<<<<<<<<<<<<<
10630  *         return _numericValueOf(self) - _numericValueOf(other)
10631  * 
10632  */
10633
10634   /* function exit code */
10635   __pyx_L1_error:;
10636   __Pyx_XDECREF(__pyx_t_1);
10637   __Pyx_XDECREF(__pyx_t_2);
10638   __Pyx_XDECREF(__pyx_t_3);
10639   __Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10640   __pyx_r = NULL;
10641   __pyx_L0:;
10642   __Pyx_XGIVEREF(__pyx_r);
10643   __Pyx_RefNannyFinishContext();
10644   return __pyx_r;
10645 }
10646
10647 /* "lxml/objectify.pyx":661
10648  *         return _numericValueOf(self) - _numericValueOf(other)
10649  * 
10650  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
10651  *         return _numericValueOf(self) * _numericValueOf(other)
10652  * 
10653  */
10654
10655 /* Python wrapper */
10656 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10657 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_27__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10658   PyObject *__pyx_r = 0;
10659   __Pyx_RefNannyDeclarations
10660   __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
10661   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10662
10663   /* function exit code */
10664   __Pyx_RefNannyFinishContext();
10665   return __pyx_r;
10666 }
10667
10668 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_26__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10669   PyObject *__pyx_r = NULL;
10670   __Pyx_RefNannyDeclarations
10671   PyObject *__pyx_t_1 = NULL;
10672   PyObject *__pyx_t_2 = NULL;
10673   PyObject *__pyx_t_3 = NULL;
10674   int __pyx_lineno = 0;
10675   const char *__pyx_filename = NULL;
10676   int __pyx_clineno = 0;
10677   __Pyx_RefNannySetupContext("__mul__", 0);
10678
10679   /* "lxml/objectify.pyx":662
10680  * 
10681  *     def __mul__(self, other):
10682  *         return _numericValueOf(self) * _numericValueOf(other)             # <<<<<<<<<<<<<<
10683  * 
10684  *     def __div__(self, other):
10685  */
10686   __Pyx_XDECREF(__pyx_r);
10687   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
10688   __Pyx_GOTREF(__pyx_t_1);
10689   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
10690   __Pyx_GOTREF(__pyx_t_2);
10691   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
10692   __Pyx_GOTREF(__pyx_t_3);
10693   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10694   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10695   __pyx_r = __pyx_t_3;
10696   __pyx_t_3 = 0;
10697   goto __pyx_L0;
10698
10699   /* "lxml/objectify.pyx":661
10700  *         return _numericValueOf(self) - _numericValueOf(other)
10701  * 
10702  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
10703  *         return _numericValueOf(self) * _numericValueOf(other)
10704  * 
10705  */
10706
10707   /* function exit code */
10708   __pyx_L1_error:;
10709   __Pyx_XDECREF(__pyx_t_1);
10710   __Pyx_XDECREF(__pyx_t_2);
10711   __Pyx_XDECREF(__pyx_t_3);
10712   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10713   __pyx_r = NULL;
10714   __pyx_L0:;
10715   __Pyx_XGIVEREF(__pyx_r);
10716   __Pyx_RefNannyFinishContext();
10717   return __pyx_r;
10718 }
10719
10720 /* "lxml/objectify.pyx":664
10721  *         return _numericValueOf(self) * _numericValueOf(other)
10722  * 
10723  *     def __div__(self, other):             # <<<<<<<<<<<<<<
10724  *         return _numericValueOf(self) / _numericValueOf(other)
10725  * 
10726  */
10727
10728 /* Python wrapper */
10729 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10730 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10731 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_29__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10732   PyObject *__pyx_r = 0;
10733   __Pyx_RefNannyDeclarations
10734   __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
10735   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_28__div__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10736
10737   /* function exit code */
10738   __Pyx_RefNannyFinishContext();
10739   return __pyx_r;
10740 }
10741 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10742
10743 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
10744 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_28__div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10745   PyObject *__pyx_r = NULL;
10746   __Pyx_RefNannyDeclarations
10747   PyObject *__pyx_t_1 = NULL;
10748   PyObject *__pyx_t_2 = NULL;
10749   PyObject *__pyx_t_3 = NULL;
10750   int __pyx_lineno = 0;
10751   const char *__pyx_filename = NULL;
10752   int __pyx_clineno = 0;
10753   __Pyx_RefNannySetupContext("__div__", 0);
10754
10755   /* "lxml/objectify.pyx":665
10756  * 
10757  *     def __div__(self, other):
10758  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
10759  * 
10760  *     def __truediv__(self, other):
10761  */
10762   __Pyx_XDECREF(__pyx_r);
10763   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
10764   __Pyx_GOTREF(__pyx_t_1);
10765   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
10766   __Pyx_GOTREF(__pyx_t_2);
10767   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 665, __pyx_L1_error)
10768   __Pyx_GOTREF(__pyx_t_3);
10769   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10770   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10771   __pyx_r = __pyx_t_3;
10772   __pyx_t_3 = 0;
10773   goto __pyx_L0;
10774
10775   /* "lxml/objectify.pyx":664
10776  *         return _numericValueOf(self) * _numericValueOf(other)
10777  * 
10778  *     def __div__(self, other):             # <<<<<<<<<<<<<<
10779  *         return _numericValueOf(self) / _numericValueOf(other)
10780  * 
10781  */
10782
10783   /* function exit code */
10784   __pyx_L1_error:;
10785   __Pyx_XDECREF(__pyx_t_1);
10786   __Pyx_XDECREF(__pyx_t_2);
10787   __Pyx_XDECREF(__pyx_t_3);
10788   __Pyx_AddTraceback("lxml.objectify.NumberElement.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10789   __pyx_r = NULL;
10790   __pyx_L0:;
10791   __Pyx_XGIVEREF(__pyx_r);
10792   __Pyx_RefNannyFinishContext();
10793   return __pyx_r;
10794 }
10795 #endif /*!(#if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000))*/
10796
10797 /* "lxml/objectify.pyx":667
10798  *         return _numericValueOf(self) / _numericValueOf(other)
10799  * 
10800  *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
10801  *         return _numericValueOf(self) / _numericValueOf(other)
10802  * 
10803  */
10804
10805 /* Python wrapper */
10806 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10807 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10808   PyObject *__pyx_r = 0;
10809   __Pyx_RefNannyDeclarations
10810   __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
10811   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10812
10813   /* function exit code */
10814   __Pyx_RefNannyFinishContext();
10815   return __pyx_r;
10816 }
10817
10818 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_30__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10819   PyObject *__pyx_r = NULL;
10820   __Pyx_RefNannyDeclarations
10821   PyObject *__pyx_t_1 = NULL;
10822   PyObject *__pyx_t_2 = NULL;
10823   PyObject *__pyx_t_3 = NULL;
10824   int __pyx_lineno = 0;
10825   const char *__pyx_filename = NULL;
10826   int __pyx_clineno = 0;
10827   __Pyx_RefNannySetupContext("__truediv__", 0);
10828
10829   /* "lxml/objectify.pyx":668
10830  * 
10831  *     def __truediv__(self, other):
10832  *         return _numericValueOf(self) / _numericValueOf(other)             # <<<<<<<<<<<<<<
10833  * 
10834  *     def __mod__(self, other):
10835  */
10836   __Pyx_XDECREF(__pyx_r);
10837   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
10838   __Pyx_GOTREF(__pyx_t_1);
10839   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
10840   __Pyx_GOTREF(__pyx_t_2);
10841   __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
10842   __Pyx_GOTREF(__pyx_t_3);
10843   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10844   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10845   __pyx_r = __pyx_t_3;
10846   __pyx_t_3 = 0;
10847   goto __pyx_L0;
10848
10849   /* "lxml/objectify.pyx":667
10850  *         return _numericValueOf(self) / _numericValueOf(other)
10851  * 
10852  *     def __truediv__(self, other):             # <<<<<<<<<<<<<<
10853  *         return _numericValueOf(self) / _numericValueOf(other)
10854  * 
10855  */
10856
10857   /* function exit code */
10858   __pyx_L1_error:;
10859   __Pyx_XDECREF(__pyx_t_1);
10860   __Pyx_XDECREF(__pyx_t_2);
10861   __Pyx_XDECREF(__pyx_t_3);
10862   __Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10863   __pyx_r = NULL;
10864   __pyx_L0:;
10865   __Pyx_XGIVEREF(__pyx_r);
10866   __Pyx_RefNannyFinishContext();
10867   return __pyx_r;
10868 }
10869
10870 /* "lxml/objectify.pyx":670
10871  *         return _numericValueOf(self) / _numericValueOf(other)
10872  * 
10873  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
10874  *         return _numericValueOf(self) % _numericValueOf(other)
10875  * 
10876  */
10877
10878 /* Python wrapper */
10879 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
10880 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_33__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10881   PyObject *__pyx_r = 0;
10882   __Pyx_RefNannyDeclarations
10883   __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
10884   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
10885
10886   /* function exit code */
10887   __Pyx_RefNannyFinishContext();
10888   return __pyx_r;
10889 }
10890
10891 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_32__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
10892   PyObject *__pyx_r = NULL;
10893   __Pyx_RefNannyDeclarations
10894   PyObject *__pyx_t_1 = NULL;
10895   PyObject *__pyx_t_2 = NULL;
10896   PyObject *__pyx_t_3 = NULL;
10897   int __pyx_lineno = 0;
10898   const char *__pyx_filename = NULL;
10899   int __pyx_clineno = 0;
10900   __Pyx_RefNannySetupContext("__mod__", 0);
10901
10902   /* "lxml/objectify.pyx":671
10903  * 
10904  *     def __mod__(self, other):
10905  *         return _numericValueOf(self) % _numericValueOf(other)             # <<<<<<<<<<<<<<
10906  * 
10907  *     def __pow__(self, other, modulo):
10908  */
10909   __Pyx_XDECREF(__pyx_r);
10910   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
10911   __Pyx_GOTREF(__pyx_t_1);
10912   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
10913   __Pyx_GOTREF(__pyx_t_2);
10914   __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 671, __pyx_L1_error)
10915   __Pyx_GOTREF(__pyx_t_3);
10916   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10917   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10918   __pyx_r = __pyx_t_3;
10919   __pyx_t_3 = 0;
10920   goto __pyx_L0;
10921
10922   /* "lxml/objectify.pyx":670
10923  *         return _numericValueOf(self) / _numericValueOf(other)
10924  * 
10925  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
10926  *         return _numericValueOf(self) % _numericValueOf(other)
10927  * 
10928  */
10929
10930   /* function exit code */
10931   __pyx_L1_error:;
10932   __Pyx_XDECREF(__pyx_t_1);
10933   __Pyx_XDECREF(__pyx_t_2);
10934   __Pyx_XDECREF(__pyx_t_3);
10935   __Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10936   __pyx_r = NULL;
10937   __pyx_L0:;
10938   __Pyx_XGIVEREF(__pyx_r);
10939   __Pyx_RefNannyFinishContext();
10940   return __pyx_r;
10941 }
10942
10943 /* "lxml/objectify.pyx":673
10944  *         return _numericValueOf(self) % _numericValueOf(other)
10945  * 
10946  *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
10947  *         if modulo is None:
10948  *             return _numericValueOf(self) ** _numericValueOf(other)
10949  */
10950
10951 /* Python wrapper */
10952 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
10953 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_35__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
10954   PyObject *__pyx_r = 0;
10955   __Pyx_RefNannyDeclarations
10956   __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
10957   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_modulo));
10958
10959   /* function exit code */
10960   __Pyx_RefNannyFinishContext();
10961   return __pyx_r;
10962 }
10963
10964 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_34__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
10965   PyObject *__pyx_r = NULL;
10966   __Pyx_RefNannyDeclarations
10967   int __pyx_t_1;
10968   int __pyx_t_2;
10969   PyObject *__pyx_t_3 = NULL;
10970   PyObject *__pyx_t_4 = NULL;
10971   PyObject *__pyx_t_5 = NULL;
10972   int __pyx_lineno = 0;
10973   const char *__pyx_filename = NULL;
10974   int __pyx_clineno = 0;
10975   __Pyx_RefNannySetupContext("__pow__", 0);
10976
10977   /* "lxml/objectify.pyx":674
10978  * 
10979  *     def __pow__(self, other, modulo):
10980  *         if modulo is None:             # <<<<<<<<<<<<<<
10981  *             return _numericValueOf(self) ** _numericValueOf(other)
10982  *         else:
10983  */
10984   __pyx_t_1 = (__pyx_v_modulo == Py_None);
10985   __pyx_t_2 = (__pyx_t_1 != 0);
10986   if (__pyx_t_2) {
10987
10988     /* "lxml/objectify.pyx":675
10989  *     def __pow__(self, other, modulo):
10990  *         if modulo is None:
10991  *             return _numericValueOf(self) ** _numericValueOf(other)             # <<<<<<<<<<<<<<
10992  *         else:
10993  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
10994  */
10995     __Pyx_XDECREF(__pyx_r);
10996     __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
10997     __Pyx_GOTREF(__pyx_t_3);
10998     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error)
10999     __Pyx_GOTREF(__pyx_t_4);
11000     __pyx_t_5 = PyNumber_Power(__pyx_t_3, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error)
11001     __Pyx_GOTREF(__pyx_t_5);
11002     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11003     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11004     __pyx_r = __pyx_t_5;
11005     __pyx_t_5 = 0;
11006     goto __pyx_L0;
11007
11008     /* "lxml/objectify.pyx":674
11009  * 
11010  *     def __pow__(self, other, modulo):
11011  *         if modulo is None:             # <<<<<<<<<<<<<<
11012  *             return _numericValueOf(self) ** _numericValueOf(other)
11013  *         else:
11014  */
11015   }
11016
11017   /* "lxml/objectify.pyx":677
11018  *             return _numericValueOf(self) ** _numericValueOf(other)
11019  *         else:
11020  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)             # <<<<<<<<<<<<<<
11021  * 
11022  *     def __neg__(self):
11023  */
11024   /*else*/ {
11025     __Pyx_XDECREF(__pyx_r);
11026     __pyx_t_5 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
11027     __Pyx_GOTREF(__pyx_t_5);
11028     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
11029     __Pyx_GOTREF(__pyx_t_4);
11030     __pyx_t_3 = PyNumber_Power(__pyx_t_5, __pyx_t_4, __pyx_v_modulo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
11031     __Pyx_GOTREF(__pyx_t_3);
11032     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11033     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11034     __pyx_r = __pyx_t_3;
11035     __pyx_t_3 = 0;
11036     goto __pyx_L0;
11037   }
11038
11039   /* "lxml/objectify.pyx":673
11040  *         return _numericValueOf(self) % _numericValueOf(other)
11041  * 
11042  *     def __pow__(self, other, modulo):             # <<<<<<<<<<<<<<
11043  *         if modulo is None:
11044  *             return _numericValueOf(self) ** _numericValueOf(other)
11045  */
11046
11047   /* function exit code */
11048   __pyx_L1_error:;
11049   __Pyx_XDECREF(__pyx_t_3);
11050   __Pyx_XDECREF(__pyx_t_4);
11051   __Pyx_XDECREF(__pyx_t_5);
11052   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11053   __pyx_r = NULL;
11054   __pyx_L0:;
11055   __Pyx_XGIVEREF(__pyx_r);
11056   __Pyx_RefNannyFinishContext();
11057   return __pyx_r;
11058 }
11059
11060 /* "lxml/objectify.pyx":679
11061  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
11062  * 
11063  *     def __neg__(self):             # <<<<<<<<<<<<<<
11064  *         return - _numericValueOf(self)
11065  * 
11066  */
11067
11068 /* Python wrapper */
11069 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self); /*proto*/
11070 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_37__neg__(PyObject *__pyx_v_self) {
11071   PyObject *__pyx_r = 0;
11072   __Pyx_RefNannyDeclarations
11073   __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
11074   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11075
11076   /* function exit code */
11077   __Pyx_RefNannyFinishContext();
11078   return __pyx_r;
11079 }
11080
11081 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_36__neg__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11082   PyObject *__pyx_r = NULL;
11083   __Pyx_RefNannyDeclarations
11084   PyObject *__pyx_t_1 = NULL;
11085   PyObject *__pyx_t_2 = NULL;
11086   int __pyx_lineno = 0;
11087   const char *__pyx_filename = NULL;
11088   int __pyx_clineno = 0;
11089   __Pyx_RefNannySetupContext("__neg__", 0);
11090
11091   /* "lxml/objectify.pyx":680
11092  * 
11093  *     def __neg__(self):
11094  *         return - _numericValueOf(self)             # <<<<<<<<<<<<<<
11095  * 
11096  *     def __pos__(self):
11097  */
11098   __Pyx_XDECREF(__pyx_r);
11099   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
11100   __Pyx_GOTREF(__pyx_t_1);
11101   __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
11102   __Pyx_GOTREF(__pyx_t_2);
11103   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11104   __pyx_r = __pyx_t_2;
11105   __pyx_t_2 = 0;
11106   goto __pyx_L0;
11107
11108   /* "lxml/objectify.pyx":679
11109  *             return pow(_numericValueOf(self), _numericValueOf(other), modulo)
11110  * 
11111  *     def __neg__(self):             # <<<<<<<<<<<<<<
11112  *         return - _numericValueOf(self)
11113  * 
11114  */
11115
11116   /* function exit code */
11117   __pyx_L1_error:;
11118   __Pyx_XDECREF(__pyx_t_1);
11119   __Pyx_XDECREF(__pyx_t_2);
11120   __Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11121   __pyx_r = NULL;
11122   __pyx_L0:;
11123   __Pyx_XGIVEREF(__pyx_r);
11124   __Pyx_RefNannyFinishContext();
11125   return __pyx_r;
11126 }
11127
11128 /* "lxml/objectify.pyx":682
11129  *         return - _numericValueOf(self)
11130  * 
11131  *     def __pos__(self):             # <<<<<<<<<<<<<<
11132  *         return + _numericValueOf(self)
11133  * 
11134  */
11135
11136 /* Python wrapper */
11137 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self); /*proto*/
11138 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_39__pos__(PyObject *__pyx_v_self) {
11139   PyObject *__pyx_r = 0;
11140   __Pyx_RefNannyDeclarations
11141   __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
11142   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11143
11144   /* function exit code */
11145   __Pyx_RefNannyFinishContext();
11146   return __pyx_r;
11147 }
11148
11149 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_38__pos__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11150   PyObject *__pyx_r = NULL;
11151   __Pyx_RefNannyDeclarations
11152   PyObject *__pyx_t_1 = NULL;
11153   PyObject *__pyx_t_2 = NULL;
11154   int __pyx_lineno = 0;
11155   const char *__pyx_filename = NULL;
11156   int __pyx_clineno = 0;
11157   __Pyx_RefNannySetupContext("__pos__", 0);
11158
11159   /* "lxml/objectify.pyx":683
11160  * 
11161  *     def __pos__(self):
11162  *         return + _numericValueOf(self)             # <<<<<<<<<<<<<<
11163  * 
11164  *     def __abs__(self):
11165  */
11166   __Pyx_XDECREF(__pyx_r);
11167   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
11168   __Pyx_GOTREF(__pyx_t_1);
11169   __pyx_t_2 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error)
11170   __Pyx_GOTREF(__pyx_t_2);
11171   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11172   __pyx_r = __pyx_t_2;
11173   __pyx_t_2 = 0;
11174   goto __pyx_L0;
11175
11176   /* "lxml/objectify.pyx":682
11177  *         return - _numericValueOf(self)
11178  * 
11179  *     def __pos__(self):             # <<<<<<<<<<<<<<
11180  *         return + _numericValueOf(self)
11181  * 
11182  */
11183
11184   /* function exit code */
11185   __pyx_L1_error:;
11186   __Pyx_XDECREF(__pyx_t_1);
11187   __Pyx_XDECREF(__pyx_t_2);
11188   __Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11189   __pyx_r = NULL;
11190   __pyx_L0:;
11191   __Pyx_XGIVEREF(__pyx_r);
11192   __Pyx_RefNannyFinishContext();
11193   return __pyx_r;
11194 }
11195
11196 /* "lxml/objectify.pyx":685
11197  *         return + _numericValueOf(self)
11198  * 
11199  *     def __abs__(self):             # <<<<<<<<<<<<<<
11200  *         return abs( _numericValueOf(self) )
11201  * 
11202  */
11203
11204 /* Python wrapper */
11205 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self); /*proto*/
11206 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_41__abs__(PyObject *__pyx_v_self) {
11207   PyObject *__pyx_r = 0;
11208   __Pyx_RefNannyDeclarations
11209   __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
11210   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11211
11212   /* function exit code */
11213   __Pyx_RefNannyFinishContext();
11214   return __pyx_r;
11215 }
11216
11217 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_40__abs__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11218   PyObject *__pyx_r = NULL;
11219   __Pyx_RefNannyDeclarations
11220   PyObject *__pyx_t_1 = NULL;
11221   PyObject *__pyx_t_2 = NULL;
11222   int __pyx_lineno = 0;
11223   const char *__pyx_filename = NULL;
11224   int __pyx_clineno = 0;
11225   __Pyx_RefNannySetupContext("__abs__", 0);
11226
11227   /* "lxml/objectify.pyx":686
11228  * 
11229  *     def __abs__(self):
11230  *         return abs( _numericValueOf(self) )             # <<<<<<<<<<<<<<
11231  * 
11232  *     def __nonzero__(self):
11233  */
11234   __Pyx_XDECREF(__pyx_r);
11235   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
11236   __Pyx_GOTREF(__pyx_t_1);
11237   __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
11238   __Pyx_GOTREF(__pyx_t_2);
11239   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11240   __pyx_r = __pyx_t_2;
11241   __pyx_t_2 = 0;
11242   goto __pyx_L0;
11243
11244   /* "lxml/objectify.pyx":685
11245  *         return + _numericValueOf(self)
11246  * 
11247  *     def __abs__(self):             # <<<<<<<<<<<<<<
11248  *         return abs( _numericValueOf(self) )
11249  * 
11250  */
11251
11252   /* function exit code */
11253   __pyx_L1_error:;
11254   __Pyx_XDECREF(__pyx_t_1);
11255   __Pyx_XDECREF(__pyx_t_2);
11256   __Pyx_AddTraceback("lxml.objectify.NumberElement.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11257   __pyx_r = NULL;
11258   __pyx_L0:;
11259   __Pyx_XGIVEREF(__pyx_r);
11260   __Pyx_RefNannyFinishContext();
11261   return __pyx_r;
11262 }
11263
11264 /* "lxml/objectify.pyx":688
11265  *         return abs( _numericValueOf(self) )
11266  * 
11267  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
11268  *         return bool(_numericValueOf(self))
11269  * 
11270  */
11271
11272 /* Python wrapper */
11273 static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self); /*proto*/
11274 static int __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__(PyObject *__pyx_v_self) {
11275   int __pyx_r;
11276   __Pyx_RefNannyDeclarations
11277   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
11278   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11279
11280   /* function exit code */
11281   __Pyx_RefNannyFinishContext();
11282   return __pyx_r;
11283 }
11284
11285 static int __pyx_pf_4lxml_9objectify_13NumberElement_42__nonzero__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11286   int __pyx_r;
11287   __Pyx_RefNannyDeclarations
11288   PyObject *__pyx_t_1 = NULL;
11289   int __pyx_t_2;
11290   int __pyx_lineno = 0;
11291   const char *__pyx_filename = NULL;
11292   int __pyx_clineno = 0;
11293   __Pyx_RefNannySetupContext("__nonzero__", 0);
11294
11295   /* "lxml/objectify.pyx":689
11296  * 
11297  *     def __nonzero__(self):
11298  *         return bool(_numericValueOf(self))             # <<<<<<<<<<<<<<
11299  * 
11300  *     def __invert__(self):
11301  */
11302   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
11303   __Pyx_GOTREF(__pyx_t_1);
11304   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 689, __pyx_L1_error)
11305   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11306   __pyx_r = (!(!__pyx_t_2));
11307   goto __pyx_L0;
11308
11309   /* "lxml/objectify.pyx":688
11310  *         return abs( _numericValueOf(self) )
11311  * 
11312  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
11313  *         return bool(_numericValueOf(self))
11314  * 
11315  */
11316
11317   /* function exit code */
11318   __pyx_L1_error:;
11319   __Pyx_XDECREF(__pyx_t_1);
11320   __Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11321   __pyx_r = -1;
11322   __pyx_L0:;
11323   __Pyx_RefNannyFinishContext();
11324   return __pyx_r;
11325 }
11326
11327 /* "lxml/objectify.pyx":691
11328  *         return bool(_numericValueOf(self))
11329  * 
11330  *     def __invert__(self):             # <<<<<<<<<<<<<<
11331  *         return ~ _numericValueOf(self)
11332  * 
11333  */
11334
11335 /* Python wrapper */
11336 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self); /*proto*/
11337 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_45__invert__(PyObject *__pyx_v_self) {
11338   PyObject *__pyx_r = 0;
11339   __Pyx_RefNannyDeclarations
11340   __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
11341   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self));
11342
11343   /* function exit code */
11344   __Pyx_RefNannyFinishContext();
11345   return __pyx_r;
11346 }
11347
11348 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_44__invert__(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_self) {
11349   PyObject *__pyx_r = NULL;
11350   __Pyx_RefNannyDeclarations
11351   PyObject *__pyx_t_1 = NULL;
11352   PyObject *__pyx_t_2 = NULL;
11353   int __pyx_lineno = 0;
11354   const char *__pyx_filename = NULL;
11355   int __pyx_clineno = 0;
11356   __Pyx_RefNannySetupContext("__invert__", 0);
11357
11358   /* "lxml/objectify.pyx":692
11359  * 
11360  *     def __invert__(self):
11361  *         return ~ _numericValueOf(self)             # <<<<<<<<<<<<<<
11362  * 
11363  *     def __lshift__(self, other):
11364  */
11365   __Pyx_XDECREF(__pyx_r);
11366   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
11367   __Pyx_GOTREF(__pyx_t_1);
11368   __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
11369   __Pyx_GOTREF(__pyx_t_2);
11370   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11371   __pyx_r = __pyx_t_2;
11372   __pyx_t_2 = 0;
11373   goto __pyx_L0;
11374
11375   /* "lxml/objectify.pyx":691
11376  *         return bool(_numericValueOf(self))
11377  * 
11378  *     def __invert__(self):             # <<<<<<<<<<<<<<
11379  *         return ~ _numericValueOf(self)
11380  * 
11381  */
11382
11383   /* function exit code */
11384   __pyx_L1_error:;
11385   __Pyx_XDECREF(__pyx_t_1);
11386   __Pyx_XDECREF(__pyx_t_2);
11387   __Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11388   __pyx_r = NULL;
11389   __pyx_L0:;
11390   __Pyx_XGIVEREF(__pyx_r);
11391   __Pyx_RefNannyFinishContext();
11392   return __pyx_r;
11393 }
11394
11395 /* "lxml/objectify.pyx":694
11396  *         return ~ _numericValueOf(self)
11397  * 
11398  *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
11399  *         return _numericValueOf(self) << _numericValueOf(other)
11400  * 
11401  */
11402
11403 /* Python wrapper */
11404 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11405 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11406   PyObject *__pyx_r = 0;
11407   __Pyx_RefNannyDeclarations
11408   __Pyx_RefNannySetupContext("__lshift__ (wrapper)", 0);
11409   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11410
11411   /* function exit code */
11412   __Pyx_RefNannyFinishContext();
11413   return __pyx_r;
11414 }
11415
11416 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_46__lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11417   PyObject *__pyx_r = NULL;
11418   __Pyx_RefNannyDeclarations
11419   PyObject *__pyx_t_1 = NULL;
11420   PyObject *__pyx_t_2 = NULL;
11421   PyObject *__pyx_t_3 = NULL;
11422   int __pyx_lineno = 0;
11423   const char *__pyx_filename = NULL;
11424   int __pyx_clineno = 0;
11425   __Pyx_RefNannySetupContext("__lshift__", 0);
11426
11427   /* "lxml/objectify.pyx":695
11428  * 
11429  *     def __lshift__(self, other):
11430  *         return _numericValueOf(self) << _numericValueOf(other)             # <<<<<<<<<<<<<<
11431  * 
11432  *     def __rshift__(self, other):
11433  */
11434   __Pyx_XDECREF(__pyx_r);
11435   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L1_error)
11436   __Pyx_GOTREF(__pyx_t_1);
11437   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
11438   __Pyx_GOTREF(__pyx_t_2);
11439   __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error)
11440   __Pyx_GOTREF(__pyx_t_3);
11441   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11442   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11443   __pyx_r = __pyx_t_3;
11444   __pyx_t_3 = 0;
11445   goto __pyx_L0;
11446
11447   /* "lxml/objectify.pyx":694
11448  *         return ~ _numericValueOf(self)
11449  * 
11450  *     def __lshift__(self, other):             # <<<<<<<<<<<<<<
11451  *         return _numericValueOf(self) << _numericValueOf(other)
11452  * 
11453  */
11454
11455   /* function exit code */
11456   __pyx_L1_error:;
11457   __Pyx_XDECREF(__pyx_t_1);
11458   __Pyx_XDECREF(__pyx_t_2);
11459   __Pyx_XDECREF(__pyx_t_3);
11460   __Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11461   __pyx_r = NULL;
11462   __pyx_L0:;
11463   __Pyx_XGIVEREF(__pyx_r);
11464   __Pyx_RefNannyFinishContext();
11465   return __pyx_r;
11466 }
11467
11468 /* "lxml/objectify.pyx":697
11469  *         return _numericValueOf(self) << _numericValueOf(other)
11470  * 
11471  *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
11472  *         return _numericValueOf(self) >> _numericValueOf(other)
11473  * 
11474  */
11475
11476 /* Python wrapper */
11477 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11478 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11479   PyObject *__pyx_r = 0;
11480   __Pyx_RefNannyDeclarations
11481   __Pyx_RefNannySetupContext("__rshift__ (wrapper)", 0);
11482   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11483
11484   /* function exit code */
11485   __Pyx_RefNannyFinishContext();
11486   return __pyx_r;
11487 }
11488
11489 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_48__rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11490   PyObject *__pyx_r = NULL;
11491   __Pyx_RefNannyDeclarations
11492   PyObject *__pyx_t_1 = NULL;
11493   PyObject *__pyx_t_2 = NULL;
11494   PyObject *__pyx_t_3 = NULL;
11495   int __pyx_lineno = 0;
11496   const char *__pyx_filename = NULL;
11497   int __pyx_clineno = 0;
11498   __Pyx_RefNannySetupContext("__rshift__", 0);
11499
11500   /* "lxml/objectify.pyx":698
11501  * 
11502  *     def __rshift__(self, other):
11503  *         return _numericValueOf(self) >> _numericValueOf(other)             # <<<<<<<<<<<<<<
11504  * 
11505  *     def __and__(self, other):
11506  */
11507   __Pyx_XDECREF(__pyx_r);
11508   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
11509   __Pyx_GOTREF(__pyx_t_1);
11510   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
11511   __Pyx_GOTREF(__pyx_t_2);
11512   __pyx_t_3 = PyNumber_Rshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error)
11513   __Pyx_GOTREF(__pyx_t_3);
11514   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11515   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11516   __pyx_r = __pyx_t_3;
11517   __pyx_t_3 = 0;
11518   goto __pyx_L0;
11519
11520   /* "lxml/objectify.pyx":697
11521  *         return _numericValueOf(self) << _numericValueOf(other)
11522  * 
11523  *     def __rshift__(self, other):             # <<<<<<<<<<<<<<
11524  *         return _numericValueOf(self) >> _numericValueOf(other)
11525  * 
11526  */
11527
11528   /* function exit code */
11529   __pyx_L1_error:;
11530   __Pyx_XDECREF(__pyx_t_1);
11531   __Pyx_XDECREF(__pyx_t_2);
11532   __Pyx_XDECREF(__pyx_t_3);
11533   __Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11534   __pyx_r = NULL;
11535   __pyx_L0:;
11536   __Pyx_XGIVEREF(__pyx_r);
11537   __Pyx_RefNannyFinishContext();
11538   return __pyx_r;
11539 }
11540
11541 /* "lxml/objectify.pyx":700
11542  *         return _numericValueOf(self) >> _numericValueOf(other)
11543  * 
11544  *     def __and__(self, other):             # <<<<<<<<<<<<<<
11545  *         return _numericValueOf(self) & _numericValueOf(other)
11546  * 
11547  */
11548
11549 /* Python wrapper */
11550 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11551 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_51__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11552   PyObject *__pyx_r = 0;
11553   __Pyx_RefNannyDeclarations
11554   __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
11555   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_50__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11556
11557   /* function exit code */
11558   __Pyx_RefNannyFinishContext();
11559   return __pyx_r;
11560 }
11561
11562 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_50__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11563   PyObject *__pyx_r = NULL;
11564   __Pyx_RefNannyDeclarations
11565   PyObject *__pyx_t_1 = NULL;
11566   PyObject *__pyx_t_2 = NULL;
11567   PyObject *__pyx_t_3 = NULL;
11568   int __pyx_lineno = 0;
11569   const char *__pyx_filename = NULL;
11570   int __pyx_clineno = 0;
11571   __Pyx_RefNannySetupContext("__and__", 0);
11572
11573   /* "lxml/objectify.pyx":701
11574  * 
11575  *     def __and__(self, other):
11576  *         return _numericValueOf(self) & _numericValueOf(other)             # <<<<<<<<<<<<<<
11577  * 
11578  *     def __or__(self, other):
11579  */
11580   __Pyx_XDECREF(__pyx_r);
11581   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
11582   __Pyx_GOTREF(__pyx_t_1);
11583   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
11584   __Pyx_GOTREF(__pyx_t_2);
11585   __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error)
11586   __Pyx_GOTREF(__pyx_t_3);
11587   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11588   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11589   __pyx_r = __pyx_t_3;
11590   __pyx_t_3 = 0;
11591   goto __pyx_L0;
11592
11593   /* "lxml/objectify.pyx":700
11594  *         return _numericValueOf(self) >> _numericValueOf(other)
11595  * 
11596  *     def __and__(self, other):             # <<<<<<<<<<<<<<
11597  *         return _numericValueOf(self) & _numericValueOf(other)
11598  * 
11599  */
11600
11601   /* function exit code */
11602   __pyx_L1_error:;
11603   __Pyx_XDECREF(__pyx_t_1);
11604   __Pyx_XDECREF(__pyx_t_2);
11605   __Pyx_XDECREF(__pyx_t_3);
11606   __Pyx_AddTraceback("lxml.objectify.NumberElement.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11607   __pyx_r = NULL;
11608   __pyx_L0:;
11609   __Pyx_XGIVEREF(__pyx_r);
11610   __Pyx_RefNannyFinishContext();
11611   return __pyx_r;
11612 }
11613
11614 /* "lxml/objectify.pyx":703
11615  *         return _numericValueOf(self) & _numericValueOf(other)
11616  * 
11617  *     def __or__(self, other):             # <<<<<<<<<<<<<<
11618  *         return _numericValueOf(self) | _numericValueOf(other)
11619  * 
11620  */
11621
11622 /* Python wrapper */
11623 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11624 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_53__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11625   PyObject *__pyx_r = 0;
11626   __Pyx_RefNannyDeclarations
11627   __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
11628   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_52__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11629
11630   /* function exit code */
11631   __Pyx_RefNannyFinishContext();
11632   return __pyx_r;
11633 }
11634
11635 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_52__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11636   PyObject *__pyx_r = NULL;
11637   __Pyx_RefNannyDeclarations
11638   PyObject *__pyx_t_1 = NULL;
11639   PyObject *__pyx_t_2 = NULL;
11640   PyObject *__pyx_t_3 = NULL;
11641   int __pyx_lineno = 0;
11642   const char *__pyx_filename = NULL;
11643   int __pyx_clineno = 0;
11644   __Pyx_RefNannySetupContext("__or__", 0);
11645
11646   /* "lxml/objectify.pyx":704
11647  * 
11648  *     def __or__(self, other):
11649  *         return _numericValueOf(self) | _numericValueOf(other)             # <<<<<<<<<<<<<<
11650  * 
11651  *     def __xor__(self, other):
11652  */
11653   __Pyx_XDECREF(__pyx_r);
11654   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
11655   __Pyx_GOTREF(__pyx_t_1);
11656   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error)
11657   __Pyx_GOTREF(__pyx_t_2);
11658   __pyx_t_3 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L1_error)
11659   __Pyx_GOTREF(__pyx_t_3);
11660   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11661   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11662   __pyx_r = __pyx_t_3;
11663   __pyx_t_3 = 0;
11664   goto __pyx_L0;
11665
11666   /* "lxml/objectify.pyx":703
11667  *         return _numericValueOf(self) & _numericValueOf(other)
11668  * 
11669  *     def __or__(self, other):             # <<<<<<<<<<<<<<
11670  *         return _numericValueOf(self) | _numericValueOf(other)
11671  * 
11672  */
11673
11674   /* function exit code */
11675   __pyx_L1_error:;
11676   __Pyx_XDECREF(__pyx_t_1);
11677   __Pyx_XDECREF(__pyx_t_2);
11678   __Pyx_XDECREF(__pyx_t_3);
11679   __Pyx_AddTraceback("lxml.objectify.NumberElement.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11680   __pyx_r = NULL;
11681   __pyx_L0:;
11682   __Pyx_XGIVEREF(__pyx_r);
11683   __Pyx_RefNannyFinishContext();
11684   return __pyx_r;
11685 }
11686
11687 /* "lxml/objectify.pyx":706
11688  *         return _numericValueOf(self) | _numericValueOf(other)
11689  * 
11690  *     def __xor__(self, other):             # <<<<<<<<<<<<<<
11691  *         return _numericValueOf(self) ^ _numericValueOf(other)
11692  * 
11693  */
11694
11695 /* Python wrapper */
11696 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
11697 static PyObject *__pyx_pw_4lxml_9objectify_13NumberElement_55__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11698   PyObject *__pyx_r = 0;
11699   __Pyx_RefNannyDeclarations
11700   __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
11701   __pyx_r = __pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
11702
11703   /* function exit code */
11704   __Pyx_RefNannyFinishContext();
11705   return __pyx_r;
11706 }
11707
11708 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_54__xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
11709   PyObject *__pyx_r = NULL;
11710   __Pyx_RefNannyDeclarations
11711   PyObject *__pyx_t_1 = NULL;
11712   PyObject *__pyx_t_2 = NULL;
11713   PyObject *__pyx_t_3 = NULL;
11714   int __pyx_lineno = 0;
11715   const char *__pyx_filename = NULL;
11716   int __pyx_clineno = 0;
11717   __Pyx_RefNannySetupContext("__xor__", 0);
11718
11719   /* "lxml/objectify.pyx":707
11720  * 
11721  *     def __xor__(self, other):
11722  *         return _numericValueOf(self) ^ _numericValueOf(other)             # <<<<<<<<<<<<<<
11723  * 
11724  * cdef class IntElement(NumberElement):
11725  */
11726   __Pyx_XDECREF(__pyx_r);
11727   __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
11728   __Pyx_GOTREF(__pyx_t_1);
11729   __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
11730   __Pyx_GOTREF(__pyx_t_2);
11731   __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
11732   __Pyx_GOTREF(__pyx_t_3);
11733   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11734   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11735   __pyx_r = __pyx_t_3;
11736   __pyx_t_3 = 0;
11737   goto __pyx_L0;
11738
11739   /* "lxml/objectify.pyx":706
11740  *         return _numericValueOf(self) | _numericValueOf(other)
11741  * 
11742  *     def __xor__(self, other):             # <<<<<<<<<<<<<<
11743  *         return _numericValueOf(self) ^ _numericValueOf(other)
11744  * 
11745  */
11746
11747   /* function exit code */
11748   __pyx_L1_error:;
11749   __Pyx_XDECREF(__pyx_t_1);
11750   __Pyx_XDECREF(__pyx_t_2);
11751   __Pyx_XDECREF(__pyx_t_3);
11752   __Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11753   __pyx_r = NULL;
11754   __pyx_L0:;
11755   __Pyx_XGIVEREF(__pyx_r);
11756   __Pyx_RefNannyFinishContext();
11757   return __pyx_r;
11758 }
11759
11760 /* "lxml/objectify.pyx":710
11761  * 
11762  * cdef class IntElement(NumberElement):
11763  *     def _init(self):             # <<<<<<<<<<<<<<
11764  *         self._parse_value = int
11765  * 
11766  */
11767
11768 /* Python wrapper */
11769 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11770 static PyMethodDef __pyx_mdef_4lxml_9objectify_10IntElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_10IntElement_1_init, METH_NOARGS, 0};
11771 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11772   PyObject *__pyx_r = 0;
11773   __Pyx_RefNannyDeclarations
11774   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
11775   __pyx_r = __pyx_pf_4lxml_9objectify_10IntElement__init(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self));
11776
11777   /* function exit code */
11778   __Pyx_RefNannyFinishContext();
11779   return __pyx_r;
11780 }
11781
11782 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self) {
11783   PyObject *__pyx_r = NULL;
11784   __Pyx_RefNannyDeclarations
11785   __Pyx_RefNannySetupContext("_init", 0);
11786
11787   /* "lxml/objectify.pyx":711
11788  * cdef class IntElement(NumberElement):
11789  *     def _init(self):
11790  *         self._parse_value = int             # <<<<<<<<<<<<<<
11791  * 
11792  *     def __index__(self):
11793  */
11794   __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
11795   __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
11796   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
11797   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
11798   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyInt_Type));
11799
11800   /* "lxml/objectify.pyx":710
11801  * 
11802  * cdef class IntElement(NumberElement):
11803  *     def _init(self):             # <<<<<<<<<<<<<<
11804  *         self._parse_value = int
11805  * 
11806  */
11807
11808   /* function exit code */
11809   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11810   __Pyx_XGIVEREF(__pyx_r);
11811   __Pyx_RefNannyFinishContext();
11812   return __pyx_r;
11813 }
11814
11815 /* "lxml/objectify.pyx":713
11816  *         self._parse_value = int
11817  * 
11818  *     def __index__(self):             # <<<<<<<<<<<<<<
11819  *         return int(_parseNumber(self))
11820  * 
11821  */
11822
11823 /* Python wrapper */
11824 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_3__index__(PyObject *__pyx_v_self); /*proto*/
11825 static PyObject *__pyx_pw_4lxml_9objectify_10IntElement_3__index__(PyObject *__pyx_v_self) {
11826   PyObject *__pyx_r = 0;
11827   __Pyx_RefNannyDeclarations
11828   __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
11829   __pyx_r = __pyx_pf_4lxml_9objectify_10IntElement_2__index__(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self));
11830
11831   /* function exit code */
11832   __Pyx_RefNannyFinishContext();
11833   return __pyx_r;
11834 }
11835
11836 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement_2__index__(struct __pyx_obj_4lxml_9objectify_IntElement *__pyx_v_self) {
11837   PyObject *__pyx_r = NULL;
11838   __Pyx_RefNannyDeclarations
11839   PyObject *__pyx_t_1 = NULL;
11840   PyObject *__pyx_t_2 = NULL;
11841   int __pyx_lineno = 0;
11842   const char *__pyx_filename = NULL;
11843   int __pyx_clineno = 0;
11844   __Pyx_RefNannySetupContext("__index__", 0);
11845
11846   /* "lxml/objectify.pyx":714
11847  * 
11848  *     def __index__(self):
11849  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
11850  * 
11851  * cdef class LongElement(NumberElement):
11852  */
11853   __Pyx_XDECREF(__pyx_r);
11854   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
11855   __Pyx_GOTREF(__pyx_t_1);
11856   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
11857   __Pyx_GOTREF(__pyx_t_2);
11858   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11859   __pyx_r = __pyx_t_2;
11860   __pyx_t_2 = 0;
11861   goto __pyx_L0;
11862
11863   /* "lxml/objectify.pyx":713
11864  *         self._parse_value = int
11865  * 
11866  *     def __index__(self):             # <<<<<<<<<<<<<<
11867  *         return int(_parseNumber(self))
11868  * 
11869  */
11870
11871   /* function exit code */
11872   __pyx_L1_error:;
11873   __Pyx_XDECREF(__pyx_t_1);
11874   __Pyx_XDECREF(__pyx_t_2);
11875   __Pyx_AddTraceback("lxml.objectify.IntElement.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11876   __pyx_r = NULL;
11877   __pyx_L0:;
11878   __Pyx_XGIVEREF(__pyx_r);
11879   __Pyx_RefNannyFinishContext();
11880   return __pyx_r;
11881 }
11882
11883 /* "lxml/objectify.pyx":717
11884  * 
11885  * cdef class LongElement(NumberElement):
11886  *     def _init(self):             # <<<<<<<<<<<<<<
11887  *         self._parse_value = long
11888  * 
11889  */
11890
11891 /* Python wrapper */
11892 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11893 static PyMethodDef __pyx_mdef_4lxml_9objectify_11LongElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11LongElement_1_init, METH_NOARGS, 0};
11894 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11895   PyObject *__pyx_r = 0;
11896   __Pyx_RefNannyDeclarations
11897   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
11898   __pyx_r = __pyx_pf_4lxml_9objectify_11LongElement__init(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self));
11899
11900   /* function exit code */
11901   __Pyx_RefNannyFinishContext();
11902   return __pyx_r;
11903 }
11904
11905 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self) {
11906   PyObject *__pyx_r = NULL;
11907   __Pyx_RefNannyDeclarations
11908   __Pyx_RefNannySetupContext("_init", 0);
11909
11910   /* "lxml/objectify.pyx":718
11911  * cdef class LongElement(NumberElement):
11912  *     def _init(self):
11913  *         self._parse_value = long             # <<<<<<<<<<<<<<
11914  * 
11915  *     def __index__(self):
11916  */
11917   __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
11918   __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
11919   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
11920   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
11921   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyLong_Type));
11922
11923   /* "lxml/objectify.pyx":717
11924  * 
11925  * cdef class LongElement(NumberElement):
11926  *     def _init(self):             # <<<<<<<<<<<<<<
11927  *         self._parse_value = long
11928  * 
11929  */
11930
11931   /* function exit code */
11932   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11933   __Pyx_XGIVEREF(__pyx_r);
11934   __Pyx_RefNannyFinishContext();
11935   return __pyx_r;
11936 }
11937
11938 /* "lxml/objectify.pyx":720
11939  *         self._parse_value = long
11940  * 
11941  *     def __index__(self):             # <<<<<<<<<<<<<<
11942  *         return int(_parseNumber(self))
11943  * 
11944  */
11945
11946 /* Python wrapper */
11947 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_3__index__(PyObject *__pyx_v_self); /*proto*/
11948 static PyObject *__pyx_pw_4lxml_9objectify_11LongElement_3__index__(PyObject *__pyx_v_self) {
11949   PyObject *__pyx_r = 0;
11950   __Pyx_RefNannyDeclarations
11951   __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
11952   __pyx_r = __pyx_pf_4lxml_9objectify_11LongElement_2__index__(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self));
11953
11954   /* function exit code */
11955   __Pyx_RefNannyFinishContext();
11956   return __pyx_r;
11957 }
11958
11959 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement_2__index__(struct __pyx_obj_4lxml_9objectify_LongElement *__pyx_v_self) {
11960   PyObject *__pyx_r = NULL;
11961   __Pyx_RefNannyDeclarations
11962   PyObject *__pyx_t_1 = NULL;
11963   PyObject *__pyx_t_2 = NULL;
11964   int __pyx_lineno = 0;
11965   const char *__pyx_filename = NULL;
11966   int __pyx_clineno = 0;
11967   __Pyx_RefNannySetupContext("__index__", 0);
11968
11969   /* "lxml/objectify.pyx":721
11970  * 
11971  *     def __index__(self):
11972  *         return int(_parseNumber(self))             # <<<<<<<<<<<<<<
11973  * 
11974  * cdef class FloatElement(NumberElement):
11975  */
11976   __Pyx_XDECREF(__pyx_r);
11977   __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
11978   __Pyx_GOTREF(__pyx_t_1);
11979   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
11980   __Pyx_GOTREF(__pyx_t_2);
11981   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11982   __pyx_r = __pyx_t_2;
11983   __pyx_t_2 = 0;
11984   goto __pyx_L0;
11985
11986   /* "lxml/objectify.pyx":720
11987  *         self._parse_value = long
11988  * 
11989  *     def __index__(self):             # <<<<<<<<<<<<<<
11990  *         return int(_parseNumber(self))
11991  * 
11992  */
11993
11994   /* function exit code */
11995   __pyx_L1_error:;
11996   __Pyx_XDECREF(__pyx_t_1);
11997   __Pyx_XDECREF(__pyx_t_2);
11998   __Pyx_AddTraceback("lxml.objectify.LongElement.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11999   __pyx_r = NULL;
12000   __pyx_L0:;
12001   __Pyx_XGIVEREF(__pyx_r);
12002   __Pyx_RefNannyFinishContext();
12003   return __pyx_r;
12004 }
12005
12006 /* "lxml/objectify.pyx":724
12007  * 
12008  * cdef class FloatElement(NumberElement):
12009  *     def _init(self):             # <<<<<<<<<<<<<<
12010  *         self._parse_value = float
12011  * 
12012  */
12013
12014 /* Python wrapper */
12015 static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12016 static PyMethodDef __pyx_mdef_4lxml_9objectify_12FloatElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_12FloatElement_1_init, METH_NOARGS, 0};
12017 static PyObject *__pyx_pw_4lxml_9objectify_12FloatElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12018   PyObject *__pyx_r = 0;
12019   __Pyx_RefNannyDeclarations
12020   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
12021   __pyx_r = __pyx_pf_4lxml_9objectify_12FloatElement__init(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self));
12022
12023   /* function exit code */
12024   __Pyx_RefNannyFinishContext();
12025   return __pyx_r;
12026 }
12027
12028 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj_4lxml_9objectify_FloatElement *__pyx_v_self) {
12029   PyObject *__pyx_r = NULL;
12030   __Pyx_RefNannyDeclarations
12031   __Pyx_RefNannySetupContext("_init", 0);
12032
12033   /* "lxml/objectify.pyx":725
12034  * cdef class FloatElement(NumberElement):
12035  *     def _init(self):
12036  *         self._parse_value = float             # <<<<<<<<<<<<<<
12037  * 
12038  * cdef class StringElement(ObjectifiedDataElement):
12039  */
12040   __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
12041   __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
12042   __Pyx_GOTREF(__pyx_v_self->__pyx_base._parse_value);
12043   __Pyx_DECREF(__pyx_v_self->__pyx_base._parse_value);
12044   __pyx_v_self->__pyx_base._parse_value = ((PyObject *)(&PyFloat_Type));
12045
12046   /* "lxml/objectify.pyx":724
12047  * 
12048  * cdef class FloatElement(NumberElement):
12049  *     def _init(self):             # <<<<<<<<<<<<<<
12050  *         self._parse_value = float
12051  * 
12052  */
12053
12054   /* function exit code */
12055   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12056   __Pyx_XGIVEREF(__pyx_r);
12057   __Pyx_RefNannyFinishContext();
12058   return __pyx_r;
12059 }
12060
12061 /* "lxml/objectify.pyx":735
12062  *     """
12063  *     @property
12064  *     def pyval(self):             # <<<<<<<<<<<<<<
12065  *         return textOf(self._c_node) or u''
12066  * 
12067  */
12068
12069 /* Python wrapper */
12070 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
12071 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(PyObject *__pyx_v_self) {
12072   PyObject *__pyx_r = 0;
12073   __Pyx_RefNannyDeclarations
12074   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
12075   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12076
12077   /* function exit code */
12078   __Pyx_RefNannyFinishContext();
12079   return __pyx_r;
12080 }
12081
12082 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12083   PyObject *__pyx_r = NULL;
12084   __Pyx_RefNannyDeclarations
12085   PyObject *__pyx_t_1 = NULL;
12086   PyObject *__pyx_t_2 = NULL;
12087   int __pyx_t_3;
12088   int __pyx_lineno = 0;
12089   const char *__pyx_filename = NULL;
12090   int __pyx_clineno = 0;
12091   __Pyx_RefNannySetupContext("__get__", 0);
12092
12093   /* "lxml/objectify.pyx":736
12094  *     @property
12095  *     def pyval(self):
12096  *         return textOf(self._c_node) or u''             # <<<<<<<<<<<<<<
12097  * 
12098  *     def __repr__(self):
12099  */
12100   __Pyx_XDECREF(__pyx_r);
12101   __pyx_t_2 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
12102   __Pyx_GOTREF(__pyx_t_2);
12103   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 736, __pyx_L1_error)
12104   if (!__pyx_t_3) {
12105     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12106   } else {
12107     __Pyx_INCREF(__pyx_t_2);
12108     __pyx_t_1 = __pyx_t_2;
12109     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12110     goto __pyx_L3_bool_binop_done;
12111   }
12112   __Pyx_INCREF(__pyx_kp_u_);
12113   __pyx_t_1 = __pyx_kp_u_;
12114   __pyx_L3_bool_binop_done:;
12115   __pyx_r = __pyx_t_1;
12116   __pyx_t_1 = 0;
12117   goto __pyx_L0;
12118
12119   /* "lxml/objectify.pyx":735
12120  *     """
12121  *     @property
12122  *     def pyval(self):             # <<<<<<<<<<<<<<
12123  *         return textOf(self._c_node) or u''
12124  * 
12125  */
12126
12127   /* function exit code */
12128   __pyx_L1_error:;
12129   __Pyx_XDECREF(__pyx_t_1);
12130   __Pyx_XDECREF(__pyx_t_2);
12131   __Pyx_AddTraceback("lxml.objectify.StringElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12132   __pyx_r = NULL;
12133   __pyx_L0:;
12134   __Pyx_XGIVEREF(__pyx_r);
12135   __Pyx_RefNannyFinishContext();
12136   return __pyx_r;
12137 }
12138
12139 /* "lxml/objectify.pyx":738
12140  *         return textOf(self._c_node) or u''
12141  * 
12142  *     def __repr__(self):             # <<<<<<<<<<<<<<
12143  *         return repr(textOf(self._c_node) or u'')
12144  * 
12145  */
12146
12147 /* Python wrapper */
12148 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self); /*proto*/
12149 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_1__repr__(PyObject *__pyx_v_self) {
12150   PyObject *__pyx_r = 0;
12151   __Pyx_RefNannyDeclarations
12152   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
12153   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement___repr__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12154
12155   /* function exit code */
12156   __Pyx_RefNannyFinishContext();
12157   return __pyx_r;
12158 }
12159
12160 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12161   PyObject *__pyx_r = NULL;
12162   __Pyx_RefNannyDeclarations
12163   PyObject *__pyx_t_1 = NULL;
12164   PyObject *__pyx_t_2 = NULL;
12165   int __pyx_t_3;
12166   int __pyx_lineno = 0;
12167   const char *__pyx_filename = NULL;
12168   int __pyx_clineno = 0;
12169   __Pyx_RefNannySetupContext("__repr__", 0);
12170
12171   /* "lxml/objectify.pyx":739
12172  * 
12173  *     def __repr__(self):
12174  *         return repr(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
12175  * 
12176  *     def strlen(self):
12177  */
12178   __Pyx_XDECREF(__pyx_r);
12179   __pyx_t_2 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
12180   __Pyx_GOTREF(__pyx_t_2);
12181   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 739, __pyx_L1_error)
12182   if (!__pyx_t_3) {
12183     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12184   } else {
12185     __Pyx_INCREF(__pyx_t_2);
12186     __pyx_t_1 = __pyx_t_2;
12187     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12188     goto __pyx_L3_bool_binop_done;
12189   }
12190   __Pyx_INCREF(__pyx_kp_u_);
12191   __pyx_t_1 = __pyx_kp_u_;
12192   __pyx_L3_bool_binop_done:;
12193   __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error)
12194   __Pyx_GOTREF(__pyx_t_2);
12195   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12196   __pyx_r = __pyx_t_2;
12197   __pyx_t_2 = 0;
12198   goto __pyx_L0;
12199
12200   /* "lxml/objectify.pyx":738
12201  *         return textOf(self._c_node) or u''
12202  * 
12203  *     def __repr__(self):             # <<<<<<<<<<<<<<
12204  *         return repr(textOf(self._c_node) or u'')
12205  * 
12206  */
12207
12208   /* function exit code */
12209   __pyx_L1_error:;
12210   __Pyx_XDECREF(__pyx_t_1);
12211   __Pyx_XDECREF(__pyx_t_2);
12212   __Pyx_AddTraceback("lxml.objectify.StringElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12213   __pyx_r = NULL;
12214   __pyx_L0:;
12215   __Pyx_XGIVEREF(__pyx_r);
12216   __Pyx_RefNannyFinishContext();
12217   return __pyx_r;
12218 }
12219
12220 /* "lxml/objectify.pyx":741
12221  *         return repr(textOf(self._c_node) or u'')
12222  * 
12223  *     def strlen(self):             # <<<<<<<<<<<<<<
12224  *         text = textOf(self._c_node)
12225  *         if text is None:
12226  */
12227
12228 /* Python wrapper */
12229 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12230 static PyMethodDef __pyx_mdef_4lxml_9objectify_13StringElement_3strlen = {"strlen", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_3strlen, METH_NOARGS, 0};
12231 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_3strlen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12232   PyObject *__pyx_r = 0;
12233   __Pyx_RefNannyDeclarations
12234   __Pyx_RefNannySetupContext("strlen (wrapper)", 0);
12235   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_2strlen(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12236
12237   /* function exit code */
12238   __Pyx_RefNannyFinishContext();
12239   return __pyx_r;
12240 }
12241
12242 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_2strlen(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12243   PyObject *__pyx_v_text = NULL;
12244   PyObject *__pyx_r = NULL;
12245   __Pyx_RefNannyDeclarations
12246   PyObject *__pyx_t_1 = NULL;
12247   int __pyx_t_2;
12248   int __pyx_t_3;
12249   Py_ssize_t __pyx_t_4;
12250   int __pyx_lineno = 0;
12251   const char *__pyx_filename = NULL;
12252   int __pyx_clineno = 0;
12253   __Pyx_RefNannySetupContext("strlen", 0);
12254
12255   /* "lxml/objectify.pyx":742
12256  * 
12257  *     def strlen(self):
12258  *         text = textOf(self._c_node)             # <<<<<<<<<<<<<<
12259  *         if text is None:
12260  *             return 0
12261  */
12262   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
12263   __Pyx_GOTREF(__pyx_t_1);
12264   __pyx_v_text = __pyx_t_1;
12265   __pyx_t_1 = 0;
12266
12267   /* "lxml/objectify.pyx":743
12268  *     def strlen(self):
12269  *         text = textOf(self._c_node)
12270  *         if text is None:             # <<<<<<<<<<<<<<
12271  *             return 0
12272  *         else:
12273  */
12274   __pyx_t_2 = (__pyx_v_text == Py_None);
12275   __pyx_t_3 = (__pyx_t_2 != 0);
12276   if (__pyx_t_3) {
12277
12278     /* "lxml/objectify.pyx":744
12279  *         text = textOf(self._c_node)
12280  *         if text is None:
12281  *             return 0             # <<<<<<<<<<<<<<
12282  *         else:
12283  *             return len(text)
12284  */
12285     __Pyx_XDECREF(__pyx_r);
12286     __Pyx_INCREF(__pyx_int_0);
12287     __pyx_r = __pyx_int_0;
12288     goto __pyx_L0;
12289
12290     /* "lxml/objectify.pyx":743
12291  *     def strlen(self):
12292  *         text = textOf(self._c_node)
12293  *         if text is None:             # <<<<<<<<<<<<<<
12294  *             return 0
12295  *         else:
12296  */
12297   }
12298
12299   /* "lxml/objectify.pyx":746
12300  *             return 0
12301  *         else:
12302  *             return len(text)             # <<<<<<<<<<<<<<
12303  * 
12304  *     def __nonzero__(self):
12305  */
12306   /*else*/ {
12307     __Pyx_XDECREF(__pyx_r);
12308     __pyx_t_4 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 746, __pyx_L1_error)
12309     __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
12310     __Pyx_GOTREF(__pyx_t_1);
12311     __pyx_r = __pyx_t_1;
12312     __pyx_t_1 = 0;
12313     goto __pyx_L0;
12314   }
12315
12316   /* "lxml/objectify.pyx":741
12317  *         return repr(textOf(self._c_node) or u'')
12318  * 
12319  *     def strlen(self):             # <<<<<<<<<<<<<<
12320  *         text = textOf(self._c_node)
12321  *         if text is None:
12322  */
12323
12324   /* function exit code */
12325   __pyx_L1_error:;
12326   __Pyx_XDECREF(__pyx_t_1);
12327   __Pyx_AddTraceback("lxml.objectify.StringElement.strlen", __pyx_clineno, __pyx_lineno, __pyx_filename);
12328   __pyx_r = NULL;
12329   __pyx_L0:;
12330   __Pyx_XDECREF(__pyx_v_text);
12331   __Pyx_XGIVEREF(__pyx_r);
12332   __Pyx_RefNannyFinishContext();
12333   return __pyx_r;
12334 }
12335
12336 /* "lxml/objectify.pyx":748
12337  *             return len(text)
12338  * 
12339  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
12340  *         return bool(textOf(self._c_node))
12341  * 
12342  */
12343
12344 /* Python wrapper */
12345 static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
12346 static int __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__(PyObject *__pyx_v_self) {
12347   int __pyx_r;
12348   __Pyx_RefNannyDeclarations
12349   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
12350   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12351
12352   /* function exit code */
12353   __Pyx_RefNannyFinishContext();
12354   return __pyx_r;
12355 }
12356
12357 static int __pyx_pf_4lxml_9objectify_13StringElement_4__nonzero__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12358   int __pyx_r;
12359   __Pyx_RefNannyDeclarations
12360   PyObject *__pyx_t_1 = NULL;
12361   int __pyx_t_2;
12362   int __pyx_lineno = 0;
12363   const char *__pyx_filename = NULL;
12364   int __pyx_clineno = 0;
12365   __Pyx_RefNannySetupContext("__nonzero__", 0);
12366
12367   /* "lxml/objectify.pyx":749
12368  * 
12369  *     def __nonzero__(self):
12370  *         return bool(textOf(self._c_node))             # <<<<<<<<<<<<<<
12371  * 
12372  *     def __richcmp__(self, other, int op):
12373  */
12374   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error)
12375   __Pyx_GOTREF(__pyx_t_1);
12376   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 749, __pyx_L1_error)
12377   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12378   __pyx_r = (!(!__pyx_t_2));
12379   goto __pyx_L0;
12380
12381   /* "lxml/objectify.pyx":748
12382  *             return len(text)
12383  * 
12384  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
12385  *         return bool(textOf(self._c_node))
12386  * 
12387  */
12388
12389   /* function exit code */
12390   __pyx_L1_error:;
12391   __Pyx_XDECREF(__pyx_t_1);
12392   __Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12393   __pyx_r = -1;
12394   __pyx_L0:;
12395   __Pyx_RefNannyFinishContext();
12396   return __pyx_r;
12397 }
12398
12399 /* "lxml/objectify.pyx":751
12400  *         return bool(textOf(self._c_node))
12401  * 
12402  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
12403  *         return _richcmpPyvals(self, other, op)
12404  * 
12405  */
12406
12407 /* Python wrapper */
12408 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
12409 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
12410   PyObject *__pyx_r = 0;
12411   __Pyx_RefNannyDeclarations
12412   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
12413   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
12414
12415   /* function exit code */
12416   __Pyx_RefNannyFinishContext();
12417   return __pyx_r;
12418 }
12419
12420 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_6__richcmp__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
12421   PyObject *__pyx_r = NULL;
12422   __Pyx_RefNannyDeclarations
12423   PyObject *__pyx_t_1 = NULL;
12424   int __pyx_lineno = 0;
12425   const char *__pyx_filename = NULL;
12426   int __pyx_clineno = 0;
12427   __Pyx_RefNannySetupContext("__richcmp__", 0);
12428
12429   /* "lxml/objectify.pyx":752
12430  * 
12431  *     def __richcmp__(self, other, int op):
12432  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
12433  * 
12434  *     def __hash__(self):
12435  */
12436   __Pyx_XDECREF(__pyx_r);
12437   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
12438   __Pyx_GOTREF(__pyx_t_1);
12439   __pyx_r = __pyx_t_1;
12440   __pyx_t_1 = 0;
12441   goto __pyx_L0;
12442
12443   /* "lxml/objectify.pyx":751
12444  *         return bool(textOf(self._c_node))
12445  * 
12446  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
12447  *         return _richcmpPyvals(self, other, op)
12448  * 
12449  */
12450
12451   /* function exit code */
12452   __pyx_L1_error:;
12453   __Pyx_XDECREF(__pyx_t_1);
12454   __Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12455   __pyx_r = NULL;
12456   __pyx_L0:;
12457   __Pyx_XGIVEREF(__pyx_r);
12458   __Pyx_RefNannyFinishContext();
12459   return __pyx_r;
12460 }
12461
12462 /* "lxml/objectify.pyx":754
12463  *         return _richcmpPyvals(self, other, op)
12464  * 
12465  *     def __hash__(self):             # <<<<<<<<<<<<<<
12466  *         return hash(textOf(self._c_node) or u'')
12467  * 
12468  */
12469
12470 /* Python wrapper */
12471 static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
12472 static Py_hash_t __pyx_pw_4lxml_9objectify_13StringElement_9__hash__(PyObject *__pyx_v_self) {
12473   Py_hash_t __pyx_r;
12474   __Pyx_RefNannyDeclarations
12475   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
12476   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12477
12478   /* function exit code */
12479   __Pyx_RefNannyFinishContext();
12480   return __pyx_r;
12481 }
12482
12483 static Py_hash_t __pyx_pf_4lxml_9objectify_13StringElement_8__hash__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12484   Py_hash_t __pyx_r;
12485   __Pyx_RefNannyDeclarations
12486   PyObject *__pyx_t_1 = NULL;
12487   PyObject *__pyx_t_2 = NULL;
12488   int __pyx_t_3;
12489   Py_hash_t __pyx_t_4;
12490   int __pyx_lineno = 0;
12491   const char *__pyx_filename = NULL;
12492   int __pyx_clineno = 0;
12493   __Pyx_RefNannySetupContext("__hash__", 0);
12494
12495   /* "lxml/objectify.pyx":755
12496  * 
12497  *     def __hash__(self):
12498  *         return hash(textOf(self._c_node) or u'')             # <<<<<<<<<<<<<<
12499  * 
12500  *     def __add__(self, other):
12501  */
12502   __pyx_t_2 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
12503   __Pyx_GOTREF(__pyx_t_2);
12504   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 755, __pyx_L1_error)
12505   if (!__pyx_t_3) {
12506     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12507   } else {
12508     __Pyx_INCREF(__pyx_t_2);
12509     __pyx_t_1 = __pyx_t_2;
12510     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12511     goto __pyx_L3_bool_binop_done;
12512   }
12513   __Pyx_INCREF(__pyx_kp_u_);
12514   __pyx_t_1 = __pyx_kp_u_;
12515   __pyx_L3_bool_binop_done:;
12516   __pyx_t_4 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 755, __pyx_L1_error)
12517   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12518   __pyx_r = __pyx_t_4;
12519   goto __pyx_L0;
12520
12521   /* "lxml/objectify.pyx":754
12522  *         return _richcmpPyvals(self, other, op)
12523  * 
12524  *     def __hash__(self):             # <<<<<<<<<<<<<<
12525  *         return hash(textOf(self._c_node) or u'')
12526  * 
12527  */
12528
12529   /* function exit code */
12530   __pyx_L1_error:;
12531   __Pyx_XDECREF(__pyx_t_1);
12532   __Pyx_XDECREF(__pyx_t_2);
12533   __Pyx_AddTraceback("lxml.objectify.StringElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12534   __pyx_r = -1;
12535   __pyx_L0:;
12536   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
12537   __Pyx_RefNannyFinishContext();
12538   return __pyx_r;
12539 }
12540
12541 /* "lxml/objectify.pyx":757
12542  *         return hash(textOf(self._c_node) or u'')
12543  * 
12544  *     def __add__(self, other):             # <<<<<<<<<<<<<<
12545  *         text  = _strValueOf(self)
12546  *         other = _strValueOf(other)
12547  */
12548
12549 /* Python wrapper */
12550 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12551 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_11__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12552   PyObject *__pyx_r = 0;
12553   __Pyx_RefNannyDeclarations
12554   __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
12555   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_10__add__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12556
12557   /* function exit code */
12558   __Pyx_RefNannyFinishContext();
12559   return __pyx_r;
12560 }
12561
12562 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_10__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12563   PyObject *__pyx_v_text = NULL;
12564   PyObject *__pyx_r = NULL;
12565   __Pyx_RefNannyDeclarations
12566   PyObject *__pyx_t_1 = NULL;
12567   int __pyx_t_2;
12568   int __pyx_t_3;
12569   int __pyx_lineno = 0;
12570   const char *__pyx_filename = NULL;
12571   int __pyx_clineno = 0;
12572   __Pyx_RefNannySetupContext("__add__", 0);
12573   __Pyx_INCREF(__pyx_v_other);
12574
12575   /* "lxml/objectify.pyx":758
12576  * 
12577  *     def __add__(self, other):
12578  *         text  = _strValueOf(self)             # <<<<<<<<<<<<<<
12579  *         other = _strValueOf(other)
12580  *         if text is None:
12581  */
12582   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
12583   __Pyx_GOTREF(__pyx_t_1);
12584   __pyx_v_text = __pyx_t_1;
12585   __pyx_t_1 = 0;
12586
12587   /* "lxml/objectify.pyx":759
12588  *     def __add__(self, other):
12589  *         text  = _strValueOf(self)
12590  *         other = _strValueOf(other)             # <<<<<<<<<<<<<<
12591  *         if text is None:
12592  *             return other
12593  */
12594   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
12595   __Pyx_GOTREF(__pyx_t_1);
12596   __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_1);
12597   __pyx_t_1 = 0;
12598
12599   /* "lxml/objectify.pyx":760
12600  *         text  = _strValueOf(self)
12601  *         other = _strValueOf(other)
12602  *         if text is None:             # <<<<<<<<<<<<<<
12603  *             return other
12604  *         if other is None:
12605  */
12606   __pyx_t_2 = (__pyx_v_text == Py_None);
12607   __pyx_t_3 = (__pyx_t_2 != 0);
12608   if (__pyx_t_3) {
12609
12610     /* "lxml/objectify.pyx":761
12611  *         other = _strValueOf(other)
12612  *         if text is None:
12613  *             return other             # <<<<<<<<<<<<<<
12614  *         if other is None:
12615  *             return text
12616  */
12617     __Pyx_XDECREF(__pyx_r);
12618     __Pyx_INCREF(__pyx_v_other);
12619     __pyx_r = __pyx_v_other;
12620     goto __pyx_L0;
12621
12622     /* "lxml/objectify.pyx":760
12623  *         text  = _strValueOf(self)
12624  *         other = _strValueOf(other)
12625  *         if text is None:             # <<<<<<<<<<<<<<
12626  *             return other
12627  *         if other is None:
12628  */
12629   }
12630
12631   /* "lxml/objectify.pyx":762
12632  *         if text is None:
12633  *             return other
12634  *         if other is None:             # <<<<<<<<<<<<<<
12635  *             return text
12636  *         return text + other
12637  */
12638   __pyx_t_3 = (__pyx_v_other == Py_None);
12639   __pyx_t_2 = (__pyx_t_3 != 0);
12640   if (__pyx_t_2) {
12641
12642     /* "lxml/objectify.pyx":763
12643  *             return other
12644  *         if other is None:
12645  *             return text             # <<<<<<<<<<<<<<
12646  *         return text + other
12647  * 
12648  */
12649     __Pyx_XDECREF(__pyx_r);
12650     __Pyx_INCREF(__pyx_v_text);
12651     __pyx_r = __pyx_v_text;
12652     goto __pyx_L0;
12653
12654     /* "lxml/objectify.pyx":762
12655  *         if text is None:
12656  *             return other
12657  *         if other is None:             # <<<<<<<<<<<<<<
12658  *             return text
12659  *         return text + other
12660  */
12661   }
12662
12663   /* "lxml/objectify.pyx":764
12664  *         if other is None:
12665  *             return text
12666  *         return text + other             # <<<<<<<<<<<<<<
12667  * 
12668  *     def __mul__(self, other):
12669  */
12670   __Pyx_XDECREF(__pyx_r);
12671   __pyx_t_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
12672   __Pyx_GOTREF(__pyx_t_1);
12673   __pyx_r = __pyx_t_1;
12674   __pyx_t_1 = 0;
12675   goto __pyx_L0;
12676
12677   /* "lxml/objectify.pyx":757
12678  *         return hash(textOf(self._c_node) or u'')
12679  * 
12680  *     def __add__(self, other):             # <<<<<<<<<<<<<<
12681  *         text  = _strValueOf(self)
12682  *         other = _strValueOf(other)
12683  */
12684
12685   /* function exit code */
12686   __pyx_L1_error:;
12687   __Pyx_XDECREF(__pyx_t_1);
12688   __Pyx_AddTraceback("lxml.objectify.StringElement.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12689   __pyx_r = NULL;
12690   __pyx_L0:;
12691   __Pyx_XDECREF(__pyx_v_text);
12692   __Pyx_XDECREF(__pyx_v_other);
12693   __Pyx_XGIVEREF(__pyx_r);
12694   __Pyx_RefNannyFinishContext();
12695   return __pyx_r;
12696 }
12697
12698 /* "lxml/objectify.pyx":766
12699  *         return text + other
12700  * 
12701  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
12702  *         if isinstance(self, StringElement):
12703  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12704  */
12705
12706 /* Python wrapper */
12707 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12708 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_13__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12709   PyObject *__pyx_r = 0;
12710   __Pyx_RefNannyDeclarations
12711   __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
12712   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_12__mul__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12713
12714   /* function exit code */
12715   __Pyx_RefNannyFinishContext();
12716   return __pyx_r;
12717 }
12718
12719 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_12__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12720   PyObject *__pyx_r = NULL;
12721   __Pyx_RefNannyDeclarations
12722   int __pyx_t_1;
12723   int __pyx_t_2;
12724   PyObject *__pyx_t_3 = NULL;
12725   PyObject *__pyx_t_4 = NULL;
12726   PyObject *__pyx_t_5 = NULL;
12727   int __pyx_lineno = 0;
12728   const char *__pyx_filename = NULL;
12729   int __pyx_clineno = 0;
12730   __Pyx_RefNannySetupContext("__mul__", 0);
12731
12732   /* "lxml/objectify.pyx":767
12733  * 
12734  *     def __mul__(self, other):
12735  *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
12736  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12737  *         elif isinstance(other, StringElement):
12738  */
12739   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_self, __pyx_ptype_4lxml_9objectify_StringElement); 
12740   __pyx_t_2 = (__pyx_t_1 != 0);
12741   if (__pyx_t_2) {
12742
12743     /* "lxml/objectify.pyx":768
12744  *     def __mul__(self, other):
12745  *         if isinstance(self, StringElement):
12746  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)             # <<<<<<<<<<<<<<
12747  *         elif isinstance(other, StringElement):
12748  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12749  */
12750     __Pyx_XDECREF(__pyx_r);
12751     __pyx_t_3 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 768, __pyx_L1_error)
12752     __Pyx_GOTREF(__pyx_t_3);
12753     __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 768, __pyx_L1_error)
12754     __Pyx_GOTREF(__pyx_t_4);
12755     __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error)
12756     __Pyx_GOTREF(__pyx_t_5);
12757     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12758     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12759     __pyx_r = __pyx_t_5;
12760     __pyx_t_5 = 0;
12761     goto __pyx_L0;
12762
12763     /* "lxml/objectify.pyx":767
12764  * 
12765  *     def __mul__(self, other):
12766  *         if isinstance(self, StringElement):             # <<<<<<<<<<<<<<
12767  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12768  *         elif isinstance(other, StringElement):
12769  */
12770   }
12771
12772   /* "lxml/objectify.pyx":769
12773  *         if isinstance(self, StringElement):
12774  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12775  *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
12776  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12777  *         else:
12778  */
12779   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_4lxml_9objectify_StringElement); 
12780   __pyx_t_1 = (__pyx_t_2 != 0);
12781   if (likely(__pyx_t_1)) {
12782
12783     /* "lxml/objectify.pyx":770
12784  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12785  *         elif isinstance(other, StringElement):
12786  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)             # <<<<<<<<<<<<<<
12787  *         else:
12788  *             raise TypeError, u"invalid types for * operator"
12789  */
12790     __Pyx_XDECREF(__pyx_r);
12791     __pyx_t_5 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error)
12792     __Pyx_GOTREF(__pyx_t_5);
12793     __pyx_t_4 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_other)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 770, __pyx_L1_error)
12794     __Pyx_GOTREF(__pyx_t_4);
12795     __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error)
12796     __Pyx_GOTREF(__pyx_t_3);
12797     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12798     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12799     __pyx_r = __pyx_t_3;
12800     __pyx_t_3 = 0;
12801     goto __pyx_L0;
12802
12803     /* "lxml/objectify.pyx":769
12804  *         if isinstance(self, StringElement):
12805  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12806  *         elif isinstance(other, StringElement):             # <<<<<<<<<<<<<<
12807  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12808  *         else:
12809  */
12810   }
12811
12812   /* "lxml/objectify.pyx":772
12813  *             return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
12814  *         else:
12815  *             raise TypeError, u"invalid types for * operator"             # <<<<<<<<<<<<<<
12816  * 
12817  *     def __mod__(self, other):
12818  */
12819   /*else*/ {
12820     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_types_for_operator, 0, 0);
12821     __PYX_ERR(0, 772, __pyx_L1_error)
12822   }
12823
12824   /* "lxml/objectify.pyx":766
12825  *         return text + other
12826  * 
12827  *     def __mul__(self, other):             # <<<<<<<<<<<<<<
12828  *         if isinstance(self, StringElement):
12829  *             return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
12830  */
12831
12832   /* function exit code */
12833   __pyx_L1_error:;
12834   __Pyx_XDECREF(__pyx_t_3);
12835   __Pyx_XDECREF(__pyx_t_4);
12836   __Pyx_XDECREF(__pyx_t_5);
12837   __Pyx_AddTraceback("lxml.objectify.StringElement.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12838   __pyx_r = NULL;
12839   __pyx_L0:;
12840   __Pyx_XGIVEREF(__pyx_r);
12841   __Pyx_RefNannyFinishContext();
12842   return __pyx_r;
12843 }
12844
12845 /* "lxml/objectify.pyx":774
12846  *             raise TypeError, u"invalid types for * operator"
12847  * 
12848  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
12849  *         return _strValueOf(self) % other
12850  * 
12851  */
12852
12853 /* Python wrapper */
12854 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
12855 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_15__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12856   PyObject *__pyx_r = 0;
12857   __Pyx_RefNannyDeclarations
12858   __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
12859   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_14__mod__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other));
12860
12861   /* function exit code */
12862   __Pyx_RefNannyFinishContext();
12863   return __pyx_r;
12864 }
12865
12866 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_14__mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
12867   PyObject *__pyx_r = NULL;
12868   __Pyx_RefNannyDeclarations
12869   PyObject *__pyx_t_1 = NULL;
12870   PyObject *__pyx_t_2 = NULL;
12871   int __pyx_lineno = 0;
12872   const char *__pyx_filename = NULL;
12873   int __pyx_clineno = 0;
12874   __Pyx_RefNannySetupContext("__mod__", 0);
12875
12876   /* "lxml/objectify.pyx":775
12877  * 
12878  *     def __mod__(self, other):
12879  *         return _strValueOf(self) % other             # <<<<<<<<<<<<<<
12880  * 
12881  *     def __int__(self):
12882  */
12883   __Pyx_XDECREF(__pyx_r);
12884   __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
12885   __Pyx_GOTREF(__pyx_t_1);
12886   __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
12887   __Pyx_GOTREF(__pyx_t_2);
12888   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12889   __pyx_r = __pyx_t_2;
12890   __pyx_t_2 = 0;
12891   goto __pyx_L0;
12892
12893   /* "lxml/objectify.pyx":774
12894  *             raise TypeError, u"invalid types for * operator"
12895  * 
12896  *     def __mod__(self, other):             # <<<<<<<<<<<<<<
12897  *         return _strValueOf(self) % other
12898  * 
12899  */
12900
12901   /* function exit code */
12902   __pyx_L1_error:;
12903   __Pyx_XDECREF(__pyx_t_1);
12904   __Pyx_XDECREF(__pyx_t_2);
12905   __Pyx_AddTraceback("lxml.objectify.StringElement.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12906   __pyx_r = NULL;
12907   __pyx_L0:;
12908   __Pyx_XGIVEREF(__pyx_r);
12909   __Pyx_RefNannyFinishContext();
12910   return __pyx_r;
12911 }
12912
12913 /* "lxml/objectify.pyx":777
12914  *         return _strValueOf(self) % other
12915  * 
12916  *     def __int__(self):             # <<<<<<<<<<<<<<
12917  *         return int(textOf(self._c_node))
12918  * 
12919  */
12920
12921 /* Python wrapper */
12922 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self); /*proto*/
12923 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_17__int__(PyObject *__pyx_v_self) {
12924   PyObject *__pyx_r = 0;
12925   __Pyx_RefNannyDeclarations
12926   __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
12927   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_16__int__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12928
12929   /* function exit code */
12930   __Pyx_RefNannyFinishContext();
12931   return __pyx_r;
12932 }
12933
12934 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_16__int__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
12935   PyObject *__pyx_r = NULL;
12936   __Pyx_RefNannyDeclarations
12937   PyObject *__pyx_t_1 = NULL;
12938   PyObject *__pyx_t_2 = NULL;
12939   int __pyx_lineno = 0;
12940   const char *__pyx_filename = NULL;
12941   int __pyx_clineno = 0;
12942   __Pyx_RefNannySetupContext("__int__", 0);
12943
12944   /* "lxml/objectify.pyx":778
12945  * 
12946  *     def __int__(self):
12947  *         return int(textOf(self._c_node))             # <<<<<<<<<<<<<<
12948  * 
12949  *     def __long__(self):
12950  */
12951   __Pyx_XDECREF(__pyx_r);
12952   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
12953   __Pyx_GOTREF(__pyx_t_1);
12954   __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
12955   __Pyx_GOTREF(__pyx_t_2);
12956   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12957   __pyx_r = __pyx_t_2;
12958   __pyx_t_2 = 0;
12959   goto __pyx_L0;
12960
12961   /* "lxml/objectify.pyx":777
12962  *         return _strValueOf(self) % other
12963  * 
12964  *     def __int__(self):             # <<<<<<<<<<<<<<
12965  *         return int(textOf(self._c_node))
12966  * 
12967  */
12968
12969   /* function exit code */
12970   __pyx_L1_error:;
12971   __Pyx_XDECREF(__pyx_t_1);
12972   __Pyx_XDECREF(__pyx_t_2);
12973   __Pyx_AddTraceback("lxml.objectify.StringElement.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12974   __pyx_r = NULL;
12975   __pyx_L0:;
12976   __Pyx_XGIVEREF(__pyx_r);
12977   __Pyx_RefNannyFinishContext();
12978   return __pyx_r;
12979 }
12980
12981 /* "lxml/objectify.pyx":780
12982  *         return int(textOf(self._c_node))
12983  * 
12984  *     def __long__(self):             # <<<<<<<<<<<<<<
12985  *         return long(textOf(self._c_node))
12986  * 
12987  */
12988
12989 /* Python wrapper */
12990 #if PY_MAJOR_VERSION < 3
12991 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self); /*proto*/
12992 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_19__long__(PyObject *__pyx_v_self) {
12993   PyObject *__pyx_r = 0;
12994   __Pyx_RefNannyDeclarations
12995   __Pyx_RefNannySetupContext("__long__ (wrapper)", 0);
12996   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_18__long__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
12997
12998   /* function exit code */
12999   __Pyx_RefNannyFinishContext();
13000   return __pyx_r;
13001 }
13002 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
13003
13004 #if PY_MAJOR_VERSION < 3
13005 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_18__long__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13006   PyObject *__pyx_r = NULL;
13007   __Pyx_RefNannyDeclarations
13008   PyObject *__pyx_t_1 = NULL;
13009   PyObject *__pyx_t_2 = NULL;
13010   int __pyx_lineno = 0;
13011   const char *__pyx_filename = NULL;
13012   int __pyx_clineno = 0;
13013   __Pyx_RefNannySetupContext("__long__", 0);
13014
13015   /* "lxml/objectify.pyx":781
13016  * 
13017  *     def __long__(self):
13018  *         return long(textOf(self._c_node))             # <<<<<<<<<<<<<<
13019  * 
13020  *     def __float__(self):
13021  */
13022   __Pyx_XDECREF(__pyx_r);
13023   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
13024   __Pyx_GOTREF(__pyx_t_1);
13025   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyLong_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
13026   __Pyx_GOTREF(__pyx_t_2);
13027   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13028   __pyx_r = __pyx_t_2;
13029   __pyx_t_2 = 0;
13030   goto __pyx_L0;
13031
13032   /* "lxml/objectify.pyx":780
13033  *         return int(textOf(self._c_node))
13034  * 
13035  *     def __long__(self):             # <<<<<<<<<<<<<<
13036  *         return long(textOf(self._c_node))
13037  * 
13038  */
13039
13040   /* function exit code */
13041   __pyx_L1_error:;
13042   __Pyx_XDECREF(__pyx_t_1);
13043   __Pyx_XDECREF(__pyx_t_2);
13044   __Pyx_AddTraceback("lxml.objectify.StringElement.__long__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13045   __pyx_r = NULL;
13046   __pyx_L0:;
13047   __Pyx_XGIVEREF(__pyx_r);
13048   __Pyx_RefNannyFinishContext();
13049   return __pyx_r;
13050 }
13051 #endif /*!(#if PY_MAJOR_VERSION < 3)*/
13052
13053 /* "lxml/objectify.pyx":783
13054  *         return long(textOf(self._c_node))
13055  * 
13056  *     def __float__(self):             # <<<<<<<<<<<<<<
13057  *         return float(textOf(self._c_node))
13058  * 
13059  */
13060
13061 /* Python wrapper */
13062 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self); /*proto*/
13063 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_21__float__(PyObject *__pyx_v_self) {
13064   PyObject *__pyx_r = 0;
13065   __Pyx_RefNannyDeclarations
13066   __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
13067   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_20__float__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
13068
13069   /* function exit code */
13070   __Pyx_RefNannyFinishContext();
13071   return __pyx_r;
13072 }
13073
13074 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_20__float__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13075   PyObject *__pyx_r = NULL;
13076   __Pyx_RefNannyDeclarations
13077   PyObject *__pyx_t_1 = NULL;
13078   PyObject *__pyx_t_2 = NULL;
13079   int __pyx_lineno = 0;
13080   const char *__pyx_filename = NULL;
13081   int __pyx_clineno = 0;
13082   __Pyx_RefNannySetupContext("__float__", 0);
13083
13084   /* "lxml/objectify.pyx":784
13085  * 
13086  *     def __float__(self):
13087  *         return float(textOf(self._c_node))             # <<<<<<<<<<<<<<
13088  * 
13089  *     def __complex__(self):
13090  */
13091   __Pyx_XDECREF(__pyx_r);
13092   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
13093   __Pyx_GOTREF(__pyx_t_1);
13094   __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
13095   __Pyx_GOTREF(__pyx_t_2);
13096   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13097   __pyx_r = __pyx_t_2;
13098   __pyx_t_2 = 0;
13099   goto __pyx_L0;
13100
13101   /* "lxml/objectify.pyx":783
13102  *         return long(textOf(self._c_node))
13103  * 
13104  *     def __float__(self):             # <<<<<<<<<<<<<<
13105  *         return float(textOf(self._c_node))
13106  * 
13107  */
13108
13109   /* function exit code */
13110   __pyx_L1_error:;
13111   __Pyx_XDECREF(__pyx_t_1);
13112   __Pyx_XDECREF(__pyx_t_2);
13113   __Pyx_AddTraceback("lxml.objectify.StringElement.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13114   __pyx_r = NULL;
13115   __pyx_L0:;
13116   __Pyx_XGIVEREF(__pyx_r);
13117   __Pyx_RefNannyFinishContext();
13118   return __pyx_r;
13119 }
13120
13121 /* "lxml/objectify.pyx":786
13122  *         return float(textOf(self._c_node))
13123  * 
13124  *     def __complex__(self):             # <<<<<<<<<<<<<<
13125  *         return complex(textOf(self._c_node))
13126  * 
13127  */
13128
13129 /* Python wrapper */
13130 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13131 static PyMethodDef __pyx_mdef_4lxml_9objectify_13StringElement_23__complex__ = {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_23__complex__, METH_NOARGS, 0};
13132 static PyObject *__pyx_pw_4lxml_9objectify_13StringElement_23__complex__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13133   PyObject *__pyx_r = 0;
13134   __Pyx_RefNannyDeclarations
13135   __Pyx_RefNannySetupContext("__complex__ (wrapper)", 0);
13136   __pyx_r = __pyx_pf_4lxml_9objectify_13StringElement_22__complex__(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self));
13137
13138   /* function exit code */
13139   __Pyx_RefNannyFinishContext();
13140   return __pyx_r;
13141 }
13142
13143 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_22__complex__(struct __pyx_obj_4lxml_9objectify_StringElement *__pyx_v_self) {
13144   PyObject *__pyx_r = NULL;
13145   __Pyx_RefNannyDeclarations
13146   PyObject *__pyx_t_1 = NULL;
13147   PyObject *__pyx_t_2 = NULL;
13148   int __pyx_lineno = 0;
13149   const char *__pyx_filename = NULL;
13150   int __pyx_clineno = 0;
13151   __Pyx_RefNannySetupContext("__complex__", 0);
13152
13153   /* "lxml/objectify.pyx":787
13154  * 
13155  *     def __complex__(self):
13156  *         return complex(textOf(self._c_node))             # <<<<<<<<<<<<<<
13157  * 
13158  * cdef class NoneElement(ObjectifiedDataElement):
13159  */
13160   __Pyx_XDECREF(__pyx_r);
13161   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
13162   __Pyx_GOTREF(__pyx_t_1);
13163   __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error)
13164   __Pyx_GOTREF(__pyx_t_2);
13165   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13166   __pyx_r = __pyx_t_2;
13167   __pyx_t_2 = 0;
13168   goto __pyx_L0;
13169
13170   /* "lxml/objectify.pyx":786
13171  *         return float(textOf(self._c_node))
13172  * 
13173  *     def __complex__(self):             # <<<<<<<<<<<<<<
13174  *         return complex(textOf(self._c_node))
13175  * 
13176  */
13177
13178   /* function exit code */
13179   __pyx_L1_error:;
13180   __Pyx_XDECREF(__pyx_t_1);
13181   __Pyx_XDECREF(__pyx_t_2);
13182   __Pyx_AddTraceback("lxml.objectify.StringElement.__complex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13183   __pyx_r = NULL;
13184   __pyx_L0:;
13185   __Pyx_XGIVEREF(__pyx_r);
13186   __Pyx_RefNannyFinishContext();
13187   return __pyx_r;
13188 }
13189
13190 /* "lxml/objectify.pyx":790
13191  * 
13192  * cdef class NoneElement(ObjectifiedDataElement):
13193  *     def __str__(self):             # <<<<<<<<<<<<<<
13194  *         return u"None"
13195  * 
13196  */
13197
13198 /* Python wrapper */
13199 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self); /*proto*/
13200 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_1__str__(PyObject *__pyx_v_self) {
13201   PyObject *__pyx_r = 0;
13202   __Pyx_RefNannyDeclarations
13203   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
13204   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement___str__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13205
13206   /* function exit code */
13207   __Pyx_RefNannyFinishContext();
13208   return __pyx_r;
13209 }
13210
13211 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13212   PyObject *__pyx_r = NULL;
13213   __Pyx_RefNannyDeclarations
13214   __Pyx_RefNannySetupContext("__str__", 0);
13215
13216   /* "lxml/objectify.pyx":791
13217  * cdef class NoneElement(ObjectifiedDataElement):
13218  *     def __str__(self):
13219  *         return u"None"             # <<<<<<<<<<<<<<
13220  * 
13221  *     def __repr__(self):
13222  */
13223   __Pyx_XDECREF(__pyx_r);
13224   __Pyx_INCREF(__pyx_n_u_None);
13225   __pyx_r = __pyx_n_u_None;
13226   goto __pyx_L0;
13227
13228   /* "lxml/objectify.pyx":790
13229  * 
13230  * cdef class NoneElement(ObjectifiedDataElement):
13231  *     def __str__(self):             # <<<<<<<<<<<<<<
13232  *         return u"None"
13233  * 
13234  */
13235
13236   /* function exit code */
13237   __pyx_L0:;
13238   __Pyx_XGIVEREF(__pyx_r);
13239   __Pyx_RefNannyFinishContext();
13240   return __pyx_r;
13241 }
13242
13243 /* "lxml/objectify.pyx":793
13244  *         return u"None"
13245  * 
13246  *     def __repr__(self):             # <<<<<<<<<<<<<<
13247  *         return "None"
13248  * 
13249  */
13250
13251 /* Python wrapper */
13252 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self); /*proto*/
13253 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_3__repr__(PyObject *__pyx_v_self) {
13254   PyObject *__pyx_r = 0;
13255   __Pyx_RefNannyDeclarations
13256   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
13257   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13258
13259   /* function exit code */
13260   __Pyx_RefNannyFinishContext();
13261   return __pyx_r;
13262 }
13263
13264 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_2__repr__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13265   PyObject *__pyx_r = NULL;
13266   __Pyx_RefNannyDeclarations
13267   __Pyx_RefNannySetupContext("__repr__", 0);
13268
13269   /* "lxml/objectify.pyx":794
13270  * 
13271  *     def __repr__(self):
13272  *         return "None"             # <<<<<<<<<<<<<<
13273  * 
13274  *     def __nonzero__(self):
13275  */
13276   __Pyx_XDECREF(__pyx_r);
13277   __Pyx_INCREF(__pyx_n_s_None);
13278   __pyx_r = __pyx_n_s_None;
13279   goto __pyx_L0;
13280
13281   /* "lxml/objectify.pyx":793
13282  *         return u"None"
13283  * 
13284  *     def __repr__(self):             # <<<<<<<<<<<<<<
13285  *         return "None"
13286  * 
13287  */
13288
13289   /* function exit code */
13290   __pyx_L0:;
13291   __Pyx_XGIVEREF(__pyx_r);
13292   __Pyx_RefNannyFinishContext();
13293   return __pyx_r;
13294 }
13295
13296 /* "lxml/objectify.pyx":796
13297  *         return "None"
13298  * 
13299  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13300  *         return False
13301  * 
13302  */
13303
13304 /* Python wrapper */
13305 static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self); /*proto*/
13306 static int __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__(PyObject *__pyx_v_self) {
13307   int __pyx_r;
13308   __Pyx_RefNannyDeclarations
13309   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
13310   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13311
13312   /* function exit code */
13313   __Pyx_RefNannyFinishContext();
13314   return __pyx_r;
13315 }
13316
13317 static int __pyx_pf_4lxml_9objectify_11NoneElement_4__nonzero__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13318   int __pyx_r;
13319   __Pyx_RefNannyDeclarations
13320   __Pyx_RefNannySetupContext("__nonzero__", 0);
13321
13322   /* "lxml/objectify.pyx":797
13323  * 
13324  *     def __nonzero__(self):
13325  *         return False             # <<<<<<<<<<<<<<
13326  * 
13327  *     def __richcmp__(self, other, int op):
13328  */
13329   __pyx_r = 0;
13330   goto __pyx_L0;
13331
13332   /* "lxml/objectify.pyx":796
13333  *         return "None"
13334  * 
13335  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13336  *         return False
13337  * 
13338  */
13339
13340   /* function exit code */
13341   __pyx_L0:;
13342   __Pyx_RefNannyFinishContext();
13343   return __pyx_r;
13344 }
13345
13346 /* "lxml/objectify.pyx":799
13347  *         return False
13348  * 
13349  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13350  *         if other is None or self is None:
13351  *             return python.PyObject_RichCompare(None, None, op)
13352  */
13353
13354 /* Python wrapper */
13355 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
13356 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13357   PyObject *__pyx_r = 0;
13358   __Pyx_RefNannyDeclarations
13359   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
13360   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
13361
13362   /* function exit code */
13363   __Pyx_RefNannyFinishContext();
13364   return __pyx_r;
13365 }
13366
13367 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_6__richcmp__(struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13368   PyObject *__pyx_r = NULL;
13369   __Pyx_RefNannyDeclarations
13370   int __pyx_t_1;
13371   int __pyx_t_2;
13372   int __pyx_t_3;
13373   PyObject *__pyx_t_4 = NULL;
13374   int __pyx_lineno = 0;
13375   const char *__pyx_filename = NULL;
13376   int __pyx_clineno = 0;
13377   __Pyx_RefNannySetupContext("__richcmp__", 0);
13378
13379   /* "lxml/objectify.pyx":800
13380  * 
13381  *     def __richcmp__(self, other, int op):
13382  *         if other is None or self is None:             # <<<<<<<<<<<<<<
13383  *             return python.PyObject_RichCompare(None, None, op)
13384  *         if isinstance(self, NoneElement):
13385  */
13386   __pyx_t_2 = (__pyx_v_other == Py_None);
13387   __pyx_t_3 = (__pyx_t_2 != 0);
13388   if (!__pyx_t_3) {
13389   } else {
13390     __pyx_t_1 = __pyx_t_3;
13391     goto __pyx_L4_bool_binop_done;
13392   }
13393   __pyx_t_3 = (((PyObject *)__pyx_v_self) == Py_None);
13394   __pyx_t_2 = (__pyx_t_3 != 0);
13395   __pyx_t_1 = __pyx_t_2;
13396   __pyx_L4_bool_binop_done:;
13397   if (__pyx_t_1) {
13398
13399     /* "lxml/objectify.pyx":801
13400  *     def __richcmp__(self, other, int op):
13401  *         if other is None or self is None:
13402  *             return python.PyObject_RichCompare(None, None, op)             # <<<<<<<<<<<<<<
13403  *         if isinstance(self, NoneElement):
13404  *             return python.PyObject_RichCompare(None, other, op)
13405  */
13406     __Pyx_XDECREF(__pyx_r);
13407     __pyx_t_4 = PyObject_RichCompare(Py_None, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 801, __pyx_L1_error)
13408     __Pyx_GOTREF(__pyx_t_4);
13409     __pyx_r = __pyx_t_4;
13410     __pyx_t_4 = 0;
13411     goto __pyx_L0;
13412
13413     /* "lxml/objectify.pyx":800
13414  * 
13415  *     def __richcmp__(self, other, int op):
13416  *         if other is None or self is None:             # <<<<<<<<<<<<<<
13417  *             return python.PyObject_RichCompare(None, None, op)
13418  *         if isinstance(self, NoneElement):
13419  */
13420   }
13421
13422   /* "lxml/objectify.pyx":802
13423  *         if other is None or self is None:
13424  *             return python.PyObject_RichCompare(None, None, op)
13425  *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
13426  *             return python.PyObject_RichCompare(None, other, op)
13427  *         else:
13428  */
13429   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_4lxml_9objectify_NoneElement); 
13430   __pyx_t_2 = (__pyx_t_1 != 0);
13431   if (__pyx_t_2) {
13432
13433     /* "lxml/objectify.pyx":803
13434  *             return python.PyObject_RichCompare(None, None, op)
13435  *         if isinstance(self, NoneElement):
13436  *             return python.PyObject_RichCompare(None, other, op)             # <<<<<<<<<<<<<<
13437  *         else:
13438  *             return python.PyObject_RichCompare(self, None, op)
13439  */
13440     __Pyx_XDECREF(__pyx_r);
13441     __pyx_t_4 = PyObject_RichCompare(Py_None, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
13442     __Pyx_GOTREF(__pyx_t_4);
13443     __pyx_r = __pyx_t_4;
13444     __pyx_t_4 = 0;
13445     goto __pyx_L0;
13446
13447     /* "lxml/objectify.pyx":802
13448  *         if other is None or self is None:
13449  *             return python.PyObject_RichCompare(None, None, op)
13450  *         if isinstance(self, NoneElement):             # <<<<<<<<<<<<<<
13451  *             return python.PyObject_RichCompare(None, other, op)
13452  *         else:
13453  */
13454   }
13455
13456   /* "lxml/objectify.pyx":805
13457  *             return python.PyObject_RichCompare(None, other, op)
13458  *         else:
13459  *             return python.PyObject_RichCompare(self, None, op)             # <<<<<<<<<<<<<<
13460  * 
13461  *     def __hash__(self):
13462  */
13463   /*else*/ {
13464     __Pyx_XDECREF(__pyx_r);
13465     __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_v_self), Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
13466     __Pyx_GOTREF(__pyx_t_4);
13467     __pyx_r = __pyx_t_4;
13468     __pyx_t_4 = 0;
13469     goto __pyx_L0;
13470   }
13471
13472   /* "lxml/objectify.pyx":799
13473  *         return False
13474  * 
13475  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13476  *         if other is None or self is None:
13477  *             return python.PyObject_RichCompare(None, None, op)
13478  */
13479
13480   /* function exit code */
13481   __pyx_L1_error:;
13482   __Pyx_XDECREF(__pyx_t_4);
13483   __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13484   __pyx_r = NULL;
13485   __pyx_L0:;
13486   __Pyx_XGIVEREF(__pyx_r);
13487   __Pyx_RefNannyFinishContext();
13488   return __pyx_r;
13489 }
13490
13491 /* "lxml/objectify.pyx":807
13492  *             return python.PyObject_RichCompare(self, None, op)
13493  * 
13494  *     def __hash__(self):             # <<<<<<<<<<<<<<
13495  *         return hash(None)
13496  * 
13497  */
13498
13499 /* Python wrapper */
13500 static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self); /*proto*/
13501 static Py_hash_t __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__(PyObject *__pyx_v_self) {
13502   Py_hash_t __pyx_r;
13503   __Pyx_RefNannyDeclarations
13504   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
13505   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13506
13507   /* function exit code */
13508   __Pyx_RefNannyFinishContext();
13509   return __pyx_r;
13510 }
13511
13512 static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13513   Py_hash_t __pyx_r;
13514   __Pyx_RefNannyDeclarations
13515   Py_hash_t __pyx_t_1;
13516   int __pyx_lineno = 0;
13517   const char *__pyx_filename = NULL;
13518   int __pyx_clineno = 0;
13519   __Pyx_RefNannySetupContext("__hash__", 0);
13520
13521   /* "lxml/objectify.pyx":808
13522  * 
13523  *     def __hash__(self):
13524  *         return hash(None)             # <<<<<<<<<<<<<<
13525  * 
13526  *     @property
13527  */
13528   __pyx_t_1 = PyObject_Hash(Py_None); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 808, __pyx_L1_error)
13529   __pyx_r = __pyx_t_1;
13530   goto __pyx_L0;
13531
13532   /* "lxml/objectify.pyx":807
13533  *             return python.PyObject_RichCompare(self, None, op)
13534  * 
13535  *     def __hash__(self):             # <<<<<<<<<<<<<<
13536  *         return hash(None)
13537  * 
13538  */
13539
13540   /* function exit code */
13541   __pyx_L1_error:;
13542   __Pyx_AddTraceback("lxml.objectify.NoneElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13543   __pyx_r = -1;
13544   __pyx_L0:;
13545   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
13546   __Pyx_RefNannyFinishContext();
13547   return __pyx_r;
13548 }
13549
13550 /* "lxml/objectify.pyx":811
13551  * 
13552  *     @property
13553  *     def pyval(self):             # <<<<<<<<<<<<<<
13554  *         return None
13555  * 
13556  */
13557
13558 /* Python wrapper */
13559 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
13560 static PyObject *__pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(PyObject *__pyx_v_self) {
13561   PyObject *__pyx_r = 0;
13562   __Pyx_RefNannyDeclarations
13563   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13564   __pyx_r = __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_NoneElement *)__pyx_v_self));
13565
13566   /* function exit code */
13567   __Pyx_RefNannyFinishContext();
13568   return __pyx_r;
13569 }
13570
13571 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_UNUSED struct __pyx_obj_4lxml_9objectify_NoneElement *__pyx_v_self) {
13572   PyObject *__pyx_r = NULL;
13573   __Pyx_RefNannyDeclarations
13574   __Pyx_RefNannySetupContext("__get__", 0);
13575
13576   /* "lxml/objectify.pyx":812
13577  *     @property
13578  *     def pyval(self):
13579  *         return None             # <<<<<<<<<<<<<<
13580  * 
13581  * 
13582  */
13583   __Pyx_XDECREF(__pyx_r);
13584   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13585   goto __pyx_L0;
13586
13587   /* "lxml/objectify.pyx":811
13588  * 
13589  *     @property
13590  *     def pyval(self):             # <<<<<<<<<<<<<<
13591  *         return None
13592  * 
13593  */
13594
13595   /* function exit code */
13596   __pyx_L0:;
13597   __Pyx_XGIVEREF(__pyx_r);
13598   __Pyx_RefNannyFinishContext();
13599   return __pyx_r;
13600 }
13601
13602 /* "lxml/objectify.pyx":821
13603  *     Python's bool type.
13604  *     """
13605  *     def _init(self):             # <<<<<<<<<<<<<<
13606  *         self._parse_value = __parseBool
13607  * 
13608  */
13609
13610 /* Python wrapper */
13611 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13612 static PyMethodDef __pyx_mdef_4lxml_9objectify_11BoolElement_1_init = {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11BoolElement_1_init, METH_NOARGS, 0};
13613 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_1_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13614   PyObject *__pyx_r = 0;
13615   __Pyx_RefNannyDeclarations
13616   __Pyx_RefNannySetupContext("_init (wrapper)", 0);
13617   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement__init(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13618
13619   /* function exit code */
13620   __Pyx_RefNannyFinishContext();
13621   return __pyx_r;
13622 }
13623
13624 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13625   PyObject *__pyx_r = NULL;
13626   __Pyx_RefNannyDeclarations
13627   PyObject *__pyx_t_1 = NULL;
13628   int __pyx_lineno = 0;
13629   const char *__pyx_filename = NULL;
13630   int __pyx_clineno = 0;
13631   __Pyx_RefNannySetupContext("_init", 0);
13632
13633   /* "lxml/objectify.pyx":822
13634  *     """
13635  *     def _init(self):
13636  *         self._parse_value = __parseBool             # <<<<<<<<<<<<<<
13637  * 
13638  *     def __nonzero__(self):
13639  */
13640   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_parseBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
13641   __Pyx_GOTREF(__pyx_t_1);
13642   __Pyx_GIVEREF(__pyx_t_1);
13643   __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
13644   __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value);
13645   __pyx_v_self->__pyx_base.__pyx_base._parse_value = __pyx_t_1;
13646   __pyx_t_1 = 0;
13647
13648   /* "lxml/objectify.pyx":821
13649  *     Python's bool type.
13650  *     """
13651  *     def _init(self):             # <<<<<<<<<<<<<<
13652  *         self._parse_value = __parseBool
13653  * 
13654  */
13655
13656   /* function exit code */
13657   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13658   goto __pyx_L0;
13659   __pyx_L1_error:;
13660   __Pyx_XDECREF(__pyx_t_1);
13661   __Pyx_AddTraceback("lxml.objectify.BoolElement._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
13662   __pyx_r = NULL;
13663   __pyx_L0:;
13664   __Pyx_XGIVEREF(__pyx_r);
13665   __Pyx_RefNannyFinishContext();
13666   return __pyx_r;
13667 }
13668
13669 /* "lxml/objectify.pyx":824
13670  *         self._parse_value = __parseBool
13671  * 
13672  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13673  *         return __parseBool(textOf(self._c_node))
13674  * 
13675  */
13676
13677 /* Python wrapper */
13678 static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self); /*proto*/
13679 static int __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__(PyObject *__pyx_v_self) {
13680   int __pyx_r;
13681   __Pyx_RefNannyDeclarations
13682   __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
13683   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13684
13685   /* function exit code */
13686   __Pyx_RefNannyFinishContext();
13687   return __pyx_r;
13688 }
13689
13690 static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13691   int __pyx_r;
13692   __Pyx_RefNannyDeclarations
13693   PyObject *__pyx_t_1 = NULL;
13694   int __pyx_t_2;
13695   int __pyx_lineno = 0;
13696   const char *__pyx_filename = NULL;
13697   int __pyx_clineno = 0;
13698   __Pyx_RefNannySetupContext("__nonzero__", 0);
13699
13700   /* "lxml/objectify.pyx":825
13701  * 
13702  *     def __nonzero__(self):
13703  *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
13704  * 
13705  *     def __richcmp__(self, other, int op):
13706  */
13707   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
13708   __Pyx_GOTREF(__pyx_t_1);
13709   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 825, __pyx_L1_error)
13710   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13711   __pyx_r = __pyx_t_2;
13712   goto __pyx_L0;
13713
13714   /* "lxml/objectify.pyx":824
13715  *         self._parse_value = __parseBool
13716  * 
13717  *     def __nonzero__(self):             # <<<<<<<<<<<<<<
13718  *         return __parseBool(textOf(self._c_node))
13719  * 
13720  */
13721
13722   /* function exit code */
13723   __pyx_L1_error:;
13724   __Pyx_XDECREF(__pyx_t_1);
13725   __Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13726   __pyx_r = -1;
13727   __pyx_L0:;
13728   __Pyx_RefNannyFinishContext();
13729   return __pyx_r;
13730 }
13731
13732 /* "lxml/objectify.pyx":827
13733  *         return __parseBool(textOf(self._c_node))
13734  * 
13735  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13736  *         return _richcmpPyvals(self, other, op)
13737  * 
13738  */
13739
13740 /* Python wrapper */
13741 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
13742 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13743   PyObject *__pyx_r = 0;
13744   __Pyx_RefNannyDeclarations
13745   __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
13746   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op));
13747
13748   /* function exit code */
13749   __Pyx_RefNannyFinishContext();
13750   return __pyx_r;
13751 }
13752
13753 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
13754   PyObject *__pyx_r = NULL;
13755   __Pyx_RefNannyDeclarations
13756   PyObject *__pyx_t_1 = NULL;
13757   int __pyx_lineno = 0;
13758   const char *__pyx_filename = NULL;
13759   int __pyx_clineno = 0;
13760   __Pyx_RefNannySetupContext("__richcmp__", 0);
13761
13762   /* "lxml/objectify.pyx":828
13763  * 
13764  *     def __richcmp__(self, other, int op):
13765  *         return _richcmpPyvals(self, other, op)             # <<<<<<<<<<<<<<
13766  * 
13767  *     def __hash__(self):
13768  */
13769   __Pyx_XDECREF(__pyx_r);
13770   __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error)
13771   __Pyx_GOTREF(__pyx_t_1);
13772   __pyx_r = __pyx_t_1;
13773   __pyx_t_1 = 0;
13774   goto __pyx_L0;
13775
13776   /* "lxml/objectify.pyx":827
13777  *         return __parseBool(textOf(self._c_node))
13778  * 
13779  *     def __richcmp__(self, other, int op):             # <<<<<<<<<<<<<<
13780  *         return _richcmpPyvals(self, other, op)
13781  * 
13782  */
13783
13784   /* function exit code */
13785   __pyx_L1_error:;
13786   __Pyx_XDECREF(__pyx_t_1);
13787   __Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13788   __pyx_r = NULL;
13789   __pyx_L0:;
13790   __Pyx_XGIVEREF(__pyx_r);
13791   __Pyx_RefNannyFinishContext();
13792   return __pyx_r;
13793 }
13794
13795 /* "lxml/objectify.pyx":830
13796  *         return _richcmpPyvals(self, other, op)
13797  * 
13798  *     def __hash__(self):             # <<<<<<<<<<<<<<
13799  *         return hash(__parseBool(textOf(self._c_node)))
13800  * 
13801  */
13802
13803 /* Python wrapper */
13804 static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self); /*proto*/
13805 static Py_hash_t __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__(PyObject *__pyx_v_self) {
13806   Py_hash_t __pyx_r;
13807   __Pyx_RefNannyDeclarations
13808   __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
13809   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13810
13811   /* function exit code */
13812   __Pyx_RefNannyFinishContext();
13813   return __pyx_r;
13814 }
13815
13816 static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13817   Py_hash_t __pyx_r;
13818   __Pyx_RefNannyDeclarations
13819   PyObject *__pyx_t_1 = NULL;
13820   int __pyx_t_2;
13821   Py_hash_t __pyx_t_3;
13822   int __pyx_lineno = 0;
13823   const char *__pyx_filename = NULL;
13824   int __pyx_clineno = 0;
13825   __Pyx_RefNannySetupContext("__hash__", 0);
13826
13827   /* "lxml/objectify.pyx":831
13828  * 
13829  *     def __hash__(self):
13830  *         return hash(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13831  * 
13832  *     def __str__(self):
13833  */
13834   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
13835   __Pyx_GOTREF(__pyx_t_1);
13836   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 831, __pyx_L1_error)
13837   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13838   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
13839   __Pyx_GOTREF(__pyx_t_1);
13840   __pyx_t_3 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_hash_t)-1))) __PYX_ERR(0, 831, __pyx_L1_error)
13841   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13842   __pyx_r = __pyx_t_3;
13843   goto __pyx_L0;
13844
13845   /* "lxml/objectify.pyx":830
13846  *         return _richcmpPyvals(self, other, op)
13847  * 
13848  *     def __hash__(self):             # <<<<<<<<<<<<<<
13849  *         return hash(__parseBool(textOf(self._c_node)))
13850  * 
13851  */
13852
13853   /* function exit code */
13854   __pyx_L1_error:;
13855   __Pyx_XDECREF(__pyx_t_1);
13856   __Pyx_AddTraceback("lxml.objectify.BoolElement.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13857   __pyx_r = -1;
13858   __pyx_L0:;
13859   if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
13860   __Pyx_RefNannyFinishContext();
13861   return __pyx_r;
13862 }
13863
13864 /* "lxml/objectify.pyx":833
13865  *         return hash(__parseBool(textOf(self._c_node)))
13866  * 
13867  *     def __str__(self):             # <<<<<<<<<<<<<<
13868  *         return unicode(__parseBool(textOf(self._c_node)))
13869  * 
13870  */
13871
13872 /* Python wrapper */
13873 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self); /*proto*/
13874 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_9__str__(PyObject *__pyx_v_self) {
13875   PyObject *__pyx_r = 0;
13876   __Pyx_RefNannyDeclarations
13877   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
13878   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_8__str__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13879
13880   /* function exit code */
13881   __Pyx_RefNannyFinishContext();
13882   return __pyx_r;
13883 }
13884
13885 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13886   PyObject *__pyx_r = NULL;
13887   __Pyx_RefNannyDeclarations
13888   PyObject *__pyx_t_1 = NULL;
13889   int __pyx_t_2;
13890   PyObject *__pyx_t_3 = NULL;
13891   int __pyx_lineno = 0;
13892   const char *__pyx_filename = NULL;
13893   int __pyx_clineno = 0;
13894   __Pyx_RefNannySetupContext("__str__", 0);
13895
13896   /* "lxml/objectify.pyx":834
13897  * 
13898  *     def __str__(self):
13899  *         return unicode(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13900  * 
13901  *     def __repr__(self):
13902  */
13903   __Pyx_XDECREF(__pyx_r);
13904   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
13905   __Pyx_GOTREF(__pyx_t_1);
13906   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
13907   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13908   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
13909   __Pyx_GOTREF(__pyx_t_1);
13910   __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
13911   __Pyx_GOTREF(__pyx_t_3);
13912   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13913   __pyx_r = __pyx_t_3;
13914   __pyx_t_3 = 0;
13915   goto __pyx_L0;
13916
13917   /* "lxml/objectify.pyx":833
13918  *         return hash(__parseBool(textOf(self._c_node)))
13919  * 
13920  *     def __str__(self):             # <<<<<<<<<<<<<<
13921  *         return unicode(__parseBool(textOf(self._c_node)))
13922  * 
13923  */
13924
13925   /* function exit code */
13926   __pyx_L1_error:;
13927   __Pyx_XDECREF(__pyx_t_1);
13928   __Pyx_XDECREF(__pyx_t_3);
13929   __Pyx_AddTraceback("lxml.objectify.BoolElement.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13930   __pyx_r = NULL;
13931   __pyx_L0:;
13932   __Pyx_XGIVEREF(__pyx_r);
13933   __Pyx_RefNannyFinishContext();
13934   return __pyx_r;
13935 }
13936
13937 /* "lxml/objectify.pyx":836
13938  *         return unicode(__parseBool(textOf(self._c_node)))
13939  * 
13940  *     def __repr__(self):             # <<<<<<<<<<<<<<
13941  *         return repr(__parseBool(textOf(self._c_node)))
13942  * 
13943  */
13944
13945 /* Python wrapper */
13946 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self); /*proto*/
13947 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_11__repr__(PyObject *__pyx_v_self) {
13948   PyObject *__pyx_r = 0;
13949   __Pyx_RefNannyDeclarations
13950   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
13951   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
13952
13953   /* function exit code */
13954   __Pyx_RefNannyFinishContext();
13955   return __pyx_r;
13956 }
13957
13958 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
13959   PyObject *__pyx_r = NULL;
13960   __Pyx_RefNannyDeclarations
13961   PyObject *__pyx_t_1 = NULL;
13962   int __pyx_t_2;
13963   PyObject *__pyx_t_3 = NULL;
13964   int __pyx_lineno = 0;
13965   const char *__pyx_filename = NULL;
13966   int __pyx_clineno = 0;
13967   __Pyx_RefNannySetupContext("__repr__", 0);
13968
13969   /* "lxml/objectify.pyx":837
13970  * 
13971  *     def __repr__(self):
13972  *         return repr(__parseBool(textOf(self._c_node)))             # <<<<<<<<<<<<<<
13973  * 
13974  *     @property
13975  */
13976   __Pyx_XDECREF(__pyx_r);
13977   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
13978   __Pyx_GOTREF(__pyx_t_1);
13979   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 837, __pyx_L1_error)
13980   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13981   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
13982   __Pyx_GOTREF(__pyx_t_1);
13983   __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
13984   __Pyx_GOTREF(__pyx_t_3);
13985   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13986   __pyx_r = __pyx_t_3;
13987   __pyx_t_3 = 0;
13988   goto __pyx_L0;
13989
13990   /* "lxml/objectify.pyx":836
13991  *         return unicode(__parseBool(textOf(self._c_node)))
13992  * 
13993  *     def __repr__(self):             # <<<<<<<<<<<<<<
13994  *         return repr(__parseBool(textOf(self._c_node)))
13995  * 
13996  */
13997
13998   /* function exit code */
13999   __pyx_L1_error:;
14000   __Pyx_XDECREF(__pyx_t_1);
14001   __Pyx_XDECREF(__pyx_t_3);
14002   __Pyx_AddTraceback("lxml.objectify.BoolElement.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14003   __pyx_r = NULL;
14004   __pyx_L0:;
14005   __Pyx_XGIVEREF(__pyx_r);
14006   __Pyx_RefNannyFinishContext();
14007   return __pyx_r;
14008 }
14009
14010 /* "lxml/objectify.pyx":840
14011  * 
14012  *     @property
14013  *     def pyval(self):             # <<<<<<<<<<<<<<
14014  *         return __parseBool(textOf(self._c_node))
14015  * 
14016  */
14017
14018 /* Python wrapper */
14019 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self); /*proto*/
14020 static PyObject *__pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(PyObject *__pyx_v_self) {
14021   PyObject *__pyx_r = 0;
14022   __Pyx_RefNannyDeclarations
14023   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
14024   __pyx_r = __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self));
14025
14026   /* function exit code */
14027   __Pyx_RefNannyFinishContext();
14028   return __pyx_r;
14029 }
14030
14031 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct __pyx_obj_4lxml_9objectify_BoolElement *__pyx_v_self) {
14032   PyObject *__pyx_r = NULL;
14033   __Pyx_RefNannyDeclarations
14034   PyObject *__pyx_t_1 = NULL;
14035   int __pyx_t_2;
14036   int __pyx_lineno = 0;
14037   const char *__pyx_filename = NULL;
14038   int __pyx_clineno = 0;
14039   __Pyx_RefNannySetupContext("__get__", 0);
14040
14041   /* "lxml/objectify.pyx":841
14042  *     @property
14043  *     def pyval(self):
14044  *         return __parseBool(textOf(self._c_node))             # <<<<<<<<<<<<<<
14045  * 
14046  * def __checkBool(s):
14047  */
14048   __Pyx_XDECREF(__pyx_r);
14049   __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
14050   __Pyx_GOTREF(__pyx_t_1);
14051   __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 841, __pyx_L1_error)
14052   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14053   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
14054   __Pyx_GOTREF(__pyx_t_1);
14055   __pyx_r = __pyx_t_1;
14056   __pyx_t_1 = 0;
14057   goto __pyx_L0;
14058
14059   /* "lxml/objectify.pyx":840
14060  * 
14061  *     @property
14062  *     def pyval(self):             # <<<<<<<<<<<<<<
14063  *         return __parseBool(textOf(self._c_node))
14064  * 
14065  */
14066
14067   /* function exit code */
14068   __pyx_L1_error:;
14069   __Pyx_XDECREF(__pyx_t_1);
14070   __Pyx_AddTraceback("lxml.objectify.BoolElement.pyval.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
14071   __pyx_r = NULL;
14072   __pyx_L0:;
14073   __Pyx_XGIVEREF(__pyx_r);
14074   __Pyx_RefNannyFinishContext();
14075   return __pyx_r;
14076 }
14077
14078 /* "lxml/objectify.pyx":843
14079  *         return __parseBool(textOf(self._c_node))
14080  * 
14081  * def __checkBool(s):             # <<<<<<<<<<<<<<
14082  *     cdef int value = -1
14083  *     if s is not None:
14084  */
14085
14086 /* Python wrapper */
14087 static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14088 static PyMethodDef __pyx_mdef_4lxml_9objectify_3__checkBool = {"__checkBool", (PyCFunction)__pyx_pw_4lxml_9objectify_3__checkBool, METH_O, 0};
14089 static PyObject *__pyx_pw_4lxml_9objectify_3__checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
14090   PyObject *__pyx_r = 0;
14091   __Pyx_RefNannyDeclarations
14092   __Pyx_RefNannySetupContext("__checkBool (wrapper)", 0);
14093   __pyx_r = __pyx_pf_4lxml_9objectify_2__checkBool(__pyx_self, ((PyObject *)__pyx_v_s));
14094
14095   /* function exit code */
14096   __Pyx_RefNannyFinishContext();
14097   return __pyx_r;
14098 }
14099
14100 static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
14101   int __pyx_v_value;
14102   PyObject *__pyx_r = NULL;
14103   __Pyx_RefNannyDeclarations
14104   int __pyx_t_1;
14105   int __pyx_t_2;
14106   int __pyx_t_3;
14107   int __pyx_lineno = 0;
14108   const char *__pyx_filename = NULL;
14109   int __pyx_clineno = 0;
14110   __Pyx_RefNannySetupContext("__checkBool", 0);
14111
14112   /* "lxml/objectify.pyx":844
14113  * 
14114  * def __checkBool(s):
14115  *     cdef int value = -1             # <<<<<<<<<<<<<<
14116  *     if s is not None:
14117  *         value = __parseBoolAsInt(s)
14118  */
14119   __pyx_v_value = -1;
14120
14121   /* "lxml/objectify.pyx":845
14122  * def __checkBool(s):
14123  *     cdef int value = -1
14124  *     if s is not None:             # <<<<<<<<<<<<<<
14125  *         value = __parseBoolAsInt(s)
14126  *     if value == -1:
14127  */
14128   __pyx_t_1 = (__pyx_v_s != Py_None);
14129   __pyx_t_2 = (__pyx_t_1 != 0);
14130   if (__pyx_t_2) {
14131
14132     /* "lxml/objectify.pyx":846
14133  *     cdef int value = -1
14134  *     if s is not None:
14135  *         value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
14136  *     if value == -1:
14137  *         raise ValueError
14138  */
14139     __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 846, __pyx_L1_error)
14140     __pyx_v_value = __pyx_t_3;
14141
14142     /* "lxml/objectify.pyx":845
14143  * def __checkBool(s):
14144  *     cdef int value = -1
14145  *     if s is not None:             # <<<<<<<<<<<<<<
14146  *         value = __parseBoolAsInt(s)
14147  *     if value == -1:
14148  */
14149   }
14150
14151   /* "lxml/objectify.pyx":847
14152  *     if s is not None:
14153  *         value = __parseBoolAsInt(s)
14154  *     if value == -1:             # <<<<<<<<<<<<<<
14155  *         raise ValueError
14156  * 
14157  */
14158   __pyx_t_2 = ((__pyx_v_value == -1L) != 0);
14159   if (unlikely(__pyx_t_2)) {
14160
14161     /* "lxml/objectify.pyx":848
14162  *         value = __parseBoolAsInt(s)
14163  *     if value == -1:
14164  *         raise ValueError             # <<<<<<<<<<<<<<
14165  * 
14166  * cpdef bint __parseBool(s) except -1:
14167  */
14168     __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0);
14169     __PYX_ERR(0, 848, __pyx_L1_error)
14170
14171     /* "lxml/objectify.pyx":847
14172  *     if s is not None:
14173  *         value = __parseBoolAsInt(s)
14174  *     if value == -1:             # <<<<<<<<<<<<<<
14175  *         raise ValueError
14176  * 
14177  */
14178   }
14179
14180   /* "lxml/objectify.pyx":843
14181  *         return __parseBool(textOf(self._c_node))
14182  * 
14183  * def __checkBool(s):             # <<<<<<<<<<<<<<
14184  *     cdef int value = -1
14185  *     if s is not None:
14186  */
14187
14188   /* function exit code */
14189   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14190   goto __pyx_L0;
14191   __pyx_L1_error:;
14192   __Pyx_AddTraceback("lxml.objectify.__checkBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14193   __pyx_r = NULL;
14194   __pyx_L0:;
14195   __Pyx_XGIVEREF(__pyx_r);
14196   __Pyx_RefNannyFinishContext();
14197   return __pyx_r;
14198 }
14199
14200 /* "lxml/objectify.pyx":850
14201  *         raise ValueError
14202  * 
14203  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
14204  *     cdef int value
14205  *     if s is None:
14206  */
14207
14208 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14209 static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUSED int __pyx_skip_dispatch) {
14210   int __pyx_v_value;
14211   int __pyx_r;
14212   __Pyx_RefNannyDeclarations
14213   int __pyx_t_1;
14214   int __pyx_t_2;
14215   int __pyx_t_3;
14216   PyObject *__pyx_t_4 = NULL;
14217   Py_ssize_t __pyx_t_5;
14218   Py_UCS4 __pyx_t_6;
14219   PyObject *__pyx_t_7 = NULL;
14220   int __pyx_lineno = 0;
14221   const char *__pyx_filename = NULL;
14222   int __pyx_clineno = 0;
14223   __Pyx_RefNannySetupContext("__parseBool", 0);
14224
14225   /* "lxml/objectify.pyx":852
14226  * cpdef bint __parseBool(s) except -1:
14227  *     cdef int value
14228  *     if s is None:             # <<<<<<<<<<<<<<
14229  *         return False
14230  *     value = __parseBoolAsInt(s)
14231  */
14232   __pyx_t_1 = (__pyx_v_s == Py_None);
14233   __pyx_t_2 = (__pyx_t_1 != 0);
14234   if (__pyx_t_2) {
14235
14236     /* "lxml/objectify.pyx":853
14237  *     cdef int value
14238  *     if s is None:
14239  *         return False             # <<<<<<<<<<<<<<
14240  *     value = __parseBoolAsInt(s)
14241  *     if value == -1:
14242  */
14243     __pyx_r = 0;
14244     goto __pyx_L0;
14245
14246     /* "lxml/objectify.pyx":852
14247  * cpdef bint __parseBool(s) except -1:
14248  *     cdef int value
14249  *     if s is None:             # <<<<<<<<<<<<<<
14250  *         return False
14251  *     value = __parseBoolAsInt(s)
14252  */
14253   }
14254
14255   /* "lxml/objectify.pyx":854
14256  *     if s is None:
14257  *         return False
14258  *     value = __parseBoolAsInt(s)             # <<<<<<<<<<<<<<
14259  *     if value == -1:
14260  *         raise ValueError, f"Invalid boolean value: '{s}'"
14261  */
14262   __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 854, __pyx_L1_error)
14263   __pyx_v_value = __pyx_t_3;
14264
14265   /* "lxml/objectify.pyx":855
14266  *         return False
14267  *     value = __parseBoolAsInt(s)
14268  *     if value == -1:             # <<<<<<<<<<<<<<
14269  *         raise ValueError, f"Invalid boolean value: '{s}'"
14270  *     return value
14271  */
14272   __pyx_t_2 = ((__pyx_v_value == -1L) != 0);
14273   if (unlikely(__pyx_t_2)) {
14274
14275     /* "lxml/objectify.pyx":856
14276  *     value = __parseBoolAsInt(s)
14277  *     if value == -1:
14278  *         raise ValueError, f"Invalid boolean value: '{s}'"             # <<<<<<<<<<<<<<
14279  *     return value
14280  * 
14281  */
14282     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
14283     __Pyx_GOTREF(__pyx_t_4);
14284     __pyx_t_5 = 0;
14285     __pyx_t_6 = 127;
14286     __Pyx_INCREF(__pyx_kp_u_Invalid_boolean_value);
14287     __pyx_t_5 += 24;
14288     __Pyx_GIVEREF(__pyx_kp_u_Invalid_boolean_value);
14289     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Invalid_boolean_value);
14290     __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_s, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
14291     __Pyx_GOTREF(__pyx_t_7);
14292     __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
14293     __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
14294     __Pyx_GIVEREF(__pyx_t_7);
14295     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
14296     __pyx_t_7 = 0;
14297     __Pyx_INCREF(__pyx_kp_u__4);
14298     __pyx_t_5 += 1;
14299     __Pyx_GIVEREF(__pyx_kp_u__4);
14300     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__4);
14301     __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 856, __pyx_L1_error)
14302     __Pyx_GOTREF(__pyx_t_7);
14303     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14304     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_7, 0, 0);
14305     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14306     __PYX_ERR(0, 856, __pyx_L1_error)
14307
14308     /* "lxml/objectify.pyx":855
14309  *         return False
14310  *     value = __parseBoolAsInt(s)
14311  *     if value == -1:             # <<<<<<<<<<<<<<
14312  *         raise ValueError, f"Invalid boolean value: '{s}'"
14313  *     return value
14314  */
14315   }
14316
14317   /* "lxml/objectify.pyx":857
14318  *     if value == -1:
14319  *         raise ValueError, f"Invalid boolean value: '{s}'"
14320  *     return value             # <<<<<<<<<<<<<<
14321  * 
14322  * cdef inline int __parseBoolAsInt(text) except -2:
14323  */
14324   __pyx_r = __pyx_v_value;
14325   goto __pyx_L0;
14326
14327   /* "lxml/objectify.pyx":850
14328  *         raise ValueError
14329  * 
14330  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
14331  *     cdef int value
14332  *     if s is None:
14333  */
14334
14335   /* function exit code */
14336   __pyx_L1_error:;
14337   __Pyx_XDECREF(__pyx_t_4);
14338   __Pyx_XDECREF(__pyx_t_7);
14339   __Pyx_AddTraceback("lxml.objectify.__parseBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14340   __pyx_r = -1;
14341   __pyx_L0:;
14342   __Pyx_RefNannyFinishContext();
14343   return __pyx_r;
14344 }
14345
14346 /* Python wrapper */
14347 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
14348 static PyMethodDef __pyx_mdef_4lxml_9objectify_5__parseBool = {"__parseBool", (PyCFunction)__pyx_pw_4lxml_9objectify_5__parseBool, METH_O, 0};
14349 static PyObject *__pyx_pw_4lxml_9objectify_5__parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
14350   PyObject *__pyx_r = 0;
14351   __Pyx_RefNannyDeclarations
14352   __Pyx_RefNannySetupContext("__parseBool (wrapper)", 0);
14353   __pyx_r = __pyx_pf_4lxml_9objectify_4__parseBool(__pyx_self, ((PyObject *)__pyx_v_s));
14354
14355   /* function exit code */
14356   __Pyx_RefNannyFinishContext();
14357   return __pyx_r;
14358 }
14359
14360 static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
14361   PyObject *__pyx_r = NULL;
14362   __Pyx_RefNannyDeclarations
14363   int __pyx_t_1;
14364   PyObject *__pyx_t_2 = NULL;
14365   int __pyx_lineno = 0;
14366   const char *__pyx_filename = NULL;
14367   int __pyx_clineno = 0;
14368   __Pyx_RefNannySetupContext("__parseBool", 0);
14369   __Pyx_XDECREF(__pyx_r);
14370   __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 850, __pyx_L1_error)
14371   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
14372   __Pyx_GOTREF(__pyx_t_2);
14373   __pyx_r = __pyx_t_2;
14374   __pyx_t_2 = 0;
14375   goto __pyx_L0;
14376
14377   /* function exit code */
14378   __pyx_L1_error:;
14379   __Pyx_XDECREF(__pyx_t_2);
14380   __Pyx_AddTraceback("lxml.objectify.__parseBool", __pyx_clineno, __pyx_lineno, __pyx_filename);
14381   __pyx_r = NULL;
14382   __pyx_L0:;
14383   __Pyx_XGIVEREF(__pyx_r);
14384   __Pyx_RefNannyFinishContext();
14385   return __pyx_r;
14386 }
14387
14388 /* "lxml/objectify.pyx":859
14389  *     return value
14390  * 
14391  * cdef inline int __parseBoolAsInt(text) except -2:             # <<<<<<<<<<<<<<
14392  *     if text == 'false':
14393  *         return 0
14394  */
14395
14396 static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
14397   int __pyx_r;
14398   __Pyx_RefNannyDeclarations
14399   int __pyx_t_1;
14400   int __pyx_lineno = 0;
14401   const char *__pyx_filename = NULL;
14402   int __pyx_clineno = 0;
14403   __Pyx_RefNannySetupContext("__parseBoolAsInt", 0);
14404
14405   /* "lxml/objectify.pyx":860
14406  * 
14407  * cdef inline int __parseBoolAsInt(text) except -2:
14408  *     if text == 'false':             # <<<<<<<<<<<<<<
14409  *         return 0
14410  *     elif text == 'true':
14411  */
14412   __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_false, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 860, __pyx_L1_error)
14413   if (__pyx_t_1) {
14414
14415     /* "lxml/objectify.pyx":861
14416  * cdef inline int __parseBoolAsInt(text) except -2:
14417  *     if text == 'false':
14418  *         return 0             # <<<<<<<<<<<<<<
14419  *     elif text == 'true':
14420  *         return 1
14421  */
14422     __pyx_r = 0;
14423     goto __pyx_L0;
14424
14425     /* "lxml/objectify.pyx":860
14426  * 
14427  * cdef inline int __parseBoolAsInt(text) except -2:
14428  *     if text == 'false':             # <<<<<<<<<<<<<<
14429  *         return 0
14430  *     elif text == 'true':
14431  */
14432   }
14433
14434   /* "lxml/objectify.pyx":862
14435  *     if text == 'false':
14436  *         return 0
14437  *     elif text == 'true':             # <<<<<<<<<<<<<<
14438  *         return 1
14439  *     elif text == '0':
14440  */
14441   __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 862, __pyx_L1_error)
14442   if (__pyx_t_1) {
14443
14444     /* "lxml/objectify.pyx":863
14445  *         return 0
14446  *     elif text == 'true':
14447  *         return 1             # <<<<<<<<<<<<<<
14448  *     elif text == '0':
14449  *         return 0
14450  */
14451     __pyx_r = 1;
14452     goto __pyx_L0;
14453
14454     /* "lxml/objectify.pyx":862
14455  *     if text == 'false':
14456  *         return 0
14457  *     elif text == 'true':             # <<<<<<<<<<<<<<
14458  *         return 1
14459  *     elif text == '0':
14460  */
14461   }
14462
14463   /* "lxml/objectify.pyx":864
14464  *     elif text == 'true':
14465  *         return 1
14466  *     elif text == '0':             # <<<<<<<<<<<<<<
14467  *         return 0
14468  *     elif text == '1':
14469  */
14470   __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 864, __pyx_L1_error)
14471   if (__pyx_t_1) {
14472
14473     /* "lxml/objectify.pyx":865
14474  *         return 1
14475  *     elif text == '0':
14476  *         return 0             # <<<<<<<<<<<<<<
14477  *     elif text == '1':
14478  *         return 1
14479  */
14480     __pyx_r = 0;
14481     goto __pyx_L0;
14482
14483     /* "lxml/objectify.pyx":864
14484  *     elif text == 'true':
14485  *         return 1
14486  *     elif text == '0':             # <<<<<<<<<<<<<<
14487  *         return 0
14488  *     elif text == '1':
14489  */
14490   }
14491
14492   /* "lxml/objectify.pyx":866
14493  *     elif text == '0':
14494  *         return 0
14495  *     elif text == '1':             # <<<<<<<<<<<<<<
14496  *         return 1
14497  *     return -1
14498  */
14499   __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_1, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 866, __pyx_L1_error)
14500   if (__pyx_t_1) {
14501
14502     /* "lxml/objectify.pyx":867
14503  *         return 0
14504  *     elif text == '1':
14505  *         return 1             # <<<<<<<<<<<<<<
14506  *     return -1
14507  * 
14508  */
14509     __pyx_r = 1;
14510     goto __pyx_L0;
14511
14512     /* "lxml/objectify.pyx":866
14513  *     elif text == '0':
14514  *         return 0
14515  *     elif text == '1':             # <<<<<<<<<<<<<<
14516  *         return 1
14517  *     return -1
14518  */
14519   }
14520
14521   /* "lxml/objectify.pyx":868
14522  *     elif text == '1':
14523  *         return 1
14524  *     return -1             # <<<<<<<<<<<<<<
14525  * 
14526  * cdef object _parseNumber(NumberElement element):
14527  */
14528   __pyx_r = -1;
14529   goto __pyx_L0;
14530
14531   /* "lxml/objectify.pyx":859
14532  *     return value
14533  * 
14534  * cdef inline int __parseBoolAsInt(text) except -2:             # <<<<<<<<<<<<<<
14535  *     if text == 'false':
14536  *         return 0
14537  */
14538
14539   /* function exit code */
14540   __pyx_L1_error:;
14541   __Pyx_AddTraceback("lxml.objectify.__parseBoolAsInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
14542   __pyx_r = -2;
14543   __pyx_L0:;
14544   __Pyx_RefNannyFinishContext();
14545   return __pyx_r;
14546 }
14547
14548 /* "lxml/objectify.pyx":870
14549  *     return -1
14550  * 
14551  * cdef object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
14552  *     return element._parse_value(textOf(element._c_node))
14553  * 
14554  */
14555
14556 static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
14557   PyObject *__pyx_r = NULL;
14558   __Pyx_RefNannyDeclarations
14559   PyObject *__pyx_t_1 = NULL;
14560   PyObject *__pyx_t_2 = NULL;
14561   PyObject *__pyx_t_3 = NULL;
14562   PyObject *__pyx_t_4 = NULL;
14563   int __pyx_lineno = 0;
14564   const char *__pyx_filename = NULL;
14565   int __pyx_clineno = 0;
14566   __Pyx_RefNannySetupContext("_parseNumber", 0);
14567
14568   /* "lxml/objectify.pyx":871
14569  * 
14570  * cdef object _parseNumber(NumberElement element):
14571  *     return element._parse_value(textOf(element._c_node))             # <<<<<<<<<<<<<<
14572  * 
14573  * cdef object _strValueOf(obj):
14574  */
14575   __Pyx_XDECREF(__pyx_r);
14576   __pyx_t_2 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
14577   __Pyx_GOTREF(__pyx_t_2);
14578   __Pyx_INCREF(__pyx_v_element->_parse_value);
14579   __pyx_t_3 = __pyx_v_element->_parse_value; __pyx_t_4 = NULL;
14580   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
14581     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
14582     if (likely(__pyx_t_4)) {
14583       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14584       __Pyx_INCREF(__pyx_t_4);
14585       __Pyx_INCREF(function);
14586       __Pyx_DECREF_SET(__pyx_t_3, function);
14587     }
14588   }
14589   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
14590   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14591   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14592   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
14593   __Pyx_GOTREF(__pyx_t_1);
14594   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14595   __pyx_r = __pyx_t_1;
14596   __pyx_t_1 = 0;
14597   goto __pyx_L0;
14598
14599   /* "lxml/objectify.pyx":870
14600  *     return -1
14601  * 
14602  * cdef object _parseNumber(NumberElement element):             # <<<<<<<<<<<<<<
14603  *     return element._parse_value(textOf(element._c_node))
14604  * 
14605  */
14606
14607   /* function exit code */
14608   __pyx_L1_error:;
14609   __Pyx_XDECREF(__pyx_t_1);
14610   __Pyx_XDECREF(__pyx_t_2);
14611   __Pyx_XDECREF(__pyx_t_3);
14612   __Pyx_XDECREF(__pyx_t_4);
14613   __Pyx_AddTraceback("lxml.objectify._parseNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
14614   __pyx_r = 0;
14615   __pyx_L0:;
14616   __Pyx_XGIVEREF(__pyx_r);
14617   __Pyx_RefNannyFinishContext();
14618   return __pyx_r;
14619 }
14620
14621 /* "lxml/objectify.pyx":873
14622  *     return element._parse_value(textOf(element._c_node))
14623  * 
14624  * cdef object _strValueOf(obj):             # <<<<<<<<<<<<<<
14625  *     if python._isString(obj):
14626  *         return obj
14627  */
14628
14629 static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
14630   PyObject *__pyx_r = NULL;
14631   __Pyx_RefNannyDeclarations
14632   int __pyx_t_1;
14633   int __pyx_t_2;
14634   PyObject *__pyx_t_3 = NULL;
14635   PyObject *__pyx_t_4 = NULL;
14636   int __pyx_lineno = 0;
14637   const char *__pyx_filename = NULL;
14638   int __pyx_clineno = 0;
14639   __Pyx_RefNannySetupContext("_strValueOf", 0);
14640
14641   /* "lxml/objectify.pyx":874
14642  * 
14643  * cdef object _strValueOf(obj):
14644  *     if python._isString(obj):             # <<<<<<<<<<<<<<
14645  *         return obj
14646  *     if isinstance(obj, _Element):
14647  */
14648   __pyx_t_1 = (_isString(__pyx_v_obj) != 0);
14649   if (__pyx_t_1) {
14650
14651     /* "lxml/objectify.pyx":875
14652  * cdef object _strValueOf(obj):
14653  *     if python._isString(obj):
14654  *         return obj             # <<<<<<<<<<<<<<
14655  *     if isinstance(obj, _Element):
14656  *         return textOf((<_Element>obj)._c_node) or u''
14657  */
14658     __Pyx_XDECREF(__pyx_r);
14659     __Pyx_INCREF(__pyx_v_obj);
14660     __pyx_r = __pyx_v_obj;
14661     goto __pyx_L0;
14662
14663     /* "lxml/objectify.pyx":874
14664  * 
14665  * cdef object _strValueOf(obj):
14666  *     if python._isString(obj):             # <<<<<<<<<<<<<<
14667  *         return obj
14668  *     if isinstance(obj, _Element):
14669  */
14670   }
14671
14672   /* "lxml/objectify.pyx":876
14673  *     if python._isString(obj):
14674  *         return obj
14675  *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
14676  *         return textOf((<_Element>obj)._c_node) or u''
14677  *     if obj is None:
14678  */
14679   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
14680   __pyx_t_2 = (__pyx_t_1 != 0);
14681   if (__pyx_t_2) {
14682
14683     /* "lxml/objectify.pyx":877
14684  *         return obj
14685  *     if isinstance(obj, _Element):
14686  *         return textOf((<_Element>obj)._c_node) or u''             # <<<<<<<<<<<<<<
14687  *     if obj is None:
14688  *         return u''
14689  */
14690     __Pyx_XDECREF(__pyx_r);
14691     __pyx_t_4 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 877, __pyx_L1_error)
14692     __Pyx_GOTREF(__pyx_t_4);
14693     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 877, __pyx_L1_error)
14694     if (!__pyx_t_2) {
14695       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14696     } else {
14697       __Pyx_INCREF(__pyx_t_4);
14698       __pyx_t_3 = __pyx_t_4;
14699       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14700       goto __pyx_L5_bool_binop_done;
14701     }
14702     __Pyx_INCREF(__pyx_kp_u_);
14703     __pyx_t_3 = __pyx_kp_u_;
14704     __pyx_L5_bool_binop_done:;
14705     __pyx_r = __pyx_t_3;
14706     __pyx_t_3 = 0;
14707     goto __pyx_L0;
14708
14709     /* "lxml/objectify.pyx":876
14710  *     if python._isString(obj):
14711  *         return obj
14712  *     if isinstance(obj, _Element):             # <<<<<<<<<<<<<<
14713  *         return textOf((<_Element>obj)._c_node) or u''
14714  *     if obj is None:
14715  */
14716   }
14717
14718   /* "lxml/objectify.pyx":878
14719  *     if isinstance(obj, _Element):
14720  *         return textOf((<_Element>obj)._c_node) or u''
14721  *     if obj is None:             # <<<<<<<<<<<<<<
14722  *         return u''
14723  *     return unicode(obj)
14724  */
14725   __pyx_t_2 = (__pyx_v_obj == Py_None);
14726   __pyx_t_1 = (__pyx_t_2 != 0);
14727   if (__pyx_t_1) {
14728
14729     /* "lxml/objectify.pyx":879
14730  *         return textOf((<_Element>obj)._c_node) or u''
14731  *     if obj is None:
14732  *         return u''             # <<<<<<<<<<<<<<
14733  *     return unicode(obj)
14734  * 
14735  */
14736     __Pyx_XDECREF(__pyx_r);
14737     __Pyx_INCREF(__pyx_kp_u_);
14738     __pyx_r = __pyx_kp_u_;
14739     goto __pyx_L0;
14740
14741     /* "lxml/objectify.pyx":878
14742  *     if isinstance(obj, _Element):
14743  *         return textOf((<_Element>obj)._c_node) or u''
14744  *     if obj is None:             # <<<<<<<<<<<<<<
14745  *         return u''
14746  *     return unicode(obj)
14747  */
14748   }
14749
14750   /* "lxml/objectify.pyx":880
14751  *     if obj is None:
14752  *         return u''
14753  *     return unicode(obj)             # <<<<<<<<<<<<<<
14754  * 
14755  * cdef object _numericValueOf(obj):
14756  */
14757   __Pyx_XDECREF(__pyx_r);
14758   __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 880, __pyx_L1_error)
14759   __Pyx_GOTREF(__pyx_t_3);
14760   __pyx_r = __pyx_t_3;
14761   __pyx_t_3 = 0;
14762   goto __pyx_L0;
14763
14764   /* "lxml/objectify.pyx":873
14765  *     return element._parse_value(textOf(element._c_node))
14766  * 
14767  * cdef object _strValueOf(obj):             # <<<<<<<<<<<<<<
14768  *     if python._isString(obj):
14769  *         return obj
14770  */
14771
14772   /* function exit code */
14773   __pyx_L1_error:;
14774   __Pyx_XDECREF(__pyx_t_3);
14775   __Pyx_XDECREF(__pyx_t_4);
14776   __Pyx_AddTraceback("lxml.objectify._strValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
14777   __pyx_r = 0;
14778   __pyx_L0:;
14779   __Pyx_XGIVEREF(__pyx_r);
14780   __Pyx_RefNannyFinishContext();
14781   return __pyx_r;
14782 }
14783
14784 /* "lxml/objectify.pyx":882
14785  *     return unicode(obj)
14786  * 
14787  * cdef object _numericValueOf(obj):             # <<<<<<<<<<<<<<
14788  *     if isinstance(obj, NumberElement):
14789  *         return _parseNumber(<NumberElement>obj)
14790  */
14791
14792 static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
14793   PyObject *__pyx_r = NULL;
14794   __Pyx_RefNannyDeclarations
14795   int __pyx_t_1;
14796   int __pyx_t_2;
14797   PyObject *__pyx_t_3 = NULL;
14798   PyObject *__pyx_t_4 = NULL;
14799   PyObject *__pyx_t_5 = NULL;
14800   PyObject *__pyx_t_6 = NULL;
14801   int __pyx_t_7;
14802   int __pyx_lineno = 0;
14803   const char *__pyx_filename = NULL;
14804   int __pyx_clineno = 0;
14805   __Pyx_RefNannySetupContext("_numericValueOf", 0);
14806
14807   /* "lxml/objectify.pyx":883
14808  * 
14809  * cdef object _numericValueOf(obj):
14810  *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
14811  *         return _parseNumber(<NumberElement>obj)
14812  *     try:
14813  */
14814   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_ptype_4lxml_9objectify_NumberElement); 
14815   __pyx_t_2 = (__pyx_t_1 != 0);
14816   if (__pyx_t_2) {
14817
14818     /* "lxml/objectify.pyx":884
14819  * cdef object _numericValueOf(obj):
14820  *     if isinstance(obj, NumberElement):
14821  *         return _parseNumber(<NumberElement>obj)             # <<<<<<<<<<<<<<
14822  *     try:
14823  *         # not always numeric, but Python will raise the right exception
14824  */
14825     __Pyx_XDECREF(__pyx_r);
14826     __pyx_t_3 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error)
14827     __Pyx_GOTREF(__pyx_t_3);
14828     __pyx_r = __pyx_t_3;
14829     __pyx_t_3 = 0;
14830     goto __pyx_L0;
14831
14832     /* "lxml/objectify.pyx":883
14833  * 
14834  * cdef object _numericValueOf(obj):
14835  *     if isinstance(obj, NumberElement):             # <<<<<<<<<<<<<<
14836  *         return _parseNumber(<NumberElement>obj)
14837  *     try:
14838  */
14839   }
14840
14841   /* "lxml/objectify.pyx":885
14842  *     if isinstance(obj, NumberElement):
14843  *         return _parseNumber(<NumberElement>obj)
14844  *     try:             # <<<<<<<<<<<<<<
14845  *         # not always numeric, but Python will raise the right exception
14846  *         return obj.pyval
14847  */
14848   {
14849     __Pyx_PyThreadState_declare
14850     __Pyx_PyThreadState_assign
14851     __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
14852     __Pyx_XGOTREF(__pyx_t_4);
14853     __Pyx_XGOTREF(__pyx_t_5);
14854     __Pyx_XGOTREF(__pyx_t_6);
14855     /*try:*/ {
14856
14857       /* "lxml/objectify.pyx":887
14858  *     try:
14859  *         # not always numeric, but Python will raise the right exception
14860  *         return obj.pyval             # <<<<<<<<<<<<<<
14861  *     except AttributeError:
14862  *         pass
14863  */
14864       __Pyx_XDECREF(__pyx_r);
14865       __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_pyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L4_error)
14866       __Pyx_GOTREF(__pyx_t_3);
14867       __pyx_r = __pyx_t_3;
14868       __pyx_t_3 = 0;
14869       goto __pyx_L8_try_return;
14870
14871       /* "lxml/objectify.pyx":885
14872  *     if isinstance(obj, NumberElement):
14873  *         return _parseNumber(<NumberElement>obj)
14874  *     try:             # <<<<<<<<<<<<<<
14875  *         # not always numeric, but Python will raise the right exception
14876  *         return obj.pyval
14877  */
14878     }
14879     __pyx_L4_error:;
14880     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14881
14882     /* "lxml/objectify.pyx":888
14883  *         # not always numeric, but Python will raise the right exception
14884  *         return obj.pyval
14885  *     except AttributeError:             # <<<<<<<<<<<<<<
14886  *         pass
14887  *     return obj
14888  */
14889     __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
14890     if (__pyx_t_7) {
14891       __Pyx_ErrRestore(0,0,0);
14892       goto __pyx_L5_exception_handled;
14893     }
14894     goto __pyx_L6_except_error;
14895     __pyx_L6_except_error:;
14896
14897     /* "lxml/objectify.pyx":885
14898  *     if isinstance(obj, NumberElement):
14899  *         return _parseNumber(<NumberElement>obj)
14900  *     try:             # <<<<<<<<<<<<<<
14901  *         # not always numeric, but Python will raise the right exception
14902  *         return obj.pyval
14903  */
14904     __Pyx_XGIVEREF(__pyx_t_4);
14905     __Pyx_XGIVEREF(__pyx_t_5);
14906     __Pyx_XGIVEREF(__pyx_t_6);
14907     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14908     goto __pyx_L1_error;
14909     __pyx_L8_try_return:;
14910     __Pyx_XGIVEREF(__pyx_t_4);
14911     __Pyx_XGIVEREF(__pyx_t_5);
14912     __Pyx_XGIVEREF(__pyx_t_6);
14913     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14914     goto __pyx_L0;
14915     __pyx_L5_exception_handled:;
14916     __Pyx_XGIVEREF(__pyx_t_4);
14917     __Pyx_XGIVEREF(__pyx_t_5);
14918     __Pyx_XGIVEREF(__pyx_t_6);
14919     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
14920   }
14921
14922   /* "lxml/objectify.pyx":890
14923  *     except AttributeError:
14924  *         pass
14925  *     return obj             # <<<<<<<<<<<<<<
14926  * 
14927  * cdef _richcmpPyvals(left, right, int op):
14928  */
14929   __Pyx_XDECREF(__pyx_r);
14930   __Pyx_INCREF(__pyx_v_obj);
14931   __pyx_r = __pyx_v_obj;
14932   goto __pyx_L0;
14933
14934   /* "lxml/objectify.pyx":882
14935  *     return unicode(obj)
14936  * 
14937  * cdef object _numericValueOf(obj):             # <<<<<<<<<<<<<<
14938  *     if isinstance(obj, NumberElement):
14939  *         return _parseNumber(<NumberElement>obj)
14940  */
14941
14942   /* function exit code */
14943   __pyx_L1_error:;
14944   __Pyx_XDECREF(__pyx_t_3);
14945   __Pyx_AddTraceback("lxml.objectify._numericValueOf", __pyx_clineno, __pyx_lineno, __pyx_filename);
14946   __pyx_r = 0;
14947   __pyx_L0:;
14948   __Pyx_XGIVEREF(__pyx_r);
14949   __Pyx_RefNannyFinishContext();
14950   return __pyx_r;
14951 }
14952
14953 /* "lxml/objectify.pyx":892
14954  *     return obj
14955  * 
14956  * cdef _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
14957  *     left  = getattr(left,  'pyval', left)
14958  *     right = getattr(right, 'pyval', right)
14959  */
14960
14961 static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
14962   PyObject *__pyx_r = NULL;
14963   __Pyx_RefNannyDeclarations
14964   PyObject *__pyx_t_1 = NULL;
14965   int __pyx_lineno = 0;
14966   const char *__pyx_filename = NULL;
14967   int __pyx_clineno = 0;
14968   __Pyx_RefNannySetupContext("_richcmpPyvals", 0);
14969   __Pyx_INCREF(__pyx_v_left);
14970   __Pyx_INCREF(__pyx_v_right);
14971
14972   /* "lxml/objectify.pyx":893
14973  * 
14974  * cdef _richcmpPyvals(left, right, int op):
14975  *     left  = getattr(left,  'pyval', left)             # <<<<<<<<<<<<<<
14976  *     right = getattr(right, 'pyval', right)
14977  *     return python.PyObject_RichCompare(left, right, op)
14978  */
14979   __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, __pyx_n_s_pyval, __pyx_v_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
14980   __Pyx_GOTREF(__pyx_t_1);
14981   __Pyx_DECREF_SET(__pyx_v_left, __pyx_t_1);
14982   __pyx_t_1 = 0;
14983
14984   /* "lxml/objectify.pyx":894
14985  * cdef _richcmpPyvals(left, right, int op):
14986  *     left  = getattr(left,  'pyval', left)
14987  *     right = getattr(right, 'pyval', right)             # <<<<<<<<<<<<<<
14988  *     return python.PyObject_RichCompare(left, right, op)
14989  * 
14990  */
14991   __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, __pyx_n_s_pyval, __pyx_v_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 894, __pyx_L1_error)
14992   __Pyx_GOTREF(__pyx_t_1);
14993   __Pyx_DECREF_SET(__pyx_v_right, __pyx_t_1);
14994   __pyx_t_1 = 0;
14995
14996   /* "lxml/objectify.pyx":895
14997  *     left  = getattr(left,  'pyval', left)
14998  *     right = getattr(right, 'pyval', right)
14999  *     return python.PyObject_RichCompare(left, right, op)             # <<<<<<<<<<<<<<
15000  * 
15001  * 
15002  */
15003   __Pyx_XDECREF(__pyx_r);
15004   __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
15005   __Pyx_GOTREF(__pyx_t_1);
15006   __pyx_r = __pyx_t_1;
15007   __pyx_t_1 = 0;
15008   goto __pyx_L0;
15009
15010   /* "lxml/objectify.pyx":892
15011  *     return obj
15012  * 
15013  * cdef _richcmpPyvals(left, right, int op):             # <<<<<<<<<<<<<<
15014  *     left  = getattr(left,  'pyval', left)
15015  *     right = getattr(right, 'pyval', right)
15016  */
15017
15018   /* function exit code */
15019   __pyx_L1_error:;
15020   __Pyx_XDECREF(__pyx_t_1);
15021   __Pyx_AddTraceback("lxml.objectify._richcmpPyvals", __pyx_clineno, __pyx_lineno, __pyx_filename);
15022   __pyx_r = 0;
15023   __pyx_L0:;
15024   __Pyx_XDECREF(__pyx_v_left);
15025   __Pyx_XDECREF(__pyx_v_right);
15026   __Pyx_XGIVEREF(__pyx_r);
15027   __Pyx_RefNannyFinishContext();
15028   return __pyx_r;
15029 }
15030
15031 /* "lxml/objectify.pyx":926
15032  *     cdef object _type
15033  *     cdef list _schema_types
15034  *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
15035  *         if isinstance(name, bytes):
15036  *             name = (<bytes>name).decode('ascii')
15037  */
15038
15039 /* Python wrapper */
15040 static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15041 static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15042   PyObject *__pyx_v_name = 0;
15043   PyObject *__pyx_v_type_check = 0;
15044   PyObject *__pyx_v_type_class = 0;
15045   PyObject *__pyx_v_stringify = 0;
15046   int __pyx_lineno = 0;
15047   const char *__pyx_filename = NULL;
15048   int __pyx_clineno = 0;
15049   int __pyx_r;
15050   __Pyx_RefNannyDeclarations
15051   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
15052   {
15053     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_type_check,&__pyx_n_s_type_class,&__pyx_n_s_stringify,0};
15054     PyObject* values[4] = {0,0,0,0};
15055     values[3] = ((PyObject *)Py_None);
15056     if (unlikely(__pyx_kwds)) {
15057       Py_ssize_t kw_args;
15058       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15059       switch (pos_args) {
15060         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15061         CYTHON_FALLTHROUGH;
15062         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15063         CYTHON_FALLTHROUGH;
15064         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15065         CYTHON_FALLTHROUGH;
15066         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15067         CYTHON_FALLTHROUGH;
15068         case  0: break;
15069         default: goto __pyx_L5_argtuple_error;
15070       }
15071       kw_args = PyDict_Size(__pyx_kwds);
15072       switch (pos_args) {
15073         case  0:
15074         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
15075         else goto __pyx_L5_argtuple_error;
15076         CYTHON_FALLTHROUGH;
15077         case  1:
15078         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_check)) != 0)) kw_args--;
15079         else {
15080           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 926, __pyx_L3_error)
15081         }
15082         CYTHON_FALLTHROUGH;
15083         case  2:
15084         if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_class)) != 0)) kw_args--;
15085         else {
15086           __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 926, __pyx_L3_error)
15087         }
15088         CYTHON_FALLTHROUGH;
15089         case  3:
15090         if (kw_args > 0) {
15091           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stringify);
15092           if (value) { values[3] = value; kw_args--; }
15093         }
15094       }
15095       if (unlikely(kw_args > 0)) {
15096         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 926, __pyx_L3_error)
15097       }
15098     } else {
15099       switch (PyTuple_GET_SIZE(__pyx_args)) {
15100         case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15101         CYTHON_FALLTHROUGH;
15102         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15103         values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15104         values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15105         break;
15106         default: goto __pyx_L5_argtuple_error;
15107       }
15108     }
15109     __pyx_v_name = values[0];
15110     __pyx_v_type_check = values[1];
15111     __pyx_v_type_class = values[2];
15112     __pyx_v_stringify = values[3];
15113   }
15114   goto __pyx_L4_argument_unpacking_done;
15115   __pyx_L5_argtuple_error:;
15116   __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 926, __pyx_L3_error)
15117   __pyx_L3_error:;
15118   __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15119   __Pyx_RefNannyFinishContext();
15120   return -1;
15121   __pyx_L4_argument_unpacking_done:;
15122   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType___init__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), __pyx_v_name, __pyx_v_type_check, __pyx_v_type_class, __pyx_v_stringify);
15123
15124   /* function exit code */
15125   __Pyx_RefNannyFinishContext();
15126   return __pyx_r;
15127 }
15128
15129 static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_type_check, PyObject *__pyx_v_type_class, PyObject *__pyx_v_stringify) {
15130   int __pyx_r;
15131   __Pyx_RefNannyDeclarations
15132   int __pyx_t_1;
15133   int __pyx_t_2;
15134   PyObject *__pyx_t_3 = NULL;
15135   int __pyx_t_4;
15136   int __pyx_lineno = 0;
15137   const char *__pyx_filename = NULL;
15138   int __pyx_clineno = 0;
15139   __Pyx_RefNannySetupContext("__init__", 0);
15140   __Pyx_INCREF(__pyx_v_name);
15141   __Pyx_INCREF(__pyx_v_stringify);
15142
15143   /* "lxml/objectify.pyx":927
15144  *     cdef list _schema_types
15145  *     def __init__(self, name, type_check, type_class, stringify=None):
15146  *         if isinstance(name, bytes):             # <<<<<<<<<<<<<<
15147  *             name = (<bytes>name).decode('ascii')
15148  *         elif not isinstance(name, unicode):
15149  */
15150   __pyx_t_1 = PyBytes_Check(__pyx_v_name); 
15151   __pyx_t_2 = (__pyx_t_1 != 0);
15152   if (__pyx_t_2) {
15153
15154     /* "lxml/objectify.pyx":928
15155  *     def __init__(self, name, type_check, type_class, stringify=None):
15156  *         if isinstance(name, bytes):
15157  *             name = (<bytes>name).decode('ascii')             # <<<<<<<<<<<<<<
15158  *         elif not isinstance(name, unicode):
15159  *             raise TypeError, u"Type name must be a string"
15160  */
15161     if (unlikely(__pyx_v_name == Py_None)) {
15162       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
15163       __PYX_ERR(0, 928, __pyx_L1_error)
15164     }
15165     __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)
15166     __Pyx_GOTREF(__pyx_t_3);
15167     __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3);
15168     __pyx_t_3 = 0;
15169
15170     /* "lxml/objectify.pyx":927
15171  *     cdef list _schema_types
15172  *     def __init__(self, name, type_check, type_class, stringify=None):
15173  *         if isinstance(name, bytes):             # <<<<<<<<<<<<<<
15174  *             name = (<bytes>name).decode('ascii')
15175  *         elif not isinstance(name, unicode):
15176  */
15177     goto __pyx_L3;
15178   }
15179
15180   /* "lxml/objectify.pyx":929
15181  *         if isinstance(name, bytes):
15182  *             name = (<bytes>name).decode('ascii')
15183  *         elif not isinstance(name, unicode):             # <<<<<<<<<<<<<<
15184  *             raise TypeError, u"Type name must be a string"
15185  *         if type_check is not None and not callable(type_check):
15186  */
15187   __pyx_t_2 = PyUnicode_Check(__pyx_v_name); 
15188   __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
15189   if (unlikely(__pyx_t_1)) {
15190
15191     /* "lxml/objectify.pyx":930
15192  *             name = (<bytes>name).decode('ascii')
15193  *         elif not isinstance(name, unicode):
15194  *             raise TypeError, u"Type name must be a string"             # <<<<<<<<<<<<<<
15195  *         if type_check is not None and not callable(type_check):
15196  *             raise TypeError, u"Type check function must be callable (or None)"
15197  */
15198     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_name_must_be_a_string, 0, 0);
15199     __PYX_ERR(0, 930, __pyx_L1_error)
15200
15201     /* "lxml/objectify.pyx":929
15202  *         if isinstance(name, bytes):
15203  *             name = (<bytes>name).decode('ascii')
15204  *         elif not isinstance(name, unicode):             # <<<<<<<<<<<<<<
15205  *             raise TypeError, u"Type name must be a string"
15206  *         if type_check is not None and not callable(type_check):
15207  */
15208   }
15209   __pyx_L3:;
15210
15211   /* "lxml/objectify.pyx":931
15212  *         elif not isinstance(name, unicode):
15213  *             raise TypeError, u"Type name must be a string"
15214  *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
15215  *             raise TypeError, u"Type check function must be callable (or None)"
15216  *         if name != TREE_PYTYPE_NAME and \
15217  */
15218   __pyx_t_2 = (__pyx_v_type_check != Py_None);
15219   __pyx_t_4 = (__pyx_t_2 != 0);
15220   if (__pyx_t_4) {
15221   } else {
15222     __pyx_t_1 = __pyx_t_4;
15223     goto __pyx_L5_bool_binop_done;
15224   }
15225   __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_v_type_check); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 931, __pyx_L1_error)
15226   __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
15227   __pyx_t_1 = __pyx_t_2;
15228   __pyx_L5_bool_binop_done:;
15229   if (unlikely(__pyx_t_1)) {
15230
15231     /* "lxml/objectify.pyx":932
15232  *             raise TypeError, u"Type name must be a string"
15233  *         if type_check is not None and not callable(type_check):
15234  *             raise TypeError, u"Type check function must be callable (or None)"             # <<<<<<<<<<<<<<
15235  *         if name != TREE_PYTYPE_NAME and \
15236  *                not issubclass(type_class, ObjectifiedDataElement):
15237  */
15238     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_check_function_must_be_call, 0, 0);
15239     __PYX_ERR(0, 932, __pyx_L1_error)
15240
15241     /* "lxml/objectify.pyx":931
15242  *         elif not isinstance(name, unicode):
15243  *             raise TypeError, u"Type name must be a string"
15244  *         if type_check is not None and not callable(type_check):             # <<<<<<<<<<<<<<
15245  *             raise TypeError, u"Type check function must be callable (or None)"
15246  *         if name != TREE_PYTYPE_NAME and \
15247  */
15248   }
15249
15250   /* "lxml/objectify.pyx":933
15251  *         if type_check is not None and not callable(type_check):
15252  *             raise TypeError, u"Type check function must be callable (or None)"
15253  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15254  *                not issubclass(type_class, ObjectifiedDataElement):
15255  *             raise TypeError, \
15256  */
15257   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 933, __pyx_L1_error)
15258   if (__pyx_t_2) {
15259   } else {
15260     __pyx_t_1 = __pyx_t_2;
15261     goto __pyx_L8_bool_binop_done;
15262   }
15263
15264   /* "lxml/objectify.pyx":934
15265  *             raise TypeError, u"Type check function must be callable (or None)"
15266  *         if name != TREE_PYTYPE_NAME and \
15267  *                not issubclass(type_class, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
15268  *             raise TypeError, \
15269  *                 u"Data classes must inherit from ObjectifiedDataElement"
15270  */
15271   __pyx_t_2 = PyObject_IsSubclass(__pyx_v_type_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 934, __pyx_L1_error)
15272   __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
15273   __pyx_t_1 = __pyx_t_4;
15274   __pyx_L8_bool_binop_done:;
15275
15276   /* "lxml/objectify.pyx":933
15277  *         if type_check is not None and not callable(type_check):
15278  *             raise TypeError, u"Type check function must be callable (or None)"
15279  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15280  *                not issubclass(type_class, ObjectifiedDataElement):
15281  *             raise TypeError, \
15282  */
15283   if (unlikely(__pyx_t_1)) {
15284
15285     /* "lxml/objectify.pyx":935
15286  *         if name != TREE_PYTYPE_NAME and \
15287  *                not issubclass(type_class, ObjectifiedDataElement):
15288  *             raise TypeError, \             # <<<<<<<<<<<<<<
15289  *                 u"Data classes must inherit from ObjectifiedDataElement"
15290  *         self.name  = name
15291  */
15292     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Data_classes_must_inherit_from_O, 0, 0);
15293     __PYX_ERR(0, 935, __pyx_L1_error)
15294
15295     /* "lxml/objectify.pyx":933
15296  *         if type_check is not None and not callable(type_check):
15297  *             raise TypeError, u"Type check function must be callable (or None)"
15298  *         if name != TREE_PYTYPE_NAME and \             # <<<<<<<<<<<<<<
15299  *                not issubclass(type_class, ObjectifiedDataElement):
15300  *             raise TypeError, \
15301  */
15302   }
15303
15304   /* "lxml/objectify.pyx":937
15305  *             raise TypeError, \
15306  *                 u"Data classes must inherit from ObjectifiedDataElement"
15307  *         self.name  = name             # <<<<<<<<<<<<<<
15308  *         self._type = type_class
15309  *         self.type_check = type_check
15310  */
15311   __Pyx_INCREF(__pyx_v_name);
15312   __Pyx_GIVEREF(__pyx_v_name);
15313   __Pyx_GOTREF(__pyx_v_self->name);
15314   __Pyx_DECREF(__pyx_v_self->name);
15315   __pyx_v_self->name = __pyx_v_name;
15316
15317   /* "lxml/objectify.pyx":938
15318  *                 u"Data classes must inherit from ObjectifiedDataElement"
15319  *         self.name  = name
15320  *         self._type = type_class             # <<<<<<<<<<<<<<
15321  *         self.type_check = type_check
15322  *         if stringify is None:
15323  */
15324   __Pyx_INCREF(__pyx_v_type_class);
15325   __Pyx_GIVEREF(__pyx_v_type_class);
15326   __Pyx_GOTREF(__pyx_v_self->_type);
15327   __Pyx_DECREF(__pyx_v_self->_type);
15328   __pyx_v_self->_type = __pyx_v_type_class;
15329
15330   /* "lxml/objectify.pyx":939
15331  *         self.name  = name
15332  *         self._type = type_class
15333  *         self.type_check = type_check             # <<<<<<<<<<<<<<
15334  *         if stringify is None:
15335  *             stringify = unicode
15336  */
15337   __Pyx_INCREF(__pyx_v_type_check);
15338   __Pyx_GIVEREF(__pyx_v_type_check);
15339   __Pyx_GOTREF(__pyx_v_self->type_check);
15340   __Pyx_DECREF(__pyx_v_self->type_check);
15341   __pyx_v_self->type_check = __pyx_v_type_check;
15342
15343   /* "lxml/objectify.pyx":940
15344  *         self._type = type_class
15345  *         self.type_check = type_check
15346  *         if stringify is None:             # <<<<<<<<<<<<<<
15347  *             stringify = unicode
15348  *         self.stringify = stringify
15349  */
15350   __pyx_t_1 = (__pyx_v_stringify == Py_None);
15351   __pyx_t_4 = (__pyx_t_1 != 0);
15352   if (__pyx_t_4) {
15353
15354     /* "lxml/objectify.pyx":941
15355  *         self.type_check = type_check
15356  *         if stringify is None:
15357  *             stringify = unicode             # <<<<<<<<<<<<<<
15358  *         self.stringify = stringify
15359  *         self._schema_types = []
15360  */
15361     __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
15362     __Pyx_DECREF_SET(__pyx_v_stringify, ((PyObject *)(&PyUnicode_Type)));
15363
15364     /* "lxml/objectify.pyx":940
15365  *         self._type = type_class
15366  *         self.type_check = type_check
15367  *         if stringify is None:             # <<<<<<<<<<<<<<
15368  *             stringify = unicode
15369  *         self.stringify = stringify
15370  */
15371   }
15372
15373   /* "lxml/objectify.pyx":942
15374  *         if stringify is None:
15375  *             stringify = unicode
15376  *         self.stringify = stringify             # <<<<<<<<<<<<<<
15377  *         self._schema_types = []
15378  * 
15379  */
15380   __Pyx_INCREF(__pyx_v_stringify);
15381   __Pyx_GIVEREF(__pyx_v_stringify);
15382   __Pyx_GOTREF(__pyx_v_self->stringify);
15383   __Pyx_DECREF(__pyx_v_self->stringify);
15384   __pyx_v_self->stringify = __pyx_v_stringify;
15385
15386   /* "lxml/objectify.pyx":943
15387  *             stringify = unicode
15388  *         self.stringify = stringify
15389  *         self._schema_types = []             # <<<<<<<<<<<<<<
15390  * 
15391  *     def __repr__(self):
15392  */
15393   __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
15394   __Pyx_GOTREF(__pyx_t_3);
15395   __Pyx_GIVEREF(__pyx_t_3);
15396   __Pyx_GOTREF(__pyx_v_self->_schema_types);
15397   __Pyx_DECREF(__pyx_v_self->_schema_types);
15398   __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_3);
15399   __pyx_t_3 = 0;
15400
15401   /* "lxml/objectify.pyx":926
15402  *     cdef object _type
15403  *     cdef list _schema_types
15404  *     def __init__(self, name, type_check, type_class, stringify=None):             # <<<<<<<<<<<<<<
15405  *         if isinstance(name, bytes):
15406  *             name = (<bytes>name).decode('ascii')
15407  */
15408
15409   /* function exit code */
15410   __pyx_r = 0;
15411   goto __pyx_L0;
15412   __pyx_L1_error:;
15413   __Pyx_XDECREF(__pyx_t_3);
15414   __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15415   __pyx_r = -1;
15416   __pyx_L0:;
15417   __Pyx_XDECREF(__pyx_v_name);
15418   __Pyx_XDECREF(__pyx_v_stringify);
15419   __Pyx_RefNannyFinishContext();
15420   return __pyx_r;
15421 }
15422
15423 /* "lxml/objectify.pyx":945
15424  *         self._schema_types = []
15425  * 
15426  *     def __repr__(self):             # <<<<<<<<<<<<<<
15427  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15428  * 
15429  */
15430
15431 /* Python wrapper */
15432 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self); /*proto*/
15433 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_3__repr__(PyObject *__pyx_v_self) {
15434   PyObject *__pyx_r = 0;
15435   __Pyx_RefNannyDeclarations
15436   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
15437   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_2__repr__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
15438
15439   /* function exit code */
15440   __Pyx_RefNannyFinishContext();
15441   return __pyx_r;
15442 }
15443
15444 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
15445   PyObject *__pyx_r = NULL;
15446   __Pyx_RefNannyDeclarations
15447   PyObject *__pyx_t_1 = NULL;
15448   PyObject *__pyx_t_2 = NULL;
15449   int __pyx_lineno = 0;
15450   const char *__pyx_filename = NULL;
15451   int __pyx_clineno = 0;
15452   __Pyx_RefNannySetupContext("__repr__", 0);
15453
15454   /* "lxml/objectify.pyx":946
15455  * 
15456  *     def __repr__(self):
15457  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)             # <<<<<<<<<<<<<<
15458  * 
15459  *     def register(self, before=None, after=None):
15460  */
15461   __Pyx_XDECREF(__pyx_r);
15462   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_type, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
15463   __Pyx_GOTREF(__pyx_t_1);
15464   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L1_error)
15465   __Pyx_GOTREF(__pyx_t_2);
15466   __Pyx_INCREF(__pyx_v_self->name);
15467   __Pyx_GIVEREF(__pyx_v_self->name);
15468   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->name);
15469   __Pyx_GIVEREF(__pyx_t_1);
15470   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
15471   __pyx_t_1 = 0;
15472   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_PyType_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 946, __pyx_L1_error)
15473   __Pyx_GOTREF(__pyx_t_1);
15474   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15475   __pyx_r = __pyx_t_1;
15476   __pyx_t_1 = 0;
15477   goto __pyx_L0;
15478
15479   /* "lxml/objectify.pyx":945
15480  *         self._schema_types = []
15481  * 
15482  *     def __repr__(self):             # <<<<<<<<<<<<<<
15483  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15484  * 
15485  */
15486
15487   /* function exit code */
15488   __pyx_L1_error:;
15489   __Pyx_XDECREF(__pyx_t_1);
15490   __Pyx_XDECREF(__pyx_t_2);
15491   __Pyx_AddTraceback("lxml.objectify.PyType.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
15492   __pyx_r = NULL;
15493   __pyx_L0:;
15494   __Pyx_XGIVEREF(__pyx_r);
15495   __Pyx_RefNannyFinishContext();
15496   return __pyx_r;
15497 }
15498
15499 /* "lxml/objectify.pyx":948
15500  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
15501  * 
15502  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
15503  *         u"""register(self, before=None, after=None)
15504  * 
15505  */
15506
15507 /* Python wrapper */
15508 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15509 static char __pyx_doc_4lxml_9objectify_6PyType_4register[] = "register(self, before=None, after=None)\n\n        Register the type.\n\n        The additional keyword arguments 'before' and 'after' accept a\n        sequence of type names that must appear before/after the new type in\n        the type list.  If any of them is not currently known, it is simply\n        ignored.  Raises ValueError if the dependencies cannot be fulfilled.\n        ";
15510 static PyMethodDef __pyx_mdef_4lxml_9objectify_6PyType_5register = {"register", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_6PyType_5register, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_6PyType_4register};
15511 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15512   PyObject *__pyx_v_before = 0;
15513   PyObject *__pyx_v_after = 0;
15514   int __pyx_lineno = 0;
15515   const char *__pyx_filename = NULL;
15516   int __pyx_clineno = 0;
15517   PyObject *__pyx_r = 0;
15518   __Pyx_RefNannyDeclarations
15519   __Pyx_RefNannySetupContext("register (wrapper)", 0);
15520   {
15521     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_before,&__pyx_n_s_after,0};
15522     PyObject* values[2] = {0,0};
15523     values[0] = ((PyObject *)Py_None);
15524     values[1] = ((PyObject *)Py_None);
15525     if (unlikely(__pyx_kwds)) {
15526       Py_ssize_t kw_args;
15527       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15528       switch (pos_args) {
15529         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15530         CYTHON_FALLTHROUGH;
15531         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15532         CYTHON_FALLTHROUGH;
15533         case  0: break;
15534         default: goto __pyx_L5_argtuple_error;
15535       }
15536       kw_args = PyDict_Size(__pyx_kwds);
15537       switch (pos_args) {
15538         case  0:
15539         if (kw_args > 0) {
15540           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_before);
15541           if (value) { values[0] = value; kw_args--; }
15542         }
15543         CYTHON_FALLTHROUGH;
15544         case  1:
15545         if (kw_args > 0) {
15546           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_after);
15547           if (value) { values[1] = value; kw_args--; }
15548         }
15549       }
15550       if (unlikely(kw_args > 0)) {
15551         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) __PYX_ERR(0, 948, __pyx_L3_error)
15552       }
15553     } else {
15554       switch (PyTuple_GET_SIZE(__pyx_args)) {
15555         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15556         CYTHON_FALLTHROUGH;
15557         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15558         CYTHON_FALLTHROUGH;
15559         case  0: break;
15560         default: goto __pyx_L5_argtuple_error;
15561       }
15562     }
15563     __pyx_v_before = values[0];
15564     __pyx_v_after = values[1];
15565   }
15566   goto __pyx_L4_argument_unpacking_done;
15567   __pyx_L5_argtuple_error:;
15568   __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 948, __pyx_L3_error)
15569   __pyx_L3_error:;
15570   __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
15571   __Pyx_RefNannyFinishContext();
15572   return NULL;
15573   __pyx_L4_argument_unpacking_done:;
15574   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4register(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), __pyx_v_before, __pyx_v_after);
15575
15576   /* function exit code */
15577   __Pyx_RefNannyFinishContext();
15578   return __pyx_r;
15579 }
15580
15581 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_before, PyObject *__pyx_v_after) {
15582   PyObject *__pyx_v_item = NULL;
15583   PyObject *__pyx_v_entry = NULL;
15584   PyObject *__pyx_v_first_pos = NULL;
15585   PyObject *__pyx_v_last_pos = NULL;
15586   PyObject *__pyx_v_i = NULL;
15587   CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
15588   PyObject *__pyx_v_pytype = NULL;
15589   PyObject *__pyx_v_xs_type = NULL;
15590   PyObject *__pyx_r = NULL;
15591   __Pyx_RefNannyDeclarations
15592   int __pyx_t_1;
15593   int __pyx_t_2;
15594   PyObject *__pyx_t_3 = NULL;
15595   Py_ssize_t __pyx_t_4;
15596   PyObject *__pyx_t_5 = NULL;
15597   PyObject *__pyx_t_6 = NULL;
15598   PyObject *__pyx_t_7 = NULL;
15599   PyObject *__pyx_t_8 = NULL;
15600   PyObject *__pyx_t_9 = NULL;
15601   PyObject *(*__pyx_t_10)(PyObject *);
15602   int __pyx_t_11;
15603   int __pyx_t_12;
15604   int __pyx_lineno = 0;
15605   const char *__pyx_filename = NULL;
15606   int __pyx_clineno = 0;
15607   __Pyx_RefNannySetupContext("register", 0);
15608   __Pyx_INCREF(__pyx_v_before);
15609   __Pyx_INCREF(__pyx_v_after);
15610
15611   /* "lxml/objectify.pyx":958
15612  *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
15613  *         """
15614  *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
15615  *             raise ValueError, u"Cannot register tree type"
15616  *         if self.type_check is not None:
15617  */
15618   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
15619   if (unlikely(__pyx_t_1)) {
15620
15621     /* "lxml/objectify.pyx":959
15622  *         """
15623  *         if self.name == TREE_PYTYPE_NAME:
15624  *             raise ValueError, u"Cannot register tree type"             # <<<<<<<<<<<<<<
15625  *         if self.type_check is not None:
15626  *             for item in _TYPE_CHECKS:
15627  */
15628     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Cannot_register_tree_type, 0, 0);
15629     __PYX_ERR(0, 959, __pyx_L1_error)
15630
15631     /* "lxml/objectify.pyx":958
15632  *         ignored.  Raises ValueError if the dependencies cannot be fulfilled.
15633  *         """
15634  *         if self.name == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
15635  *             raise ValueError, u"Cannot register tree type"
15636  *         if self.type_check is not None:
15637  */
15638   }
15639
15640   /* "lxml/objectify.pyx":960
15641  *         if self.name == TREE_PYTYPE_NAME:
15642  *             raise ValueError, u"Cannot register tree type"
15643  *         if self.type_check is not None:             # <<<<<<<<<<<<<<
15644  *             for item in _TYPE_CHECKS:
15645  *                 if item[0] is self.type_check:
15646  */
15647   __pyx_t_1 = (__pyx_v_self->type_check != Py_None);
15648   __pyx_t_2 = (__pyx_t_1 != 0);
15649   if (__pyx_t_2) {
15650
15651     /* "lxml/objectify.pyx":961
15652  *             raise ValueError, u"Cannot register tree type"
15653  *         if self.type_check is not None:
15654  *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
15655  *                 if item[0] is self.type_check:
15656  *                     _TYPE_CHECKS.remove(item)
15657  */
15658     if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
15659       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
15660       __PYX_ERR(0, 961, __pyx_L1_error)
15661     }
15662     __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
15663     for (;;) {
15664       if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
15665       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15666       __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 961, __pyx_L1_error)
15667       #else
15668       __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
15669       __Pyx_GOTREF(__pyx_t_5);
15670       #endif
15671       __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5);
15672       __pyx_t_5 = 0;
15673
15674       /* "lxml/objectify.pyx":962
15675  *         if self.type_check is not None:
15676  *             for item in _TYPE_CHECKS:
15677  *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
15678  *                     _TYPE_CHECKS.remove(item)
15679  *                     break
15680  */
15681       __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 962, __pyx_L1_error)
15682       __Pyx_GOTREF(__pyx_t_5);
15683       __pyx_t_2 = (__pyx_t_5 == __pyx_v_self->type_check);
15684       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15685       __pyx_t_1 = (__pyx_t_2 != 0);
15686       if (__pyx_t_1) {
15687
15688         /* "lxml/objectify.pyx":963
15689  *             for item in _TYPE_CHECKS:
15690  *                 if item[0] is self.type_check:
15691  *                     _TYPE_CHECKS.remove(item)             # <<<<<<<<<<<<<<
15692  *                     break
15693  *             entry = (self.type_check, self)
15694  */
15695         __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 963, __pyx_L1_error)
15696         __Pyx_GOTREF(__pyx_t_5);
15697         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15698
15699         /* "lxml/objectify.pyx":964
15700  *                 if item[0] is self.type_check:
15701  *                     _TYPE_CHECKS.remove(item)
15702  *                     break             # <<<<<<<<<<<<<<
15703  *             entry = (self.type_check, self)
15704  *             first_pos = 0
15705  */
15706         goto __pyx_L6_break;
15707
15708         /* "lxml/objectify.pyx":962
15709  *         if self.type_check is not None:
15710  *             for item in _TYPE_CHECKS:
15711  *                 if item[0] is self.type_check:             # <<<<<<<<<<<<<<
15712  *                     _TYPE_CHECKS.remove(item)
15713  *                     break
15714  */
15715       }
15716
15717       /* "lxml/objectify.pyx":961
15718  *             raise ValueError, u"Cannot register tree type"
15719  *         if self.type_check is not None:
15720  *             for item in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
15721  *                 if item[0] is self.type_check:
15722  *                     _TYPE_CHECKS.remove(item)
15723  */
15724     }
15725     __pyx_L6_break:;
15726     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15727
15728     /* "lxml/objectify.pyx":965
15729  *                     _TYPE_CHECKS.remove(item)
15730  *                     break
15731  *             entry = (self.type_check, self)             # <<<<<<<<<<<<<<
15732  *             first_pos = 0
15733  *             last_pos = -1
15734  */
15735     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
15736     __Pyx_GOTREF(__pyx_t_3);
15737     __Pyx_INCREF(__pyx_v_self->type_check);
15738     __Pyx_GIVEREF(__pyx_v_self->type_check);
15739     PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->type_check);
15740     __Pyx_INCREF(((PyObject *)__pyx_v_self));
15741     __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
15742     PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self));
15743     __pyx_v_entry = ((PyObject*)__pyx_t_3);
15744     __pyx_t_3 = 0;
15745
15746     /* "lxml/objectify.pyx":966
15747  *                     break
15748  *             entry = (self.type_check, self)
15749  *             first_pos = 0             # <<<<<<<<<<<<<<
15750  *             last_pos = -1
15751  *             if before or after:
15752  */
15753     __Pyx_INCREF(__pyx_int_0);
15754     __pyx_v_first_pos = __pyx_int_0;
15755
15756     /* "lxml/objectify.pyx":967
15757  *             entry = (self.type_check, self)
15758  *             first_pos = 0
15759  *             last_pos = -1             # <<<<<<<<<<<<<<
15760  *             if before or after:
15761  *                 if before is None:
15762  */
15763     __Pyx_INCREF(__pyx_int_neg_1);
15764     __pyx_v_last_pos = __pyx_int_neg_1;
15765
15766     /* "lxml/objectify.pyx":968
15767  *             first_pos = 0
15768  *             last_pos = -1
15769  *             if before or after:             # <<<<<<<<<<<<<<
15770  *                 if before is None:
15771  *                     before = ()
15772  */
15773     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
15774     if (!__pyx_t_2) {
15775     } else {
15776       __pyx_t_1 = __pyx_t_2;
15777       goto __pyx_L9_bool_binop_done;
15778     }
15779     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error)
15780     __pyx_t_1 = __pyx_t_2;
15781     __pyx_L9_bool_binop_done:;
15782     if (__pyx_t_1) {
15783
15784       /* "lxml/objectify.pyx":969
15785  *             last_pos = -1
15786  *             if before or after:
15787  *                 if before is None:             # <<<<<<<<<<<<<<
15788  *                     before = ()
15789  *                 elif after is None:
15790  */
15791       __pyx_t_1 = (__pyx_v_before == Py_None);
15792       __pyx_t_2 = (__pyx_t_1 != 0);
15793       if (__pyx_t_2) {
15794
15795         /* "lxml/objectify.pyx":970
15796  *             if before or after:
15797  *                 if before is None:
15798  *                     before = ()             # <<<<<<<<<<<<<<
15799  *                 elif after is None:
15800  *                     after = ()
15801  */
15802         __Pyx_INCREF(__pyx_empty_tuple);
15803         __Pyx_DECREF_SET(__pyx_v_before, __pyx_empty_tuple);
15804
15805         /* "lxml/objectify.pyx":969
15806  *             last_pos = -1
15807  *             if before or after:
15808  *                 if before is None:             # <<<<<<<<<<<<<<
15809  *                     before = ()
15810  *                 elif after is None:
15811  */
15812         goto __pyx_L11;
15813       }
15814
15815       /* "lxml/objectify.pyx":971
15816  *                 if before is None:
15817  *                     before = ()
15818  *                 elif after is None:             # <<<<<<<<<<<<<<
15819  *                     after = ()
15820  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15821  */
15822       __pyx_t_2 = (__pyx_v_after == Py_None);
15823       __pyx_t_1 = (__pyx_t_2 != 0);
15824       if (__pyx_t_1) {
15825
15826         /* "lxml/objectify.pyx":972
15827  *                     before = ()
15828  *                 elif after is None:
15829  *                     after = ()             # <<<<<<<<<<<<<<
15830  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15831  *                     if last_pos == -1 and pytype.name in before:
15832  */
15833         __Pyx_INCREF(__pyx_empty_tuple);
15834         __Pyx_DECREF_SET(__pyx_v_after, __pyx_empty_tuple);
15835
15836         /* "lxml/objectify.pyx":971
15837  *                 if before is None:
15838  *                     before = ()
15839  *                 elif after is None:             # <<<<<<<<<<<<<<
15840  *                     after = ()
15841  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15842  */
15843       }
15844       __pyx_L11:;
15845
15846       /* "lxml/objectify.pyx":973
15847  *                 elif after is None:
15848  *                     after = ()
15849  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
15850  *                     if last_pos == -1 and pytype.name in before:
15851  *                         last_pos = i
15852  */
15853       __Pyx_INCREF(__pyx_int_0);
15854       __pyx_t_3 = __pyx_int_0;
15855       __pyx_t_5 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0;
15856       for (;;) {
15857         if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
15858         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15859         __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 973, __pyx_L1_error)
15860         #else
15861         __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
15862         __Pyx_GOTREF(__pyx_t_6);
15863         #endif
15864         if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
15865           PyObject* sequence = __pyx_t_6;
15866           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
15867           if (unlikely(size != 2)) {
15868             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
15869             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15870             __PYX_ERR(0, 973, __pyx_L1_error)
15871           }
15872           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15873           if (likely(PyTuple_CheckExact(sequence))) {
15874             __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
15875             __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
15876           } else {
15877             __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
15878             __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
15879           }
15880           __Pyx_INCREF(__pyx_t_7);
15881           __Pyx_INCREF(__pyx_t_8);
15882           #else
15883           __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 973, __pyx_L1_error)
15884           __Pyx_GOTREF(__pyx_t_7);
15885           __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 973, __pyx_L1_error)
15886           __Pyx_GOTREF(__pyx_t_8);
15887           #endif
15888           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15889         } else {
15890           Py_ssize_t index = -1;
15891           __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 973, __pyx_L1_error)
15892           __Pyx_GOTREF(__pyx_t_9);
15893           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15894           __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
15895           index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L14_unpacking_failed;
15896           __Pyx_GOTREF(__pyx_t_7);
15897           index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed;
15898           __Pyx_GOTREF(__pyx_t_8);
15899           if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 973, __pyx_L1_error)
15900           __pyx_t_10 = NULL;
15901           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15902           goto __pyx_L15_unpacking_done;
15903           __pyx_L14_unpacking_failed:;
15904           __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15905           __pyx_t_10 = NULL;
15906           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15907           __PYX_ERR(0, 973, __pyx_L1_error)
15908           __pyx_L15_unpacking_done:;
15909         }
15910         __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_7);
15911         __pyx_t_7 = 0;
15912         __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_8);
15913         __pyx_t_8 = 0;
15914         __Pyx_INCREF(__pyx_t_3);
15915         __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
15916         __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 973, __pyx_L1_error)
15917         __Pyx_GOTREF(__pyx_t_6);
15918         __Pyx_DECREF(__pyx_t_3);
15919         __pyx_t_3 = __pyx_t_6;
15920         __pyx_t_6 = 0;
15921
15922         /* "lxml/objectify.pyx":974
15923  *                     after = ()
15924  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15925  *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
15926  *                         last_pos = i
15927  *                     if pytype.name in after:
15928  */
15929         __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L1_error)
15930         __Pyx_GOTREF(__pyx_t_6);
15931         __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error)
15932         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15933         if (__pyx_t_2) {
15934         } else {
15935           __pyx_t_1 = __pyx_t_2;
15936           goto __pyx_L17_bool_binop_done;
15937         }
15938         __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 974, __pyx_L1_error)
15939         __Pyx_GOTREF(__pyx_t_6);
15940         __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_before, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 974, __pyx_L1_error)
15941         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15942         __pyx_t_11 = (__pyx_t_2 != 0);
15943         __pyx_t_1 = __pyx_t_11;
15944         __pyx_L17_bool_binop_done:;
15945         if (__pyx_t_1) {
15946
15947           /* "lxml/objectify.pyx":975
15948  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15949  *                     if last_pos == -1 and pytype.name in before:
15950  *                         last_pos = i             # <<<<<<<<<<<<<<
15951  *                     if pytype.name in after:
15952  *                         first_pos = i+1
15953  */
15954           __Pyx_INCREF(__pyx_v_i);
15955           __Pyx_DECREF_SET(__pyx_v_last_pos, __pyx_v_i);
15956
15957           /* "lxml/objectify.pyx":974
15958  *                     after = ()
15959  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):
15960  *                     if last_pos == -1 and pytype.name in before:             # <<<<<<<<<<<<<<
15961  *                         last_pos = i
15962  *                     if pytype.name in after:
15963  */
15964         }
15965
15966         /* "lxml/objectify.pyx":976
15967  *                     if last_pos == -1 and pytype.name in before:
15968  *                         last_pos = i
15969  *                     if pytype.name in after:             # <<<<<<<<<<<<<<
15970  *                         first_pos = i+1
15971  *             if last_pos == -1:
15972  */
15973         __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 976, __pyx_L1_error)
15974         __Pyx_GOTREF(__pyx_t_6);
15975         __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_after, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
15976         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15977         __pyx_t_11 = (__pyx_t_1 != 0);
15978         if (__pyx_t_11) {
15979
15980           /* "lxml/objectify.pyx":977
15981  *                         last_pos = i
15982  *                     if pytype.name in after:
15983  *                         first_pos = i+1             # <<<<<<<<<<<<<<
15984  *             if last_pos == -1:
15985  *                 _TYPE_CHECKS.append(entry)
15986  */
15987           __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 977, __pyx_L1_error)
15988           __Pyx_GOTREF(__pyx_t_6);
15989           __Pyx_DECREF_SET(__pyx_v_first_pos, __pyx_t_6);
15990           __pyx_t_6 = 0;
15991
15992           /* "lxml/objectify.pyx":976
15993  *                     if last_pos == -1 and pytype.name in before:
15994  *                         last_pos = i
15995  *                     if pytype.name in after:             # <<<<<<<<<<<<<<
15996  *                         first_pos = i+1
15997  *             if last_pos == -1:
15998  */
15999         }
16000
16001         /* "lxml/objectify.pyx":973
16002  *                 elif after is None:
16003  *                     after = ()
16004  *                 for i, (check, pytype) in enumerate(_TYPE_CHECKS):             # <<<<<<<<<<<<<<
16005  *                     if last_pos == -1 and pytype.name in before:
16006  *                         last_pos = i
16007  */
16008       }
16009       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16010       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16011
16012       /* "lxml/objectify.pyx":968
16013  *             first_pos = 0
16014  *             last_pos = -1
16015  *             if before or after:             # <<<<<<<<<<<<<<
16016  *                 if before is None:
16017  *                     before = ()
16018  */
16019     }
16020
16021     /* "lxml/objectify.pyx":978
16022  *                     if pytype.name in after:
16023  *                         first_pos = i+1
16024  *             if last_pos == -1:             # <<<<<<<<<<<<<<
16025  *                 _TYPE_CHECKS.append(entry)
16026  *             elif first_pos > last_pos:
16027  */
16028     __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error)
16029     __Pyx_GOTREF(__pyx_t_3);
16030     __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 978, __pyx_L1_error)
16031     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16032     if (__pyx_t_11) {
16033
16034       /* "lxml/objectify.pyx":979
16035  *                         first_pos = i+1
16036  *             if last_pos == -1:
16037  *                 _TYPE_CHECKS.append(entry)             # <<<<<<<<<<<<<<
16038  *             elif first_pos > last_pos:
16039  *                 raise ValueError, u"inconsistent before/after dependencies"
16040  */
16041       if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
16042         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
16043         __PYX_ERR(0, 979, __pyx_L1_error)
16044       }
16045       __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 979, __pyx_L1_error)
16046
16047       /* "lxml/objectify.pyx":978
16048  *                     if pytype.name in after:
16049  *                         first_pos = i+1
16050  *             if last_pos == -1:             # <<<<<<<<<<<<<<
16051  *                 _TYPE_CHECKS.append(entry)
16052  *             elif first_pos > last_pos:
16053  */
16054       goto __pyx_L20;
16055     }
16056
16057     /* "lxml/objectify.pyx":980
16058  *             if last_pos == -1:
16059  *                 _TYPE_CHECKS.append(entry)
16060  *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
16061  *                 raise ValueError, u"inconsistent before/after dependencies"
16062  *             else:
16063  */
16064     __pyx_t_3 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error)
16065     __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 980, __pyx_L1_error)
16066     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16067     if (unlikely(__pyx_t_11)) {
16068
16069       /* "lxml/objectify.pyx":981
16070  *                 _TYPE_CHECKS.append(entry)
16071  *             elif first_pos > last_pos:
16072  *                 raise ValueError, u"inconsistent before/after dependencies"             # <<<<<<<<<<<<<<
16073  *             else:
16074  *                 _TYPE_CHECKS.insert(last_pos, entry)
16075  */
16076       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_inconsistent_before_after_depend, 0, 0);
16077       __PYX_ERR(0, 981, __pyx_L1_error)
16078
16079       /* "lxml/objectify.pyx":980
16080  *             if last_pos == -1:
16081  *                 _TYPE_CHECKS.append(entry)
16082  *             elif first_pos > last_pos:             # <<<<<<<<<<<<<<
16083  *                 raise ValueError, u"inconsistent before/after dependencies"
16084  *             else:
16085  */
16086     }
16087
16088     /* "lxml/objectify.pyx":983
16089  *                 raise ValueError, u"inconsistent before/after dependencies"
16090  *             else:
16091  *                 _TYPE_CHECKS.insert(last_pos, entry)             # <<<<<<<<<<<<<<
16092  * 
16093  *         _PYTYPE_DICT[self.name] = self
16094  */
16095     /*else*/ {
16096       if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
16097         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert");
16098         __PYX_ERR(0, 983, __pyx_L1_error)
16099       }
16100       __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L1_error)
16101       __pyx_t_12 = PyList_Insert(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_4, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 983, __pyx_L1_error)
16102     }
16103     __pyx_L20:;
16104
16105     /* "lxml/objectify.pyx":960
16106  *         if self.name == TREE_PYTYPE_NAME:
16107  *             raise ValueError, u"Cannot register tree type"
16108  *         if self.type_check is not None:             # <<<<<<<<<<<<<<
16109  *             for item in _TYPE_CHECKS:
16110  *                 if item[0] is self.type_check:
16111  */
16112   }
16113
16114   /* "lxml/objectify.pyx":985
16115  *                 _TYPE_CHECKS.insert(last_pos, entry)
16116  * 
16117  *         _PYTYPE_DICT[self.name] = self             # <<<<<<<<<<<<<<
16118  *         for xs_type in self._schema_types:
16119  *             _SCHEMA_TYPE_DICT[xs_type] = self
16120  */
16121   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16122     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16123     __PYX_ERR(0, 985, __pyx_L1_error)
16124   }
16125   if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 985, __pyx_L1_error)
16126
16127   /* "lxml/objectify.pyx":986
16128  * 
16129  *         _PYTYPE_DICT[self.name] = self
16130  *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
16131  *             _SCHEMA_TYPE_DICT[xs_type] = self
16132  * 
16133  */
16134   if (unlikely(__pyx_v_self->_schema_types == Py_None)) {
16135     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
16136     __PYX_ERR(0, 986, __pyx_L1_error)
16137   }
16138   __pyx_t_3 = __pyx_v_self->_schema_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
16139   for (;;) {
16140     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
16141     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16142     __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 986, __pyx_L1_error)
16143     #else
16144     __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)
16145     __Pyx_GOTREF(__pyx_t_5);
16146     #endif
16147     __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_5);
16148     __pyx_t_5 = 0;
16149
16150     /* "lxml/objectify.pyx":987
16151  *         _PYTYPE_DICT[self.name] = self
16152  *         for xs_type in self._schema_types:
16153  *             _SCHEMA_TYPE_DICT[xs_type] = self             # <<<<<<<<<<<<<<
16154  * 
16155  *     def unregister(self):
16156  */
16157     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16158       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16159       __PYX_ERR(0, 987, __pyx_L1_error)
16160     }
16161     if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 987, __pyx_L1_error)
16162
16163     /* "lxml/objectify.pyx":986
16164  * 
16165  *         _PYTYPE_DICT[self.name] = self
16166  *         for xs_type in self._schema_types:             # <<<<<<<<<<<<<<
16167  *             _SCHEMA_TYPE_DICT[xs_type] = self
16168  * 
16169  */
16170   }
16171   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16172
16173   /* "lxml/objectify.pyx":948
16174  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
16175  * 
16176  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
16177  *         u"""register(self, before=None, after=None)
16178  * 
16179  */
16180
16181   /* function exit code */
16182   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16183   goto __pyx_L0;
16184   __pyx_L1_error:;
16185   __Pyx_XDECREF(__pyx_t_3);
16186   __Pyx_XDECREF(__pyx_t_5);
16187   __Pyx_XDECREF(__pyx_t_6);
16188   __Pyx_XDECREF(__pyx_t_7);
16189   __Pyx_XDECREF(__pyx_t_8);
16190   __Pyx_XDECREF(__pyx_t_9);
16191   __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
16192   __pyx_r = NULL;
16193   __pyx_L0:;
16194   __Pyx_XDECREF(__pyx_v_item);
16195   __Pyx_XDECREF(__pyx_v_entry);
16196   __Pyx_XDECREF(__pyx_v_first_pos);
16197   __Pyx_XDECREF(__pyx_v_last_pos);
16198   __Pyx_XDECREF(__pyx_v_i);
16199   __Pyx_XDECREF(__pyx_v_check);
16200   __Pyx_XDECREF(__pyx_v_pytype);
16201   __Pyx_XDECREF(__pyx_v_xs_type);
16202   __Pyx_XDECREF(__pyx_v_before);
16203   __Pyx_XDECREF(__pyx_v_after);
16204   __Pyx_XGIVEREF(__pyx_r);
16205   __Pyx_RefNannyFinishContext();
16206   return __pyx_r;
16207 }
16208
16209 /* "lxml/objectify.pyx":989
16210  *             _SCHEMA_TYPE_DICT[xs_type] = self
16211  * 
16212  *     def unregister(self):             # <<<<<<<<<<<<<<
16213  *         u"unregister(self)"
16214  *         if _PYTYPE_DICT.get(self.name) is self:
16215  */
16216
16217 /* Python wrapper */
16218 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
16219 static char __pyx_doc_4lxml_9objectify_6PyType_6unregister[] = "unregister(self)";
16220 static PyMethodDef __pyx_mdef_4lxml_9objectify_6PyType_7unregister = {"unregister", (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_7unregister, METH_NOARGS, __pyx_doc_4lxml_9objectify_6PyType_6unregister};
16221 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_7unregister(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
16222   PyObject *__pyx_r = 0;
16223   __Pyx_RefNannyDeclarations
16224   __Pyx_RefNannySetupContext("unregister (wrapper)", 0);
16225   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_6unregister(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16226
16227   /* function exit code */
16228   __Pyx_RefNannyFinishContext();
16229   return __pyx_r;
16230 }
16231
16232 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16233   PyObject *__pyx_v_xs_type = NULL;
16234   PyObject *__pyx_v_pytype = NULL;
16235   PyObject *__pyx_r = NULL;
16236   __Pyx_RefNannyDeclarations
16237   PyObject *__pyx_t_1 = NULL;
16238   int __pyx_t_2;
16239   int __pyx_t_3;
16240   PyObject *__pyx_t_4 = NULL;
16241   Py_ssize_t __pyx_t_5;
16242   PyObject *__pyx_t_6 = NULL;
16243   PyObject *__pyx_t_7 = NULL;
16244   PyObject *__pyx_t_8 = NULL;
16245   PyObject *(*__pyx_t_9)(PyObject *);
16246   PyObject *__pyx_t_10 = NULL;
16247   PyObject *__pyx_t_11 = NULL;
16248   PyObject *__pyx_t_12 = NULL;
16249   int __pyx_t_13;
16250   int __pyx_lineno = 0;
16251   const char *__pyx_filename = NULL;
16252   int __pyx_clineno = 0;
16253   __Pyx_RefNannySetupContext("unregister", 0);
16254
16255   /* "lxml/objectify.pyx":991
16256  *     def unregister(self):
16257  *         u"unregister(self)"
16258  *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
16259  *             del _PYTYPE_DICT[self.name]
16260  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16261  */
16262   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16263     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
16264     __PYX_ERR(0, 991, __pyx_L1_error)
16265   }
16266   __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
16267   __Pyx_GOTREF(__pyx_t_1);
16268   __pyx_t_2 = (__pyx_t_1 == ((PyObject *)__pyx_v_self));
16269   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16270   __pyx_t_3 = (__pyx_t_2 != 0);
16271   if (__pyx_t_3) {
16272
16273     /* "lxml/objectify.pyx":992
16274  *         u"unregister(self)"
16275  *         if _PYTYPE_DICT.get(self.name) is self:
16276  *             del _PYTYPE_DICT[self.name]             # <<<<<<<<<<<<<<
16277  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16278  *             if pytype is self:
16279  */
16280     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
16281       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16282       __PYX_ERR(0, 992, __pyx_L1_error)
16283     }
16284     if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name) < 0)) __PYX_ERR(0, 992, __pyx_L1_error)
16285
16286     /* "lxml/objectify.pyx":991
16287  *     def unregister(self):
16288  *         u"unregister(self)"
16289  *         if _PYTYPE_DICT.get(self.name) is self:             # <<<<<<<<<<<<<<
16290  *             del _PYTYPE_DICT[self.name]
16291  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16292  */
16293   }
16294
16295   /* "lxml/objectify.pyx":993
16296  *         if _PYTYPE_DICT.get(self.name) is self:
16297  *             del _PYTYPE_DICT[self.name]
16298  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
16299  *             if pytype is self:
16300  *                 del _SCHEMA_TYPE_DICT[xs_type]
16301  */
16302   if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16303     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
16304     __PYX_ERR(0, 993, __pyx_L1_error)
16305   }
16306   __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L1_error)
16307   __Pyx_GOTREF(__pyx_t_1);
16308   __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error)
16309   __Pyx_GOTREF(__pyx_t_4);
16310   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16311   __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
16312   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16313   for (;;) {
16314     if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
16315     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16316     __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 993, __pyx_L1_error)
16317     #else
16318     __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L1_error)
16319     __Pyx_GOTREF(__pyx_t_4);
16320     #endif
16321     if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
16322       PyObject* sequence = __pyx_t_4;
16323       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
16324       if (unlikely(size != 2)) {
16325         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
16326         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
16327         __PYX_ERR(0, 993, __pyx_L1_error)
16328       }
16329       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16330       if (likely(PyTuple_CheckExact(sequence))) {
16331         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
16332         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
16333       } else {
16334         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
16335         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
16336       }
16337       __Pyx_INCREF(__pyx_t_6);
16338       __Pyx_INCREF(__pyx_t_7);
16339       #else
16340       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 993, __pyx_L1_error)
16341       __Pyx_GOTREF(__pyx_t_6);
16342       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 993, __pyx_L1_error)
16343       __Pyx_GOTREF(__pyx_t_7);
16344       #endif
16345       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16346     } else {
16347       Py_ssize_t index = -1;
16348       __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L1_error)
16349       __Pyx_GOTREF(__pyx_t_8);
16350       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16351       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
16352       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
16353       __Pyx_GOTREF(__pyx_t_6);
16354       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
16355       __Pyx_GOTREF(__pyx_t_7);
16356       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 993, __pyx_L1_error)
16357       __pyx_t_9 = NULL;
16358       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16359       goto __pyx_L7_unpacking_done;
16360       __pyx_L6_unpacking_failed:;
16361       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
16362       __pyx_t_9 = NULL;
16363       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
16364       __PYX_ERR(0, 993, __pyx_L1_error)
16365       __pyx_L7_unpacking_done:;
16366     }
16367     __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_6);
16368     __pyx_t_6 = 0;
16369     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7);
16370     __pyx_t_7 = 0;
16371
16372     /* "lxml/objectify.pyx":994
16373  *             del _PYTYPE_DICT[self.name]
16374  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16375  *             if pytype is self:             # <<<<<<<<<<<<<<
16376  *                 del _SCHEMA_TYPE_DICT[xs_type]
16377  *         if self.type_check is None:
16378  */
16379     __pyx_t_3 = (__pyx_v_pytype == ((PyObject *)__pyx_v_self));
16380     __pyx_t_2 = (__pyx_t_3 != 0);
16381     if (__pyx_t_2) {
16382
16383       /* "lxml/objectify.pyx":995
16384  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16385  *             if pytype is self:
16386  *                 del _SCHEMA_TYPE_DICT[xs_type]             # <<<<<<<<<<<<<<
16387  *         if self.type_check is None:
16388  *             return
16389  */
16390       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
16391         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
16392         __PYX_ERR(0, 995, __pyx_L1_error)
16393       }
16394       if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type) < 0)) __PYX_ERR(0, 995, __pyx_L1_error)
16395
16396       /* "lxml/objectify.pyx":994
16397  *             del _PYTYPE_DICT[self.name]
16398  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
16399  *             if pytype is self:             # <<<<<<<<<<<<<<
16400  *                 del _SCHEMA_TYPE_DICT[xs_type]
16401  *         if self.type_check is None:
16402  */
16403     }
16404
16405     /* "lxml/objectify.pyx":993
16406  *         if _PYTYPE_DICT.get(self.name) is self:
16407  *             del _PYTYPE_DICT[self.name]
16408  *         for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):             # <<<<<<<<<<<<<<
16409  *             if pytype is self:
16410  *                 del _SCHEMA_TYPE_DICT[xs_type]
16411  */
16412   }
16413   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16414
16415   /* "lxml/objectify.pyx":996
16416  *             if pytype is self:
16417  *                 del _SCHEMA_TYPE_DICT[xs_type]
16418  *         if self.type_check is None:             # <<<<<<<<<<<<<<
16419  *             return
16420  *         try:
16421  */
16422   __pyx_t_2 = (__pyx_v_self->type_check == Py_None);
16423   __pyx_t_3 = (__pyx_t_2 != 0);
16424   if (__pyx_t_3) {
16425
16426     /* "lxml/objectify.pyx":997
16427  *                 del _SCHEMA_TYPE_DICT[xs_type]
16428  *         if self.type_check is None:
16429  *             return             # <<<<<<<<<<<<<<
16430  *         try:
16431  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16432  */
16433     __Pyx_XDECREF(__pyx_r);
16434     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16435     goto __pyx_L0;
16436
16437     /* "lxml/objectify.pyx":996
16438  *             if pytype is self:
16439  *                 del _SCHEMA_TYPE_DICT[xs_type]
16440  *         if self.type_check is None:             # <<<<<<<<<<<<<<
16441  *             return
16442  *         try:
16443  */
16444   }
16445
16446   /* "lxml/objectify.pyx":998
16447  *         if self.type_check is None:
16448  *             return
16449  *         try:             # <<<<<<<<<<<<<<
16450  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16451  *         except ValueError:
16452  */
16453   {
16454     __Pyx_PyThreadState_declare
16455     __Pyx_PyThreadState_assign
16456     __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
16457     __Pyx_XGOTREF(__pyx_t_10);
16458     __Pyx_XGOTREF(__pyx_t_11);
16459     __Pyx_XGOTREF(__pyx_t_12);
16460     /*try:*/ {
16461
16462       /* "lxml/objectify.pyx":999
16463  *             return
16464  *         try:
16465  *             _TYPE_CHECKS.remove( (self.type_check, self) )             # <<<<<<<<<<<<<<
16466  *         except ValueError:
16467  *             pass
16468  */
16469       __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L10_error)
16470       __Pyx_GOTREF(__pyx_t_1);
16471       __Pyx_INCREF(__pyx_v_self->type_check);
16472       __Pyx_GIVEREF(__pyx_v_self->type_check);
16473       PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->type_check);
16474       __Pyx_INCREF(((PyObject *)__pyx_v_self));
16475       __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
16476       PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
16477       __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L10_error)
16478       __Pyx_GOTREF(__pyx_t_4);
16479       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16480       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16481
16482       /* "lxml/objectify.pyx":998
16483  *         if self.type_check is None:
16484  *             return
16485  *         try:             # <<<<<<<<<<<<<<
16486  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16487  *         except ValueError:
16488  */
16489     }
16490     __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16491     __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
16492     __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
16493     goto __pyx_L15_try_end;
16494     __pyx_L10_error:;
16495     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16496     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16497     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16498     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16499     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
16500
16501     /* "lxml/objectify.pyx":1000
16502  *         try:
16503  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16504  *         except ValueError:             # <<<<<<<<<<<<<<
16505  *             pass
16506  * 
16507  */
16508     __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
16509     if (__pyx_t_13) {
16510       __Pyx_ErrRestore(0,0,0);
16511       goto __pyx_L11_exception_handled;
16512     }
16513     goto __pyx_L12_except_error;
16514     __pyx_L12_except_error:;
16515
16516     /* "lxml/objectify.pyx":998
16517  *         if self.type_check is None:
16518  *             return
16519  *         try:             # <<<<<<<<<<<<<<
16520  *             _TYPE_CHECKS.remove( (self.type_check, self) )
16521  *         except ValueError:
16522  */
16523     __Pyx_XGIVEREF(__pyx_t_10);
16524     __Pyx_XGIVEREF(__pyx_t_11);
16525     __Pyx_XGIVEREF(__pyx_t_12);
16526     __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
16527     goto __pyx_L1_error;
16528     __pyx_L11_exception_handled:;
16529     __Pyx_XGIVEREF(__pyx_t_10);
16530     __Pyx_XGIVEREF(__pyx_t_11);
16531     __Pyx_XGIVEREF(__pyx_t_12);
16532     __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
16533     __pyx_L15_try_end:;
16534   }
16535
16536   /* "lxml/objectify.pyx":989
16537  *             _SCHEMA_TYPE_DICT[xs_type] = self
16538  * 
16539  *     def unregister(self):             # <<<<<<<<<<<<<<
16540  *         u"unregister(self)"
16541  *         if _PYTYPE_DICT.get(self.name) is self:
16542  */
16543
16544   /* function exit code */
16545   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16546   goto __pyx_L0;
16547   __pyx_L1_error:;
16548   __Pyx_XDECREF(__pyx_t_1);
16549   __Pyx_XDECREF(__pyx_t_4);
16550   __Pyx_XDECREF(__pyx_t_6);
16551   __Pyx_XDECREF(__pyx_t_7);
16552   __Pyx_XDECREF(__pyx_t_8);
16553   __Pyx_AddTraceback("lxml.objectify.PyType.unregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
16554   __pyx_r = NULL;
16555   __pyx_L0:;
16556   __Pyx_XDECREF(__pyx_v_xs_type);
16557   __Pyx_XDECREF(__pyx_v_pytype);
16558   __Pyx_XGIVEREF(__pyx_r);
16559   __Pyx_RefNannyFinishContext();
16560   return __pyx_r;
16561 }
16562
16563 /* "lxml/objectify.pyx":1008
16564  *         Note that this must be set before registering the type!
16565  *         """
16566  *         def __get__(self):             # <<<<<<<<<<<<<<
16567  *             return self._schema_types
16568  *         def __set__(self, types):
16569  */
16570
16571 /* Python wrapper */
16572 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
16573 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(PyObject *__pyx_v_self) {
16574   PyObject *__pyx_r = 0;
16575   __Pyx_RefNannyDeclarations
16576   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16577   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16578
16579   /* function exit code */
16580   __Pyx_RefNannyFinishContext();
16581   return __pyx_r;
16582 }
16583
16584 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16585   PyObject *__pyx_r = NULL;
16586   __Pyx_RefNannyDeclarations
16587   __Pyx_RefNannySetupContext("__get__", 0);
16588
16589   /* "lxml/objectify.pyx":1009
16590  *         """
16591  *         def __get__(self):
16592  *             return self._schema_types             # <<<<<<<<<<<<<<
16593  *         def __set__(self, types):
16594  *             self._schema_types = list(map(unicode, types))
16595  */
16596   __Pyx_XDECREF(__pyx_r);
16597   __Pyx_INCREF(__pyx_v_self->_schema_types);
16598   __pyx_r = __pyx_v_self->_schema_types;
16599   goto __pyx_L0;
16600
16601   /* "lxml/objectify.pyx":1008
16602  *         Note that this must be set before registering the type!
16603  *         """
16604  *         def __get__(self):             # <<<<<<<<<<<<<<
16605  *             return self._schema_types
16606  *         def __set__(self, types):
16607  */
16608
16609   /* function exit code */
16610   __pyx_L0:;
16611   __Pyx_XGIVEREF(__pyx_r);
16612   __Pyx_RefNannyFinishContext();
16613   return __pyx_r;
16614 }
16615
16616 /* "lxml/objectify.pyx":1010
16617  *         def __get__(self):
16618  *             return self._schema_types
16619  *         def __set__(self, types):             # <<<<<<<<<<<<<<
16620  *             self._schema_types = list(map(unicode, types))
16621  * 
16622  */
16623
16624 /* Python wrapper */
16625 static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
16626 static int __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
16627   int __pyx_r;
16628   __Pyx_RefNannyDeclarations
16629   __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
16630   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self), ((PyObject *)__pyx_v_types));
16631
16632   /* function exit code */
16633   __Pyx_RefNannyFinishContext();
16634   return __pyx_r;
16635 }
16636
16637 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self, PyObject *__pyx_v_types) {
16638   int __pyx_r;
16639   __Pyx_RefNannyDeclarations
16640   PyObject *__pyx_t_1 = NULL;
16641   PyObject *__pyx_t_2 = NULL;
16642   int __pyx_lineno = 0;
16643   const char *__pyx_filename = NULL;
16644   int __pyx_clineno = 0;
16645   __Pyx_RefNannySetupContext("__set__", 0);
16646
16647   /* "lxml/objectify.pyx":1011
16648  *             return self._schema_types
16649  *         def __set__(self, types):
16650  *             self._schema_types = list(map(unicode, types))             # <<<<<<<<<<<<<<
16651  * 
16652  * 
16653  */
16654   __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
16655   __Pyx_GOTREF(__pyx_t_1);
16656   __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
16657   __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
16658   PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyUnicode_Type)));
16659   __Pyx_INCREF(__pyx_v_types);
16660   __Pyx_GIVEREF(__pyx_v_types);
16661   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types);
16662   __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
16663   __Pyx_GOTREF(__pyx_t_2);
16664   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16665   __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
16666   __Pyx_GOTREF(__pyx_t_1);
16667   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16668   __Pyx_GIVEREF(__pyx_t_1);
16669   __Pyx_GOTREF(__pyx_v_self->_schema_types);
16670   __Pyx_DECREF(__pyx_v_self->_schema_types);
16671   __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_1);
16672   __pyx_t_1 = 0;
16673
16674   /* "lxml/objectify.pyx":1010
16675  *         def __get__(self):
16676  *             return self._schema_types
16677  *         def __set__(self, types):             # <<<<<<<<<<<<<<
16678  *             self._schema_types = list(map(unicode, types))
16679  * 
16680  */
16681
16682   /* function exit code */
16683   __pyx_r = 0;
16684   goto __pyx_L0;
16685   __pyx_L1_error:;
16686   __Pyx_XDECREF(__pyx_t_1);
16687   __Pyx_XDECREF(__pyx_t_2);
16688   __Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
16689   __pyx_r = -1;
16690   __pyx_L0:;
16691   __Pyx_RefNannyFinishContext();
16692   return __pyx_r;
16693 }
16694
16695 /* "lxml/objectify.pyx":921
16696  *     matching type will be used.
16697  *     """
16698  *     cdef readonly object name             # <<<<<<<<<<<<<<
16699  *     cdef readonly object type_check
16700  *     cdef readonly object stringify
16701  */
16702
16703 /* Python wrapper */
16704 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
16705 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(PyObject *__pyx_v_self) {
16706   PyObject *__pyx_r = 0;
16707   __Pyx_RefNannyDeclarations
16708   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16709   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_4name___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16710
16711   /* function exit code */
16712   __Pyx_RefNannyFinishContext();
16713   return __pyx_r;
16714 }
16715
16716 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16717   PyObject *__pyx_r = NULL;
16718   __Pyx_RefNannyDeclarations
16719   __Pyx_RefNannySetupContext("__get__", 0);
16720   __Pyx_XDECREF(__pyx_r);
16721   __Pyx_INCREF(__pyx_v_self->name);
16722   __pyx_r = __pyx_v_self->name;
16723   goto __pyx_L0;
16724
16725   /* function exit code */
16726   __pyx_L0:;
16727   __Pyx_XGIVEREF(__pyx_r);
16728   __Pyx_RefNannyFinishContext();
16729   return __pyx_r;
16730 }
16731
16732 /* "lxml/objectify.pyx":922
16733  *     """
16734  *     cdef readonly object name
16735  *     cdef readonly object type_check             # <<<<<<<<<<<<<<
16736  *     cdef readonly object stringify
16737  *     cdef object _type
16738  */
16739
16740 /* Python wrapper */
16741 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self); /*proto*/
16742 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(PyObject *__pyx_v_self) {
16743   PyObject *__pyx_r = 0;
16744   __Pyx_RefNannyDeclarations
16745   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16746   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16747
16748   /* function exit code */
16749   __Pyx_RefNannyFinishContext();
16750   return __pyx_r;
16751 }
16752
16753 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16754   PyObject *__pyx_r = NULL;
16755   __Pyx_RefNannyDeclarations
16756   __Pyx_RefNannySetupContext("__get__", 0);
16757   __Pyx_XDECREF(__pyx_r);
16758   __Pyx_INCREF(__pyx_v_self->type_check);
16759   __pyx_r = __pyx_v_self->type_check;
16760   goto __pyx_L0;
16761
16762   /* function exit code */
16763   __pyx_L0:;
16764   __Pyx_XGIVEREF(__pyx_r);
16765   __Pyx_RefNannyFinishContext();
16766   return __pyx_r;
16767 }
16768
16769 /* "lxml/objectify.pyx":923
16770  *     cdef readonly object name
16771  *     cdef readonly object type_check
16772  *     cdef readonly object stringify             # <<<<<<<<<<<<<<
16773  *     cdef object _type
16774  *     cdef list _schema_types
16775  */
16776
16777 /* Python wrapper */
16778 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self); /*proto*/
16779 static PyObject *__pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(PyObject *__pyx_v_self) {
16780   PyObject *__pyx_r = 0;
16781   __Pyx_RefNannyDeclarations
16782   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
16783   __pyx_r = __pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self));
16784
16785   /* function exit code */
16786   __Pyx_RefNannyFinishContext();
16787   return __pyx_r;
16788 }
16789
16790 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_self) {
16791   PyObject *__pyx_r = NULL;
16792   __Pyx_RefNannyDeclarations
16793   __Pyx_RefNannySetupContext("__get__", 0);
16794   __Pyx_XDECREF(__pyx_r);
16795   __Pyx_INCREF(__pyx_v_self->stringify);
16796   __pyx_r = __pyx_v_self->stringify;
16797   goto __pyx_L0;
16798
16799   /* function exit code */
16800   __pyx_L0:;
16801   __Pyx_XGIVEREF(__pyx_r);
16802   __Pyx_RefNannyFinishContext();
16803   return __pyx_r;
16804 }
16805
16806 /* "lxml/objectify.pyx":1018
16807  * cdef list _TYPE_CHECKS = []
16808  * 
16809  * def __lower_bool(b):             # <<<<<<<<<<<<<<
16810  *     return u"true" if b else u"false"
16811  * 
16812  */
16813
16814 /* Python wrapper */
16815 static PyObject *__pyx_pw_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
16816 static PyMethodDef __pyx_mdef_4lxml_9objectify_7__lower_bool = {"__lower_bool", (PyCFunction)__pyx_pw_4lxml_9objectify_7__lower_bool, METH_O, 0};
16817 static PyObject *__pyx_pw_4lxml_9objectify_7__lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
16818   PyObject *__pyx_r = 0;
16819   __Pyx_RefNannyDeclarations
16820   __Pyx_RefNannySetupContext("__lower_bool (wrapper)", 0);
16821   __pyx_r = __pyx_pf_4lxml_9objectify_6__lower_bool(__pyx_self, ((PyObject *)__pyx_v_b));
16822
16823   /* function exit code */
16824   __Pyx_RefNannyFinishContext();
16825   return __pyx_r;
16826 }
16827
16828 static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b) {
16829   PyObject *__pyx_r = NULL;
16830   __Pyx_RefNannyDeclarations
16831   PyObject *__pyx_t_1 = NULL;
16832   int __pyx_t_2;
16833   int __pyx_lineno = 0;
16834   const char *__pyx_filename = NULL;
16835   int __pyx_clineno = 0;
16836   __Pyx_RefNannySetupContext("__lower_bool", 0);
16837
16838   /* "lxml/objectify.pyx":1019
16839  * 
16840  * def __lower_bool(b):
16841  *     return u"true" if b else u"false"             # <<<<<<<<<<<<<<
16842  * 
16843  * cdef _pytypename(obj):
16844  */
16845   __Pyx_XDECREF(__pyx_r);
16846   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
16847   if (__pyx_t_2) {
16848     __Pyx_INCREF(__pyx_n_u_true);
16849     __pyx_t_1 = __pyx_n_u_true;
16850   } else {
16851     __Pyx_INCREF(__pyx_n_u_false);
16852     __pyx_t_1 = __pyx_n_u_false;
16853   }
16854   __pyx_r = __pyx_t_1;
16855   __pyx_t_1 = 0;
16856   goto __pyx_L0;
16857
16858   /* "lxml/objectify.pyx":1018
16859  * cdef list _TYPE_CHECKS = []
16860  * 
16861  * def __lower_bool(b):             # <<<<<<<<<<<<<<
16862  *     return u"true" if b else u"false"
16863  * 
16864  */
16865
16866   /* function exit code */
16867   __pyx_L1_error:;
16868   __Pyx_XDECREF(__pyx_t_1);
16869   __Pyx_AddTraceback("lxml.objectify.__lower_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
16870   __pyx_r = NULL;
16871   __pyx_L0:;
16872   __Pyx_XGIVEREF(__pyx_r);
16873   __Pyx_RefNannyFinishContext();
16874   return __pyx_r;
16875 }
16876
16877 /* "lxml/objectify.pyx":1021
16878  *     return u"true" if b else u"false"
16879  * 
16880  * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
16881  *     return u"str" if python._isString(obj) else _typename(obj)
16882  * 
16883  */
16884
16885 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
16886   PyObject *__pyx_r = NULL;
16887   __Pyx_RefNannyDeclarations
16888   PyObject *__pyx_t_1 = NULL;
16889   PyObject *__pyx_t_2 = NULL;
16890   int __pyx_lineno = 0;
16891   const char *__pyx_filename = NULL;
16892   int __pyx_clineno = 0;
16893   __Pyx_RefNannySetupContext("_pytypename", 0);
16894
16895   /* "lxml/objectify.pyx":1022
16896  * 
16897  * cdef _pytypename(obj):
16898  *     return u"str" if python._isString(obj) else _typename(obj)             # <<<<<<<<<<<<<<
16899  * 
16900  * def pytypename(obj):
16901  */
16902   __Pyx_XDECREF(__pyx_r);
16903   if ((_isString(__pyx_v_obj) != 0)) {
16904     __Pyx_INCREF(__pyx_n_u_str);
16905     __pyx_t_1 = __pyx_n_u_str;
16906   } else {
16907     __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
16908     __Pyx_GOTREF(__pyx_t_2);
16909     __pyx_t_1 = __pyx_t_2;
16910     __pyx_t_2 = 0;
16911   }
16912   __pyx_r = __pyx_t_1;
16913   __pyx_t_1 = 0;
16914   goto __pyx_L0;
16915
16916   /* "lxml/objectify.pyx":1021
16917  *     return u"true" if b else u"false"
16918  * 
16919  * cdef _pytypename(obj):             # <<<<<<<<<<<<<<
16920  *     return u"str" if python._isString(obj) else _typename(obj)
16921  * 
16922  */
16923
16924   /* function exit code */
16925   __pyx_L1_error:;
16926   __Pyx_XDECREF(__pyx_t_1);
16927   __Pyx_XDECREF(__pyx_t_2);
16928   __Pyx_AddTraceback("lxml.objectify._pytypename", __pyx_clineno, __pyx_lineno, __pyx_filename);
16929   __pyx_r = 0;
16930   __pyx_L0:;
16931   __Pyx_XGIVEREF(__pyx_r);
16932   __Pyx_RefNannyFinishContext();
16933   return __pyx_r;
16934 }
16935
16936 /* "lxml/objectify.pyx":1024
16937  *     return u"str" if python._isString(obj) else _typename(obj)
16938  * 
16939  * def pytypename(obj):             # <<<<<<<<<<<<<<
16940  *     u"""pytypename(obj)
16941  * 
16942  */
16943
16944 /* Python wrapper */
16945 static PyObject *__pyx_pw_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16946 static char __pyx_doc_4lxml_9objectify_8pytypename[] = "pytypename(obj)\n\n    Find the name of the corresponding PyType for a Python object.\n    ";
16947 static PyMethodDef __pyx_mdef_4lxml_9objectify_9pytypename = {"pytypename", (PyCFunction)__pyx_pw_4lxml_9objectify_9pytypename, METH_O, __pyx_doc_4lxml_9objectify_8pytypename};
16948 static PyObject *__pyx_pw_4lxml_9objectify_9pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16949   PyObject *__pyx_r = 0;
16950   __Pyx_RefNannyDeclarations
16951   __Pyx_RefNannySetupContext("pytypename (wrapper)", 0);
16952   __pyx_r = __pyx_pf_4lxml_9objectify_8pytypename(__pyx_self, ((PyObject *)__pyx_v_obj));
16953
16954   /* function exit code */
16955   __Pyx_RefNannyFinishContext();
16956   return __pyx_r;
16957 }
16958
16959 static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16960   PyObject *__pyx_r = NULL;
16961   __Pyx_RefNannyDeclarations
16962   PyObject *__pyx_t_1 = NULL;
16963   int __pyx_lineno = 0;
16964   const char *__pyx_filename = NULL;
16965   int __pyx_clineno = 0;
16966   __Pyx_RefNannySetupContext("pytypename", 0);
16967
16968   /* "lxml/objectify.pyx":1029
16969  *     Find the name of the corresponding PyType for a Python object.
16970  *     """
16971  *     return _pytypename(obj)             # <<<<<<<<<<<<<<
16972  * 
16973  * cdef _registerPyTypes():
16974  */
16975   __Pyx_XDECREF(__pyx_r);
16976   __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
16977   __Pyx_GOTREF(__pyx_t_1);
16978   __pyx_r = __pyx_t_1;
16979   __pyx_t_1 = 0;
16980   goto __pyx_L0;
16981
16982   /* "lxml/objectify.pyx":1024
16983  *     return u"str" if python._isString(obj) else _typename(obj)
16984  * 
16985  * def pytypename(obj):             # <<<<<<<<<<<<<<
16986  *     u"""pytypename(obj)
16987  * 
16988  */
16989
16990   /* function exit code */
16991   __pyx_L1_error:;
16992   __Pyx_XDECREF(__pyx_t_1);
16993   __Pyx_AddTraceback("lxml.objectify.pytypename", __pyx_clineno, __pyx_lineno, __pyx_filename);
16994   __pyx_r = NULL;
16995   __pyx_L0:;
16996   __Pyx_XGIVEREF(__pyx_r);
16997   __Pyx_RefNannyFinishContext();
16998   return __pyx_r;
16999 }
17000
17001 /* "lxml/objectify.pyx":1031
17002  *     return _pytypename(obj)
17003  * 
17004  * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
17005  *     pytype = PyType(u'int', int, IntElement)
17006  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17007  */
17008
17009 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
17010   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = NULL;
17011   PyObject *__pyx_r = NULL;
17012   __Pyx_RefNannyDeclarations
17013   PyObject *__pyx_t_1 = NULL;
17014   PyObject *__pyx_t_2 = NULL;
17015   PyObject *__pyx_t_3 = NULL;
17016   int __pyx_lineno = 0;
17017   const char *__pyx_filename = NULL;
17018   int __pyx_clineno = 0;
17019   __Pyx_RefNannySetupContext("_registerPyTypes", 0);
17020
17021   /* "lxml/objectify.pyx":1032
17022  * 
17023  * cdef _registerPyTypes():
17024  *     pytype = PyType(u'int', int, IntElement)             # <<<<<<<<<<<<<<
17025  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17026  *                              u"unsignedByte", u"nonPositiveInteger",
17027  */
17028   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
17029   __Pyx_GOTREF(__pyx_t_1);
17030   __Pyx_INCREF(__pyx_n_u_int);
17031   __Pyx_GIVEREF(__pyx_n_u_int);
17032   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_int);
17033   __Pyx_INCREF(((PyObject *)(&PyInt_Type)));
17034   __Pyx_GIVEREF(((PyObject *)(&PyInt_Type)));
17035   PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)(&PyInt_Type)));
17036   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17037   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17038   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17039   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
17040   __Pyx_GOTREF(__pyx_t_2);
17041   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17042   __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
17043   __pyx_t_2 = 0;
17044
17045   /* "lxml/objectify.pyx":1033
17046  * cdef _registerPyTypes():
17047  *     pytype = PyType(u'int', int, IntElement)
17048  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
17049  *                              u"unsignedByte", u"nonPositiveInteger",
17050  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
17051  */
17052   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__5) < 0) __PYX_ERR(0, 1033, __pyx_L1_error)
17053
17054   /* "lxml/objectify.pyx":1037
17055  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
17056  *                              u"unsignedLong", u"unsignedInt", u"positiveInteger",)
17057  *     pytype.register()             # <<<<<<<<<<<<<<
17058  * 
17059  *     # 'long' type just for backwards compatibility
17060  */
17061   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error)
17062   __Pyx_GOTREF(__pyx_t_1);
17063   __pyx_t_3 = NULL;
17064   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
17065     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
17066     if (likely(__pyx_t_3)) {
17067       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
17068       __Pyx_INCREF(__pyx_t_3);
17069       __Pyx_INCREF(function);
17070       __Pyx_DECREF_SET(__pyx_t_1, function);
17071     }
17072   }
17073   __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
17074   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17075   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)
17076   __Pyx_GOTREF(__pyx_t_2);
17077   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17078   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17079
17080   /* "lxml/objectify.pyx":1040
17081  * 
17082  *     # 'long' type just for backwards compatibility
17083  *     pytype = PyType(u'long', None, IntElement)             # <<<<<<<<<<<<<<
17084  *     pytype.register()
17085  * 
17086  */
17087   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
17088   __Pyx_GOTREF(__pyx_t_2);
17089   __Pyx_INCREF(__pyx_n_u_long);
17090   __Pyx_GIVEREF(__pyx_n_u_long);
17091   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_long);
17092   __Pyx_INCREF(Py_None);
17093   __Pyx_GIVEREF(Py_None);
17094   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17095   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17096   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17097   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement));
17098   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
17099   __Pyx_GOTREF(__pyx_t_1);
17100   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17101   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
17102   __pyx_t_1 = 0;
17103
17104   /* "lxml/objectify.pyx":1041
17105  *     # 'long' type just for backwards compatibility
17106  *     pytype = PyType(u'long', None, IntElement)
17107  *     pytype.register()             # <<<<<<<<<<<<<<
17108  * 
17109  *     pytype = PyType(u'float', float, FloatElement, repr)
17110  */
17111   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
17112   __Pyx_GOTREF(__pyx_t_2);
17113   __pyx_t_3 = NULL;
17114   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17115     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17116     if (likely(__pyx_t_3)) {
17117       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17118       __Pyx_INCREF(__pyx_t_3);
17119       __Pyx_INCREF(function);
17120       __Pyx_DECREF_SET(__pyx_t_2, function);
17121     }
17122   }
17123   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17124   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17125   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
17126   __Pyx_GOTREF(__pyx_t_1);
17127   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17128   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17129
17130   /* "lxml/objectify.pyx":1043
17131  *     pytype.register()
17132  * 
17133  *     pytype = PyType(u'float', float, FloatElement, repr)             # <<<<<<<<<<<<<<
17134  *     pytype.xmlSchemaTypes = (u"double", u"float")
17135  *     pytype.register()
17136  */
17137   __pyx_t_1 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
17138   __Pyx_GOTREF(__pyx_t_1);
17139   __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
17140   __Pyx_GOTREF(__pyx_t_2);
17141   __Pyx_INCREF(__pyx_n_u_float);
17142   __Pyx_GIVEREF(__pyx_n_u_float);
17143   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_float);
17144   __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
17145   __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
17146   PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)(&PyFloat_Type)));
17147   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17148   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17149   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement));
17150   __Pyx_GIVEREF(__pyx_t_1);
17151   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1);
17152   __pyx_t_1 = 0;
17153   __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
17154   __Pyx_GOTREF(__pyx_t_1);
17155   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17156   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
17157   __pyx_t_1 = 0;
17158
17159   /* "lxml/objectify.pyx":1044
17160  * 
17161  *     pytype = PyType(u'float', float, FloatElement, repr)
17162  *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
17163  *     pytype.register()
17164  * 
17165  */
17166   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__6) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
17167
17168   /* "lxml/objectify.pyx":1045
17169  *     pytype = PyType(u'float', float, FloatElement, repr)
17170  *     pytype.xmlSchemaTypes = (u"double", u"float")
17171  *     pytype.register()             # <<<<<<<<<<<<<<
17172  * 
17173  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17174  */
17175   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error)
17176   __Pyx_GOTREF(__pyx_t_2);
17177   __pyx_t_3 = NULL;
17178   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17179     __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
17180     if (likely(__pyx_t_3)) {
17181       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17182       __Pyx_INCREF(__pyx_t_3);
17183       __Pyx_INCREF(function);
17184       __Pyx_DECREF_SET(__pyx_t_2, function);
17185     }
17186   }
17187   __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17188   __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17189   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
17190   __Pyx_GOTREF(__pyx_t_1);
17191   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17192   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17193
17194   /* "lxml/objectify.pyx":1047
17195  *     pytype.register()
17196  * 
17197  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)             # <<<<<<<<<<<<<<
17198  *     pytype.xmlSchemaTypes = (u"boolean",)
17199  *     pytype.register()
17200  */
17201   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_checkBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
17202   __Pyx_GOTREF(__pyx_t_1);
17203   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lower_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
17204   __Pyx_GOTREF(__pyx_t_2);
17205   __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1047, __pyx_L1_error)
17206   __Pyx_GOTREF(__pyx_t_3);
17207   __Pyx_INCREF(__pyx_n_u_bool);
17208   __Pyx_GIVEREF(__pyx_n_u_bool);
17209   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_bool);
17210   __Pyx_GIVEREF(__pyx_t_1);
17211   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
17212   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17213   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17214   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement));
17215   __Pyx_GIVEREF(__pyx_t_2);
17216   PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
17217   __pyx_t_1 = 0;
17218   __pyx_t_2 = 0;
17219   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
17220   __Pyx_GOTREF(__pyx_t_2);
17221   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17222   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
17223   __pyx_t_2 = 0;
17224
17225   /* "lxml/objectify.pyx":1048
17226  * 
17227  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17228  *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
17229  *     pytype.register()
17230  * 
17231  */
17232   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__7) < 0) __PYX_ERR(0, 1048, __pyx_L1_error)
17233
17234   /* "lxml/objectify.pyx":1049
17235  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
17236  *     pytype.xmlSchemaTypes = (u"boolean",)
17237  *     pytype.register()             # <<<<<<<<<<<<<<
17238  * 
17239  *     pytype = PyType(u'str', None, StringElement)
17240  */
17241   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
17242   __Pyx_GOTREF(__pyx_t_3);
17243   __pyx_t_1 = NULL;
17244   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17245     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
17246     if (likely(__pyx_t_1)) {
17247       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17248       __Pyx_INCREF(__pyx_t_1);
17249       __Pyx_INCREF(function);
17250       __Pyx_DECREF_SET(__pyx_t_3, function);
17251     }
17252   }
17253   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
17254   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17255   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
17256   __Pyx_GOTREF(__pyx_t_2);
17257   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17258   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17259
17260   /* "lxml/objectify.pyx":1051
17261  *     pytype.register()
17262  * 
17263  *     pytype = PyType(u'str', None, StringElement)             # <<<<<<<<<<<<<<
17264  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
17265  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17266  */
17267   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error)
17268   __Pyx_GOTREF(__pyx_t_2);
17269   __Pyx_INCREF(__pyx_n_u_str);
17270   __Pyx_GIVEREF(__pyx_n_u_str);
17271   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_str);
17272   __Pyx_INCREF(Py_None);
17273   __Pyx_GIVEREF(Py_None);
17274   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17275   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17276   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17277   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
17278   __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1051, __pyx_L1_error)
17279   __Pyx_GOTREF(__pyx_t_3);
17280   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17281   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3));
17282   __pyx_t_3 = 0;
17283
17284   /* "lxml/objectify.pyx":1052
17285  * 
17286  *     pytype = PyType(u'str', None, StringElement)
17287  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
17288  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17289  *                              u"NMTOKEN", )
17290  */
17291   if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__8) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)
17292
17293   /* "lxml/objectify.pyx":1055
17294  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
17295  *                              u"NMTOKEN", )
17296  *     pytype.register()             # <<<<<<<<<<<<<<
17297  * 
17298  *     # since lxml 2.0
17299  */
17300   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
17301   __Pyx_GOTREF(__pyx_t_2);
17302   __pyx_t_1 = NULL;
17303   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17304     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
17305     if (likely(__pyx_t_1)) {
17306       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17307       __Pyx_INCREF(__pyx_t_1);
17308       __Pyx_INCREF(function);
17309       __Pyx_DECREF_SET(__pyx_t_2, function);
17310     }
17311   }
17312   __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17313   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17314   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
17315   __Pyx_GOTREF(__pyx_t_3);
17316   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17317   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17318
17319   /* "lxml/objectify.pyx":1058
17320  * 
17321  *     # since lxml 2.0
17322  *     pytype = PyType(u'NoneType', None, NoneElement)             # <<<<<<<<<<<<<<
17323  *     pytype.register()
17324  * 
17325  */
17326   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
17327   __Pyx_GOTREF(__pyx_t_3);
17328   __Pyx_INCREF(__pyx_n_u_NoneType);
17329   __Pyx_GIVEREF(__pyx_n_u_NoneType);
17330   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_NoneType);
17331   __Pyx_INCREF(Py_None);
17332   __Pyx_GIVEREF(Py_None);
17333   PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
17334   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17335   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17336   PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17337   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
17338   __Pyx_GOTREF(__pyx_t_2);
17339   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17340   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
17341   __pyx_t_2 = 0;
17342
17343   /* "lxml/objectify.pyx":1059
17344  *     # since lxml 2.0
17345  *     pytype = PyType(u'NoneType', None, NoneElement)
17346  *     pytype.register()             # <<<<<<<<<<<<<<
17347  * 
17348  *     # backwards compatibility
17349  */
17350   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error)
17351   __Pyx_GOTREF(__pyx_t_3);
17352   __pyx_t_1 = NULL;
17353   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
17354     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
17355     if (likely(__pyx_t_1)) {
17356       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
17357       __Pyx_INCREF(__pyx_t_1);
17358       __Pyx_INCREF(function);
17359       __Pyx_DECREF_SET(__pyx_t_3, function);
17360     }
17361   }
17362   __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
17363   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17364   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error)
17365   __Pyx_GOTREF(__pyx_t_2);
17366   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17367   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17368
17369   /* "lxml/objectify.pyx":1062
17370  * 
17371  *     # backwards compatibility
17372  *     pytype = PyType(u'none', None, NoneElement)             # <<<<<<<<<<<<<<
17373  *     pytype.register()
17374  * 
17375  */
17376   __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error)
17377   __Pyx_GOTREF(__pyx_t_2);
17378   __Pyx_INCREF(__pyx_n_u_none);
17379   __Pyx_GIVEREF(__pyx_n_u_none);
17380   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_none);
17381   __Pyx_INCREF(Py_None);
17382   __Pyx_GIVEREF(Py_None);
17383   PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
17384   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17385   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17386   PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
17387   __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error)
17388   __Pyx_GOTREF(__pyx_t_3);
17389   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17390   __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3));
17391   __pyx_t_3 = 0;
17392
17393   /* "lxml/objectify.pyx":1063
17394  *     # backwards compatibility
17395  *     pytype = PyType(u'none', None, NoneElement)
17396  *     pytype.register()             # <<<<<<<<<<<<<<
17397  * 
17398  * # non-registered PyType for inner tree elements
17399  */
17400   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error)
17401   __Pyx_GOTREF(__pyx_t_2);
17402   __pyx_t_1 = NULL;
17403   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
17404     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
17405     if (likely(__pyx_t_1)) {
17406       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
17407       __Pyx_INCREF(__pyx_t_1);
17408       __Pyx_INCREF(function);
17409       __Pyx_DECREF_SET(__pyx_t_2, function);
17410     }
17411   }
17412   __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
17413   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
17414   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1063, __pyx_L1_error)
17415   __Pyx_GOTREF(__pyx_t_3);
17416   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17417   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17418
17419   /* "lxml/objectify.pyx":1031
17420  *     return _pytypename(obj)
17421  * 
17422  * cdef _registerPyTypes():             # <<<<<<<<<<<<<<
17423  *     pytype = PyType(u'int', int, IntElement)
17424  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
17425  */
17426
17427   /* function exit code */
17428   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17429   goto __pyx_L0;
17430   __pyx_L1_error:;
17431   __Pyx_XDECREF(__pyx_t_1);
17432   __Pyx_XDECREF(__pyx_t_2);
17433   __Pyx_XDECREF(__pyx_t_3);
17434   __Pyx_AddTraceback("lxml.objectify._registerPyTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
17435   __pyx_r = 0;
17436   __pyx_L0:;
17437   __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
17438   __Pyx_XGIVEREF(__pyx_r);
17439   __Pyx_RefNannyFinishContext();
17440   return __pyx_r;
17441 }
17442
17443 /* "lxml/objectify.pyx":1070
17444  * _registerPyTypes()
17445  * 
17446  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
17447  *     u"""getRegisteredTypes()
17448  * 
17449  */
17450
17451 /* Python wrapper */
17452 static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
17453 static char __pyx_doc_4lxml_9objectify_10getRegisteredTypes[] = "getRegisteredTypes()\n\n    Returns a list of the currently registered PyType objects.\n\n    To add a new type, retrieve this list and call unregister() for all\n    entries.  Then add the new type at a suitable position (possibly replacing\n    an existing one) and call register() for all entries.\n\n    This is necessary if the new type interferes with the type check functions\n    of existing ones (normally only int/float/bool) and must the tried before\n    other types.  To add a type that is not yet parsable by the current type\n    check functions, you can simply register() it, which will append it to the\n    end of the type list.\n    ";
17454 static PyMethodDef __pyx_mdef_4lxml_9objectify_11getRegisteredTypes = {"getRegisteredTypes", (PyCFunction)__pyx_pw_4lxml_9objectify_11getRegisteredTypes, METH_NOARGS, __pyx_doc_4lxml_9objectify_10getRegisteredTypes};
17455 static PyObject *__pyx_pw_4lxml_9objectify_11getRegisteredTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
17456   PyObject *__pyx_r = 0;
17457   __Pyx_RefNannyDeclarations
17458   __Pyx_RefNannySetupContext("getRegisteredTypes (wrapper)", 0);
17459   __pyx_r = __pyx_pf_4lxml_9objectify_10getRegisteredTypes(__pyx_self);
17460
17461   /* function exit code */
17462   __Pyx_RefNannyFinishContext();
17463   return __pyx_r;
17464 }
17465
17466 static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED PyObject *__pyx_self) {
17467   PyObject *__pyx_v_types = 0;
17468   PyObject *__pyx_v_known = 0;
17469   CYTHON_UNUSED PyObject *__pyx_v_check = NULL;
17470   PyObject *__pyx_v_pytype = NULL;
17471   PyObject *__pyx_v_name = NULL;
17472   PyObject *__pyx_r = NULL;
17473   __Pyx_RefNannyDeclarations
17474   PyObject *__pyx_t_1 = NULL;
17475   Py_ssize_t __pyx_t_2;
17476   PyObject *__pyx_t_3 = NULL;
17477   PyObject *__pyx_t_4 = NULL;
17478   PyObject *__pyx_t_5 = NULL;
17479   PyObject *__pyx_t_6 = NULL;
17480   PyObject *(*__pyx_t_7)(PyObject *);
17481   int __pyx_t_8;
17482   int __pyx_t_9;
17483   int __pyx_t_10;
17484   PyObject *(*__pyx_t_11)(PyObject *);
17485   int __pyx_lineno = 0;
17486   const char *__pyx_filename = NULL;
17487   int __pyx_clineno = 0;
17488   __Pyx_RefNannySetupContext("getRegisteredTypes", 0);
17489
17490   /* "lxml/objectify.pyx":1085
17491  *     end of the type list.
17492  *     """
17493  *     cdef list types = []             # <<<<<<<<<<<<<<
17494  *     cdef set known = set()
17495  *     for check, pytype in _TYPE_CHECKS:
17496  */
17497   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
17498   __Pyx_GOTREF(__pyx_t_1);
17499   __pyx_v_types = ((PyObject*)__pyx_t_1);
17500   __pyx_t_1 = 0;
17501
17502   /* "lxml/objectify.pyx":1086
17503  *     """
17504  *     cdef list types = []
17505  *     cdef set known = set()             # <<<<<<<<<<<<<<
17506  *     for check, pytype in _TYPE_CHECKS:
17507  *         name = pytype.name
17508  */
17509   __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
17510   __Pyx_GOTREF(__pyx_t_1);
17511   __pyx_v_known = ((PyObject*)__pyx_t_1);
17512   __pyx_t_1 = 0;
17513
17514   /* "lxml/objectify.pyx":1087
17515  *     cdef list types = []
17516  *     cdef set known = set()
17517  *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17518  *         name = pytype.name
17519  *         if name not in known:
17520  */
17521   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
17522     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
17523     __PYX_ERR(0, 1087, __pyx_L1_error)
17524   }
17525   __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
17526   for (;;) {
17527     if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
17528     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17529     __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error)
17530     #else
17531     __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error)
17532     __Pyx_GOTREF(__pyx_t_3);
17533     #endif
17534     if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
17535       PyObject* sequence = __pyx_t_3;
17536       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17537       if (unlikely(size != 2)) {
17538         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
17539         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17540         __PYX_ERR(0, 1087, __pyx_L1_error)
17541       }
17542       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17543       if (likely(PyTuple_CheckExact(sequence))) {
17544         __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
17545         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
17546       } else {
17547         __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
17548         __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
17549       }
17550       __Pyx_INCREF(__pyx_t_4);
17551       __Pyx_INCREF(__pyx_t_5);
17552       #else
17553       __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1087, __pyx_L1_error)
17554       __Pyx_GOTREF(__pyx_t_4);
17555       __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
17556       __Pyx_GOTREF(__pyx_t_5);
17557       #endif
17558       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17559     } else {
17560       Py_ssize_t index = -1;
17561       __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1087, __pyx_L1_error)
17562       __Pyx_GOTREF(__pyx_t_6);
17563       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17564       __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
17565       index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
17566       __Pyx_GOTREF(__pyx_t_4);
17567       index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed;
17568       __Pyx_GOTREF(__pyx_t_5);
17569       if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1087, __pyx_L1_error)
17570       __pyx_t_7 = NULL;
17571       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17572       goto __pyx_L6_unpacking_done;
17573       __pyx_L5_unpacking_failed:;
17574       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17575       __pyx_t_7 = NULL;
17576       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17577       __PYX_ERR(0, 1087, __pyx_L1_error)
17578       __pyx_L6_unpacking_done:;
17579     }
17580     __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_4);
17581     __pyx_t_4 = 0;
17582     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_5);
17583     __pyx_t_5 = 0;
17584
17585     /* "lxml/objectify.pyx":1088
17586  *     cdef set known = set()
17587  *     for check, pytype in _TYPE_CHECKS:
17588  *         name = pytype.name             # <<<<<<<<<<<<<<
17589  *         if name not in known:
17590  *             known.add(name)
17591  */
17592     __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1088, __pyx_L1_error)
17593     __Pyx_GOTREF(__pyx_t_3);
17594     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
17595     __pyx_t_3 = 0;
17596
17597     /* "lxml/objectify.pyx":1089
17598  *     for check, pytype in _TYPE_CHECKS:
17599  *         name = pytype.name
17600  *         if name not in known:             # <<<<<<<<<<<<<<
17601  *             known.add(name)
17602  *             types.append(pytype)
17603  */
17604     __pyx_t_8 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1089, __pyx_L1_error)
17605     __pyx_t_9 = (__pyx_t_8 != 0);
17606     if (__pyx_t_9) {
17607
17608       /* "lxml/objectify.pyx":1090
17609  *         name = pytype.name
17610  *         if name not in known:
17611  *             known.add(name)             # <<<<<<<<<<<<<<
17612  *             types.append(pytype)
17613  *     for pytype in _PYTYPE_DICT.values():
17614  */
17615       __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1090, __pyx_L1_error)
17616
17617       /* "lxml/objectify.pyx":1091
17618  *         if name not in known:
17619  *             known.add(name)
17620  *             types.append(pytype)             # <<<<<<<<<<<<<<
17621  *     for pytype in _PYTYPE_DICT.values():
17622  *         name = pytype.name
17623  */
17624       __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1091, __pyx_L1_error)
17625
17626       /* "lxml/objectify.pyx":1089
17627  *     for check, pytype in _TYPE_CHECKS:
17628  *         name = pytype.name
17629  *         if name not in known:             # <<<<<<<<<<<<<<
17630  *             known.add(name)
17631  *             types.append(pytype)
17632  */
17633     }
17634
17635     /* "lxml/objectify.pyx":1087
17636  *     cdef list types = []
17637  *     cdef set known = set()
17638  *     for check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17639  *         name = pytype.name
17640  *         if name not in known:
17641  */
17642   }
17643   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17644
17645   /* "lxml/objectify.pyx":1092
17646  *             known.add(name)
17647  *             types.append(pytype)
17648  *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
17649  *         name = pytype.name
17650  *         if name not in known:
17651  */
17652   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
17653     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
17654     __PYX_ERR(0, 1092, __pyx_L1_error)
17655   }
17656   __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_4lxml_9objectify__PYTYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
17657   __Pyx_GOTREF(__pyx_t_1);
17658   if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
17659     __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0;
17660     __pyx_t_11 = NULL;
17661   } else {
17662     __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L1_error)
17663     __Pyx_GOTREF(__pyx_t_3);
17664     __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1092, __pyx_L1_error)
17665   }
17666   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17667   for (;;) {
17668     if (likely(!__pyx_t_11)) {
17669       if (likely(PyList_CheckExact(__pyx_t_3))) {
17670         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
17671         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17672         __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
17673         #else
17674         __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
17675         __Pyx_GOTREF(__pyx_t_1);
17676         #endif
17677       } else {
17678         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
17679         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17680         __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L1_error)
17681         #else
17682         __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
17683         __Pyx_GOTREF(__pyx_t_1);
17684         #endif
17685       }
17686     } else {
17687       __pyx_t_1 = __pyx_t_11(__pyx_t_3);
17688       if (unlikely(!__pyx_t_1)) {
17689         PyObject* exc_type = PyErr_Occurred();
17690         if (exc_type) {
17691           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
17692           else __PYX_ERR(0, 1092, __pyx_L1_error)
17693         }
17694         break;
17695       }
17696       __Pyx_GOTREF(__pyx_t_1);
17697     }
17698     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_1);
17699     __pyx_t_1 = 0;
17700
17701     /* "lxml/objectify.pyx":1093
17702  *             types.append(pytype)
17703  *     for pytype in _PYTYPE_DICT.values():
17704  *         name = pytype.name             # <<<<<<<<<<<<<<
17705  *         if name not in known:
17706  *             known.add(name)
17707  */
17708     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L1_error)
17709     __Pyx_GOTREF(__pyx_t_1);
17710     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1);
17711     __pyx_t_1 = 0;
17712
17713     /* "lxml/objectify.pyx":1094
17714  *     for pytype in _PYTYPE_DICT.values():
17715  *         name = pytype.name
17716  *         if name not in known:             # <<<<<<<<<<<<<<
17717  *             known.add(name)
17718  *             types.append(pytype)
17719  */
17720     __pyx_t_9 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1094, __pyx_L1_error)
17721     __pyx_t_8 = (__pyx_t_9 != 0);
17722     if (__pyx_t_8) {
17723
17724       /* "lxml/objectify.pyx":1095
17725  *         name = pytype.name
17726  *         if name not in known:
17727  *             known.add(name)             # <<<<<<<<<<<<<<
17728  *             types.append(pytype)
17729  *     return types
17730  */
17731       __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1095, __pyx_L1_error)
17732
17733       /* "lxml/objectify.pyx":1096
17734  *         if name not in known:
17735  *             known.add(name)
17736  *             types.append(pytype)             # <<<<<<<<<<<<<<
17737  *     return types
17738  * 
17739  */
17740       __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1096, __pyx_L1_error)
17741
17742       /* "lxml/objectify.pyx":1094
17743  *     for pytype in _PYTYPE_DICT.values():
17744  *         name = pytype.name
17745  *         if name not in known:             # <<<<<<<<<<<<<<
17746  *             known.add(name)
17747  *             types.append(pytype)
17748  */
17749     }
17750
17751     /* "lxml/objectify.pyx":1092
17752  *             known.add(name)
17753  *             types.append(pytype)
17754  *     for pytype in _PYTYPE_DICT.values():             # <<<<<<<<<<<<<<
17755  *         name = pytype.name
17756  *         if name not in known:
17757  */
17758   }
17759   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17760
17761   /* "lxml/objectify.pyx":1097
17762  *             known.add(name)
17763  *             types.append(pytype)
17764  *     return types             # <<<<<<<<<<<<<<
17765  * 
17766  * cdef PyType _guessPyType(value, PyType defaulttype):
17767  */
17768   __Pyx_XDECREF(__pyx_r);
17769   __Pyx_INCREF(__pyx_v_types);
17770   __pyx_r = __pyx_v_types;
17771   goto __pyx_L0;
17772
17773   /* "lxml/objectify.pyx":1070
17774  * _registerPyTypes()
17775  * 
17776  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
17777  *     u"""getRegisteredTypes()
17778  * 
17779  */
17780
17781   /* function exit code */
17782   __pyx_L1_error:;
17783   __Pyx_XDECREF(__pyx_t_1);
17784   __Pyx_XDECREF(__pyx_t_3);
17785   __Pyx_XDECREF(__pyx_t_4);
17786   __Pyx_XDECREF(__pyx_t_5);
17787   __Pyx_XDECREF(__pyx_t_6);
17788   __Pyx_AddTraceback("lxml.objectify.getRegisteredTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
17789   __pyx_r = NULL;
17790   __pyx_L0:;
17791   __Pyx_XDECREF(__pyx_v_types);
17792   __Pyx_XDECREF(__pyx_v_known);
17793   __Pyx_XDECREF(__pyx_v_check);
17794   __Pyx_XDECREF(__pyx_v_pytype);
17795   __Pyx_XDECREF(__pyx_v_name);
17796   __Pyx_XGIVEREF(__pyx_r);
17797   __Pyx_RefNannyFinishContext();
17798   return __pyx_r;
17799 }
17800
17801 /* "lxml/objectify.pyx":1099
17802  *     return types
17803  * 
17804  * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
17805  *     if value is None:
17806  *         return None
17807  */
17808
17809 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *__pyx_v_value, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_defaulttype) {
17810   PyObject *__pyx_v_type_check = NULL;
17811   PyObject *__pyx_v_tested_pytype = NULL;
17812   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
17813   __Pyx_RefNannyDeclarations
17814   int __pyx_t_1;
17815   int __pyx_t_2;
17816   PyObject *__pyx_t_3 = NULL;
17817   Py_ssize_t __pyx_t_4;
17818   PyObject *__pyx_t_5 = NULL;
17819   PyObject *__pyx_t_6 = NULL;
17820   PyObject *__pyx_t_7 = NULL;
17821   PyObject *__pyx_t_8 = NULL;
17822   PyObject *(*__pyx_t_9)(PyObject *);
17823   PyObject *__pyx_t_10 = NULL;
17824   PyObject *__pyx_t_11 = NULL;
17825   PyObject *__pyx_t_12 = NULL;
17826   int __pyx_t_13;
17827   int __pyx_lineno = 0;
17828   const char *__pyx_filename = NULL;
17829   int __pyx_clineno = 0;
17830   __Pyx_RefNannySetupContext("_guessPyType", 0);
17831
17832   /* "lxml/objectify.pyx":1100
17833  * 
17834  * cdef PyType _guessPyType(value, PyType defaulttype):
17835  *     if value is None:             # <<<<<<<<<<<<<<
17836  *         return None
17837  *     for type_check, tested_pytype in _TYPE_CHECKS:
17838  */
17839   __pyx_t_1 = (__pyx_v_value == Py_None);
17840   __pyx_t_2 = (__pyx_t_1 != 0);
17841   if (__pyx_t_2) {
17842
17843     /* "lxml/objectify.pyx":1101
17844  * cdef PyType _guessPyType(value, PyType defaulttype):
17845  *     if value is None:
17846  *         return None             # <<<<<<<<<<<<<<
17847  *     for type_check, tested_pytype in _TYPE_CHECKS:
17848  *         try:
17849  */
17850     __Pyx_XDECREF(((PyObject *)__pyx_r));
17851     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
17852     goto __pyx_L0;
17853
17854     /* "lxml/objectify.pyx":1100
17855  * 
17856  * cdef PyType _guessPyType(value, PyType defaulttype):
17857  *     if value is None:             # <<<<<<<<<<<<<<
17858  *         return None
17859  *     for type_check, tested_pytype in _TYPE_CHECKS:
17860  */
17861   }
17862
17863   /* "lxml/objectify.pyx":1102
17864  *     if value is None:
17865  *         return None
17866  *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
17867  *         try:
17868  *             type_check(value)
17869  */
17870   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
17871     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
17872     __PYX_ERR(0, 1102, __pyx_L1_error)
17873   }
17874   __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
17875   for (;;) {
17876     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
17877     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17878     __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1102, __pyx_L1_error)
17879     #else
17880     __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1102, __pyx_L1_error)
17881     __Pyx_GOTREF(__pyx_t_5);
17882     #endif
17883     if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
17884       PyObject* sequence = __pyx_t_5;
17885       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17886       if (unlikely(size != 2)) {
17887         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
17888         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17889         __PYX_ERR(0, 1102, __pyx_L1_error)
17890       }
17891       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17892       if (likely(PyTuple_CheckExact(sequence))) {
17893         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
17894         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
17895       } else {
17896         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
17897         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
17898       }
17899       __Pyx_INCREF(__pyx_t_6);
17900       __Pyx_INCREF(__pyx_t_7);
17901       #else
17902       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1102, __pyx_L1_error)
17903       __Pyx_GOTREF(__pyx_t_6);
17904       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error)
17905       __Pyx_GOTREF(__pyx_t_7);
17906       #endif
17907       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17908     } else {
17909       Py_ssize_t index = -1;
17910       __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L1_error)
17911       __Pyx_GOTREF(__pyx_t_8);
17912       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17913       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
17914       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
17915       __Pyx_GOTREF(__pyx_t_6);
17916       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
17917       __Pyx_GOTREF(__pyx_t_7);
17918       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1102, __pyx_L1_error)
17919       __pyx_t_9 = NULL;
17920       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17921       goto __pyx_L7_unpacking_done;
17922       __pyx_L6_unpacking_failed:;
17923       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17924       __pyx_t_9 = NULL;
17925       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17926       __PYX_ERR(0, 1102, __pyx_L1_error)
17927       __pyx_L7_unpacking_done:;
17928     }
17929     __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6);
17930     __pyx_t_6 = 0;
17931     __Pyx_XDECREF_SET(__pyx_v_tested_pytype, __pyx_t_7);
17932     __pyx_t_7 = 0;
17933
17934     /* "lxml/objectify.pyx":1103
17935  *         return None
17936  *     for type_check, tested_pytype in _TYPE_CHECKS:
17937  *         try:             # <<<<<<<<<<<<<<
17938  *             type_check(value)
17939  *             return <PyType>tested_pytype
17940  */
17941     {
17942       __Pyx_PyThreadState_declare
17943       __Pyx_PyThreadState_assign
17944       __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
17945       __Pyx_XGOTREF(__pyx_t_10);
17946       __Pyx_XGOTREF(__pyx_t_11);
17947       __Pyx_XGOTREF(__pyx_t_12);
17948       /*try:*/ {
17949
17950         /* "lxml/objectify.pyx":1104
17951  *     for type_check, tested_pytype in _TYPE_CHECKS:
17952  *         try:
17953  *             type_check(value)             # <<<<<<<<<<<<<<
17954  *             return <PyType>tested_pytype
17955  *         except IGNORABLE_ERRORS:
17956  */
17957         __Pyx_INCREF(__pyx_v_type_check);
17958         __pyx_t_7 = __pyx_v_type_check; __pyx_t_6 = NULL;
17959         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
17960           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
17961           if (likely(__pyx_t_6)) {
17962             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
17963             __Pyx_INCREF(__pyx_t_6);
17964             __Pyx_INCREF(function);
17965             __Pyx_DECREF_SET(__pyx_t_7, function);
17966           }
17967         }
17968         __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
17969         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17970         if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L8_error)
17971         __Pyx_GOTREF(__pyx_t_5);
17972         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17973         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17974
17975         /* "lxml/objectify.pyx":1105
17976  *         try:
17977  *             type_check(value)
17978  *             return <PyType>tested_pytype             # <<<<<<<<<<<<<<
17979  *         except IGNORABLE_ERRORS:
17980  *             # could not be parsed as the specified type => ignore
17981  */
17982         __Pyx_XDECREF(((PyObject *)__pyx_r));
17983         __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
17984         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
17985         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17986         goto __pyx_L12_try_return;
17987
17988         /* "lxml/objectify.pyx":1103
17989  *         return None
17990  *     for type_check, tested_pytype in _TYPE_CHECKS:
17991  *         try:             # <<<<<<<<<<<<<<
17992  *             type_check(value)
17993  *             return <PyType>tested_pytype
17994  */
17995       }
17996       __pyx_L8_error:;
17997       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17998       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17999       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18000       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18001
18002       /* "lxml/objectify.pyx":1106
18003  *             type_check(value)
18004  *             return <PyType>tested_pytype
18005  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
18006  *             # could not be parsed as the specified type => ignore
18007  *             pass
18008  */
18009       __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
18010       if (__pyx_t_13) {
18011         __Pyx_ErrRestore(0,0,0);
18012         goto __pyx_L9_exception_handled;
18013       }
18014       goto __pyx_L10_except_error;
18015       __pyx_L10_except_error:;
18016
18017       /* "lxml/objectify.pyx":1103
18018  *         return None
18019  *     for type_check, tested_pytype in _TYPE_CHECKS:
18020  *         try:             # <<<<<<<<<<<<<<
18021  *             type_check(value)
18022  *             return <PyType>tested_pytype
18023  */
18024       __Pyx_XGIVEREF(__pyx_t_10);
18025       __Pyx_XGIVEREF(__pyx_t_11);
18026       __Pyx_XGIVEREF(__pyx_t_12);
18027       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18028       goto __pyx_L1_error;
18029       __pyx_L12_try_return:;
18030       __Pyx_XGIVEREF(__pyx_t_10);
18031       __Pyx_XGIVEREF(__pyx_t_11);
18032       __Pyx_XGIVEREF(__pyx_t_12);
18033       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18034       goto __pyx_L0;
18035       __pyx_L9_exception_handled:;
18036       __Pyx_XGIVEREF(__pyx_t_10);
18037       __Pyx_XGIVEREF(__pyx_t_11);
18038       __Pyx_XGIVEREF(__pyx_t_12);
18039       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18040     }
18041
18042     /* "lxml/objectify.pyx":1102
18043  *     if value is None:
18044  *         return None
18045  *     for type_check, tested_pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18046  *         try:
18047  *             type_check(value)
18048  */
18049   }
18050   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18051
18052   /* "lxml/objectify.pyx":1109
18053  *             # could not be parsed as the specified type => ignore
18054  *             pass
18055  *     return defaulttype             # <<<<<<<<<<<<<<
18056  * 
18057  * cdef object _guessElementClass(tree.xmlNode* c_node):
18058  */
18059   __Pyx_XDECREF(((PyObject *)__pyx_r));
18060   __Pyx_INCREF(((PyObject *)__pyx_v_defaulttype));
18061   __pyx_r = __pyx_v_defaulttype;
18062   goto __pyx_L0;
18063
18064   /* "lxml/objectify.pyx":1099
18065  *     return types
18066  * 
18067  * cdef PyType _guessPyType(value, PyType defaulttype):             # <<<<<<<<<<<<<<
18068  *     if value is None:
18069  *         return None
18070  */
18071
18072   /* function exit code */
18073   __pyx_L1_error:;
18074   __Pyx_XDECREF(__pyx_t_3);
18075   __Pyx_XDECREF(__pyx_t_5);
18076   __Pyx_XDECREF(__pyx_t_6);
18077   __Pyx_XDECREF(__pyx_t_7);
18078   __Pyx_XDECREF(__pyx_t_8);
18079   __Pyx_AddTraceback("lxml.objectify._guessPyType", __pyx_clineno, __pyx_lineno, __pyx_filename);
18080   __pyx_r = 0;
18081   __pyx_L0:;
18082   __Pyx_XDECREF(__pyx_v_type_check);
18083   __Pyx_XDECREF(__pyx_v_tested_pytype);
18084   __Pyx_XGIVEREF((PyObject *)__pyx_r);
18085   __Pyx_RefNannyFinishContext();
18086   return __pyx_r;
18087 }
18088
18089 /* "lxml/objectify.pyx":1111
18090  *     return defaulttype
18091  * 
18092  * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
18093  *     value = textOf(c_node)
18094  *     if value is None:
18095  */
18096
18097 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
18098   PyObject *__pyx_v_value = NULL;
18099   PyObject *__pyx_v_type_check = NULL;
18100   PyObject *__pyx_v_pytype = NULL;
18101   PyObject *__pyx_r = NULL;
18102   __Pyx_RefNannyDeclarations
18103   PyObject *__pyx_t_1 = NULL;
18104   int __pyx_t_2;
18105   int __pyx_t_3;
18106   Py_ssize_t __pyx_t_4;
18107   PyObject *__pyx_t_5 = NULL;
18108   PyObject *__pyx_t_6 = NULL;
18109   PyObject *__pyx_t_7 = NULL;
18110   PyObject *__pyx_t_8 = NULL;
18111   PyObject *(*__pyx_t_9)(PyObject *);
18112   PyObject *__pyx_t_10 = NULL;
18113   PyObject *__pyx_t_11 = NULL;
18114   PyObject *__pyx_t_12 = NULL;
18115   int __pyx_t_13;
18116   int __pyx_lineno = 0;
18117   const char *__pyx_filename = NULL;
18118   int __pyx_clineno = 0;
18119   __Pyx_RefNannySetupContext("_guessElementClass", 0);
18120
18121   /* "lxml/objectify.pyx":1112
18122  * 
18123  * cdef object _guessElementClass(tree.xmlNode* c_node):
18124  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
18125  *     if value is None:
18126  *         return None
18127  */
18128   __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
18129   __Pyx_GOTREF(__pyx_t_1);
18130   __pyx_v_value = __pyx_t_1;
18131   __pyx_t_1 = 0;
18132
18133   /* "lxml/objectify.pyx":1113
18134  * cdef object _guessElementClass(tree.xmlNode* c_node):
18135  *     value = textOf(c_node)
18136  *     if value is None:             # <<<<<<<<<<<<<<
18137  *         return None
18138  *     if value == '':
18139  */
18140   __pyx_t_2 = (__pyx_v_value == Py_None);
18141   __pyx_t_3 = (__pyx_t_2 != 0);
18142   if (__pyx_t_3) {
18143
18144     /* "lxml/objectify.pyx":1114
18145  *     value = textOf(c_node)
18146  *     if value is None:
18147  *         return None             # <<<<<<<<<<<<<<
18148  *     if value == '':
18149  *         return StringElement
18150  */
18151     __Pyx_XDECREF(__pyx_r);
18152     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18153     goto __pyx_L0;
18154
18155     /* "lxml/objectify.pyx":1113
18156  * cdef object _guessElementClass(tree.xmlNode* c_node):
18157  *     value = textOf(c_node)
18158  *     if value is None:             # <<<<<<<<<<<<<<
18159  *         return None
18160  *     if value == '':
18161  */
18162   }
18163
18164   /* "lxml/objectify.pyx":1115
18165  *     if value is None:
18166  *         return None
18167  *     if value == '':             # <<<<<<<<<<<<<<
18168  *         return StringElement
18169  * 
18170  */
18171   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1115, __pyx_L1_error)
18172   if (__pyx_t_3) {
18173
18174     /* "lxml/objectify.pyx":1116
18175  *         return None
18176  *     if value == '':
18177  *         return StringElement             # <<<<<<<<<<<<<<
18178  * 
18179  *     for type_check, pytype in _TYPE_CHECKS:
18180  */
18181     __Pyx_XDECREF(__pyx_r);
18182     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
18183     __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement);
18184     goto __pyx_L0;
18185
18186     /* "lxml/objectify.pyx":1115
18187  *     if value is None:
18188  *         return None
18189  *     if value == '':             # <<<<<<<<<<<<<<
18190  *         return StringElement
18191  * 
18192  */
18193   }
18194
18195   /* "lxml/objectify.pyx":1118
18196  *         return StringElement
18197  * 
18198  *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18199  *         try:
18200  *             type_check(value)
18201  */
18202   if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
18203     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
18204     __PYX_ERR(0, 1118, __pyx_L1_error)
18205   }
18206   __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
18207   for (;;) {
18208     if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
18209     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18210     __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1118, __pyx_L1_error)
18211     #else
18212     __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1118, __pyx_L1_error)
18213     __Pyx_GOTREF(__pyx_t_5);
18214     #endif
18215     if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
18216       PyObject* sequence = __pyx_t_5;
18217       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
18218       if (unlikely(size != 2)) {
18219         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
18220         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
18221         __PYX_ERR(0, 1118, __pyx_L1_error)
18222       }
18223       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18224       if (likely(PyTuple_CheckExact(sequence))) {
18225         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
18226         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
18227       } else {
18228         __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
18229         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
18230       }
18231       __Pyx_INCREF(__pyx_t_6);
18232       __Pyx_INCREF(__pyx_t_7);
18233       #else
18234       __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1118, __pyx_L1_error)
18235       __Pyx_GOTREF(__pyx_t_6);
18236       __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1118, __pyx_L1_error)
18237       __Pyx_GOTREF(__pyx_t_7);
18238       #endif
18239       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18240     } else {
18241       Py_ssize_t index = -1;
18242       __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1118, __pyx_L1_error)
18243       __Pyx_GOTREF(__pyx_t_8);
18244       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18245       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
18246       index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
18247       __Pyx_GOTREF(__pyx_t_6);
18248       index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed;
18249       __Pyx_GOTREF(__pyx_t_7);
18250       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1118, __pyx_L1_error)
18251       __pyx_t_9 = NULL;
18252       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18253       goto __pyx_L8_unpacking_done;
18254       __pyx_L7_unpacking_failed:;
18255       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18256       __pyx_t_9 = NULL;
18257       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
18258       __PYX_ERR(0, 1118, __pyx_L1_error)
18259       __pyx_L8_unpacking_done:;
18260     }
18261     __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6);
18262     __pyx_t_6 = 0;
18263     __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7);
18264     __pyx_t_7 = 0;
18265
18266     /* "lxml/objectify.pyx":1119
18267  * 
18268  *     for type_check, pytype in _TYPE_CHECKS:
18269  *         try:             # <<<<<<<<<<<<<<
18270  *             type_check(value)
18271  *             return (<PyType>pytype)._type
18272  */
18273     {
18274       __Pyx_PyThreadState_declare
18275       __Pyx_PyThreadState_assign
18276       __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
18277       __Pyx_XGOTREF(__pyx_t_10);
18278       __Pyx_XGOTREF(__pyx_t_11);
18279       __Pyx_XGOTREF(__pyx_t_12);
18280       /*try:*/ {
18281
18282         /* "lxml/objectify.pyx":1120
18283  *     for type_check, pytype in _TYPE_CHECKS:
18284  *         try:
18285  *             type_check(value)             # <<<<<<<<<<<<<<
18286  *             return (<PyType>pytype)._type
18287  *         except IGNORABLE_ERRORS:
18288  */
18289         __Pyx_INCREF(__pyx_v_type_check);
18290         __pyx_t_7 = __pyx_v_type_check; __pyx_t_6 = NULL;
18291         if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
18292           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
18293           if (likely(__pyx_t_6)) {
18294             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18295             __Pyx_INCREF(__pyx_t_6);
18296             __Pyx_INCREF(function);
18297             __Pyx_DECREF_SET(__pyx_t_7, function);
18298           }
18299         }
18300         __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
18301         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18302         if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1120, __pyx_L9_error)
18303         __Pyx_GOTREF(__pyx_t_5);
18304         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18305         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18306
18307         /* "lxml/objectify.pyx":1121
18308  *         try:
18309  *             type_check(value)
18310  *             return (<PyType>pytype)._type             # <<<<<<<<<<<<<<
18311  *         except IGNORABLE_ERRORS:
18312  *             pass
18313  */
18314         __Pyx_XDECREF(__pyx_r);
18315         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
18316         __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
18317         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18318         goto __pyx_L13_try_return;
18319
18320         /* "lxml/objectify.pyx":1119
18321  * 
18322  *     for type_check, pytype in _TYPE_CHECKS:
18323  *         try:             # <<<<<<<<<<<<<<
18324  *             type_check(value)
18325  *             return (<PyType>pytype)._type
18326  */
18327       }
18328       __pyx_L9_error:;
18329       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18330       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18331       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18332       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18333
18334       /* "lxml/objectify.pyx":1122
18335  *             type_check(value)
18336  *             return (<PyType>pytype)._type
18337  *         except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
18338  *             pass
18339  *     return None
18340  */
18341       __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
18342       if (__pyx_t_13) {
18343         __Pyx_ErrRestore(0,0,0);
18344         goto __pyx_L10_exception_handled;
18345       }
18346       goto __pyx_L11_except_error;
18347       __pyx_L11_except_error:;
18348
18349       /* "lxml/objectify.pyx":1119
18350  * 
18351  *     for type_check, pytype in _TYPE_CHECKS:
18352  *         try:             # <<<<<<<<<<<<<<
18353  *             type_check(value)
18354  *             return (<PyType>pytype)._type
18355  */
18356       __Pyx_XGIVEREF(__pyx_t_10);
18357       __Pyx_XGIVEREF(__pyx_t_11);
18358       __Pyx_XGIVEREF(__pyx_t_12);
18359       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18360       goto __pyx_L1_error;
18361       __pyx_L13_try_return:;
18362       __Pyx_XGIVEREF(__pyx_t_10);
18363       __Pyx_XGIVEREF(__pyx_t_11);
18364       __Pyx_XGIVEREF(__pyx_t_12);
18365       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18366       goto __pyx_L0;
18367       __pyx_L10_exception_handled:;
18368       __Pyx_XGIVEREF(__pyx_t_10);
18369       __Pyx_XGIVEREF(__pyx_t_11);
18370       __Pyx_XGIVEREF(__pyx_t_12);
18371       __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
18372     }
18373
18374     /* "lxml/objectify.pyx":1118
18375  *         return StringElement
18376  * 
18377  *     for type_check, pytype in _TYPE_CHECKS:             # <<<<<<<<<<<<<<
18378  *         try:
18379  *             type_check(value)
18380  */
18381   }
18382   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18383
18384   /* "lxml/objectify.pyx":1124
18385  *         except IGNORABLE_ERRORS:
18386  *             pass
18387  *     return None             # <<<<<<<<<<<<<<
18388  * 
18389  * ################################################################################
18390  */
18391   __Pyx_XDECREF(__pyx_r);
18392   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18393   goto __pyx_L0;
18394
18395   /* "lxml/objectify.pyx":1111
18396  *     return defaulttype
18397  * 
18398  * cdef object _guessElementClass(tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
18399  *     value = textOf(c_node)
18400  *     if value is None:
18401  */
18402
18403   /* function exit code */
18404   __pyx_L1_error:;
18405   __Pyx_XDECREF(__pyx_t_1);
18406   __Pyx_XDECREF(__pyx_t_5);
18407   __Pyx_XDECREF(__pyx_t_6);
18408   __Pyx_XDECREF(__pyx_t_7);
18409   __Pyx_XDECREF(__pyx_t_8);
18410   __Pyx_AddTraceback("lxml.objectify._guessElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
18411   __pyx_r = 0;
18412   __pyx_L0:;
18413   __Pyx_XDECREF(__pyx_v_value);
18414   __Pyx_XDECREF(__pyx_v_type_check);
18415   __Pyx_XDECREF(__pyx_v_pytype);
18416   __Pyx_XGIVEREF(__pyx_r);
18417   __Pyx_RefNannyFinishContext();
18418   return __pyx_r;
18419 }
18420
18421 /* "lxml/objectify.pyx":1137
18422  *     cdef bint _annotate
18423  * 
18424  *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
18425  *         u"__call__(self, *children, **attrib)"
18426  *         cdef _ObjectifyElementMakerCaller elementMaker
18427  */
18428
18429 /* Python wrapper */
18430 static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18431 static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
18432 #if CYTHON_COMPILING_IN_CPYTHON
18433 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
18434 #endif
18435 static PyObject *__pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18436   PyObject *__pyx_v_children = 0;
18437   PyObject *__pyx_v_attrib = 0;
18438   PyObject *__pyx_r = 0;
18439   __Pyx_RefNannyDeclarations
18440   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
18441   if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
18442   __pyx_v_attrib = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_attrib)) return NULL;
18443   __Pyx_GOTREF(__pyx_v_attrib);
18444   __Pyx_INCREF(__pyx_args);
18445   __pyx_v_children = __pyx_args;
18446   __pyx_r = __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self), __pyx_v_children, __pyx_v_attrib);
18447
18448   /* function exit code */
18449   __Pyx_XDECREF(__pyx_v_children);
18450   __Pyx_XDECREF(__pyx_v_attrib);
18451   __Pyx_RefNannyFinishContext();
18452   return __pyx_r;
18453 }
18454
18455 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_self, PyObject *__pyx_v_children, PyObject *__pyx_v_attrib) {
18456   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker = 0;
18457   struct LxmlElement *__pyx_v_element = 0;
18458   struct LxmlElement *__pyx_v_childElement = 0;
18459   int __pyx_v_has_children;
18460   int __pyx_v_has_string_value;
18461   PyObject *__pyx_v_pytype_name = NULL;
18462   PyObject *__pyx_v_child = NULL;
18463   PyObject *__pyx_v_name = NULL;
18464   PyObject *__pyx_v_value = NULL;
18465   PyObject *__pyx_v_pytype = NULL;
18466   PyObject *__pyx_r = NULL;
18467   __Pyx_RefNannyDeclarations
18468   int __pyx_t_1;
18469   int __pyx_t_2;
18470   PyObject *__pyx_t_3 = NULL;
18471   PyObject *__pyx_t_4 = NULL;
18472   PyObject *__pyx_t_5 = NULL;
18473   int __pyx_t_6;
18474   PyObject *__pyx_t_7 = NULL;
18475   Py_ssize_t __pyx_t_8;
18476   Py_ssize_t __pyx_t_9;
18477   PyObject *(*__pyx_t_10)(PyObject *);
18478   PyObject *__pyx_t_11 = NULL;
18479   PyObject *__pyx_t_12 = NULL;
18480   PyObject *(*__pyx_t_13)(PyObject *);
18481   int __pyx_lineno = 0;
18482   const char *__pyx_filename = NULL;
18483   int __pyx_clineno = 0;
18484   __Pyx_RefNannySetupContext("__call__", 0);
18485
18486   /* "lxml/objectify.pyx":1144
18487  *         cdef bint has_children
18488  *         cdef bint has_string_value
18489  *         if self._element_factory is None:             # <<<<<<<<<<<<<<
18490  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18491  *         else:
18492  */
18493   __pyx_t_1 = (__pyx_v_self->_element_factory == Py_None);
18494   __pyx_t_2 = (__pyx_t_1 != 0);
18495   if (__pyx_t_2) {
18496
18497     /* "lxml/objectify.pyx":1145
18498  *         cdef bint has_string_value
18499  *         if self._element_factory is None:
18500  *             element = _makeElement(self._tag, None, attrib, self._nsmap)             # <<<<<<<<<<<<<<
18501  *         else:
18502  *             element = self._element_factory(self._tag, attrib, self._nsmap)
18503  */
18504     __pyx_t_3 = __pyx_v_self->_tag;
18505     __Pyx_INCREF(__pyx_t_3);
18506     __pyx_t_4 = __pyx_v_self->_nsmap;
18507     __Pyx_INCREF(__pyx_t_4);
18508     __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_t_3, Py_None, __pyx_v_attrib, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1145, __pyx_L1_error)
18509     __Pyx_GOTREF(__pyx_t_5);
18510     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18511     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18512     __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
18513     __pyx_t_5 = 0;
18514
18515     /* "lxml/objectify.pyx":1144
18516  *         cdef bint has_children
18517  *         cdef bint has_string_value
18518  *         if self._element_factory is None:             # <<<<<<<<<<<<<<
18519  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18520  *         else:
18521  */
18522     goto __pyx_L3;
18523   }
18524
18525   /* "lxml/objectify.pyx":1147
18526  *             element = _makeElement(self._tag, None, attrib, self._nsmap)
18527  *         else:
18528  *             element = self._element_factory(self._tag, attrib, self._nsmap)             # <<<<<<<<<<<<<<
18529  * 
18530  *         pytype_name = None
18531  */
18532   /*else*/ {
18533     __Pyx_INCREF(__pyx_v_self->_element_factory);
18534     __pyx_t_4 = __pyx_v_self->_element_factory; __pyx_t_3 = NULL;
18535     __pyx_t_6 = 0;
18536     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18537       __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18538       if (likely(__pyx_t_3)) {
18539         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18540         __Pyx_INCREF(__pyx_t_3);
18541         __Pyx_INCREF(function);
18542         __Pyx_DECREF_SET(__pyx_t_4, function);
18543         __pyx_t_6 = 1;
18544       }
18545     }
18546     #if CYTHON_FAST_PYCALL
18547     if (PyFunction_Check(__pyx_t_4)) {
18548       PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap};
18549       __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1147, __pyx_L1_error)
18550       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18551       __Pyx_GOTREF(__pyx_t_5);
18552     } else
18553     #endif
18554     #if CYTHON_FAST_PYCCALL
18555     if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
18556       PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap};
18557       __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1147, __pyx_L1_error)
18558       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18559       __Pyx_GOTREF(__pyx_t_5);
18560     } else
18561     #endif
18562     {
18563       __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1147, __pyx_L1_error)
18564       __Pyx_GOTREF(__pyx_t_7);
18565       if (__pyx_t_3) {
18566         __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
18567       }
18568       __Pyx_INCREF(__pyx_v_self->_tag);
18569       __Pyx_GIVEREF(__pyx_v_self->_tag);
18570       PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self->_tag);
18571       __Pyx_INCREF(__pyx_v_attrib);
18572       __Pyx_GIVEREF(__pyx_v_attrib);
18573       PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_attrib);
18574       __Pyx_INCREF(__pyx_v_self->_nsmap);
18575       __Pyx_GIVEREF(__pyx_v_self->_nsmap);
18576       PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_self->_nsmap);
18577       __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1147, __pyx_L1_error)
18578       __Pyx_GOTREF(__pyx_t_5);
18579       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18580     }
18581     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18582     if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1147, __pyx_L1_error)
18583     __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
18584     __pyx_t_5 = 0;
18585   }
18586   __pyx_L3:;
18587
18588   /* "lxml/objectify.pyx":1149
18589  *             element = self._element_factory(self._tag, attrib, self._nsmap)
18590  * 
18591  *         pytype_name = None             # <<<<<<<<<<<<<<
18592  *         has_children = False
18593  *         has_string_value = False
18594  */
18595   __Pyx_INCREF(Py_None);
18596   __pyx_v_pytype_name = Py_None;
18597
18598   /* "lxml/objectify.pyx":1150
18599  * 
18600  *         pytype_name = None
18601  *         has_children = False             # <<<<<<<<<<<<<<
18602  *         has_string_value = False
18603  *         for child in children:
18604  */
18605   __pyx_v_has_children = 0;
18606
18607   /* "lxml/objectify.pyx":1151
18608  *         pytype_name = None
18609  *         has_children = False
18610  *         has_string_value = False             # <<<<<<<<<<<<<<
18611  *         for child in children:
18612  *             if child is None:
18613  */
18614   __pyx_v_has_string_value = 0;
18615
18616   /* "lxml/objectify.pyx":1152
18617  *         has_children = False
18618  *         has_string_value = False
18619  *         for child in children:             # <<<<<<<<<<<<<<
18620  *             if child is None:
18621  *                 if len(children) == 1:
18622  */
18623   __pyx_t_5 = __pyx_v_children; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0;
18624   for (;;) {
18625     if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
18626     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18627     __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error)
18628     #else
18629     __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1152, __pyx_L1_error)
18630     __Pyx_GOTREF(__pyx_t_4);
18631     #endif
18632     __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_4);
18633     __pyx_t_4 = 0;
18634
18635     /* "lxml/objectify.pyx":1153
18636  *         has_string_value = False
18637  *         for child in children:
18638  *             if child is None:             # <<<<<<<<<<<<<<
18639  *                 if len(children) == 1:
18640  *                     cetree.setAttributeValue(
18641  */
18642     __pyx_t_2 = (__pyx_v_child == Py_None);
18643     __pyx_t_1 = (__pyx_t_2 != 0);
18644     if (__pyx_t_1) {
18645
18646       /* "lxml/objectify.pyx":1154
18647  *         for child in children:
18648  *             if child is None:
18649  *                 if len(children) == 1:             # <<<<<<<<<<<<<<
18650  *                     cetree.setAttributeValue(
18651  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18652  */
18653       __pyx_t_9 = PyTuple_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1154, __pyx_L1_error)
18654       __pyx_t_1 = ((__pyx_t_9 == 1) != 0);
18655       if (__pyx_t_1) {
18656
18657         /* "lxml/objectify.pyx":1156
18658  *                 if len(children) == 1:
18659  *                     cetree.setAttributeValue(
18660  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")             # <<<<<<<<<<<<<<
18661  *             elif python._isString(child):
18662  *                 _add_text(element, child)
18663  */
18664         __pyx_t_4 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
18665         __Pyx_INCREF(__pyx_t_4);
18666
18667         /* "lxml/objectify.pyx":1155
18668  *             if child is None:
18669  *                 if len(children) == 1:
18670  *                     cetree.setAttributeValue(             # <<<<<<<<<<<<<<
18671  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18672  *             elif python._isString(child):
18673  */
18674         __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_4, __pyx_n_u_true); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1155, __pyx_L1_error)
18675         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18676
18677         /* "lxml/objectify.pyx":1154
18678  *         for child in children:
18679  *             if child is None:
18680  *                 if len(children) == 1:             # <<<<<<<<<<<<<<
18681  *                     cetree.setAttributeValue(
18682  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18683  */
18684       }
18685
18686       /* "lxml/objectify.pyx":1153
18687  *         has_string_value = False
18688  *         for child in children:
18689  *             if child is None:             # <<<<<<<<<<<<<<
18690  *                 if len(children) == 1:
18691  *                     cetree.setAttributeValue(
18692  */
18693       goto __pyx_L6;
18694     }
18695
18696     /* "lxml/objectify.pyx":1157
18697  *                     cetree.setAttributeValue(
18698  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18699  *             elif python._isString(child):             # <<<<<<<<<<<<<<
18700  *                 _add_text(element, child)
18701  *                 has_string_value = True
18702  */
18703     __pyx_t_1 = (_isString(__pyx_v_child) != 0);
18704     if (__pyx_t_1) {
18705
18706       /* "lxml/objectify.pyx":1158
18707  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18708  *             elif python._isString(child):
18709  *                 _add_text(element, child)             # <<<<<<<<<<<<<<
18710  *                 has_string_value = True
18711  *             elif isinstance(child, _Element):
18712  */
18713       __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error)
18714       __Pyx_GOTREF(__pyx_t_4);
18715       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18716
18717       /* "lxml/objectify.pyx":1159
18718  *             elif python._isString(child):
18719  *                 _add_text(element, child)
18720  *                 has_string_value = True             # <<<<<<<<<<<<<<
18721  *             elif isinstance(child, _Element):
18722  *                 cetree.appendChildToElement(element, <_Element>child)
18723  */
18724       __pyx_v_has_string_value = 1;
18725
18726       /* "lxml/objectify.pyx":1157
18727  *                     cetree.setAttributeValue(
18728  *                         element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
18729  *             elif python._isString(child):             # <<<<<<<<<<<<<<
18730  *                 _add_text(element, child)
18731  *                 has_string_value = True
18732  */
18733       goto __pyx_L6;
18734     }
18735
18736     /* "lxml/objectify.pyx":1160
18737  *                 _add_text(element, child)
18738  *                 has_string_value = True
18739  *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
18740  *                 cetree.appendChildToElement(element, <_Element>child)
18741  *                 has_children = True
18742  */
18743     __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element); 
18744     __pyx_t_2 = (__pyx_t_1 != 0);
18745     if (__pyx_t_2) {
18746
18747       /* "lxml/objectify.pyx":1161
18748  *                 has_string_value = True
18749  *             elif isinstance(child, _Element):
18750  *                 cetree.appendChildToElement(element, <_Element>child)             # <<<<<<<<<<<<<<
18751  *                 has_children = True
18752  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18753  */
18754       __pyx_t_6 = appendChildToElement(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1161, __pyx_L1_error)
18755
18756       /* "lxml/objectify.pyx":1162
18757  *             elif isinstance(child, _Element):
18758  *                 cetree.appendChildToElement(element, <_Element>child)
18759  *                 has_children = True             # <<<<<<<<<<<<<<
18760  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18761  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18762  */
18763       __pyx_v_has_children = 1;
18764
18765       /* "lxml/objectify.pyx":1160
18766  *                 _add_text(element, child)
18767  *                 has_string_value = True
18768  *             elif isinstance(child, _Element):             # <<<<<<<<<<<<<<
18769  *                 cetree.appendChildToElement(element, <_Element>child)
18770  *                 has_children = True
18771  */
18772       goto __pyx_L6;
18773     }
18774
18775     /* "lxml/objectify.pyx":1163
18776  *                 cetree.appendChildToElement(element, <_Element>child)
18777  *                 has_children = True
18778  *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
18779  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18780  *                 if elementMaker._element_factory is None:
18781  */
18782     __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_child, __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller); 
18783     __pyx_t_1 = (__pyx_t_2 != 0);
18784     if (__pyx_t_1) {
18785
18786       /* "lxml/objectify.pyx":1164
18787  *                 has_children = True
18788  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18789  *                 elementMaker = <_ObjectifyElementMakerCaller>child             # <<<<<<<<<<<<<<
18790  *                 if elementMaker._element_factory is None:
18791  *                     cetree.makeSubElement(element, elementMaker._tag,
18792  */
18793       __pyx_t_4 = __pyx_v_child;
18794       __Pyx_INCREF(__pyx_t_4);
18795       __Pyx_XDECREF_SET(__pyx_v_elementMaker, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_4));
18796       __pyx_t_4 = 0;
18797
18798       /* "lxml/objectify.pyx":1165
18799  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18800  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18801  *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
18802  *                     cetree.makeSubElement(element, elementMaker._tag,
18803  *                                           None, None, None, None)
18804  */
18805       __pyx_t_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
18806       __pyx_t_2 = (__pyx_t_1 != 0);
18807       if (__pyx_t_2) {
18808
18809         /* "lxml/objectify.pyx":1166
18810  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18811  *                 if elementMaker._element_factory is None:
18812  *                     cetree.makeSubElement(element, elementMaker._tag,             # <<<<<<<<<<<<<<
18813  *                                           None, None, None, None)
18814  *                 else:
18815  */
18816         __pyx_t_4 = __pyx_v_elementMaker->_tag;
18817         __Pyx_INCREF(__pyx_t_4);
18818
18819         /* "lxml/objectify.pyx":1167
18820  *                 if elementMaker._element_factory is None:
18821  *                     cetree.makeSubElement(element, elementMaker._tag,
18822  *                                           None, None, None, None)             # <<<<<<<<<<<<<<
18823  *                 else:
18824  *                     childElement = elementMaker._element_factory(
18825  */
18826         __pyx_t_7 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1166, __pyx_L1_error)
18827         __Pyx_GOTREF(__pyx_t_7);
18828         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18829         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18830
18831         /* "lxml/objectify.pyx":1165
18832  *             elif isinstance(child, _ObjectifyElementMakerCaller):
18833  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18834  *                 if elementMaker._element_factory is None:             # <<<<<<<<<<<<<<
18835  *                     cetree.makeSubElement(element, elementMaker._tag,
18836  *                                           None, None, None, None)
18837  */
18838         goto __pyx_L8;
18839       }
18840
18841       /* "lxml/objectify.pyx":1169
18842  *                                           None, None, None, None)
18843  *                 else:
18844  *                     childElement = elementMaker._element_factory(             # <<<<<<<<<<<<<<
18845  *                         elementMaker._tag)
18846  *                     cetree.appendChildToElement(element, childElement)
18847  */
18848       /*else*/ {
18849
18850         /* "lxml/objectify.pyx":1170
18851  *                 else:
18852  *                     childElement = elementMaker._element_factory(
18853  *                         elementMaker._tag)             # <<<<<<<<<<<<<<
18854  *                     cetree.appendChildToElement(element, childElement)
18855  *                 has_children = True
18856  */
18857         __Pyx_INCREF(__pyx_v_elementMaker->_element_factory);
18858         __pyx_t_4 = __pyx_v_elementMaker->_element_factory; __pyx_t_3 = NULL;
18859         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18860           __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18861           if (likely(__pyx_t_3)) {
18862             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18863             __Pyx_INCREF(__pyx_t_3);
18864             __Pyx_INCREF(function);
18865             __Pyx_DECREF_SET(__pyx_t_4, function);
18866           }
18867         }
18868         __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_elementMaker->_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elementMaker->_tag);
18869         __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18870         if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error)
18871         __Pyx_GOTREF(__pyx_t_7);
18872         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18873
18874         /* "lxml/objectify.pyx":1169
18875  *                                           None, None, None, None)
18876  *                 else:
18877  *                     childElement = elementMaker._element_factory(             # <<<<<<<<<<<<<<
18878  *                         elementMaker._tag)
18879  *                     cetree.appendChildToElement(element, childElement)
18880  */
18881         if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1169, __pyx_L1_error)
18882         __Pyx_XDECREF_SET(__pyx_v_childElement, ((struct LxmlElement *)__pyx_t_7));
18883         __pyx_t_7 = 0;
18884
18885         /* "lxml/objectify.pyx":1171
18886  *                     childElement = elementMaker._element_factory(
18887  *                         elementMaker._tag)
18888  *                     cetree.appendChildToElement(element, childElement)             # <<<<<<<<<<<<<<
18889  *                 has_children = True
18890  *             elif isinstance(child, dict):
18891  */
18892         __pyx_t_6 = appendChildToElement(__pyx_v_element, __pyx_v_childElement); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1171, __pyx_L1_error)
18893       }
18894       __pyx_L8:;
18895
18896       /* "lxml/objectify.pyx":1172
18897  *                         elementMaker._tag)
18898  *                     cetree.appendChildToElement(element, childElement)
18899  *                 has_children = True             # <<<<<<<<<<<<<<
18900  *             elif isinstance(child, dict):
18901  *                 for name, value in child.items():
18902  */
18903       __pyx_v_has_children = 1;
18904
18905       /* "lxml/objectify.pyx":1163
18906  *                 cetree.appendChildToElement(element, <_Element>child)
18907  *                 has_children = True
18908  *             elif isinstance(child, _ObjectifyElementMakerCaller):             # <<<<<<<<<<<<<<
18909  *                 elementMaker = <_ObjectifyElementMakerCaller>child
18910  *                 if elementMaker._element_factory is None:
18911  */
18912       goto __pyx_L6;
18913     }
18914
18915     /* "lxml/objectify.pyx":1173
18916  *                     cetree.appendChildToElement(element, childElement)
18917  *                 has_children = True
18918  *             elif isinstance(child, dict):             # <<<<<<<<<<<<<<
18919  *                 for name, value in child.items():
18920  *                     # keyword arguments in attrib take precedence
18921  */
18922     __pyx_t_2 = PyDict_Check(__pyx_v_child); 
18923     __pyx_t_1 = (__pyx_t_2 != 0);
18924     if (__pyx_t_1) {
18925
18926       /* "lxml/objectify.pyx":1174
18927  *                 has_children = True
18928  *             elif isinstance(child, dict):
18929  *                 for name, value in child.items():             # <<<<<<<<<<<<<<
18930  *                     # keyword arguments in attrib take precedence
18931  *                     if name in attrib:
18932  */
18933       __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
18934       __Pyx_GOTREF(__pyx_t_4);
18935       __pyx_t_3 = NULL;
18936       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18937         __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
18938         if (likely(__pyx_t_3)) {
18939           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18940           __Pyx_INCREF(__pyx_t_3);
18941           __Pyx_INCREF(function);
18942           __Pyx_DECREF_SET(__pyx_t_4, function);
18943         }
18944       }
18945       __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
18946       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18947       if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
18948       __Pyx_GOTREF(__pyx_t_7);
18949       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18950       if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
18951         __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0;
18952         __pyx_t_10 = NULL;
18953       } else {
18954         __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
18955         __Pyx_GOTREF(__pyx_t_4);
18956         __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1174, __pyx_L1_error)
18957       }
18958       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18959       for (;;) {
18960         if (likely(!__pyx_t_10)) {
18961           if (likely(PyList_CheckExact(__pyx_t_4))) {
18962             if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break;
18963             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18964             __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
18965             #else
18966             __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
18967             __Pyx_GOTREF(__pyx_t_7);
18968             #endif
18969           } else {
18970             if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
18971             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18972             __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1174, __pyx_L1_error)
18973             #else
18974             __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
18975             __Pyx_GOTREF(__pyx_t_7);
18976             #endif
18977           }
18978         } else {
18979           __pyx_t_7 = __pyx_t_10(__pyx_t_4);
18980           if (unlikely(!__pyx_t_7)) {
18981             PyObject* exc_type = PyErr_Occurred();
18982             if (exc_type) {
18983               if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18984               else __PYX_ERR(0, 1174, __pyx_L1_error)
18985             }
18986             break;
18987           }
18988           __Pyx_GOTREF(__pyx_t_7);
18989         }
18990         if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
18991           PyObject* sequence = __pyx_t_7;
18992           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
18993           if (unlikely(size != 2)) {
18994             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
18995             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
18996             __PYX_ERR(0, 1174, __pyx_L1_error)
18997           }
18998           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18999           if (likely(PyTuple_CheckExact(sequence))) {
19000             __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
19001             __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); 
19002           } else {
19003             __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
19004             __pyx_t_11 = PyList_GET_ITEM(sequence, 1); 
19005           }
19006           __Pyx_INCREF(__pyx_t_3);
19007           __Pyx_INCREF(__pyx_t_11);
19008           #else
19009           __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1174, __pyx_L1_error)
19010           __Pyx_GOTREF(__pyx_t_3);
19011           __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1174, __pyx_L1_error)
19012           __Pyx_GOTREF(__pyx_t_11);
19013           #endif
19014           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19015         } else {
19016           Py_ssize_t index = -1;
19017           __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1174, __pyx_L1_error)
19018           __Pyx_GOTREF(__pyx_t_12);
19019           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19020           __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext;
19021           index = 0; __pyx_t_3 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
19022           __Pyx_GOTREF(__pyx_t_3);
19023           index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L11_unpacking_failed;
19024           __Pyx_GOTREF(__pyx_t_11);
19025           if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 1174, __pyx_L1_error)
19026           __pyx_t_13 = NULL;
19027           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
19028           goto __pyx_L12_unpacking_done;
19029           __pyx_L11_unpacking_failed:;
19030           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
19031           __pyx_t_13 = NULL;
19032           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
19033           __PYX_ERR(0, 1174, __pyx_L1_error)
19034           __pyx_L12_unpacking_done:;
19035         }
19036         __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
19037         __pyx_t_3 = 0;
19038         __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11);
19039         __pyx_t_11 = 0;
19040
19041         /* "lxml/objectify.pyx":1176
19042  *                 for name, value in child.items():
19043  *                     # keyword arguments in attrib take precedence
19044  *                     if name in attrib:             # <<<<<<<<<<<<<<
19045  *                         continue
19046  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19047  */
19048         __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_attrib, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1176, __pyx_L1_error)
19049         __pyx_t_2 = (__pyx_t_1 != 0);
19050         if (__pyx_t_2) {
19051
19052           /* "lxml/objectify.pyx":1177
19053  *                     # keyword arguments in attrib take precedence
19054  *                     if name in attrib:
19055  *                         continue             # <<<<<<<<<<<<<<
19056  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19057  *                     if pytype is not None:
19058  */
19059           goto __pyx_L9_continue;
19060
19061           /* "lxml/objectify.pyx":1176
19062  *                 for name, value in child.items():
19063  *                     # keyword arguments in attrib take precedence
19064  *                     if name in attrib:             # <<<<<<<<<<<<<<
19065  *                         continue
19066  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19067  */
19068         }
19069
19070         /* "lxml/objectify.pyx":1178
19071  *                     if name in attrib:
19072  *                         continue
19073  *                     pytype = _PYTYPE_DICT.get(_typename(value))             # <<<<<<<<<<<<<<
19074  *                     if pytype is not None:
19075  *                         value = (<PyType>pytype).stringify(value)
19076  */
19077         if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
19078           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
19079           __PYX_ERR(0, 1178, __pyx_L1_error)
19080         }
19081         __pyx_t_7 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1178, __pyx_L1_error)
19082         __Pyx_GOTREF(__pyx_t_7);
19083         __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1178, __pyx_L1_error)
19084         __Pyx_GOTREF(__pyx_t_11);
19085         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19086         __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11);
19087         __pyx_t_11 = 0;
19088
19089         /* "lxml/objectify.pyx":1179
19090  *                         continue
19091  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19092  *                     if pytype is not None:             # <<<<<<<<<<<<<<
19093  *                         value = (<PyType>pytype).stringify(value)
19094  *                     elif not python._isString(value):
19095  */
19096         __pyx_t_2 = (__pyx_v_pytype != Py_None);
19097         __pyx_t_1 = (__pyx_t_2 != 0);
19098         if (__pyx_t_1) {
19099
19100           /* "lxml/objectify.pyx":1180
19101  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19102  *                     if pytype is not None:
19103  *                         value = (<PyType>pytype).stringify(value)             # <<<<<<<<<<<<<<
19104  *                     elif not python._isString(value):
19105  *                         value = unicode(value)
19106  */
19107           __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify);
19108           __pyx_t_7 = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify; __pyx_t_3 = NULL;
19109           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
19110             __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
19111             if (likely(__pyx_t_3)) {
19112               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
19113               __Pyx_INCREF(__pyx_t_3);
19114               __Pyx_INCREF(function);
19115               __Pyx_DECREF_SET(__pyx_t_7, function);
19116             }
19117           }
19118           __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
19119           __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19120           if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1180, __pyx_L1_error)
19121           __Pyx_GOTREF(__pyx_t_11);
19122           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19123           __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
19124           __pyx_t_11 = 0;
19125
19126           /* "lxml/objectify.pyx":1179
19127  *                         continue
19128  *                     pytype = _PYTYPE_DICT.get(_typename(value))
19129  *                     if pytype is not None:             # <<<<<<<<<<<<<<
19130  *                         value = (<PyType>pytype).stringify(value)
19131  *                     elif not python._isString(value):
19132  */
19133           goto __pyx_L14;
19134         }
19135
19136         /* "lxml/objectify.pyx":1181
19137  *                     if pytype is not None:
19138  *                         value = (<PyType>pytype).stringify(value)
19139  *                     elif not python._isString(value):             # <<<<<<<<<<<<<<
19140  *                         value = unicode(value)
19141  *                     cetree.setAttributeValue(element, name, value)
19142  */
19143         __pyx_t_1 = ((!(_isString(__pyx_v_value) != 0)) != 0);
19144         if (__pyx_t_1) {
19145
19146           /* "lxml/objectify.pyx":1182
19147  *                         value = (<PyType>pytype).stringify(value)
19148  *                     elif not python._isString(value):
19149  *                         value = unicode(value)             # <<<<<<<<<<<<<<
19150  *                     cetree.setAttributeValue(element, name, value)
19151  *             else:
19152  */
19153           __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1182, __pyx_L1_error)
19154           __Pyx_GOTREF(__pyx_t_11);
19155           __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11);
19156           __pyx_t_11 = 0;
19157
19158           /* "lxml/objectify.pyx":1181
19159  *                     if pytype is not None:
19160  *                         value = (<PyType>pytype).stringify(value)
19161  *                     elif not python._isString(value):             # <<<<<<<<<<<<<<
19162  *                         value = unicode(value)
19163  *                     cetree.setAttributeValue(element, name, value)
19164  */
19165         }
19166         __pyx_L14:;
19167
19168         /* "lxml/objectify.pyx":1183
19169  *                     elif not python._isString(value):
19170  *                         value = unicode(value)
19171  *                     cetree.setAttributeValue(element, name, value)             # <<<<<<<<<<<<<<
19172  *             else:
19173  *                 if pytype_name is not None:
19174  */
19175         __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1183, __pyx_L1_error)
19176
19177         /* "lxml/objectify.pyx":1174
19178  *                 has_children = True
19179  *             elif isinstance(child, dict):
19180  *                 for name, value in child.items():             # <<<<<<<<<<<<<<
19181  *                     # keyword arguments in attrib take precedence
19182  *                     if name in attrib:
19183  */
19184         __pyx_L9_continue:;
19185       }
19186       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19187
19188       /* "lxml/objectify.pyx":1173
19189  *                     cetree.appendChildToElement(element, childElement)
19190  *                 has_children = True
19191  *             elif isinstance(child, dict):             # <<<<<<<<<<<<<<
19192  *                 for name, value in child.items():
19193  *                     # keyword arguments in attrib take precedence
19194  */
19195       goto __pyx_L6;
19196     }
19197
19198     /* "lxml/objectify.pyx":1185
19199  *                     cetree.setAttributeValue(element, name, value)
19200  *             else:
19201  *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
19202  *                     # concatenation always makes the result a string
19203  *                     has_string_value = True
19204  */
19205     /*else*/ {
19206       __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
19207       __pyx_t_2 = (__pyx_t_1 != 0);
19208       if (__pyx_t_2) {
19209
19210         /* "lxml/objectify.pyx":1187
19211  *                 if pytype_name is not None:
19212  *                     # concatenation always makes the result a string
19213  *                     has_string_value = True             # <<<<<<<<<<<<<<
19214  *                 pytype_name = _typename(child)
19215  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19216  */
19217         __pyx_v_has_string_value = 1;
19218
19219         /* "lxml/objectify.pyx":1185
19220  *                     cetree.setAttributeValue(element, name, value)
19221  *             else:
19222  *                 if pytype_name is not None:             # <<<<<<<<<<<<<<
19223  *                     # concatenation always makes the result a string
19224  *                     has_string_value = True
19225  */
19226       }
19227
19228       /* "lxml/objectify.pyx":1188
19229  *                     # concatenation always makes the result a string
19230  *                     has_string_value = True
19231  *                 pytype_name = _typename(child)             # <<<<<<<<<<<<<<
19232  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19233  *                 if pytype is not None:
19234  */
19235       __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
19236       __Pyx_GOTREF(__pyx_t_4);
19237       __Pyx_DECREF_SET(__pyx_v_pytype_name, __pyx_t_4);
19238       __pyx_t_4 = 0;
19239
19240       /* "lxml/objectify.pyx":1189
19241  *                     has_string_value = True
19242  *                 pytype_name = _typename(child)
19243  *                 pytype = _PYTYPE_DICT.get(_typename(child))             # <<<<<<<<<<<<<<
19244  *                 if pytype is not None:
19245  *                     _add_text(element, (<PyType>pytype).stringify(child))
19246  */
19247       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
19248         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
19249         __PYX_ERR(0, 1189, __pyx_L1_error)
19250       }
19251       __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error)
19252       __Pyx_GOTREF(__pyx_t_4);
19253       __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1189, __pyx_L1_error)
19254       __Pyx_GOTREF(__pyx_t_11);
19255       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19256       __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11);
19257       __pyx_t_11 = 0;
19258
19259       /* "lxml/objectify.pyx":1190
19260  *                 pytype_name = _typename(child)
19261  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19262  *                 if pytype is not None:             # <<<<<<<<<<<<<<
19263  *                     _add_text(element, (<PyType>pytype).stringify(child))
19264  *                 else:
19265  */
19266       __pyx_t_2 = (__pyx_v_pytype != Py_None);
19267       __pyx_t_1 = (__pyx_t_2 != 0);
19268       if (__pyx_t_1) {
19269
19270         /* "lxml/objectify.pyx":1191
19271  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19272  *                 if pytype is not None:
19273  *                     _add_text(element, (<PyType>pytype).stringify(child))             # <<<<<<<<<<<<<<
19274  *                 else:
19275  *                     has_string_value = True
19276  */
19277         __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify);
19278         __pyx_t_4 = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify; __pyx_t_7 = NULL;
19279         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
19280           __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
19281           if (likely(__pyx_t_7)) {
19282             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
19283             __Pyx_INCREF(__pyx_t_7);
19284             __Pyx_INCREF(function);
19285             __Pyx_DECREF_SET(__pyx_t_4, function);
19286           }
19287         }
19288         __pyx_t_11 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_child);
19289         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
19290         if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1191, __pyx_L1_error)
19291         __Pyx_GOTREF(__pyx_t_11);
19292         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19293         __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error)
19294         __Pyx_GOTREF(__pyx_t_4);
19295         __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
19296         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19297
19298         /* "lxml/objectify.pyx":1190
19299  *                 pytype_name = _typename(child)
19300  *                 pytype = _PYTYPE_DICT.get(_typename(child))
19301  *                 if pytype is not None:             # <<<<<<<<<<<<<<
19302  *                     _add_text(element, (<PyType>pytype).stringify(child))
19303  *                 else:
19304  */
19305         goto __pyx_L16;
19306       }
19307
19308       /* "lxml/objectify.pyx":1193
19309  *                     _add_text(element, (<PyType>pytype).stringify(child))
19310  *                 else:
19311  *                     has_string_value = True             # <<<<<<<<<<<<<<
19312  *                     child = unicode(child)
19313  *                     _add_text(element, child)
19314  */
19315       /*else*/ {
19316         __pyx_v_has_string_value = 1;
19317
19318         /* "lxml/objectify.pyx":1194
19319  *                 else:
19320  *                     has_string_value = True
19321  *                     child = unicode(child)             # <<<<<<<<<<<<<<
19322  *                     _add_text(element, child)
19323  * 
19324  */
19325         __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error)
19326         __Pyx_GOTREF(__pyx_t_4);
19327         __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_4);
19328         __pyx_t_4 = 0;
19329
19330         /* "lxml/objectify.pyx":1195
19331  *                     has_string_value = True
19332  *                     child = unicode(child)
19333  *                     _add_text(element, child)             # <<<<<<<<<<<<<<
19334  * 
19335  *         if self._annotate and not has_children:
19336  */
19337         __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error)
19338         __Pyx_GOTREF(__pyx_t_4);
19339         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19340       }
19341       __pyx_L16:;
19342     }
19343     __pyx_L6:;
19344
19345     /* "lxml/objectify.pyx":1152
19346  *         has_children = False
19347  *         has_string_value = False
19348  *         for child in children:             # <<<<<<<<<<<<<<
19349  *             if child is None:
19350  *                 if len(children) == 1:
19351  */
19352   }
19353   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19354
19355   /* "lxml/objectify.pyx":1197
19356  *                     _add_text(element, child)
19357  * 
19358  *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
19359  *             if has_string_value:
19360  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19361  */
19362   __pyx_t_2 = (__pyx_v_self->_annotate != 0);
19363   if (__pyx_t_2) {
19364   } else {
19365     __pyx_t_1 = __pyx_t_2;
19366     goto __pyx_L18_bool_binop_done;
19367   }
19368   __pyx_t_2 = ((!(__pyx_v_has_children != 0)) != 0);
19369   __pyx_t_1 = __pyx_t_2;
19370   __pyx_L18_bool_binop_done:;
19371   if (__pyx_t_1) {
19372
19373     /* "lxml/objectify.pyx":1198
19374  * 
19375  *         if self._annotate and not has_children:
19376  *             if has_string_value:             # <<<<<<<<<<<<<<
19377  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19378  *             elif pytype_name is not None:
19379  */
19380     __pyx_t_1 = (__pyx_v_has_string_value != 0);
19381     if (__pyx_t_1) {
19382
19383       /* "lxml/objectify.pyx":1199
19384  *         if self._annotate and not has_children:
19385  *             if has_string_value:
19386  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")             # <<<<<<<<<<<<<<
19387  *             elif pytype_name is not None:
19388  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19389  */
19390       __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
19391       __Pyx_GOTREF(__pyx_t_5);
19392       __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_n_u_str); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1199, __pyx_L1_error)
19393       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19394
19395       /* "lxml/objectify.pyx":1198
19396  * 
19397  *         if self._annotate and not has_children:
19398  *             if has_string_value:             # <<<<<<<<<<<<<<
19399  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19400  *             elif pytype_name is not None:
19401  */
19402       goto __pyx_L20;
19403     }
19404
19405     /* "lxml/objectify.pyx":1200
19406  *             if has_string_value:
19407  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19408  *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
19409  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19410  * 
19411  */
19412     __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
19413     __pyx_t_2 = (__pyx_t_1 != 0);
19414     if (__pyx_t_2) {
19415
19416       /* "lxml/objectify.pyx":1201
19417  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19418  *             elif pytype_name is not None:
19419  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)             # <<<<<<<<<<<<<<
19420  * 
19421  *         return element
19422  */
19423       __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
19424       __Pyx_GOTREF(__pyx_t_5);
19425       __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_v_pytype_name); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1201, __pyx_L1_error)
19426       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19427
19428       /* "lxml/objectify.pyx":1200
19429  *             if has_string_value:
19430  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19431  *             elif pytype_name is not None:             # <<<<<<<<<<<<<<
19432  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19433  * 
19434  */
19435     }
19436     __pyx_L20:;
19437
19438     /* "lxml/objectify.pyx":1197
19439  *                     _add_text(element, child)
19440  * 
19441  *         if self._annotate and not has_children:             # <<<<<<<<<<<<<<
19442  *             if has_string_value:
19443  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
19444  */
19445   }
19446
19447   /* "lxml/objectify.pyx":1203
19448  *                 cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
19449  * 
19450  *         return element             # <<<<<<<<<<<<<<
19451  * 
19452  * cdef _add_text(_Element elem, text):
19453  */
19454   __Pyx_XDECREF(__pyx_r);
19455   __Pyx_INCREF(((PyObject *)__pyx_v_element));
19456   __pyx_r = ((PyObject *)__pyx_v_element);
19457   goto __pyx_L0;
19458
19459   /* "lxml/objectify.pyx":1137
19460  *     cdef bint _annotate
19461  * 
19462  *     def __call__(self, *children, **attrib):             # <<<<<<<<<<<<<<
19463  *         u"__call__(self, *children, **attrib)"
19464  *         cdef _ObjectifyElementMakerCaller elementMaker
19465  */
19466
19467   /* function exit code */
19468   __pyx_L1_error:;
19469   __Pyx_XDECREF(__pyx_t_3);
19470   __Pyx_XDECREF(__pyx_t_4);
19471   __Pyx_XDECREF(__pyx_t_5);
19472   __Pyx_XDECREF(__pyx_t_7);
19473   __Pyx_XDECREF(__pyx_t_11);
19474   __Pyx_XDECREF(__pyx_t_12);
19475   __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19476   __pyx_r = NULL;
19477   __pyx_L0:;
19478   __Pyx_XDECREF((PyObject *)__pyx_v_elementMaker);
19479   __Pyx_XDECREF((PyObject *)__pyx_v_element);
19480   __Pyx_XDECREF((PyObject *)__pyx_v_childElement);
19481   __Pyx_XDECREF(__pyx_v_pytype_name);
19482   __Pyx_XDECREF(__pyx_v_child);
19483   __Pyx_XDECREF(__pyx_v_name);
19484   __Pyx_XDECREF(__pyx_v_value);
19485   __Pyx_XDECREF(__pyx_v_pytype);
19486   __Pyx_XGIVEREF(__pyx_r);
19487   __Pyx_RefNannyFinishContext();
19488   return __pyx_r;
19489 }
19490
19491 /* "lxml/objectify.pyx":1205
19492  *         return element
19493  * 
19494  * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
19495  *     # add text to the tree in construction, either as element text or
19496  *     # tail text, depending on the current tree state
19497  */
19498
19499 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem, PyObject *__pyx_v_text) {
19500   xmlNode *__pyx_v_c_child;
19501   PyObject *__pyx_v_old = NULL;
19502   PyObject *__pyx_r = NULL;
19503   __Pyx_RefNannyDeclarations
19504   int __pyx_t_1;
19505   PyObject *__pyx_t_2 = NULL;
19506   int __pyx_t_3;
19507   int __pyx_t_4;
19508   int __pyx_lineno = 0;
19509   const char *__pyx_filename = NULL;
19510   int __pyx_clineno = 0;
19511   __Pyx_RefNannySetupContext("_add_text", 0);
19512   __Pyx_INCREF(__pyx_v_text);
19513
19514   /* "lxml/objectify.pyx":1209
19515  *     # tail text, depending on the current tree state
19516  *     cdef tree.xmlNode* c_child
19517  *     c_child = cetree.findChildBackwards(elem._c_node, 0)             # <<<<<<<<<<<<<<
19518  *     if c_child is not NULL:
19519  *         old = cetree.tailOf(c_child)
19520  */
19521   __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0);
19522
19523   /* "lxml/objectify.pyx":1210
19524  *     cdef tree.xmlNode* c_child
19525  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19526  *     if c_child is not NULL:             # <<<<<<<<<<<<<<
19527  *         old = cetree.tailOf(c_child)
19528  *         if old is not None:
19529  */
19530   __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
19531   if (__pyx_t_1) {
19532
19533     /* "lxml/objectify.pyx":1211
19534  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19535  *     if c_child is not NULL:
19536  *         old = cetree.tailOf(c_child)             # <<<<<<<<<<<<<<
19537  *         if old is not None:
19538  *             text = old + text
19539  */
19540     __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error)
19541     __Pyx_GOTREF(__pyx_t_2);
19542     __pyx_v_old = __pyx_t_2;
19543     __pyx_t_2 = 0;
19544
19545     /* "lxml/objectify.pyx":1212
19546  *     if c_child is not NULL:
19547  *         old = cetree.tailOf(c_child)
19548  *         if old is not None:             # <<<<<<<<<<<<<<
19549  *             text = old + text
19550  *         cetree.setTailText(c_child, text)
19551  */
19552     __pyx_t_1 = (__pyx_v_old != Py_None);
19553     __pyx_t_3 = (__pyx_t_1 != 0);
19554     if (__pyx_t_3) {
19555
19556       /* "lxml/objectify.pyx":1213
19557  *         old = cetree.tailOf(c_child)
19558  *         if old is not None:
19559  *             text = old + text             # <<<<<<<<<<<<<<
19560  *         cetree.setTailText(c_child, text)
19561  *     else:
19562  */
19563       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error)
19564       __Pyx_GOTREF(__pyx_t_2);
19565       __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2);
19566       __pyx_t_2 = 0;
19567
19568       /* "lxml/objectify.pyx":1212
19569  *     if c_child is not NULL:
19570  *         old = cetree.tailOf(c_child)
19571  *         if old is not None:             # <<<<<<<<<<<<<<
19572  *             text = old + text
19573  *         cetree.setTailText(c_child, text)
19574  */
19575     }
19576
19577     /* "lxml/objectify.pyx":1214
19578  *         if old is not None:
19579  *             text = old + text
19580  *         cetree.setTailText(c_child, text)             # <<<<<<<<<<<<<<
19581  *     else:
19582  *         old = cetree.textOf(elem._c_node)
19583  */
19584     __pyx_t_4 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1214, __pyx_L1_error)
19585
19586     /* "lxml/objectify.pyx":1210
19587  *     cdef tree.xmlNode* c_child
19588  *     c_child = cetree.findChildBackwards(elem._c_node, 0)
19589  *     if c_child is not NULL:             # <<<<<<<<<<<<<<
19590  *         old = cetree.tailOf(c_child)
19591  *         if old is not None:
19592  */
19593     goto __pyx_L3;
19594   }
19595
19596   /* "lxml/objectify.pyx":1216
19597  *         cetree.setTailText(c_child, text)
19598  *     else:
19599  *         old = cetree.textOf(elem._c_node)             # <<<<<<<<<<<<<<
19600  *         if old is not None:
19601  *             text = old + text
19602  */
19603   /*else*/ {
19604     __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1216, __pyx_L1_error)
19605     __Pyx_GOTREF(__pyx_t_2);
19606     __pyx_v_old = __pyx_t_2;
19607     __pyx_t_2 = 0;
19608
19609     /* "lxml/objectify.pyx":1217
19610  *     else:
19611  *         old = cetree.textOf(elem._c_node)
19612  *         if old is not None:             # <<<<<<<<<<<<<<
19613  *             text = old + text
19614  *         cetree.setNodeText(elem._c_node, text)
19615  */
19616     __pyx_t_3 = (__pyx_v_old != Py_None);
19617     __pyx_t_1 = (__pyx_t_3 != 0);
19618     if (__pyx_t_1) {
19619
19620       /* "lxml/objectify.pyx":1218
19621  *         old = cetree.textOf(elem._c_node)
19622  *         if old is not None:
19623  *             text = old + text             # <<<<<<<<<<<<<<
19624  *         cetree.setNodeText(elem._c_node, text)
19625  * 
19626  */
19627       __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error)
19628       __Pyx_GOTREF(__pyx_t_2);
19629       __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2);
19630       __pyx_t_2 = 0;
19631
19632       /* "lxml/objectify.pyx":1217
19633  *     else:
19634  *         old = cetree.textOf(elem._c_node)
19635  *         if old is not None:             # <<<<<<<<<<<<<<
19636  *             text = old + text
19637  *         cetree.setNodeText(elem._c_node, text)
19638  */
19639     }
19640
19641     /* "lxml/objectify.pyx":1219
19642  *         if old is not None:
19643  *             text = old + text
19644  *         cetree.setNodeText(elem._c_node, text)             # <<<<<<<<<<<<<<
19645  * 
19646  * cdef class ElementMaker:
19647  */
19648     __pyx_t_4 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1219, __pyx_L1_error)
19649   }
19650   __pyx_L3:;
19651
19652   /* "lxml/objectify.pyx":1205
19653  *         return element
19654  * 
19655  * cdef _add_text(_Element elem, text):             # <<<<<<<<<<<<<<
19656  *     # add text to the tree in construction, either as element text or
19657  *     # tail text, depending on the current tree state
19658  */
19659
19660   /* function exit code */
19661   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19662   goto __pyx_L0;
19663   __pyx_L1_error:;
19664   __Pyx_XDECREF(__pyx_t_2);
19665   __Pyx_AddTraceback("lxml.objectify._add_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
19666   __pyx_r = 0;
19667   __pyx_L0:;
19668   __Pyx_XDECREF(__pyx_v_old);
19669   __Pyx_XDECREF(__pyx_v_text);
19670   __Pyx_XGIVEREF(__pyx_r);
19671   __Pyx_RefNannyFinishContext();
19672   return __pyx_r;
19673 }
19674
19675 /* "lxml/objectify.pyx":1252
19676  *     cdef bint _annotate
19677  *     cdef dict _cache
19678  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19679  *                  makeelement=None):
19680  *         if nsmap is None:
19681  */
19682
19683 /* Python wrapper */
19684 static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19685 static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19686   PyObject *__pyx_v_namespace = 0;
19687   PyObject *__pyx_v_nsmap = 0;
19688   PyObject *__pyx_v_annotate = 0;
19689   PyObject *__pyx_v_makeelement = 0;
19690   int __pyx_lineno = 0;
19691   const char *__pyx_filename = NULL;
19692   int __pyx_clineno = 0;
19693   int __pyx_r;
19694   __Pyx_RefNannyDeclarations
19695   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
19696   {
19697     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_namespace,&__pyx_n_s_nsmap,&__pyx_n_s_annotate,&__pyx_n_s_makeelement,0};
19698     PyObject* values[4] = {0,0,0,0};
19699     values[0] = ((PyObject *)Py_None);
19700     values[1] = ((PyObject *)Py_None);
19701     values[2] = ((PyObject *)Py_True);
19702
19703     /* "lxml/objectify.pyx":1253
19704  *     cdef dict _cache
19705  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19706  *                  makeelement=None):             # <<<<<<<<<<<<<<
19707  *         if nsmap is None:
19708  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19709  */
19710     values[3] = ((PyObject *)Py_None);
19711     if (unlikely(__pyx_kwds)) {
19712       Py_ssize_t kw_args;
19713       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19714       switch (pos_args) {
19715         case  0: break;
19716         default: goto __pyx_L5_argtuple_error;
19717       }
19718       kw_args = PyDict_Size(__pyx_kwds);
19719       if (kw_args > 0 && likely(kw_args <= 4)) {
19720         Py_ssize_t index;
19721         for (index = 0; index < 4 && kw_args > 0; index++) {
19722           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
19723           if (value) { values[index] = value; kw_args--; }
19724         }
19725       }
19726       if (unlikely(kw_args > 0)) {
19727         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(0, 1252, __pyx_L3_error)
19728       }
19729     } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
19730       goto __pyx_L5_argtuple_error;
19731     } else {
19732     }
19733     __pyx_v_namespace = values[0];
19734     __pyx_v_nsmap = values[1];
19735     __pyx_v_annotate = values[2];
19736     __pyx_v_makeelement = values[3];
19737   }
19738   goto __pyx_L4_argument_unpacking_done;
19739   __pyx_L5_argtuple_error:;
19740   __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1252, __pyx_L3_error)
19741   __pyx_L3_error:;
19742   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19743   __Pyx_RefNannyFinishContext();
19744   return -1;
19745   __pyx_L4_argument_unpacking_done:;
19746   __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker___init__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), __pyx_v_namespace, __pyx_v_nsmap, __pyx_v_annotate, __pyx_v_makeelement);
19747
19748   /* "lxml/objectify.pyx":1252
19749  *     cdef bint _annotate
19750  *     cdef dict _cache
19751  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19752  *                  makeelement=None):
19753  *         if nsmap is None:
19754  */
19755
19756   /* function exit code */
19757   __Pyx_RefNannyFinishContext();
19758   return __pyx_r;
19759 }
19760
19761 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_namespace, PyObject *__pyx_v_nsmap, PyObject *__pyx_v_annotate, PyObject *__pyx_v_makeelement) {
19762   int __pyx_r;
19763   __Pyx_RefNannyDeclarations
19764   int __pyx_t_1;
19765   int __pyx_t_2;
19766   PyObject *__pyx_t_3 = NULL;
19767   PyObject *__pyx_t_4 = NULL;
19768   int __pyx_lineno = 0;
19769   const char *__pyx_filename = NULL;
19770   int __pyx_clineno = 0;
19771   __Pyx_RefNannySetupContext("__init__", 0);
19772   __Pyx_INCREF(__pyx_v_nsmap);
19773
19774   /* "lxml/objectify.pyx":1254
19775  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19776  *                  makeelement=None):
19777  *         if nsmap is None:             # <<<<<<<<<<<<<<
19778  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19779  *         self._nsmap = nsmap
19780  */
19781   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19782   __pyx_t_2 = (__pyx_t_1 != 0);
19783   if (__pyx_t_2) {
19784
19785     /* "lxml/objectify.pyx":1255
19786  *                  makeelement=None):
19787  *         if nsmap is None:
19788  *             nsmap = _DEFAULT_NSMAP if annotate else {}             # <<<<<<<<<<<<<<
19789  *         self._nsmap = nsmap
19790  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19791  */
19792     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error)
19793     if (__pyx_t_2) {
19794       __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19795       __pyx_t_3 = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP;
19796     } else {
19797       __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
19798       __Pyx_GOTREF(__pyx_t_4);
19799       __pyx_t_3 = __pyx_t_4;
19800       __pyx_t_4 = 0;
19801     }
19802     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_t_3);
19803     __pyx_t_3 = 0;
19804
19805     /* "lxml/objectify.pyx":1254
19806  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,
19807  *                  makeelement=None):
19808  *         if nsmap is None:             # <<<<<<<<<<<<<<
19809  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19810  *         self._nsmap = nsmap
19811  */
19812   }
19813
19814   /* "lxml/objectify.pyx":1256
19815  *         if nsmap is None:
19816  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19817  *         self._nsmap = nsmap             # <<<<<<<<<<<<<<
19818  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19819  *         self._annotate = annotate
19820  */
19821   __Pyx_INCREF(__pyx_v_nsmap);
19822   __Pyx_GIVEREF(__pyx_v_nsmap);
19823   __Pyx_GOTREF(__pyx_v_self->_nsmap);
19824   __Pyx_DECREF(__pyx_v_self->_nsmap);
19825   __pyx_v_self->_nsmap = __pyx_v_nsmap;
19826
19827   /* "lxml/objectify.pyx":1257
19828  *             nsmap = _DEFAULT_NSMAP if annotate else {}
19829  *         self._nsmap = nsmap
19830  *         self._namespace = None if namespace is None else u"{%s}" % namespace             # <<<<<<<<<<<<<<
19831  *         self._annotate = annotate
19832  *         if makeelement is not None:
19833  */
19834   __pyx_t_2 = (__pyx_v_namespace == Py_None);
19835   if ((__pyx_t_2 != 0)) {
19836     __Pyx_INCREF(Py_None);
19837     __pyx_t_3 = Py_None;
19838   } else {
19839     __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error)
19840     __Pyx_GOTREF(__pyx_t_4);
19841     __pyx_t_3 = __pyx_t_4;
19842     __pyx_t_4 = 0;
19843   }
19844   __Pyx_GIVEREF(__pyx_t_3);
19845   __Pyx_GOTREF(__pyx_v_self->_namespace);
19846   __Pyx_DECREF(__pyx_v_self->_namespace);
19847   __pyx_v_self->_namespace = __pyx_t_3;
19848   __pyx_t_3 = 0;
19849
19850   /* "lxml/objectify.pyx":1258
19851  *         self._nsmap = nsmap
19852  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19853  *         self._annotate = annotate             # <<<<<<<<<<<<<<
19854  *         if makeelement is not None:
19855  *             if not callable(makeelement):
19856  */
19857   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1258, __pyx_L1_error)
19858   __pyx_v_self->_annotate = __pyx_t_2;
19859
19860   /* "lxml/objectify.pyx":1259
19861  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19862  *         self._annotate = annotate
19863  *         if makeelement is not None:             # <<<<<<<<<<<<<<
19864  *             if not callable(makeelement):
19865  *                 raise TypeError(
19866  */
19867   __pyx_t_2 = (__pyx_v_makeelement != Py_None);
19868   __pyx_t_1 = (__pyx_t_2 != 0);
19869   if (__pyx_t_1) {
19870
19871     /* "lxml/objectify.pyx":1260
19872  *         self._annotate = annotate
19873  *         if makeelement is not None:
19874  *             if not callable(makeelement):             # <<<<<<<<<<<<<<
19875  *                 raise TypeError(
19876  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19877  */
19878     __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1260, __pyx_L1_error)
19879     __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
19880     if (unlikely(__pyx_t_2)) {
19881
19882       /* "lxml/objectify.pyx":1262
19883  *             if not callable(makeelement):
19884  *                 raise TypeError(
19885  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")             # <<<<<<<<<<<<<<
19886  *             self._makeelement = makeelement
19887  *         else:
19888  */
19889       __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_makeelement)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error)
19890       __Pyx_GOTREF(__pyx_t_3);
19891       __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_argument_of_makeelement_paramete, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error)
19892       __Pyx_GOTREF(__pyx_t_4);
19893       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19894
19895       /* "lxml/objectify.pyx":1261
19896  *         if makeelement is not None:
19897  *             if not callable(makeelement):
19898  *                 raise TypeError(             # <<<<<<<<<<<<<<
19899  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19900  *             self._makeelement = makeelement
19901  */
19902       __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error)
19903       __Pyx_GOTREF(__pyx_t_3);
19904       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19905       __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19906       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19907       __PYX_ERR(0, 1261, __pyx_L1_error)
19908
19909       /* "lxml/objectify.pyx":1260
19910  *         self._annotate = annotate
19911  *         if makeelement is not None:
19912  *             if not callable(makeelement):             # <<<<<<<<<<<<<<
19913  *                 raise TypeError(
19914  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19915  */
19916     }
19917
19918     /* "lxml/objectify.pyx":1263
19919  *                 raise TypeError(
19920  *                     f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}")
19921  *             self._makeelement = makeelement             # <<<<<<<<<<<<<<
19922  *         else:
19923  *             self._makeelement = None
19924  */
19925     __Pyx_INCREF(__pyx_v_makeelement);
19926     __Pyx_GIVEREF(__pyx_v_makeelement);
19927     __Pyx_GOTREF(__pyx_v_self->_makeelement);
19928     __Pyx_DECREF(__pyx_v_self->_makeelement);
19929     __pyx_v_self->_makeelement = __pyx_v_makeelement;
19930
19931     /* "lxml/objectify.pyx":1259
19932  *         self._namespace = None if namespace is None else u"{%s}" % namespace
19933  *         self._annotate = annotate
19934  *         if makeelement is not None:             # <<<<<<<<<<<<<<
19935  *             if not callable(makeelement):
19936  *                 raise TypeError(
19937  */
19938     goto __pyx_L4;
19939   }
19940
19941   /* "lxml/objectify.pyx":1265
19942  *             self._makeelement = makeelement
19943  *         else:
19944  *             self._makeelement = None             # <<<<<<<<<<<<<<
19945  *         self._cache = {}
19946  * 
19947  */
19948   /*else*/ {
19949     __Pyx_INCREF(Py_None);
19950     __Pyx_GIVEREF(Py_None);
19951     __Pyx_GOTREF(__pyx_v_self->_makeelement);
19952     __Pyx_DECREF(__pyx_v_self->_makeelement);
19953     __pyx_v_self->_makeelement = Py_None;
19954   }
19955   __pyx_L4:;
19956
19957   /* "lxml/objectify.pyx":1266
19958  *         else:
19959  *             self._makeelement = None
19960  *         self._cache = {}             # <<<<<<<<<<<<<<
19961  * 
19962  *     @cython.final
19963  */
19964   __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error)
19965   __Pyx_GOTREF(__pyx_t_3);
19966   __Pyx_GIVEREF(__pyx_t_3);
19967   __Pyx_GOTREF(__pyx_v_self->_cache);
19968   __Pyx_DECREF(__pyx_v_self->_cache);
19969   __pyx_v_self->_cache = ((PyObject*)__pyx_t_3);
19970   __pyx_t_3 = 0;
19971
19972   /* "lxml/objectify.pyx":1252
19973  *     cdef bint _annotate
19974  *     cdef dict _cache
19975  *     def __init__(self, *, namespace=None, nsmap=None, annotate=True,             # <<<<<<<<<<<<<<
19976  *                  makeelement=None):
19977  *         if nsmap is None:
19978  */
19979
19980   /* function exit code */
19981   __pyx_r = 0;
19982   goto __pyx_L0;
19983   __pyx_L1_error:;
19984   __Pyx_XDECREF(__pyx_t_3);
19985   __Pyx_XDECREF(__pyx_t_4);
19986   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19987   __pyx_r = -1;
19988   __pyx_L0:;
19989   __Pyx_XDECREF(__pyx_v_nsmap);
19990   __Pyx_RefNannyFinishContext();
19991   return __pyx_r;
19992 }
19993
19994 /* "lxml/objectify.pyx":1269
19995  * 
19996  *     @cython.final
19997  *     cdef _build_element_maker(self, tag, bint caching):             # <<<<<<<<<<<<<<
19998  *         cdef _ObjectifyElementMakerCaller element_maker
19999  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20000  */
20001
20002 static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag, int __pyx_v_caching) {
20003   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker = 0;
20004   PyObject *__pyx_r = NULL;
20005   __Pyx_RefNannyDeclarations
20006   PyObject *__pyx_t_1 = NULL;
20007   int __pyx_t_2;
20008   int __pyx_t_3;
20009   int __pyx_t_4;
20010   Py_ssize_t __pyx_t_5;
20011   int __pyx_t_6;
20012   int __pyx_lineno = 0;
20013   const char *__pyx_filename = NULL;
20014   int __pyx_clineno = 0;
20015   __Pyx_RefNannySetupContext("_build_element_maker", 0);
20016
20017   /* "lxml/objectify.pyx":1271
20018  *     cdef _build_element_maker(self, tag, bint caching):
20019  *         cdef _ObjectifyElementMakerCaller element_maker
20020  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)             # <<<<<<<<<<<<<<
20021  *         if self._namespace is not None and tag[0] != u"{":
20022  *             element_maker._tag = self._namespace + tag
20023  */
20024   __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(((PyTypeObject *)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
20025   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
20026   __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_1);
20027   __pyx_t_1 = 0;
20028
20029   /* "lxml/objectify.pyx":1272
20030  *         cdef _ObjectifyElementMakerCaller element_maker
20031  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20032  *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
20033  *             element_maker._tag = self._namespace + tag
20034  *         else:
20035  */
20036   __pyx_t_3 = (__pyx_v_self->_namespace != Py_None);
20037   __pyx_t_4 = (__pyx_t_3 != 0);
20038   if (__pyx_t_4) {
20039   } else {
20040     __pyx_t_2 = __pyx_t_4;
20041     goto __pyx_L4_bool_binop_done;
20042   }
20043   __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tag, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
20044   __Pyx_GOTREF(__pyx_t_1);
20045   __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1272, __pyx_L1_error)
20046   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20047   __pyx_t_2 = __pyx_t_4;
20048   __pyx_L4_bool_binop_done:;
20049   if (__pyx_t_2) {
20050
20051     /* "lxml/objectify.pyx":1273
20052  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20053  *         if self._namespace is not None and tag[0] != u"{":
20054  *             element_maker._tag = self._namespace + tag             # <<<<<<<<<<<<<<
20055  *         else:
20056  *             element_maker._tag = tag
20057  */
20058     __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error)
20059     __Pyx_GOTREF(__pyx_t_1);
20060     __Pyx_GIVEREF(__pyx_t_1);
20061     __Pyx_GOTREF(__pyx_v_element_maker->_tag);
20062     __Pyx_DECREF(__pyx_v_element_maker->_tag);
20063     __pyx_v_element_maker->_tag = __pyx_t_1;
20064     __pyx_t_1 = 0;
20065
20066     /* "lxml/objectify.pyx":1272
20067  *         cdef _ObjectifyElementMakerCaller element_maker
20068  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20069  *         if self._namespace is not None and tag[0] != u"{":             # <<<<<<<<<<<<<<
20070  *             element_maker._tag = self._namespace + tag
20071  *         else:
20072  */
20073     goto __pyx_L3;
20074   }
20075
20076   /* "lxml/objectify.pyx":1275
20077  *             element_maker._tag = self._namespace + tag
20078  *         else:
20079  *             element_maker._tag = tag             # <<<<<<<<<<<<<<
20080  *         element_maker._nsmap = self._nsmap
20081  *         element_maker._annotate = self._annotate
20082  */
20083   /*else*/ {
20084     __Pyx_INCREF(__pyx_v_tag);
20085     __Pyx_GIVEREF(__pyx_v_tag);
20086     __Pyx_GOTREF(__pyx_v_element_maker->_tag);
20087     __Pyx_DECREF(__pyx_v_element_maker->_tag);
20088     __pyx_v_element_maker->_tag = __pyx_v_tag;
20089   }
20090   __pyx_L3:;
20091
20092   /* "lxml/objectify.pyx":1276
20093  *         else:
20094  *             element_maker._tag = tag
20095  *         element_maker._nsmap = self._nsmap             # <<<<<<<<<<<<<<
20096  *         element_maker._annotate = self._annotate
20097  *         element_maker._element_factory = self._makeelement
20098  */
20099   __pyx_t_1 = __pyx_v_self->_nsmap;
20100   __Pyx_INCREF(__pyx_t_1);
20101   __Pyx_GIVEREF(__pyx_t_1);
20102   __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
20103   __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
20104   __pyx_v_element_maker->_nsmap = __pyx_t_1;
20105   __pyx_t_1 = 0;
20106
20107   /* "lxml/objectify.pyx":1277
20108  *             element_maker._tag = tag
20109  *         element_maker._nsmap = self._nsmap
20110  *         element_maker._annotate = self._annotate             # <<<<<<<<<<<<<<
20111  *         element_maker._element_factory = self._makeelement
20112  *         if caching:
20113  */
20114   __pyx_t_2 = __pyx_v_self->_annotate;
20115   __pyx_v_element_maker->_annotate = __pyx_t_2;
20116
20117   /* "lxml/objectify.pyx":1278
20118  *         element_maker._nsmap = self._nsmap
20119  *         element_maker._annotate = self._annotate
20120  *         element_maker._element_factory = self._makeelement             # <<<<<<<<<<<<<<
20121  *         if caching:
20122  *             if len(self._cache) > 200:
20123  */
20124   __pyx_t_1 = __pyx_v_self->_makeelement;
20125   __Pyx_INCREF(__pyx_t_1);
20126   __Pyx_GIVEREF(__pyx_t_1);
20127   __Pyx_GOTREF(__pyx_v_element_maker->_element_factory);
20128   __Pyx_DECREF(__pyx_v_element_maker->_element_factory);
20129   __pyx_v_element_maker->_element_factory = __pyx_t_1;
20130   __pyx_t_1 = 0;
20131
20132   /* "lxml/objectify.pyx":1279
20133  *         element_maker._annotate = self._annotate
20134  *         element_maker._element_factory = self._makeelement
20135  *         if caching:             # <<<<<<<<<<<<<<
20136  *             if len(self._cache) > 200:
20137  *                 self._cache.clear()
20138  */
20139   __pyx_t_2 = (__pyx_v_caching != 0);
20140   if (__pyx_t_2) {
20141
20142     /* "lxml/objectify.pyx":1280
20143  *         element_maker._element_factory = self._makeelement
20144  *         if caching:
20145  *             if len(self._cache) > 200:             # <<<<<<<<<<<<<<
20146  *                 self._cache.clear()
20147  *             self._cache[tag] = element_maker
20148  */
20149     __pyx_t_1 = __pyx_v_self->_cache;
20150     __Pyx_INCREF(__pyx_t_1);
20151     if (unlikely(__pyx_t_1 == Py_None)) {
20152       PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20153       __PYX_ERR(0, 1280, __pyx_L1_error)
20154     }
20155     __pyx_t_5 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1280, __pyx_L1_error)
20156     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20157     __pyx_t_2 = ((__pyx_t_5 > 0xC8) != 0);
20158     if (__pyx_t_2) {
20159
20160       /* "lxml/objectify.pyx":1281
20161  *         if caching:
20162  *             if len(self._cache) > 200:
20163  *                 self._cache.clear()             # <<<<<<<<<<<<<<
20164  *             self._cache[tag] = element_maker
20165  *         return element_maker
20166  */
20167       if (unlikely(__pyx_v_self->_cache == Py_None)) {
20168         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
20169         __PYX_ERR(0, 1281, __pyx_L1_error)
20170       }
20171       __pyx_t_6 = __Pyx_PyDict_Clear(__pyx_v_self->_cache); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error)
20172
20173       /* "lxml/objectify.pyx":1280
20174  *         element_maker._element_factory = self._makeelement
20175  *         if caching:
20176  *             if len(self._cache) > 200:             # <<<<<<<<<<<<<<
20177  *                 self._cache.clear()
20178  *             self._cache[tag] = element_maker
20179  */
20180     }
20181
20182     /* "lxml/objectify.pyx":1282
20183  *             if len(self._cache) > 200:
20184  *                 self._cache.clear()
20185  *             self._cache[tag] = element_maker             # <<<<<<<<<<<<<<
20186  *         return element_maker
20187  * 
20188  */
20189     if (unlikely(__pyx_v_self->_cache == Py_None)) {
20190       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
20191       __PYX_ERR(0, 1282, __pyx_L1_error)
20192     }
20193     if (unlikely(PyDict_SetItem(__pyx_v_self->_cache, __pyx_v_tag, ((PyObject *)__pyx_v_element_maker)) < 0)) __PYX_ERR(0, 1282, __pyx_L1_error)
20194
20195     /* "lxml/objectify.pyx":1279
20196  *         element_maker._annotate = self._annotate
20197  *         element_maker._element_factory = self._makeelement
20198  *         if caching:             # <<<<<<<<<<<<<<
20199  *             if len(self._cache) > 200:
20200  *                 self._cache.clear()
20201  */
20202   }
20203
20204   /* "lxml/objectify.pyx":1283
20205  *                 self._cache.clear()
20206  *             self._cache[tag] = element_maker
20207  *         return element_maker             # <<<<<<<<<<<<<<
20208  * 
20209  *     def __getattr__(self, tag):
20210  */
20211   __Pyx_XDECREF(__pyx_r);
20212   __Pyx_INCREF(((PyObject *)__pyx_v_element_maker));
20213   __pyx_r = ((PyObject *)__pyx_v_element_maker);
20214   goto __pyx_L0;
20215
20216   /* "lxml/objectify.pyx":1269
20217  * 
20218  *     @cython.final
20219  *     cdef _build_element_maker(self, tag, bint caching):             # <<<<<<<<<<<<<<
20220  *         cdef _ObjectifyElementMakerCaller element_maker
20221  *         element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller)
20222  */
20223
20224   /* function exit code */
20225   __pyx_L1_error:;
20226   __Pyx_XDECREF(__pyx_t_1);
20227   __Pyx_AddTraceback("lxml.objectify.ElementMaker._build_element_maker", __pyx_clineno, __pyx_lineno, __pyx_filename);
20228   __pyx_r = 0;
20229   __pyx_L0:;
20230   __Pyx_XDECREF((PyObject *)__pyx_v_element_maker);
20231   __Pyx_XGIVEREF(__pyx_r);
20232   __Pyx_RefNannyFinishContext();
20233   return __pyx_r;
20234 }
20235
20236 /* "lxml/objectify.pyx":1285
20237  *         return element_maker
20238  * 
20239  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
20240  *         element_maker = self._cache.get(tag)
20241  *         if element_maker is None:
20242  */
20243
20244 /* Python wrapper */
20245 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
20246 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
20247   PyObject *__pyx_r = 0;
20248   __Pyx_RefNannyDeclarations
20249   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
20250   __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), ((PyObject *)__pyx_v_tag));
20251
20252   /* function exit code */
20253   __Pyx_RefNannyFinishContext();
20254   return __pyx_r;
20255 }
20256
20257 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag) {
20258   PyObject *__pyx_v_element_maker = NULL;
20259   PyObject *__pyx_r = NULL;
20260   __Pyx_RefNannyDeclarations
20261   PyObject *__pyx_t_1 = NULL;
20262   int __pyx_t_2;
20263   int __pyx_t_3;
20264   PyObject *__pyx_t_4 = NULL;
20265   PyObject *__pyx_t_5 = NULL;
20266   int __pyx_t_6;
20267   PyObject *__pyx_t_7 = NULL;
20268   int __pyx_lineno = 0;
20269   const char *__pyx_filename = NULL;
20270   int __pyx_clineno = 0;
20271   __Pyx_RefNannySetupContext("__getattr__", 0);
20272
20273   /* "lxml/objectify.pyx":1286
20274  * 
20275  *     def __getattr__(self, tag):
20276  *         element_maker = self._cache.get(tag)             # <<<<<<<<<<<<<<
20277  *         if element_maker is None:
20278  *             if is_special_method(tag):
20279  */
20280   if (unlikely(__pyx_v_self->_cache == Py_None)) {
20281     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
20282     __PYX_ERR(0, 1286, __pyx_L1_error)
20283   }
20284   __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error)
20285   __Pyx_GOTREF(__pyx_t_1);
20286   __pyx_v_element_maker = __pyx_t_1;
20287   __pyx_t_1 = 0;
20288
20289   /* "lxml/objectify.pyx":1287
20290  *     def __getattr__(self, tag):
20291  *         element_maker = self._cache.get(tag)
20292  *         if element_maker is None:             # <<<<<<<<<<<<<<
20293  *             if is_special_method(tag):
20294  *                 return object.__getattr__(self, tag)
20295  */
20296   __pyx_t_2 = (__pyx_v_element_maker == Py_None);
20297   __pyx_t_3 = (__pyx_t_2 != 0);
20298   if (__pyx_t_3) {
20299
20300     /* "lxml/objectify.pyx":1288
20301  *         element_maker = self._cache.get(tag)
20302  *         if element_maker is None:
20303  *             if is_special_method(tag):             # <<<<<<<<<<<<<<
20304  *                 return object.__getattr__(self, tag)
20305  *             return self._build_element_maker(tag, caching=True)
20306  */
20307     __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
20308     __pyx_t_4 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_5 = NULL;
20309     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
20310       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20311       if (likely(__pyx_t_5)) {
20312         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20313         __Pyx_INCREF(__pyx_t_5);
20314         __Pyx_INCREF(function);
20315         __Pyx_DECREF_SET(__pyx_t_4, function);
20316       }
20317     }
20318     __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_tag);
20319     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20320     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
20321     __Pyx_GOTREF(__pyx_t_1);
20322     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20323     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1288, __pyx_L1_error)
20324     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20325     if (__pyx_t_3) {
20326
20327       /* "lxml/objectify.pyx":1289
20328  *         if element_maker is None:
20329  *             if is_special_method(tag):
20330  *                 return object.__getattr__(self, tag)             # <<<<<<<<<<<<<<
20331  *             return self._build_element_maker(tag, caching=True)
20332  *         return element_maker
20333  */
20334       __Pyx_XDECREF(__pyx_r);
20335       __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_getattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error)
20336       __Pyx_GOTREF(__pyx_t_4);
20337       __pyx_t_5 = NULL;
20338       __pyx_t_6 = 0;
20339       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
20340         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20341         if (likely(__pyx_t_5)) {
20342           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20343           __Pyx_INCREF(__pyx_t_5);
20344           __Pyx_INCREF(function);
20345           __Pyx_DECREF_SET(__pyx_t_4, function);
20346           __pyx_t_6 = 1;
20347         }
20348       }
20349       #if CYTHON_FAST_PYCALL
20350       if (PyFunction_Check(__pyx_t_4)) {
20351         PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag};
20352         __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
20353         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20354         __Pyx_GOTREF(__pyx_t_1);
20355       } else
20356       #endif
20357       #if CYTHON_FAST_PYCCALL
20358       if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
20359         PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag};
20360         __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
20361         __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20362         __Pyx_GOTREF(__pyx_t_1);
20363       } else
20364       #endif
20365       {
20366         __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1289, __pyx_L1_error)
20367         __Pyx_GOTREF(__pyx_t_7);
20368         if (__pyx_t_5) {
20369           __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
20370         }
20371         __Pyx_INCREF(((PyObject *)__pyx_v_self));
20372         __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
20373         PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self));
20374         __Pyx_INCREF(__pyx_v_tag);
20375         __Pyx_GIVEREF(__pyx_v_tag);
20376         PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_tag);
20377         __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
20378         __Pyx_GOTREF(__pyx_t_1);
20379         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
20380       }
20381       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20382       __pyx_r = __pyx_t_1;
20383       __pyx_t_1 = 0;
20384       goto __pyx_L0;
20385
20386       /* "lxml/objectify.pyx":1288
20387  *         element_maker = self._cache.get(tag)
20388  *         if element_maker is None:
20389  *             if is_special_method(tag):             # <<<<<<<<<<<<<<
20390  *                 return object.__getattr__(self, tag)
20391  *             return self._build_element_maker(tag, caching=True)
20392  */
20393     }
20394
20395     /* "lxml/objectify.pyx":1290
20396  *             if is_special_method(tag):
20397  *                 return object.__getattr__(self, tag)
20398  *             return self._build_element_maker(tag, caching=True)             # <<<<<<<<<<<<<<
20399  *         return element_maker
20400  * 
20401  */
20402     __Pyx_XDECREF(__pyx_r);
20403     __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error)
20404     __Pyx_GOTREF(__pyx_t_1);
20405     __pyx_r = __pyx_t_1;
20406     __pyx_t_1 = 0;
20407     goto __pyx_L0;
20408
20409     /* "lxml/objectify.pyx":1287
20410  *     def __getattr__(self, tag):
20411  *         element_maker = self._cache.get(tag)
20412  *         if element_maker is None:             # <<<<<<<<<<<<<<
20413  *             if is_special_method(tag):
20414  *                 return object.__getattr__(self, tag)
20415  */
20416   }
20417
20418   /* "lxml/objectify.pyx":1291
20419  *                 return object.__getattr__(self, tag)
20420  *             return self._build_element_maker(tag, caching=True)
20421  *         return element_maker             # <<<<<<<<<<<<<<
20422  * 
20423  *     def __call__(self, tag, *args, **kwargs):
20424  */
20425   __Pyx_XDECREF(__pyx_r);
20426   __Pyx_INCREF(__pyx_v_element_maker);
20427   __pyx_r = __pyx_v_element_maker;
20428   goto __pyx_L0;
20429
20430   /* "lxml/objectify.pyx":1285
20431  *         return element_maker
20432  * 
20433  *     def __getattr__(self, tag):             # <<<<<<<<<<<<<<
20434  *         element_maker = self._cache.get(tag)
20435  *         if element_maker is None:
20436  */
20437
20438   /* function exit code */
20439   __pyx_L1_error:;
20440   __Pyx_XDECREF(__pyx_t_1);
20441   __Pyx_XDECREF(__pyx_t_4);
20442   __Pyx_XDECREF(__pyx_t_5);
20443   __Pyx_XDECREF(__pyx_t_7);
20444   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20445   __pyx_r = NULL;
20446   __pyx_L0:;
20447   __Pyx_XDECREF(__pyx_v_element_maker);
20448   __Pyx_XGIVEREF(__pyx_r);
20449   __Pyx_RefNannyFinishContext();
20450   return __pyx_r;
20451 }
20452
20453 /* "lxml/objectify.pyx":1293
20454  *         return element_maker
20455  * 
20456  *     def __call__(self, tag, *args, **kwargs):             # <<<<<<<<<<<<<<
20457  *         element_maker = self._cache.get(tag)
20458  *         if element_maker is None:
20459  */
20460
20461 /* Python wrapper */
20462 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20463 static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20464   PyObject *__pyx_v_tag = 0;
20465   PyObject *__pyx_v_args = 0;
20466   PyObject *__pyx_v_kwargs = 0;
20467   int __pyx_lineno = 0;
20468   const char *__pyx_filename = NULL;
20469   int __pyx_clineno = 0;
20470   PyObject *__pyx_r = 0;
20471   __Pyx_RefNannyDeclarations
20472   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
20473   __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
20474   __Pyx_GOTREF(__pyx_v_kwargs);
20475   if (PyTuple_GET_SIZE(__pyx_args) > 1) {
20476     __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
20477     if (unlikely(!__pyx_v_args)) {
20478       __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
20479       __Pyx_RefNannyFinishContext();
20480       return NULL;
20481     }
20482     __Pyx_GOTREF(__pyx_v_args);
20483   } else {
20484     __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
20485   }
20486   {
20487     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,0};
20488     PyObject* values[1] = {0};
20489     if (unlikely(__pyx_kwds)) {
20490       Py_ssize_t kw_args;
20491       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20492       switch (pos_args) {
20493         default:
20494         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20495         CYTHON_FALLTHROUGH;
20496         case  0: break;
20497       }
20498       kw_args = PyDict_Size(__pyx_kwds);
20499       switch (pos_args) {
20500         case  0:
20501         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--;
20502         else goto __pyx_L5_argtuple_error;
20503       }
20504       if (unlikely(kw_args > 0)) {
20505         const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
20506         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 1293, __pyx_L3_error)
20507       }
20508     } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
20509       goto __pyx_L5_argtuple_error;
20510     } else {
20511       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20512     }
20513     __pyx_v_tag = values[0];
20514   }
20515   goto __pyx_L4_argument_unpacking_done;
20516   __pyx_L5_argtuple_error:;
20517   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1293, __pyx_L3_error)
20518   __pyx_L3_error:;
20519   __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
20520   __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
20521   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20522   __Pyx_RefNannyFinishContext();
20523   return NULL;
20524   __pyx_L4_argument_unpacking_done:;
20525   __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), __pyx_v_tag, __pyx_v_args, __pyx_v_kwargs);
20526
20527   /* function exit code */
20528   __Pyx_XDECREF(__pyx_v_args);
20529   __Pyx_XDECREF(__pyx_v_kwargs);
20530   __Pyx_RefNannyFinishContext();
20531   return __pyx_r;
20532 }
20533
20534 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx_obj_4lxml_9objectify_ElementMaker *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
20535   PyObject *__pyx_v_element_maker = NULL;
20536   PyObject *__pyx_r = NULL;
20537   __Pyx_RefNannyDeclarations
20538   PyObject *__pyx_t_1 = NULL;
20539   int __pyx_t_2;
20540   int __pyx_t_3;
20541   PyObject *__pyx_t_4 = NULL;
20542   PyObject *__pyx_t_5 = NULL;
20543   int __pyx_lineno = 0;
20544   const char *__pyx_filename = NULL;
20545   int __pyx_clineno = 0;
20546   __Pyx_RefNannySetupContext("__call__", 0);
20547
20548   /* "lxml/objectify.pyx":1294
20549  * 
20550  *     def __call__(self, tag, *args, **kwargs):
20551  *         element_maker = self._cache.get(tag)             # <<<<<<<<<<<<<<
20552  *         if element_maker is None:
20553  *             element_maker = self._build_element_maker(
20554  */
20555   if (unlikely(__pyx_v_self->_cache == Py_None)) {
20556     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
20557     __PYX_ERR(0, 1294, __pyx_L1_error)
20558   }
20559   __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
20560   __Pyx_GOTREF(__pyx_t_1);
20561   __pyx_v_element_maker = __pyx_t_1;
20562   __pyx_t_1 = 0;
20563
20564   /* "lxml/objectify.pyx":1295
20565  *     def __call__(self, tag, *args, **kwargs):
20566  *         element_maker = self._cache.get(tag)
20567  *         if element_maker is None:             # <<<<<<<<<<<<<<
20568  *             element_maker = self._build_element_maker(
20569  *                 tag, caching=not is_special_method(tag))
20570  */
20571   __pyx_t_2 = (__pyx_v_element_maker == Py_None);
20572   __pyx_t_3 = (__pyx_t_2 != 0);
20573   if (__pyx_t_3) {
20574
20575     /* "lxml/objectify.pyx":1297
20576  *         if element_maker is None:
20577  *             element_maker = self._build_element_maker(
20578  *                 tag, caching=not is_special_method(tag))             # <<<<<<<<<<<<<<
20579  *         return element_maker(*args, **kwargs)
20580  * 
20581  */
20582     __Pyx_INCREF(__pyx_v_4lxml_9objectify_is_special_method);
20583     __pyx_t_4 = __pyx_v_4lxml_9objectify_is_special_method; __pyx_t_5 = NULL;
20584     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
20585       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20586       if (likely(__pyx_t_5)) {
20587         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20588         __Pyx_INCREF(__pyx_t_5);
20589         __Pyx_INCREF(function);
20590         __Pyx_DECREF_SET(__pyx_t_4, function);
20591       }
20592     }
20593     __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_tag);
20594     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20595     if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
20596     __Pyx_GOTREF(__pyx_t_1);
20597     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20598     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1297, __pyx_L1_error)
20599     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20600
20601     /* "lxml/objectify.pyx":1296
20602  *         element_maker = self._cache.get(tag)
20603  *         if element_maker is None:
20604  *             element_maker = self._build_element_maker(             # <<<<<<<<<<<<<<
20605  *                 tag, caching=not is_special_method(tag))
20606  *         return element_maker(*args, **kwargs)
20607  */
20608     __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, (!__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
20609     __Pyx_GOTREF(__pyx_t_1);
20610     __Pyx_DECREF_SET(__pyx_v_element_maker, __pyx_t_1);
20611     __pyx_t_1 = 0;
20612
20613     /* "lxml/objectify.pyx":1295
20614  *     def __call__(self, tag, *args, **kwargs):
20615  *         element_maker = self._cache.get(tag)
20616  *         if element_maker is None:             # <<<<<<<<<<<<<<
20617  *             element_maker = self._build_element_maker(
20618  *                 tag, caching=not is_special_method(tag))
20619  */
20620   }
20621
20622   /* "lxml/objectify.pyx":1298
20623  *             element_maker = self._build_element_maker(
20624  *                 tag, caching=not is_special_method(tag))
20625  *         return element_maker(*args, **kwargs)             # <<<<<<<<<<<<<<
20626  * 
20627  * ################################################################################
20628  */
20629   __Pyx_XDECREF(__pyx_r);
20630   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_element_maker, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
20631   __Pyx_GOTREF(__pyx_t_1);
20632   __pyx_r = __pyx_t_1;
20633   __pyx_t_1 = 0;
20634   goto __pyx_L0;
20635
20636   /* "lxml/objectify.pyx":1293
20637  *         return element_maker
20638  * 
20639  *     def __call__(self, tag, *args, **kwargs):             # <<<<<<<<<<<<<<
20640  *         element_maker = self._cache.get(tag)
20641  *         if element_maker is None:
20642  */
20643
20644   /* function exit code */
20645   __pyx_L1_error:;
20646   __Pyx_XDECREF(__pyx_t_1);
20647   __Pyx_XDECREF(__pyx_t_4);
20648   __Pyx_XDECREF(__pyx_t_5);
20649   __Pyx_AddTraceback("lxml.objectify.ElementMaker.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20650   __pyx_r = NULL;
20651   __pyx_L0:;
20652   __Pyx_XDECREF(__pyx_v_element_maker);
20653   __Pyx_XGIVEREF(__pyx_r);
20654   __Pyx_RefNannyFinishContext();
20655   return __pyx_r;
20656 }
20657
20658 /* "lxml/objectify.pyx":1305
20659  * cdef bint __RECURSIVE_STR = 0 # default: off
20660  * 
20661  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
20662  *     u"""enable_recursive_str(on=True)
20663  * 
20664  */
20665
20666 /* Python wrapper */
20667 static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20668 static char __pyx_doc_4lxml_9objectify_12enable_recursive_str[] = "enable_recursive_str(on=True)\n\n    Enable a recursively generated tree representation for str(element),\n    based on objectify.dump(element).\n    ";
20669 static PyMethodDef __pyx_mdef_4lxml_9objectify_13enable_recursive_str = {"enable_recursive_str", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_13enable_recursive_str, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_12enable_recursive_str};
20670 static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20671   PyObject *__pyx_v_on = 0;
20672   int __pyx_lineno = 0;
20673   const char *__pyx_filename = NULL;
20674   int __pyx_clineno = 0;
20675   PyObject *__pyx_r = 0;
20676   __Pyx_RefNannyDeclarations
20677   __Pyx_RefNannySetupContext("enable_recursive_str (wrapper)", 0);
20678   {
20679     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_on,0};
20680     PyObject* values[1] = {0};
20681     values[0] = ((PyObject *)((PyObject *)Py_True));
20682     if (unlikely(__pyx_kwds)) {
20683       Py_ssize_t kw_args;
20684       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20685       switch (pos_args) {
20686         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20687         CYTHON_FALLTHROUGH;
20688         case  0: break;
20689         default: goto __pyx_L5_argtuple_error;
20690       }
20691       kw_args = PyDict_Size(__pyx_kwds);
20692       switch (pos_args) {
20693         case  0:
20694         if (kw_args > 0) {
20695           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_on);
20696           if (value) { values[0] = value; kw_args--; }
20697         }
20698       }
20699       if (unlikely(kw_args > 0)) {
20700         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_recursive_str") < 0)) __PYX_ERR(0, 1305, __pyx_L3_error)
20701       }
20702     } else {
20703       switch (PyTuple_GET_SIZE(__pyx_args)) {
20704         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20705         CYTHON_FALLTHROUGH;
20706         case  0: break;
20707         default: goto __pyx_L5_argtuple_error;
20708       }
20709     }
20710     __pyx_v_on = values[0];
20711   }
20712   goto __pyx_L4_argument_unpacking_done;
20713   __pyx_L5_argtuple_error:;
20714   __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1305, __pyx_L3_error)
20715   __pyx_L3_error:;
20716   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
20717   __Pyx_RefNannyFinishContext();
20718   return NULL;
20719   __pyx_L4_argument_unpacking_done:;
20720   __pyx_r = __pyx_pf_4lxml_9objectify_12enable_recursive_str(__pyx_self, __pyx_v_on);
20721
20722   /* function exit code */
20723   __Pyx_RefNannyFinishContext();
20724   return __pyx_r;
20725 }
20726
20727 static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_on) {
20728   PyObject *__pyx_r = NULL;
20729   __Pyx_RefNannyDeclarations
20730   int __pyx_t_1;
20731   int __pyx_lineno = 0;
20732   const char *__pyx_filename = NULL;
20733   int __pyx_clineno = 0;
20734   __Pyx_RefNannySetupContext("enable_recursive_str", 0);
20735
20736   /* "lxml/objectify.pyx":1312
20737  *     """
20738  *     global __RECURSIVE_STR
20739  *     __RECURSIVE_STR = on             # <<<<<<<<<<<<<<
20740  * 
20741  * def dump(_Element element not None):
20742  */
20743   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L1_error)
20744   __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1;
20745
20746   /* "lxml/objectify.pyx":1305
20747  * cdef bint __RECURSIVE_STR = 0 # default: off
20748  * 
20749  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
20750  *     u"""enable_recursive_str(on=True)
20751  * 
20752  */
20753
20754   /* function exit code */
20755   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20756   goto __pyx_L0;
20757   __pyx_L1_error:;
20758   __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
20759   __pyx_r = NULL;
20760   __pyx_L0:;
20761   __Pyx_XGIVEREF(__pyx_r);
20762   __Pyx_RefNannyFinishContext();
20763   return __pyx_r;
20764 }
20765
20766 /* "lxml/objectify.pyx":1314
20767  *     __RECURSIVE_STR = on
20768  * 
20769  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
20770  *     u"""dump(_Element element not None)
20771  * 
20772  */
20773
20774 /* Python wrapper */
20775 static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
20776 static char __pyx_doc_4lxml_9objectify_14dump[] = "dump(_Element element not None)\n\n    Return a recursively generated string representation of an element.\n    ";
20777 static PyMethodDef __pyx_mdef_4lxml_9objectify_15dump = {"dump", (PyCFunction)__pyx_pw_4lxml_9objectify_15dump, METH_O, __pyx_doc_4lxml_9objectify_14dump};
20778 static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
20779   int __pyx_lineno = 0;
20780   const char *__pyx_filename = NULL;
20781   int __pyx_clineno = 0;
20782   PyObject *__pyx_r = 0;
20783   __Pyx_RefNannyDeclarations
20784   __Pyx_RefNannySetupContext("dump (wrapper)", 0);
20785   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "element", 0))) __PYX_ERR(0, 1314, __pyx_L1_error)
20786   __pyx_r = __pyx_pf_4lxml_9objectify_14dump(__pyx_self, ((struct LxmlElement *)__pyx_v_element));
20787
20788   /* function exit code */
20789   goto __pyx_L0;
20790   __pyx_L1_error:;
20791   __pyx_r = NULL;
20792   __pyx_L0:;
20793   __Pyx_RefNannyFinishContext();
20794   return __pyx_r;
20795 }
20796
20797 static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_self, struct LxmlElement *__pyx_v_element) {
20798   PyObject *__pyx_r = NULL;
20799   __Pyx_RefNannyDeclarations
20800   PyObject *__pyx_t_1 = NULL;
20801   int __pyx_lineno = 0;
20802   const char *__pyx_filename = NULL;
20803   int __pyx_clineno = 0;
20804   __Pyx_RefNannySetupContext("dump", 0);
20805
20806   /* "lxml/objectify.pyx":1319
20807  *     Return a recursively generated string representation of an element.
20808  *     """
20809  *     return _dump(element, 0)             # <<<<<<<<<<<<<<
20810  * 
20811  * cdef object _dump(_Element element, int indent):
20812  */
20813   __Pyx_XDECREF(__pyx_r);
20814   __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(__pyx_v_element, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
20815   __Pyx_GOTREF(__pyx_t_1);
20816   __pyx_r = __pyx_t_1;
20817   __pyx_t_1 = 0;
20818   goto __pyx_L0;
20819
20820   /* "lxml/objectify.pyx":1314
20821  *     __RECURSIVE_STR = on
20822  * 
20823  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
20824  *     u"""dump(_Element element not None)
20825  * 
20826  */
20827
20828   /* function exit code */
20829   __pyx_L1_error:;
20830   __Pyx_XDECREF(__pyx_t_1);
20831   __Pyx_AddTraceback("lxml.objectify.dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
20832   __pyx_r = NULL;
20833   __pyx_L0:;
20834   __Pyx_XGIVEREF(__pyx_r);
20835   __Pyx_RefNannyFinishContext();
20836   return __pyx_r;
20837 }
20838
20839 /* "lxml/objectify.pyx":1321
20840  *     return _dump(element, 0)
20841  * 
20842  * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
20843  *     indentstr = u"    " * indent
20844  *     if isinstance(element, ObjectifiedDataElement):
20845  */
20846
20847 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element, int __pyx_v_indent) {
20848   PyObject *__pyx_v_indentstr = NULL;
20849   PyObject *__pyx_v_value = NULL;
20850   PyObject *__pyx_v_result = NULL;
20851   PyObject *__pyx_v_xsi_ns = NULL;
20852   PyObject *__pyx_v_pytype_ns = NULL;
20853   PyObject *__pyx_v_name = NULL;
20854   PyObject *__pyx_v_child = NULL;
20855   PyObject *__pyx_r = NULL;
20856   __Pyx_RefNannyDeclarations
20857   PyObject *__pyx_t_1 = NULL;
20858   PyObject *__pyx_t_2 = NULL;
20859   int __pyx_t_3;
20860   int __pyx_t_4;
20861   PyObject *__pyx_t_5 = NULL;
20862   Py_ssize_t __pyx_t_6;
20863   Py_UCS4 __pyx_t_7;
20864   int __pyx_t_8;
20865   PyObject *__pyx_t_9 = NULL;
20866   PyObject *__pyx_t_10 = NULL;
20867   PyObject *(*__pyx_t_11)(PyObject *);
20868   int __pyx_t_12;
20869   Py_ssize_t __pyx_t_13;
20870   PyObject *(*__pyx_t_14)(PyObject *);
20871   int __pyx_lineno = 0;
20872   const char *__pyx_filename = NULL;
20873   int __pyx_clineno = 0;
20874   __Pyx_RefNannySetupContext("_dump", 0);
20875
20876   /* "lxml/objectify.pyx":1322
20877  * 
20878  * cdef object _dump(_Element element, int indent):
20879  *     indentstr = u"    " * indent             # <<<<<<<<<<<<<<
20880  *     if isinstance(element, ObjectifiedDataElement):
20881  *         value = repr(element)
20882  */
20883   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_indent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error)
20884   __Pyx_GOTREF(__pyx_t_1);
20885   __pyx_t_2 = PyNumber_Multiply(__pyx_kp_u__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error)
20886   __Pyx_GOTREF(__pyx_t_2);
20887   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20888   if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1322, __pyx_L1_error)
20889   __pyx_v_indentstr = ((PyObject*)__pyx_t_2);
20890   __pyx_t_2 = 0;
20891
20892   /* "lxml/objectify.pyx":1323
20893  * cdef object _dump(_Element element, int indent):
20894  *     indentstr = u"    " * indent
20895  *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
20896  *         value = repr(element)
20897  *     else:
20898  */
20899   __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement); 
20900   __pyx_t_4 = (__pyx_t_3 != 0);
20901   if (__pyx_t_4) {
20902
20903     /* "lxml/objectify.pyx":1324
20904  *     indentstr = u"    " * indent
20905  *     if isinstance(element, ObjectifiedDataElement):
20906  *         value = repr(element)             # <<<<<<<<<<<<<<
20907  *     else:
20908  *         value = textOf(element._c_node)
20909  */
20910     __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L1_error)
20911     __Pyx_GOTREF(__pyx_t_2);
20912     __pyx_v_value = __pyx_t_2;
20913     __pyx_t_2 = 0;
20914
20915     /* "lxml/objectify.pyx":1323
20916  * cdef object _dump(_Element element, int indent):
20917  *     indentstr = u"    " * indent
20918  *     if isinstance(element, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
20919  *         value = repr(element)
20920  *     else:
20921  */
20922     goto __pyx_L3;
20923   }
20924
20925   /* "lxml/objectify.pyx":1326
20926  *         value = repr(element)
20927  *     else:
20928  *         value = textOf(element._c_node)             # <<<<<<<<<<<<<<
20929  *         if value is not None:
20930  *             if not value.strip():
20931  */
20932   /*else*/ {
20933     __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error)
20934     __Pyx_GOTREF(__pyx_t_2);
20935     __pyx_v_value = __pyx_t_2;
20936     __pyx_t_2 = 0;
20937
20938     /* "lxml/objectify.pyx":1327
20939  *     else:
20940  *         value = textOf(element._c_node)
20941  *         if value is not None:             # <<<<<<<<<<<<<<
20942  *             if not value.strip():
20943  *                 value = None
20944  */
20945     __pyx_t_4 = (__pyx_v_value != Py_None);
20946     __pyx_t_3 = (__pyx_t_4 != 0);
20947     if (__pyx_t_3) {
20948
20949       /* "lxml/objectify.pyx":1328
20950  *         value = textOf(element._c_node)
20951  *         if value is not None:
20952  *             if not value.strip():             # <<<<<<<<<<<<<<
20953  *                 value = None
20954  *             else:
20955  */
20956       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
20957       __Pyx_GOTREF(__pyx_t_1);
20958       __pyx_t_5 = NULL;
20959       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
20960         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
20961         if (likely(__pyx_t_5)) {
20962           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20963           __Pyx_INCREF(__pyx_t_5);
20964           __Pyx_INCREF(function);
20965           __Pyx_DECREF_SET(__pyx_t_1, function);
20966         }
20967       }
20968       __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
20969       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20970       if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error)
20971       __Pyx_GOTREF(__pyx_t_2);
20972       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20973       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1328, __pyx_L1_error)
20974       __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20975       __pyx_t_4 = ((!__pyx_t_3) != 0);
20976       if (__pyx_t_4) {
20977
20978         /* "lxml/objectify.pyx":1329
20979  *         if value is not None:
20980  *             if not value.strip():
20981  *                 value = None             # <<<<<<<<<<<<<<
20982  *             else:
20983  *                 value = repr(value)
20984  */
20985         __Pyx_INCREF(Py_None);
20986         __Pyx_DECREF_SET(__pyx_v_value, Py_None);
20987
20988         /* "lxml/objectify.pyx":1328
20989  *         value = textOf(element._c_node)
20990  *         if value is not None:
20991  *             if not value.strip():             # <<<<<<<<<<<<<<
20992  *                 value = None
20993  *             else:
20994  */
20995         goto __pyx_L5;
20996       }
20997
20998       /* "lxml/objectify.pyx":1331
20999  *                 value = None
21000  *             else:
21001  *                 value = repr(value)             # <<<<<<<<<<<<<<
21002  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"
21003  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21004  */
21005       /*else*/ {
21006         __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error)
21007         __Pyx_GOTREF(__pyx_t_2);
21008         __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
21009         __pyx_t_2 = 0;
21010       }
21011       __pyx_L5:;
21012
21013       /* "lxml/objectify.pyx":1327
21014  *     else:
21015  *         value = textOf(element._c_node)
21016  *         if value is not None:             # <<<<<<<<<<<<<<
21017  *             if not value.strip():
21018  *                 value = None
21019  */
21020     }
21021   }
21022   __pyx_L3:;
21023
21024   /* "lxml/objectify.pyx":1332
21025  *             else:
21026  *                 value = repr(value)
21027  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"             # <<<<<<<<<<<<<<
21028  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21029  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21030  */
21031   __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error)
21032   __Pyx_GOTREF(__pyx_t_2);
21033   __pyx_t_6 = 0;
21034   __pyx_t_7 = 127;
21035   __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21036   __Pyx_GOTREF(__pyx_t_1);
21037   __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
21038   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21039   __Pyx_GIVEREF(__pyx_t_1);
21040   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
21041   __pyx_t_1 = 0;
21042   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21043   __Pyx_GOTREF(__pyx_t_1);
21044   __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21045   __Pyx_GOTREF(__pyx_t_5);
21046   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21047   __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
21048   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
21049   __Pyx_GIVEREF(__pyx_t_5);
21050   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
21051   __pyx_t_5 = 0;
21052   __Pyx_INCREF(__pyx_kp_u__11);
21053   __pyx_t_6 += 3;
21054   __Pyx_GIVEREF(__pyx_kp_u__11);
21055   PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__11);
21056   __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21057   __Pyx_GOTREF(__pyx_t_5);
21058   __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7;
21059   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
21060   __Pyx_GIVEREF(__pyx_t_5);
21061   PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
21062   __pyx_t_5 = 0;
21063   __Pyx_INCREF(__pyx_kp_u__12);
21064   __pyx_t_6 += 2;
21065   __Pyx_GIVEREF(__pyx_kp_u__12);
21066   PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__12);
21067   __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error)
21068   __Pyx_GOTREF(__pyx_t_5);
21069   __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21070   __Pyx_GOTREF(__pyx_t_1);
21071   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21072   __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
21073   __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21074   __Pyx_GIVEREF(__pyx_t_1);
21075   PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_1);
21076   __pyx_t_1 = 0;
21077   __Pyx_INCREF(__pyx_kp_u__13);
21078   __pyx_t_6 += 2;
21079   __Pyx_GIVEREF(__pyx_kp_u__13);
21080   PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__13);
21081   __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error)
21082   __Pyx_GOTREF(__pyx_t_1);
21083   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21084   __pyx_v_result = __pyx_t_1;
21085   __pyx_t_1 = 0;
21086
21087   /* "lxml/objectify.pyx":1333
21088  *                 value = repr(value)
21089  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"
21090  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
21091  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21092  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21093  */
21094   __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
21095   __Pyx_GOTREF(__pyx_t_1);
21096   __pyx_v_xsi_ns = ((PyObject*)__pyx_t_1);
21097   __pyx_t_1 = 0;
21098
21099   /* "lxml/objectify.pyx":1334
21100  *     result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n"
21101  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21102  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE             # <<<<<<<<<<<<<<
21103  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21104  *         if u'{' in name:
21105  */
21106   __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error)
21107   __Pyx_GOTREF(__pyx_t_1);
21108   __pyx_v_pytype_ns = ((PyObject*)__pyx_t_1);
21109   __pyx_t_1 = 0;
21110
21111   /* "lxml/objectify.pyx":1335
21112  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21113  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21114  *     for name, value in sorted(cetree.iterattributes(element, 3)):             # <<<<<<<<<<<<<<
21115  *         if u'{' in name:
21116  *             if name == PYTYPE_ATTRIBUTE:
21117  */
21118   __pyx_t_2 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
21119   __Pyx_GOTREF(__pyx_t_2);
21120   __pyx_t_5 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error)
21121   __Pyx_GOTREF(__pyx_t_5);
21122   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21123   __pyx_t_1 = ((PyObject*)__pyx_t_5);
21124   __pyx_t_5 = 0;
21125   __pyx_t_8 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1335, __pyx_L1_error)
21126   if (unlikely(__pyx_t_1 == Py_None)) {
21127     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
21128     __PYX_ERR(0, 1335, __pyx_L1_error)
21129   }
21130   __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
21131   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21132   for (;;) {
21133     if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
21134     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21135     __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1335, __pyx_L1_error)
21136     #else
21137     __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
21138     __Pyx_GOTREF(__pyx_t_1);
21139     #endif
21140     if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
21141       PyObject* sequence = __pyx_t_1;
21142       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
21143       if (unlikely(size != 2)) {
21144         if (size > 2) __Pyx_RaiseTooManyValuesError(2);
21145         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
21146         __PYX_ERR(0, 1335, __pyx_L1_error)
21147       }
21148       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21149       if (likely(PyTuple_CheckExact(sequence))) {
21150         __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
21151         __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
21152       } else {
21153         __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
21154         __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
21155       }
21156       __Pyx_INCREF(__pyx_t_2);
21157       __Pyx_INCREF(__pyx_t_9);
21158       #else
21159       __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
21160       __Pyx_GOTREF(__pyx_t_2);
21161       __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error)
21162       __Pyx_GOTREF(__pyx_t_9);
21163       #endif
21164       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21165     } else {
21166       Py_ssize_t index = -1;
21167       __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1335, __pyx_L1_error)
21168       __Pyx_GOTREF(__pyx_t_10);
21169       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21170       __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
21171       index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
21172       __Pyx_GOTREF(__pyx_t_2);
21173       index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed;
21174       __Pyx_GOTREF(__pyx_t_9);
21175       if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
21176       __pyx_t_11 = NULL;
21177       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21178       goto __pyx_L9_unpacking_done;
21179       __pyx_L8_unpacking_failed:;
21180       __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21181       __pyx_t_11 = NULL;
21182       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
21183       __PYX_ERR(0, 1335, __pyx_L1_error)
21184       __pyx_L9_unpacking_done:;
21185     }
21186     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
21187     __pyx_t_2 = 0;
21188     __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_9);
21189     __pyx_t_9 = 0;
21190
21191     /* "lxml/objectify.pyx":1336
21192  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21193  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21194  *         if u'{' in name:             # <<<<<<<<<<<<<<
21195  *             if name == PYTYPE_ATTRIBUTE:
21196  *                 if value == TREE_PYTYPE_NAME:
21197  */
21198     __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__9, __pyx_v_name, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1336, __pyx_L1_error)
21199     __pyx_t_3 = (__pyx_t_4 != 0);
21200     if (__pyx_t_3) {
21201
21202       /* "lxml/objectify.pyx":1337
21203  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21204  *         if u'{' in name:
21205  *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
21206  *                 if value == TREE_PYTYPE_NAME:
21207  *                     continue
21208  */
21209       __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error)
21210       __Pyx_GOTREF(__pyx_t_1);
21211       __pyx_t_9 = PyObject_RichCompare(__pyx_v_name, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error)
21212       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21213       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error)
21214       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21215       if (__pyx_t_3) {
21216
21217         /* "lxml/objectify.pyx":1338
21218  *         if u'{' in name:
21219  *             if name == PYTYPE_ATTRIBUTE:
21220  *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
21221  *                     continue
21222  *                 else:
21223  */
21224         __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1338, __pyx_L1_error)
21225         if (__pyx_t_3) {
21226
21227           /* "lxml/objectify.pyx":1339
21228  *             if name == PYTYPE_ATTRIBUTE:
21229  *                 if value == TREE_PYTYPE_NAME:
21230  *                     continue             # <<<<<<<<<<<<<<
21231  *                 else:
21232  *                     name = name.replace(pytype_ns, u'py:')
21233  */
21234           goto __pyx_L6_continue;
21235
21236           /* "lxml/objectify.pyx":1338
21237  *         if u'{' in name:
21238  *             if name == PYTYPE_ATTRIBUTE:
21239  *                 if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
21240  *                     continue
21241  *                 else:
21242  */
21243         }
21244
21245         /* "lxml/objectify.pyx":1341
21246  *                     continue
21247  *                 else:
21248  *                     name = name.replace(pytype_ns, u'py:')             # <<<<<<<<<<<<<<
21249  *             name = name.replace(xsi_ns, u'xsi:')
21250  *         result += f"{indentstr}  * {name} = {value!r}\n"
21251  */
21252         /*else*/ {
21253           __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error)
21254           __Pyx_GOTREF(__pyx_t_1);
21255           __pyx_t_2 = NULL;
21256           __pyx_t_12 = 0;
21257           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
21258             __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
21259             if (likely(__pyx_t_2)) {
21260               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
21261               __Pyx_INCREF(__pyx_t_2);
21262               __Pyx_INCREF(function);
21263               __Pyx_DECREF_SET(__pyx_t_1, function);
21264               __pyx_t_12 = 1;
21265             }
21266           }
21267           #if CYTHON_FAST_PYCALL
21268           if (PyFunction_Check(__pyx_t_1)) {
21269             PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_pytype_ns, __pyx_kp_u_py};
21270             __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error)
21271             __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21272             __Pyx_GOTREF(__pyx_t_9);
21273           } else
21274           #endif
21275           #if CYTHON_FAST_PYCCALL
21276           if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
21277             PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_pytype_ns, __pyx_kp_u_py};
21278             __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error)
21279             __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
21280             __Pyx_GOTREF(__pyx_t_9);
21281           } else
21282           #endif
21283           {
21284             __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1341, __pyx_L1_error)
21285             __Pyx_GOTREF(__pyx_t_10);
21286             if (__pyx_t_2) {
21287               __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
21288             }
21289             __Pyx_INCREF(__pyx_v_pytype_ns);
21290             __Pyx_GIVEREF(__pyx_v_pytype_ns);
21291             PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_12, __pyx_v_pytype_ns);
21292             __Pyx_INCREF(__pyx_kp_u_py);
21293             __Pyx_GIVEREF(__pyx_kp_u_py);
21294             PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_kp_u_py);
21295             __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error)
21296             __Pyx_GOTREF(__pyx_t_9);
21297             __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21298           }
21299           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21300           __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9);
21301           __pyx_t_9 = 0;
21302         }
21303
21304         /* "lxml/objectify.pyx":1337
21305  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21306  *         if u'{' in name:
21307  *             if name == PYTYPE_ATTRIBUTE:             # <<<<<<<<<<<<<<
21308  *                 if value == TREE_PYTYPE_NAME:
21309  *                     continue
21310  */
21311       }
21312
21313       /* "lxml/objectify.pyx":1342
21314  *                 else:
21315  *                     name = name.replace(pytype_ns, u'py:')
21316  *             name = name.replace(xsi_ns, u'xsi:')             # <<<<<<<<<<<<<<
21317  *         result += f"{indentstr}  * {name} = {value!r}\n"
21318  * 
21319  */
21320       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
21321       __Pyx_GOTREF(__pyx_t_1);
21322       __pyx_t_10 = NULL;
21323       __pyx_t_12 = 0;
21324       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
21325         __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
21326         if (likely(__pyx_t_10)) {
21327           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
21328           __Pyx_INCREF(__pyx_t_10);
21329           __Pyx_INCREF(function);
21330           __Pyx_DECREF_SET(__pyx_t_1, function);
21331           __pyx_t_12 = 1;
21332         }
21333       }
21334       #if CYTHON_FAST_PYCALL
21335       if (PyFunction_Check(__pyx_t_1)) {
21336         PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi};
21337         __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1342, __pyx_L1_error)
21338         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
21339         __Pyx_GOTREF(__pyx_t_9);
21340       } else
21341       #endif
21342       #if CYTHON_FAST_PYCCALL
21343       if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
21344         PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi};
21345         __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1342, __pyx_L1_error)
21346         __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
21347         __Pyx_GOTREF(__pyx_t_9);
21348       } else
21349       #endif
21350       {
21351         __pyx_t_2 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
21352         __Pyx_GOTREF(__pyx_t_2);
21353         if (__pyx_t_10) {
21354           __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); __pyx_t_10 = NULL;
21355         }
21356         __Pyx_INCREF(__pyx_v_xsi_ns);
21357         __Pyx_GIVEREF(__pyx_v_xsi_ns);
21358         PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_12, __pyx_v_xsi_ns);
21359         __Pyx_INCREF(__pyx_kp_u_xsi);
21360         __Pyx_GIVEREF(__pyx_kp_u_xsi);
21361         PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_12, __pyx_kp_u_xsi);
21362         __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1342, __pyx_L1_error)
21363         __Pyx_GOTREF(__pyx_t_9);
21364         __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21365       }
21366       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21367       __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9);
21368       __pyx_t_9 = 0;
21369
21370       /* "lxml/objectify.pyx":1336
21371  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21372  *     for name, value in sorted(cetree.iterattributes(element, 3)):
21373  *         if u'{' in name:             # <<<<<<<<<<<<<<
21374  *             if name == PYTYPE_ATTRIBUTE:
21375  *                 if value == TREE_PYTYPE_NAME:
21376  */
21377     }
21378
21379     /* "lxml/objectify.pyx":1343
21380  *                     name = name.replace(pytype_ns, u'py:')
21381  *             name = name.replace(xsi_ns, u'xsi:')
21382  *         result += f"{indentstr}  * {name} = {value!r}\n"             # <<<<<<<<<<<<<<
21383  * 
21384  *     indent += 1
21385  */
21386     __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error)
21387     __Pyx_GOTREF(__pyx_t_9);
21388     __pyx_t_13 = 0;
21389     __pyx_t_7 = 127;
21390     __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
21391     __Pyx_GOTREF(__pyx_t_1);
21392     __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
21393     __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21394     __Pyx_GIVEREF(__pyx_t_1);
21395     PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
21396     __pyx_t_1 = 0;
21397     __Pyx_INCREF(__pyx_kp_u__14);
21398     __pyx_t_13 += 4;
21399     __Pyx_GIVEREF(__pyx_kp_u__14);
21400     PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u__14);
21401     __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
21402     __Pyx_GOTREF(__pyx_t_1);
21403     __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
21404     __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21405     __Pyx_GIVEREF(__pyx_t_1);
21406     PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_1);
21407     __pyx_t_1 = 0;
21408     __Pyx_INCREF(__pyx_kp_u__11);
21409     __pyx_t_13 += 3;
21410     __Pyx_GIVEREF(__pyx_kp_u__11);
21411     PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u__11);
21412     __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
21413     __Pyx_GOTREF(__pyx_t_1);
21414     __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7;
21415     __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
21416     __Pyx_GIVEREF(__pyx_t_1);
21417     PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_1);
21418     __pyx_t_1 = 0;
21419     __Pyx_INCREF(__pyx_kp_u__15);
21420     __pyx_t_13 += 1;
21421     __Pyx_GIVEREF(__pyx_kp_u__15);
21422     PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_u__15);
21423     __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
21424     __Pyx_GOTREF(__pyx_t_1);
21425     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21426     __pyx_t_9 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error)
21427     __Pyx_GOTREF(__pyx_t_9);
21428     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21429     __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9);
21430     __pyx_t_9 = 0;
21431
21432     /* "lxml/objectify.pyx":1335
21433  *     xsi_ns    = u"{%s}" % XML_SCHEMA_INSTANCE_NS
21434  *     pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
21435  *     for name, value in sorted(cetree.iterattributes(element, 3)):             # <<<<<<<<<<<<<<
21436  *         if u'{' in name:
21437  *             if name == PYTYPE_ATTRIBUTE:
21438  */
21439     __pyx_L6_continue:;
21440   }
21441   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21442
21443   /* "lxml/objectify.pyx":1345
21444  *         result += f"{indentstr}  * {name} = {value!r}\n"
21445  * 
21446  *     indent += 1             # <<<<<<<<<<<<<<
21447  *     for child in element.iterchildren():
21448  *         result += _dump(child, indent)
21449  */
21450   __pyx_v_indent = (__pyx_v_indent + 1);
21451
21452   /* "lxml/objectify.pyx":1346
21453  * 
21454  *     indent += 1
21455  *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
21456  *         result += _dump(child, indent)
21457  *     if indent == 1:
21458  */
21459   __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1346, __pyx_L1_error)
21460   __Pyx_GOTREF(__pyx_t_9);
21461   __pyx_t_1 = NULL;
21462   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
21463     __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
21464     if (likely(__pyx_t_1)) {
21465       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
21466       __Pyx_INCREF(__pyx_t_1);
21467       __Pyx_INCREF(function);
21468       __Pyx_DECREF_SET(__pyx_t_9, function);
21469     }
21470   }
21471   __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
21472   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
21473   if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
21474   __Pyx_GOTREF(__pyx_t_5);
21475   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21476   if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
21477     __pyx_t_9 = __pyx_t_5; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0;
21478     __pyx_t_14 = NULL;
21479   } else {
21480     __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1346, __pyx_L1_error)
21481     __Pyx_GOTREF(__pyx_t_9);
21482     __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1346, __pyx_L1_error)
21483   }
21484   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21485   for (;;) {
21486     if (likely(!__pyx_t_14)) {
21487       if (likely(PyList_CheckExact(__pyx_t_9))) {
21488         if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break;
21489         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21490         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error)
21491         #else
21492         __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
21493         __Pyx_GOTREF(__pyx_t_5);
21494         #endif
21495       } else {
21496         if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
21497         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21498         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error)
21499         #else
21500         __pyx_t_5 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error)
21501         __Pyx_GOTREF(__pyx_t_5);
21502         #endif
21503       }
21504     } else {
21505       __pyx_t_5 = __pyx_t_14(__pyx_t_9);
21506       if (unlikely(!__pyx_t_5)) {
21507         PyObject* exc_type = PyErr_Occurred();
21508         if (exc_type) {
21509           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21510           else __PYX_ERR(0, 1346, __pyx_L1_error)
21511         }
21512         break;
21513       }
21514       __Pyx_GOTREF(__pyx_t_5);
21515     }
21516     __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_5);
21517     __pyx_t_5 = 0;
21518
21519     /* "lxml/objectify.pyx":1347
21520  *     indent += 1
21521  *     for child in element.iterchildren():
21522  *         result += _dump(child, indent)             # <<<<<<<<<<<<<<
21523  *     if indent == 1:
21524  *         return result[:-1] # strip last '\n'
21525  */
21526     if (!(likely(((__pyx_v_child) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1347, __pyx_L1_error)
21527     __pyx_t_5 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1347, __pyx_L1_error)
21528     __Pyx_GOTREF(__pyx_t_5);
21529     __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error)
21530     __Pyx_GOTREF(__pyx_t_1);
21531     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21532     __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
21533     __pyx_t_1 = 0;
21534
21535     /* "lxml/objectify.pyx":1346
21536  * 
21537  *     indent += 1
21538  *     for child in element.iterchildren():             # <<<<<<<<<<<<<<
21539  *         result += _dump(child, indent)
21540  *     if indent == 1:
21541  */
21542   }
21543   __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21544
21545   /* "lxml/objectify.pyx":1348
21546  *     for child in element.iterchildren():
21547  *         result += _dump(child, indent)
21548  *     if indent == 1:             # <<<<<<<<<<<<<<
21549  *         return result[:-1] # strip last '\n'
21550  *     else:
21551  */
21552   __pyx_t_3 = ((__pyx_v_indent == 1) != 0);
21553   if (__pyx_t_3) {
21554
21555     /* "lxml/objectify.pyx":1349
21556  *         result += _dump(child, indent)
21557  *     if indent == 1:
21558  *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
21559  *     else:
21560  *         return result
21561  */
21562     __Pyx_XDECREF(__pyx_r);
21563     __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_result, 0, -1L, NULL, NULL, &__pyx_slice__16, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1349, __pyx_L1_error)
21564     __Pyx_GOTREF(__pyx_t_9);
21565     __pyx_r = __pyx_t_9;
21566     __pyx_t_9 = 0;
21567     goto __pyx_L0;
21568
21569     /* "lxml/objectify.pyx":1348
21570  *     for child in element.iterchildren():
21571  *         result += _dump(child, indent)
21572  *     if indent == 1:             # <<<<<<<<<<<<<<
21573  *         return result[:-1] # strip last '\n'
21574  *     else:
21575  */
21576   }
21577
21578   /* "lxml/objectify.pyx":1351
21579  *         return result[:-1] # strip last '\n'
21580  *     else:
21581  *         return result             # <<<<<<<<<<<<<<
21582  * 
21583  * 
21584  */
21585   /*else*/ {
21586     __Pyx_XDECREF(__pyx_r);
21587     __Pyx_INCREF(__pyx_v_result);
21588     __pyx_r = __pyx_v_result;
21589     goto __pyx_L0;
21590   }
21591
21592   /* "lxml/objectify.pyx":1321
21593  *     return _dump(element, 0)
21594  * 
21595  * cdef object _dump(_Element element, int indent):             # <<<<<<<<<<<<<<
21596  *     indentstr = u"    " * indent
21597  *     if isinstance(element, ObjectifiedDataElement):
21598  */
21599
21600   /* function exit code */
21601   __pyx_L1_error:;
21602   __Pyx_XDECREF(__pyx_t_1);
21603   __Pyx_XDECREF(__pyx_t_2);
21604   __Pyx_XDECREF(__pyx_t_5);
21605   __Pyx_XDECREF(__pyx_t_9);
21606   __Pyx_XDECREF(__pyx_t_10);
21607   __Pyx_AddTraceback("lxml.objectify._dump", __pyx_clineno, __pyx_lineno, __pyx_filename);
21608   __pyx_r = 0;
21609   __pyx_L0:;
21610   __Pyx_XDECREF(__pyx_v_indentstr);
21611   __Pyx_XDECREF(__pyx_v_value);
21612   __Pyx_XDECREF(__pyx_v_result);
21613   __Pyx_XDECREF(__pyx_v_xsi_ns);
21614   __Pyx_XDECREF(__pyx_v_pytype_ns);
21615   __Pyx_XDECREF(__pyx_v_name);
21616   __Pyx_XDECREF(__pyx_v_child);
21617   __Pyx_XGIVEREF(__pyx_r);
21618   __Pyx_RefNannyFinishContext();
21619   return __pyx_r;
21620 }
21621
21622 /* "lxml/objectify.pyx":1357
21623  * # Pickle support for objectified ElementTree
21624  * 
21625  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
21626  *     return etree.ElementTree(fromstring(data))
21627  * 
21628  */
21629
21630 /* Python wrapper */
21631 static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
21632 static PyMethodDef __pyx_mdef_4lxml_9objectify_17__unpickleElementTree = {"__unpickleElementTree", (PyCFunction)__pyx_pw_4lxml_9objectify_17__unpickleElementTree, METH_O, 0};
21633 static PyObject *__pyx_pw_4lxml_9objectify_17__unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
21634   PyObject *__pyx_r = 0;
21635   __Pyx_RefNannyDeclarations
21636   __Pyx_RefNannySetupContext("__unpickleElementTree (wrapper)", 0);
21637   __pyx_r = __pyx_pf_4lxml_9objectify_16__unpickleElementTree(__pyx_self, ((PyObject *)__pyx_v_data));
21638
21639   /* function exit code */
21640   __Pyx_RefNannyFinishContext();
21641   return __pyx_r;
21642 }
21643
21644 static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
21645   PyObject *__pyx_r = NULL;
21646   __Pyx_RefNannyDeclarations
21647   PyObject *__pyx_t_1 = NULL;
21648   PyObject *__pyx_t_2 = NULL;
21649   PyObject *__pyx_t_3 = NULL;
21650   PyObject *__pyx_t_4 = NULL;
21651   PyObject *__pyx_t_5 = NULL;
21652   int __pyx_lineno = 0;
21653   const char *__pyx_filename = NULL;
21654   int __pyx_clineno = 0;
21655   __Pyx_RefNannySetupContext("__unpickleElementTree", 0);
21656
21657   /* "lxml/objectify.pyx":1358
21658  * 
21659  * def __unpickleElementTree(data):
21660  *     return etree.ElementTree(fromstring(data))             # <<<<<<<<<<<<<<
21661  * 
21662  * cdef _setupPickle(elementTreeReduceFunction):
21663  */
21664   __Pyx_XDECREF(__pyx_r);
21665   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error)
21666   __Pyx_GOTREF(__pyx_t_2);
21667   __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1358, __pyx_L1_error)
21668   __Pyx_GOTREF(__pyx_t_4);
21669   __pyx_t_5 = NULL;
21670   if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
21671     __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
21672     if (likely(__pyx_t_5)) {
21673       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
21674       __Pyx_INCREF(__pyx_t_5);
21675       __Pyx_INCREF(function);
21676       __Pyx_DECREF_SET(__pyx_t_4, function);
21677     }
21678   }
21679   __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data);
21680   __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21681   if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1358, __pyx_L1_error)
21682   __Pyx_GOTREF(__pyx_t_3);
21683   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21684   __pyx_t_4 = NULL;
21685   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
21686     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
21687     if (likely(__pyx_t_4)) {
21688       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
21689       __Pyx_INCREF(__pyx_t_4);
21690       __Pyx_INCREF(function);
21691       __Pyx_DECREF_SET(__pyx_t_2, function);
21692     }
21693   }
21694   __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
21695   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21696   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21697   if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error)
21698   __Pyx_GOTREF(__pyx_t_1);
21699   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21700   __pyx_r = __pyx_t_1;
21701   __pyx_t_1 = 0;
21702   goto __pyx_L0;
21703
21704   /* "lxml/objectify.pyx":1357
21705  * # Pickle support for objectified ElementTree
21706  * 
21707  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
21708  *     return etree.ElementTree(fromstring(data))
21709  * 
21710  */
21711
21712   /* function exit code */
21713   __pyx_L1_error:;
21714   __Pyx_XDECREF(__pyx_t_1);
21715   __Pyx_XDECREF(__pyx_t_2);
21716   __Pyx_XDECREF(__pyx_t_3);
21717   __Pyx_XDECREF(__pyx_t_4);
21718   __Pyx_XDECREF(__pyx_t_5);
21719   __Pyx_AddTraceback("lxml.objectify.__unpickleElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
21720   __pyx_r = NULL;
21721   __pyx_L0:;
21722   __Pyx_XGIVEREF(__pyx_r);
21723   __Pyx_RefNannyFinishContext();
21724   return __pyx_r;
21725 }
21726
21727 /* "lxml/objectify.pyx":1360
21728  *     return etree.ElementTree(fromstring(data))
21729  * 
21730  * cdef _setupPickle(elementTreeReduceFunction):             # <<<<<<<<<<<<<<
21731  *     if python.IS_PYTHON2:
21732  *         import copy_reg as copyreg
21733  */
21734
21735 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementTreeReduceFunction) {
21736   PyObject *__pyx_v_copyreg = NULL;
21737   PyObject *__pyx_r = NULL;
21738   __Pyx_RefNannyDeclarations
21739   int __pyx_t_1;
21740   PyObject *__pyx_t_2 = NULL;
21741   PyObject *__pyx_t_3 = NULL;
21742   PyObject *__pyx_t_4 = NULL;
21743   PyObject *__pyx_t_5 = NULL;
21744   PyObject *__pyx_t_6 = NULL;
21745   int __pyx_t_7;
21746   PyObject *__pyx_t_8 = NULL;
21747   int __pyx_lineno = 0;
21748   const char *__pyx_filename = NULL;
21749   int __pyx_clineno = 0;
21750   __Pyx_RefNannySetupContext("_setupPickle", 0);
21751
21752   /* "lxml/objectify.pyx":1361
21753  * 
21754  * cdef _setupPickle(elementTreeReduceFunction):
21755  *     if python.IS_PYTHON2:             # <<<<<<<<<<<<<<
21756  *         import copy_reg as copyreg
21757  *     else:
21758  */
21759   __pyx_t_1 = (IS_PYTHON2 != 0);
21760   if (__pyx_t_1) {
21761
21762     /* "lxml/objectify.pyx":1362
21763  * cdef _setupPickle(elementTreeReduceFunction):
21764  *     if python.IS_PYTHON2:
21765  *         import copy_reg as copyreg             # <<<<<<<<<<<<<<
21766  *     else:
21767  *         import copyreg
21768  */
21769     __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy_reg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
21770     __Pyx_GOTREF(__pyx_t_2);
21771     __pyx_v_copyreg = __pyx_t_2;
21772     __pyx_t_2 = 0;
21773
21774     /* "lxml/objectify.pyx":1361
21775  * 
21776  * cdef _setupPickle(elementTreeReduceFunction):
21777  *     if python.IS_PYTHON2:             # <<<<<<<<<<<<<<
21778  *         import copy_reg as copyreg
21779  *     else:
21780  */
21781     goto __pyx_L3;
21782   }
21783
21784   /* "lxml/objectify.pyx":1364
21785  *         import copy_reg as copyreg
21786  *     else:
21787  *         import copyreg             # <<<<<<<<<<<<<<
21788  *     copyreg.pickle(etree._ElementTree,
21789  *                    elementTreeReduceFunction, __unpickleElementTree)
21790  */
21791   /*else*/ {
21792     __pyx_t_2 = __Pyx_Import(__pyx_n_s_copyreg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
21793     __Pyx_GOTREF(__pyx_t_2);
21794     __pyx_v_copyreg = __pyx_t_2;
21795     __pyx_t_2 = 0;
21796   }
21797   __pyx_L3:;
21798
21799   /* "lxml/objectify.pyx":1365
21800  *     else:
21801  *         import copyreg
21802  *     copyreg.pickle(etree._ElementTree,             # <<<<<<<<<<<<<<
21803  *                    elementTreeReduceFunction, __unpickleElementTree)
21804  * 
21805  */
21806   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copyreg, __pyx_n_s_pickle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1365, __pyx_L1_error)
21807   __Pyx_GOTREF(__pyx_t_3);
21808   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1365, __pyx_L1_error)
21809   __Pyx_GOTREF(__pyx_t_4);
21810
21811   /* "lxml/objectify.pyx":1366
21812  *         import copyreg
21813  *     copyreg.pickle(etree._ElementTree,
21814  *                    elementTreeReduceFunction, __unpickleElementTree)             # <<<<<<<<<<<<<<
21815  * 
21816  * def pickleReduceElementTree(obj):
21817  */
21818   __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error)
21819   __Pyx_GOTREF(__pyx_t_5);
21820   __pyx_t_6 = NULL;
21821   __pyx_t_7 = 0;
21822   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
21823     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
21824     if (likely(__pyx_t_6)) {
21825       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21826       __Pyx_INCREF(__pyx_t_6);
21827       __Pyx_INCREF(function);
21828       __Pyx_DECREF_SET(__pyx_t_3, function);
21829       __pyx_t_7 = 1;
21830     }
21831   }
21832   #if CYTHON_FAST_PYCALL
21833   if (PyFunction_Check(__pyx_t_3)) {
21834     PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5};
21835     __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
21836     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21837     __Pyx_GOTREF(__pyx_t_2);
21838     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21839     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21840   } else
21841   #endif
21842   #if CYTHON_FAST_PYCCALL
21843   if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
21844     PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5};
21845     __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
21846     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
21847     __Pyx_GOTREF(__pyx_t_2);
21848     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21849     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21850   } else
21851   #endif
21852   {
21853     __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1365, __pyx_L1_error)
21854     __Pyx_GOTREF(__pyx_t_8);
21855     if (__pyx_t_6) {
21856       __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
21857     }
21858     __Pyx_GIVEREF(__pyx_t_4);
21859     PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
21860     __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
21861     __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
21862     PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_elementTreeReduceFunction);
21863     __Pyx_GIVEREF(__pyx_t_5);
21864     PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
21865     __pyx_t_4 = 0;
21866     __pyx_t_5 = 0;
21867     __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error)
21868     __Pyx_GOTREF(__pyx_t_2);
21869     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
21870   }
21871   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21872   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21873
21874   /* "lxml/objectify.pyx":1360
21875  *     return etree.ElementTree(fromstring(data))
21876  * 
21877  * cdef _setupPickle(elementTreeReduceFunction):             # <<<<<<<<<<<<<<
21878  *     if python.IS_PYTHON2:
21879  *         import copy_reg as copyreg
21880  */
21881
21882   /* function exit code */
21883   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21884   goto __pyx_L0;
21885   __pyx_L1_error:;
21886   __Pyx_XDECREF(__pyx_t_2);
21887   __Pyx_XDECREF(__pyx_t_3);
21888   __Pyx_XDECREF(__pyx_t_4);
21889   __Pyx_XDECREF(__pyx_t_5);
21890   __Pyx_XDECREF(__pyx_t_6);
21891   __Pyx_XDECREF(__pyx_t_8);
21892   __Pyx_AddTraceback("lxml.objectify._setupPickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
21893   __pyx_r = 0;
21894   __pyx_L0:;
21895   __Pyx_XDECREF(__pyx_v_copyreg);
21896   __Pyx_XGIVEREF(__pyx_r);
21897   __Pyx_RefNannyFinishContext();
21898   return __pyx_r;
21899 }
21900
21901 /* "lxml/objectify.pyx":1368
21902  *                    elementTreeReduceFunction, __unpickleElementTree)
21903  * 
21904  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
21905  *     return __unpickleElementTree, (etree.tostring(obj),)
21906  * 
21907  */
21908
21909 /* Python wrapper */
21910 static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
21911 static PyMethodDef __pyx_mdef_4lxml_9objectify_19pickleReduceElementTree = {"pickleReduceElementTree", (PyCFunction)__pyx_pw_4lxml_9objectify_19pickleReduceElementTree, METH_O, 0};
21912 static PyObject *__pyx_pw_4lxml_9objectify_19pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21913   PyObject *__pyx_r = 0;
21914   __Pyx_RefNannyDeclarations
21915   __Pyx_RefNannySetupContext("pickleReduceElementTree (wrapper)", 0);
21916   __pyx_r = __pyx_pf_4lxml_9objectify_18pickleReduceElementTree(__pyx_self, ((PyObject *)__pyx_v_obj));
21917
21918   /* function exit code */
21919   __Pyx_RefNannyFinishContext();
21920   return __pyx_r;
21921 }
21922
21923 static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
21924   PyObject *__pyx_r = NULL;
21925   __Pyx_RefNannyDeclarations
21926   PyObject *__pyx_t_1 = NULL;
21927   PyObject *__pyx_t_2 = NULL;
21928   PyObject *__pyx_t_3 = NULL;
21929   PyObject *__pyx_t_4 = NULL;
21930   int __pyx_lineno = 0;
21931   const char *__pyx_filename = NULL;
21932   int __pyx_clineno = 0;
21933   __Pyx_RefNannySetupContext("pickleReduceElementTree", 0);
21934
21935   /* "lxml/objectify.pyx":1369
21936  * 
21937  * def pickleReduceElementTree(obj):
21938  *     return __unpickleElementTree, (etree.tostring(obj),)             # <<<<<<<<<<<<<<
21939  * 
21940  * _setupPickle(pickleReduceElementTree)
21941  */
21942   __Pyx_XDECREF(__pyx_r);
21943   __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error)
21944   __Pyx_GOTREF(__pyx_t_1);
21945   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_tostring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L1_error)
21946   __Pyx_GOTREF(__pyx_t_3);
21947   __pyx_t_4 = NULL;
21948   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
21949     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
21950     if (likely(__pyx_t_4)) {
21951       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
21952       __Pyx_INCREF(__pyx_t_4);
21953       __Pyx_INCREF(function);
21954       __Pyx_DECREF_SET(__pyx_t_3, function);
21955     }
21956   }
21957   __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_obj);
21958   __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21959   if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
21960   __Pyx_GOTREF(__pyx_t_2);
21961   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21962   __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L1_error)
21963   __Pyx_GOTREF(__pyx_t_3);
21964   __Pyx_GIVEREF(__pyx_t_2);
21965   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
21966   __pyx_t_2 = 0;
21967   __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
21968   __Pyx_GOTREF(__pyx_t_2);
21969   __Pyx_GIVEREF(__pyx_t_1);
21970   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
21971   __Pyx_GIVEREF(__pyx_t_3);
21972   PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
21973   __pyx_t_1 = 0;
21974   __pyx_t_3 = 0;
21975   __pyx_r = __pyx_t_2;
21976   __pyx_t_2 = 0;
21977   goto __pyx_L0;
21978
21979   /* "lxml/objectify.pyx":1368
21980  *                    elementTreeReduceFunction, __unpickleElementTree)
21981  * 
21982  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
21983  *     return __unpickleElementTree, (etree.tostring(obj),)
21984  * 
21985  */
21986
21987   /* function exit code */
21988   __pyx_L1_error:;
21989   __Pyx_XDECREF(__pyx_t_1);
21990   __Pyx_XDECREF(__pyx_t_2);
21991   __Pyx_XDECREF(__pyx_t_3);
21992   __Pyx_XDECREF(__pyx_t_4);
21993   __Pyx_AddTraceback("lxml.objectify.pickleReduceElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename);
21994   __pyx_r = NULL;
21995   __pyx_L0:;
21996   __Pyx_XGIVEREF(__pyx_r);
21997   __Pyx_RefNannyFinishContext();
21998   return __pyx_r;
21999 }
22000
22001 /* "lxml/objectify.pyx":1383
22002  *     cdef object empty_data_class
22003  *     cdef object tree_class
22004  *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
22005  *         u"""Lookup mechanism for objectify.
22006  * 
22007  */
22008
22009 /* Python wrapper */
22010 static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22011 static char __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__[] = "Lookup mechanism for objectify.\n\n        The default Element classes can be replaced by passing subclasses of\n        ObjectifiedElement and ObjectifiedDataElement as keyword arguments.\n        'tree_class' defines inner tree classes (defaults to\n        ObjectifiedElement), 'empty_data_class' defines the default class for\n        empty data elements (defaults to StringElement).\n        ";
22012 #if CYTHON_COMPILING_IN_CPYTHON
22013 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
22014 #endif
22015 static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22016   PyObject *__pyx_v_tree_class = 0;
22017   PyObject *__pyx_v_empty_data_class = 0;
22018   int __pyx_lineno = 0;
22019   const char *__pyx_filename = NULL;
22020   int __pyx_clineno = 0;
22021   int __pyx_r;
22022   __Pyx_RefNannyDeclarations
22023   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
22024   {
22025     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tree_class,&__pyx_n_s_empty_data_class,0};
22026     PyObject* values[2] = {0,0};
22027     values[0] = ((PyObject *)Py_None);
22028     values[1] = ((PyObject *)Py_None);
22029     if (unlikely(__pyx_kwds)) {
22030       Py_ssize_t kw_args;
22031       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22032       switch (pos_args) {
22033         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22034         CYTHON_FALLTHROUGH;
22035         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22036         CYTHON_FALLTHROUGH;
22037         case  0: break;
22038         default: goto __pyx_L5_argtuple_error;
22039       }
22040       kw_args = PyDict_Size(__pyx_kwds);
22041       switch (pos_args) {
22042         case  0:
22043         if (kw_args > 0) {
22044           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tree_class);
22045           if (value) { values[0] = value; kw_args--; }
22046         }
22047         CYTHON_FALLTHROUGH;
22048         case  1:
22049         if (kw_args > 0) {
22050           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_empty_data_class);
22051           if (value) { values[1] = value; kw_args--; }
22052         }
22053       }
22054       if (unlikely(kw_args > 0)) {
22055         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1383, __pyx_L3_error)
22056       }
22057     } else {
22058       switch (PyTuple_GET_SIZE(__pyx_args)) {
22059         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22060         CYTHON_FALLTHROUGH;
22061         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22062         CYTHON_FALLTHROUGH;
22063         case  0: break;
22064         default: goto __pyx_L5_argtuple_error;
22065       }
22066     }
22067     __pyx_v_tree_class = values[0];
22068     __pyx_v_empty_data_class = values[1];
22069   }
22070   goto __pyx_L4_argument_unpacking_done;
22071   __pyx_L5_argtuple_error:;
22072   __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1383, __pyx_L3_error)
22073   __pyx_L3_error:;
22074   __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22075   __Pyx_RefNannyFinishContext();
22076   return -1;
22077   __pyx_L4_argument_unpacking_done:;
22078   __pyx_r = __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self), __pyx_v_tree_class, __pyx_v_empty_data_class);
22079
22080   /* function exit code */
22081   __Pyx_RefNannyFinishContext();
22082   return __pyx_r;
22083 }
22084
22085 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_self, PyObject *__pyx_v_tree_class, PyObject *__pyx_v_empty_data_class) {
22086   int __pyx_r;
22087   __Pyx_RefNannyDeclarations
22088   int __pyx_t_1;
22089   int __pyx_t_2;
22090   __Pyx_RefNannySetupContext("__init__", 0);
22091   __Pyx_INCREF(__pyx_v_tree_class);
22092   __Pyx_INCREF(__pyx_v_empty_data_class);
22093
22094   /* "lxml/objectify.pyx":1392
22095  *         empty data elements (defaults to StringElement).
22096  *         """
22097  *         self._lookup_function = _lookupElementClass             # <<<<<<<<<<<<<<
22098  *         if tree_class is None:
22099  *             tree_class = ObjectifiedElement
22100  */
22101   __pyx_v_self->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;
22102
22103   /* "lxml/objectify.pyx":1393
22104  *         """
22105  *         self._lookup_function = _lookupElementClass
22106  *         if tree_class is None:             # <<<<<<<<<<<<<<
22107  *             tree_class = ObjectifiedElement
22108  *         self.tree_class = tree_class
22109  */
22110   __pyx_t_1 = (__pyx_v_tree_class == Py_None);
22111   __pyx_t_2 = (__pyx_t_1 != 0);
22112   if (__pyx_t_2) {
22113
22114     /* "lxml/objectify.pyx":1394
22115  *         self._lookup_function = _lookupElementClass
22116  *         if tree_class is None:
22117  *             tree_class = ObjectifiedElement             # <<<<<<<<<<<<<<
22118  *         self.tree_class = tree_class
22119  *         if empty_data_class is None:
22120  */
22121     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
22122     __Pyx_DECREF_SET(__pyx_v_tree_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
22123
22124     /* "lxml/objectify.pyx":1393
22125  *         """
22126  *         self._lookup_function = _lookupElementClass
22127  *         if tree_class is None:             # <<<<<<<<<<<<<<
22128  *             tree_class = ObjectifiedElement
22129  *         self.tree_class = tree_class
22130  */
22131   }
22132
22133   /* "lxml/objectify.pyx":1395
22134  *         if tree_class is None:
22135  *             tree_class = ObjectifiedElement
22136  *         self.tree_class = tree_class             # <<<<<<<<<<<<<<
22137  *         if empty_data_class is None:
22138  *             empty_data_class = StringElement
22139  */
22140   __Pyx_INCREF(__pyx_v_tree_class);
22141   __Pyx_GIVEREF(__pyx_v_tree_class);
22142   __Pyx_GOTREF(__pyx_v_self->tree_class);
22143   __Pyx_DECREF(__pyx_v_self->tree_class);
22144   __pyx_v_self->tree_class = __pyx_v_tree_class;
22145
22146   /* "lxml/objectify.pyx":1396
22147  *             tree_class = ObjectifiedElement
22148  *         self.tree_class = tree_class
22149  *         if empty_data_class is None:             # <<<<<<<<<<<<<<
22150  *             empty_data_class = StringElement
22151  *         self.empty_data_class = empty_data_class
22152  */
22153   __pyx_t_2 = (__pyx_v_empty_data_class == Py_None);
22154   __pyx_t_1 = (__pyx_t_2 != 0);
22155   if (__pyx_t_1) {
22156
22157     /* "lxml/objectify.pyx":1397
22158  *         self.tree_class = tree_class
22159  *         if empty_data_class is None:
22160  *             empty_data_class = StringElement             # <<<<<<<<<<<<<<
22161  *         self.empty_data_class = empty_data_class
22162  * 
22163  */
22164     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
22165     __Pyx_DECREF_SET(__pyx_v_empty_data_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement));
22166
22167     /* "lxml/objectify.pyx":1396
22168  *             tree_class = ObjectifiedElement
22169  *         self.tree_class = tree_class
22170  *         if empty_data_class is None:             # <<<<<<<<<<<<<<
22171  *             empty_data_class = StringElement
22172  *         self.empty_data_class = empty_data_class
22173  */
22174   }
22175
22176   /* "lxml/objectify.pyx":1398
22177  *         if empty_data_class is None:
22178  *             empty_data_class = StringElement
22179  *         self.empty_data_class = empty_data_class             # <<<<<<<<<<<<<<
22180  * 
22181  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
22182  */
22183   __Pyx_INCREF(__pyx_v_empty_data_class);
22184   __Pyx_GIVEREF(__pyx_v_empty_data_class);
22185   __Pyx_GOTREF(__pyx_v_self->empty_data_class);
22186   __Pyx_DECREF(__pyx_v_self->empty_data_class);
22187   __pyx_v_self->empty_data_class = __pyx_v_empty_data_class;
22188
22189   /* "lxml/objectify.pyx":1383
22190  *     cdef object empty_data_class
22191  *     cdef object tree_class
22192  *     def __init__(self, tree_class=None, empty_data_class=None):             # <<<<<<<<<<<<<<
22193  *         u"""Lookup mechanism for objectify.
22194  * 
22195  */
22196
22197   /* function exit code */
22198   __pyx_r = 0;
22199   __Pyx_XDECREF(__pyx_v_tree_class);
22200   __Pyx_XDECREF(__pyx_v_empty_data_class);
22201   __Pyx_RefNannyFinishContext();
22202   return __pyx_r;
22203 }
22204
22205 /* "lxml/objectify.pyx":1400
22206  *         self.empty_data_class = empty_data_class
22207  * 
22208  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
22209  *     cdef ObjectifyElementClassLookup lookup
22210  *     lookup = <ObjectifyElementClassLookup>state
22211  */
22212
22213 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state, CYTHON_UNUSED struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
22214   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup = 0;
22215   PyObject *__pyx_v_value = NULL;
22216   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
22217   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_schema_type = NULL;
22218   CYTHON_UNUSED PyObject *__pyx_v_prefix = NULL;
22219   PyObject *__pyx_v_el_class = NULL;
22220   PyObject *__pyx_r = NULL;
22221   __Pyx_RefNannyDeclarations
22222   PyObject *__pyx_t_1 = NULL;
22223   int __pyx_t_2;
22224   int __pyx_t_3;
22225   PyObject *__pyx_t_4 = NULL;
22226   int __pyx_t_5;
22227   PyObject *__pyx_t_6 = NULL;
22228   PyObject *__pyx_t_7 = NULL;
22229   PyObject *(*__pyx_t_8)(PyObject *);
22230   int __pyx_lineno = 0;
22231   const char *__pyx_filename = NULL;
22232   int __pyx_clineno = 0;
22233   __Pyx_RefNannySetupContext("_lookupElementClass", 0);
22234
22235   /* "lxml/objectify.pyx":1402
22236  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
22237  *     cdef ObjectifyElementClassLookup lookup
22238  *     lookup = <ObjectifyElementClassLookup>state             # <<<<<<<<<<<<<<
22239  *     # if element has children => no data class
22240  *     if cetree.hasChild(c_node):
22241  */
22242   __pyx_t_1 = __pyx_v_state;
22243   __Pyx_INCREF(__pyx_t_1);
22244   __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_t_1);
22245   __pyx_t_1 = 0;
22246
22247   /* "lxml/objectify.pyx":1404
22248  *     lookup = <ObjectifyElementClassLookup>state
22249  *     # if element has children => no data class
22250  *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
22251  *         return lookup.tree_class
22252  * 
22253  */
22254   __pyx_t_2 = (hasChild(__pyx_v_c_node) != 0);
22255   if (__pyx_t_2) {
22256
22257     /* "lxml/objectify.pyx":1405
22258  *     # if element has children => no data class
22259  *     if cetree.hasChild(c_node):
22260  *         return lookup.tree_class             # <<<<<<<<<<<<<<
22261  * 
22262  *     # if element is defined as xsi:nil, return NoneElement class
22263  */
22264     __Pyx_XDECREF(__pyx_r);
22265     __Pyx_INCREF(__pyx_v_lookup->tree_class);
22266     __pyx_r = __pyx_v_lookup->tree_class;
22267     goto __pyx_L0;
22268
22269     /* "lxml/objectify.pyx":1404
22270  *     lookup = <ObjectifyElementClassLookup>state
22271  *     # if element has children => no data class
22272  *     if cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
22273  *         return lookup.tree_class
22274  * 
22275  */
22276   }
22277
22278   /* "lxml/objectify.pyx":1408
22279  * 
22280  *     # if element is defined as xsi:nil, return NoneElement class
22281  *     if u"true" == cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22282  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22283  *         return NoneElement
22284  */
22285   __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
22286   __Pyx_GOTREF(__pyx_t_1);
22287   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_n_u_true, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1408, __pyx_L1_error)
22288   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22289   if (__pyx_t_2) {
22290
22291     /* "lxml/objectify.pyx":1410
22292  *     if u"true" == cetree.attributeValueFromNsName(
22293  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22294  *         return NoneElement             # <<<<<<<<<<<<<<
22295  * 
22296  *     # check for Python type hint
22297  */
22298     __Pyx_XDECREF(__pyx_r);
22299     __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement));
22300     __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement);
22301     goto __pyx_L0;
22302
22303     /* "lxml/objectify.pyx":1408
22304  * 
22305  *     # if element is defined as xsi:nil, return NoneElement class
22306  *     if u"true" == cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22307  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil"):
22308  *         return NoneElement
22309  */
22310   }
22311
22312   /* "lxml/objectify.pyx":1413
22313  * 
22314  *     # check for Python type hint
22315  *     value = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22316  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22317  *     if value is not None:
22318  */
22319   __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
22320   __Pyx_GOTREF(__pyx_t_1);
22321   __pyx_v_value = __pyx_t_1;
22322   __pyx_t_1 = 0;
22323
22324   /* "lxml/objectify.pyx":1415
22325  *     value = cetree.attributeValueFromNsName(
22326  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22327  *     if value is not None:             # <<<<<<<<<<<<<<
22328  *         if value == TREE_PYTYPE_NAME:
22329  *             return lookup.tree_class
22330  */
22331   __pyx_t_2 = (__pyx_v_value != Py_None);
22332   __pyx_t_3 = (__pyx_t_2 != 0);
22333   if (__pyx_t_3) {
22334
22335     /* "lxml/objectify.pyx":1416
22336  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22337  *     if value is not None:
22338  *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
22339  *             return lookup.tree_class
22340  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22341  */
22342     __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
22343     if (__pyx_t_3) {
22344
22345       /* "lxml/objectify.pyx":1417
22346  *     if value is not None:
22347  *         if value == TREE_PYTYPE_NAME:
22348  *             return lookup.tree_class             # <<<<<<<<<<<<<<
22349  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22350  *         if py_type is not None:
22351  */
22352       __Pyx_XDECREF(__pyx_r);
22353       __Pyx_INCREF(__pyx_v_lookup->tree_class);
22354       __pyx_r = __pyx_v_lookup->tree_class;
22355       goto __pyx_L0;
22356
22357       /* "lxml/objectify.pyx":1416
22358  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22359  *     if value is not None:
22360  *         if value == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
22361  *             return lookup.tree_class
22362  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22363  */
22364     }
22365
22366     /* "lxml/objectify.pyx":1418
22367  *         if value == TREE_PYTYPE_NAME:
22368  *             return lookup.tree_class
22369  *         py_type = <PyType>_PYTYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22370  *         if py_type is not None:
22371  *             return py_type._type
22372  */
22373     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
22374       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22375       __PYX_ERR(0, 1418, __pyx_L1_error)
22376     }
22377     __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
22378     __Pyx_GOTREF(__pyx_t_1);
22379     __pyx_t_4 = __pyx_t_1;
22380     __Pyx_INCREF(__pyx_t_4);
22381     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22382     __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
22383     __pyx_t_4 = 0;
22384
22385     /* "lxml/objectify.pyx":1419
22386  *             return lookup.tree_class
22387  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22388  *         if py_type is not None:             # <<<<<<<<<<<<<<
22389  *             return py_type._type
22390  *         # unknown 'pyval' => try to figure it out ourself, just go on
22391  */
22392     __pyx_t_3 = (((PyObject *)__pyx_v_py_type) != Py_None);
22393     __pyx_t_2 = (__pyx_t_3 != 0);
22394     if (__pyx_t_2) {
22395
22396       /* "lxml/objectify.pyx":1420
22397  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22398  *         if py_type is not None:
22399  *             return py_type._type             # <<<<<<<<<<<<<<
22400  *         # unknown 'pyval' => try to figure it out ourself, just go on
22401  * 
22402  */
22403       __Pyx_XDECREF(__pyx_r);
22404       __Pyx_INCREF(__pyx_v_py_type->_type);
22405       __pyx_r = __pyx_v_py_type->_type;
22406       goto __pyx_L0;
22407
22408       /* "lxml/objectify.pyx":1419
22409  *             return lookup.tree_class
22410  *         py_type = <PyType>_PYTYPE_DICT.get(value)
22411  *         if py_type is not None:             # <<<<<<<<<<<<<<
22412  *             return py_type._type
22413  *         # unknown 'pyval' => try to figure it out ourself, just go on
22414  */
22415     }
22416
22417     /* "lxml/objectify.pyx":1415
22418  *     value = cetree.attributeValueFromNsName(
22419  *         c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
22420  *     if value is not None:             # <<<<<<<<<<<<<<
22421  *         if value == TREE_PYTYPE_NAME:
22422  *             return lookup.tree_class
22423  */
22424   }
22425
22426   /* "lxml/objectify.pyx":1424
22427  * 
22428  *     # check for XML Schema type hint
22429  *     value = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
22430  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22431  * 
22432  */
22433   __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error)
22434   __Pyx_GOTREF(__pyx_t_4);
22435   __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4);
22436   __pyx_t_4 = 0;
22437
22438   /* "lxml/objectify.pyx":1427
22439  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22440  * 
22441  *     if value is not None:             # <<<<<<<<<<<<<<
22442  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22443  *         if schema_type is None and u':' in value:
22444  */
22445   __pyx_t_2 = (__pyx_v_value != Py_None);
22446   __pyx_t_3 = (__pyx_t_2 != 0);
22447   if (__pyx_t_3) {
22448
22449     /* "lxml/objectify.pyx":1428
22450  * 
22451  *     if value is not None:
22452  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22453  *         if schema_type is None and u':' in value:
22454  *             prefix, value = value.split(u':', 1)
22455  */
22456     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
22457       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22458       __PYX_ERR(0, 1428, __pyx_L1_error)
22459     }
22460     __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error)
22461     __Pyx_GOTREF(__pyx_t_4);
22462     __pyx_t_1 = __pyx_t_4;
22463     __Pyx_INCREF(__pyx_t_1);
22464     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22465     __pyx_v_schema_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1);
22466     __pyx_t_1 = 0;
22467
22468     /* "lxml/objectify.pyx":1429
22469  *     if value is not None:
22470  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22471  *         if schema_type is None and u':' in value:             # <<<<<<<<<<<<<<
22472  *             prefix, value = value.split(u':', 1)
22473  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22474  */
22475     __pyx_t_2 = (((PyObject *)__pyx_v_schema_type) == Py_None);
22476     __pyx_t_5 = (__pyx_t_2 != 0);
22477     if (__pyx_t_5) {
22478     } else {
22479       __pyx_t_3 = __pyx_t_5;
22480       goto __pyx_L10_bool_binop_done;
22481     }
22482     __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1429, __pyx_L1_error)
22483     __pyx_t_2 = (__pyx_t_5 != 0);
22484     __pyx_t_3 = __pyx_t_2;
22485     __pyx_L10_bool_binop_done:;
22486     if (__pyx_t_3) {
22487
22488       /* "lxml/objectify.pyx":1430
22489  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22490  *         if schema_type is None and u':' in value:
22491  *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
22492  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22493  *         if schema_type is not None:
22494  */
22495       __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error)
22496       __Pyx_GOTREF(__pyx_t_1);
22497       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error)
22498       __Pyx_GOTREF(__pyx_t_4);
22499       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22500       if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
22501         PyObject* sequence = __pyx_t_4;
22502         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
22503         if (unlikely(size != 2)) {
22504           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
22505           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
22506           __PYX_ERR(0, 1430, __pyx_L1_error)
22507         }
22508         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22509         if (likely(PyTuple_CheckExact(sequence))) {
22510           __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
22511           __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
22512         } else {
22513           __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
22514           __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
22515         }
22516         __Pyx_INCREF(__pyx_t_1);
22517         __Pyx_INCREF(__pyx_t_6);
22518         #else
22519         __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error)
22520         __Pyx_GOTREF(__pyx_t_1);
22521         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1430, __pyx_L1_error)
22522         __Pyx_GOTREF(__pyx_t_6);
22523         #endif
22524         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22525       } else {
22526         Py_ssize_t index = -1;
22527         __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1430, __pyx_L1_error)
22528         __Pyx_GOTREF(__pyx_t_7);
22529         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22530         __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
22531         index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
22532         __Pyx_GOTREF(__pyx_t_1);
22533         index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed;
22534         __Pyx_GOTREF(__pyx_t_6);
22535         if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1430, __pyx_L1_error)
22536         __pyx_t_8 = NULL;
22537         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22538         goto __pyx_L13_unpacking_done;
22539         __pyx_L12_unpacking_failed:;
22540         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22541         __pyx_t_8 = NULL;
22542         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
22543         __PYX_ERR(0, 1430, __pyx_L1_error)
22544         __pyx_L13_unpacking_done:;
22545       }
22546       __pyx_v_prefix = __pyx_t_1;
22547       __pyx_t_1 = 0;
22548       __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6);
22549       __pyx_t_6 = 0;
22550
22551       /* "lxml/objectify.pyx":1431
22552  *         if schema_type is None and u':' in value:
22553  *             prefix, value = value.split(u':', 1)
22554  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)             # <<<<<<<<<<<<<<
22555  *         if schema_type is not None:
22556  *             return schema_type._type
22557  */
22558       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
22559         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
22560         __PYX_ERR(0, 1431, __pyx_L1_error)
22561       }
22562       __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1431, __pyx_L1_error)
22563       __Pyx_GOTREF(__pyx_t_4);
22564       __pyx_t_6 = __pyx_t_4;
22565       __Pyx_INCREF(__pyx_t_6);
22566       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22567       __Pyx_DECREF_SET(__pyx_v_schema_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
22568       __pyx_t_6 = 0;
22569
22570       /* "lxml/objectify.pyx":1429
22571  *     if value is not None:
22572  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22573  *         if schema_type is None and u':' in value:             # <<<<<<<<<<<<<<
22574  *             prefix, value = value.split(u':', 1)
22575  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22576  */
22577     }
22578
22579     /* "lxml/objectify.pyx":1432
22580  *             prefix, value = value.split(u':', 1)
22581  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22582  *         if schema_type is not None:             # <<<<<<<<<<<<<<
22583  *             return schema_type._type
22584  * 
22585  */
22586     __pyx_t_3 = (((PyObject *)__pyx_v_schema_type) != Py_None);
22587     __pyx_t_2 = (__pyx_t_3 != 0);
22588     if (__pyx_t_2) {
22589
22590       /* "lxml/objectify.pyx":1433
22591  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22592  *         if schema_type is not None:
22593  *             return schema_type._type             # <<<<<<<<<<<<<<
22594  * 
22595  *     # otherwise determine class based on text content type
22596  */
22597       __Pyx_XDECREF(__pyx_r);
22598       __Pyx_INCREF(__pyx_v_schema_type->_type);
22599       __pyx_r = __pyx_v_schema_type->_type;
22600       goto __pyx_L0;
22601
22602       /* "lxml/objectify.pyx":1432
22603  *             prefix, value = value.split(u':', 1)
22604  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22605  *         if schema_type is not None:             # <<<<<<<<<<<<<<
22606  *             return schema_type._type
22607  * 
22608  */
22609     }
22610
22611     /* "lxml/objectify.pyx":1427
22612  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
22613  * 
22614  *     if value is not None:             # <<<<<<<<<<<<<<
22615  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
22616  *         if schema_type is None and u':' in value:
22617  */
22618   }
22619
22620   /* "lxml/objectify.pyx":1436
22621  * 
22622  *     # otherwise determine class based on text content type
22623  *     el_class = _guessElementClass(c_node)             # <<<<<<<<<<<<<<
22624  *     if el_class is not None:
22625  *         return el_class
22626  */
22627   __pyx_t_6 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1436, __pyx_L1_error)
22628   __Pyx_GOTREF(__pyx_t_6);
22629   __pyx_v_el_class = __pyx_t_6;
22630   __pyx_t_6 = 0;
22631
22632   /* "lxml/objectify.pyx":1437
22633  *     # otherwise determine class based on text content type
22634  *     el_class = _guessElementClass(c_node)
22635  *     if el_class is not None:             # <<<<<<<<<<<<<<
22636  *         return el_class
22637  * 
22638  */
22639   __pyx_t_2 = (__pyx_v_el_class != Py_None);
22640   __pyx_t_3 = (__pyx_t_2 != 0);
22641   if (__pyx_t_3) {
22642
22643     /* "lxml/objectify.pyx":1438
22644  *     el_class = _guessElementClass(c_node)
22645  *     if el_class is not None:
22646  *         return el_class             # <<<<<<<<<<<<<<
22647  * 
22648  *     # if element is a root node => default to tree node
22649  */
22650     __Pyx_XDECREF(__pyx_r);
22651     __Pyx_INCREF(__pyx_v_el_class);
22652     __pyx_r = __pyx_v_el_class;
22653     goto __pyx_L0;
22654
22655     /* "lxml/objectify.pyx":1437
22656  *     # otherwise determine class based on text content type
22657  *     el_class = _guessElementClass(c_node)
22658  *     if el_class is not None:             # <<<<<<<<<<<<<<
22659  *         return el_class
22660  * 
22661  */
22662   }
22663
22664   /* "lxml/objectify.pyx":1441
22665  * 
22666  *     # if element is a root node => default to tree node
22667  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
22668  *         return lookup.tree_class
22669  * 
22670  */
22671   __pyx_t_2 = ((__pyx_v_c_node->parent == NULL) != 0);
22672   if (!__pyx_t_2) {
22673   } else {
22674     __pyx_t_3 = __pyx_t_2;
22675     goto __pyx_L17_bool_binop_done;
22676   }
22677   __pyx_t_2 = ((!(_isElement(__pyx_v_c_node->parent) != 0)) != 0);
22678   __pyx_t_3 = __pyx_t_2;
22679   __pyx_L17_bool_binop_done:;
22680   if (__pyx_t_3) {
22681
22682     /* "lxml/objectify.pyx":1442
22683  *     # if element is a root node => default to tree node
22684  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):
22685  *         return lookup.tree_class             # <<<<<<<<<<<<<<
22686  * 
22687  *     return lookup.empty_data_class
22688  */
22689     __Pyx_XDECREF(__pyx_r);
22690     __Pyx_INCREF(__pyx_v_lookup->tree_class);
22691     __pyx_r = __pyx_v_lookup->tree_class;
22692     goto __pyx_L0;
22693
22694     /* "lxml/objectify.pyx":1441
22695  * 
22696  *     # if element is a root node => default to tree node
22697  *     if c_node.parent is NULL or not tree._isElement(c_node.parent):             # <<<<<<<<<<<<<<
22698  *         return lookup.tree_class
22699  * 
22700  */
22701   }
22702
22703   /* "lxml/objectify.pyx":1444
22704  *         return lookup.tree_class
22705  * 
22706  *     return lookup.empty_data_class             # <<<<<<<<<<<<<<
22707  * 
22708  * 
22709  */
22710   __Pyx_XDECREF(__pyx_r);
22711   __Pyx_INCREF(__pyx_v_lookup->empty_data_class);
22712   __pyx_r = __pyx_v_lookup->empty_data_class;
22713   goto __pyx_L0;
22714
22715   /* "lxml/objectify.pyx":1400
22716  *         self.empty_data_class = empty_data_class
22717  * 
22718  * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):             # <<<<<<<<<<<<<<
22719  *     cdef ObjectifyElementClassLookup lookup
22720  *     lookup = <ObjectifyElementClassLookup>state
22721  */
22722
22723   /* function exit code */
22724   __pyx_L1_error:;
22725   __Pyx_XDECREF(__pyx_t_1);
22726   __Pyx_XDECREF(__pyx_t_4);
22727   __Pyx_XDECREF(__pyx_t_6);
22728   __Pyx_XDECREF(__pyx_t_7);
22729   __Pyx_AddTraceback("lxml.objectify._lookupElementClass", __pyx_clineno, __pyx_lineno, __pyx_filename);
22730   __pyx_r = 0;
22731   __pyx_L0:;
22732   __Pyx_XDECREF((PyObject *)__pyx_v_lookup);
22733   __Pyx_XDECREF(__pyx_v_value);
22734   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
22735   __Pyx_XDECREF((PyObject *)__pyx_v_schema_type);
22736   __Pyx_XDECREF(__pyx_v_prefix);
22737   __Pyx_XDECREF(__pyx_v_el_class);
22738   __Pyx_XGIVEREF(__pyx_r);
22739   __Pyx_RefNannyFinishContext();
22740   return __pyx_r;
22741 }
22742
22743 /* "lxml/objectify.pyx":1450
22744  * # Type annotations
22745  * 
22746  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
22747  *     if pytype is None:
22748  *         return None
22749  */
22750
22751 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *__pyx_v_c_node, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype) {
22752   PyObject *__pyx_v_value = NULL;
22753   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
22754   __Pyx_RefNannyDeclarations
22755   int __pyx_t_1;
22756   int __pyx_t_2;
22757   PyObject *__pyx_t_3 = NULL;
22758   PyObject *__pyx_t_4 = NULL;
22759   PyObject *__pyx_t_5 = NULL;
22760   PyObject *__pyx_t_6 = NULL;
22761   PyObject *__pyx_t_7 = NULL;
22762   PyObject *__pyx_t_8 = NULL;
22763   int __pyx_t_9;
22764   int __pyx_lineno = 0;
22765   const char *__pyx_filename = NULL;
22766   int __pyx_clineno = 0;
22767   __Pyx_RefNannySetupContext("_check_type", 0);
22768
22769   /* "lxml/objectify.pyx":1451
22770  * 
22771  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22772  *     if pytype is None:             # <<<<<<<<<<<<<<
22773  *         return None
22774  *     value = textOf(c_node)
22775  */
22776   __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
22777   __pyx_t_2 = (__pyx_t_1 != 0);
22778   if (__pyx_t_2) {
22779
22780     /* "lxml/objectify.pyx":1452
22781  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22782  *     if pytype is None:
22783  *         return None             # <<<<<<<<<<<<<<
22784  *     value = textOf(c_node)
22785  *     try:
22786  */
22787     __Pyx_XDECREF(((PyObject *)__pyx_r));
22788     __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
22789     goto __pyx_L0;
22790
22791     /* "lxml/objectify.pyx":1451
22792  * 
22793  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
22794  *     if pytype is None:             # <<<<<<<<<<<<<<
22795  *         return None
22796  *     value = textOf(c_node)
22797  */
22798   }
22799
22800   /* "lxml/objectify.pyx":1453
22801  *     if pytype is None:
22802  *         return None
22803  *     value = textOf(c_node)             # <<<<<<<<<<<<<<
22804  *     try:
22805  *         pytype.type_check(value)
22806  */
22807   __pyx_t_3 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error)
22808   __Pyx_GOTREF(__pyx_t_3);
22809   __pyx_v_value = __pyx_t_3;
22810   __pyx_t_3 = 0;
22811
22812   /* "lxml/objectify.pyx":1454
22813  *         return None
22814  *     value = textOf(c_node)
22815  *     try:             # <<<<<<<<<<<<<<
22816  *         pytype.type_check(value)
22817  *         return pytype
22818  */
22819   {
22820     __Pyx_PyThreadState_declare
22821     __Pyx_PyThreadState_assign
22822     __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
22823     __Pyx_XGOTREF(__pyx_t_4);
22824     __Pyx_XGOTREF(__pyx_t_5);
22825     __Pyx_XGOTREF(__pyx_t_6);
22826     /*try:*/ {
22827
22828       /* "lxml/objectify.pyx":1455
22829  *     value = textOf(c_node)
22830  *     try:
22831  *         pytype.type_check(value)             # <<<<<<<<<<<<<<
22832  *         return pytype
22833  *     except IGNORABLE_ERRORS:
22834  */
22835       __Pyx_INCREF(__pyx_v_pytype->type_check);
22836       __pyx_t_7 = __pyx_v_pytype->type_check; __pyx_t_8 = NULL;
22837       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
22838         __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
22839         if (likely(__pyx_t_8)) {
22840           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
22841           __Pyx_INCREF(__pyx_t_8);
22842           __Pyx_INCREF(function);
22843           __Pyx_DECREF_SET(__pyx_t_7, function);
22844         }
22845       }
22846       __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value);
22847       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22848       if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L4_error)
22849       __Pyx_GOTREF(__pyx_t_3);
22850       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
22851       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22852
22853       /* "lxml/objectify.pyx":1456
22854  *     try:
22855  *         pytype.type_check(value)
22856  *         return pytype             # <<<<<<<<<<<<<<
22857  *     except IGNORABLE_ERRORS:
22858  *         # could not be parsed as the specified type => ignore
22859  */
22860       __Pyx_XDECREF(((PyObject *)__pyx_r));
22861       __Pyx_INCREF(((PyObject *)__pyx_v_pytype));
22862       __pyx_r = __pyx_v_pytype;
22863       goto __pyx_L8_try_return;
22864
22865       /* "lxml/objectify.pyx":1454
22866  *         return None
22867  *     value = textOf(c_node)
22868  *     try:             # <<<<<<<<<<<<<<
22869  *         pytype.type_check(value)
22870  *         return pytype
22871  */
22872     }
22873     __pyx_L4_error:;
22874     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
22875     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
22876     __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
22877
22878     /* "lxml/objectify.pyx":1457
22879  *         pytype.type_check(value)
22880  *         return pytype
22881  *     except IGNORABLE_ERRORS:             # <<<<<<<<<<<<<<
22882  *         # could not be parsed as the specified type => ignore
22883  *         pass
22884  */
22885     __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
22886     if (__pyx_t_9) {
22887       __Pyx_ErrRestore(0,0,0);
22888       goto __pyx_L5_exception_handled;
22889     }
22890     goto __pyx_L6_except_error;
22891     __pyx_L6_except_error:;
22892
22893     /* "lxml/objectify.pyx":1454
22894  *         return None
22895  *     value = textOf(c_node)
22896  *     try:             # <<<<<<<<<<<<<<
22897  *         pytype.type_check(value)
22898  *         return pytype
22899  */
22900     __Pyx_XGIVEREF(__pyx_t_4);
22901     __Pyx_XGIVEREF(__pyx_t_5);
22902     __Pyx_XGIVEREF(__pyx_t_6);
22903     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22904     goto __pyx_L1_error;
22905     __pyx_L8_try_return:;
22906     __Pyx_XGIVEREF(__pyx_t_4);
22907     __Pyx_XGIVEREF(__pyx_t_5);
22908     __Pyx_XGIVEREF(__pyx_t_6);
22909     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22910     goto __pyx_L0;
22911     __pyx_L5_exception_handled:;
22912     __Pyx_XGIVEREF(__pyx_t_4);
22913     __Pyx_XGIVEREF(__pyx_t_5);
22914     __Pyx_XGIVEREF(__pyx_t_6);
22915     __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
22916   }
22917
22918   /* "lxml/objectify.pyx":1460
22919  *         # could not be parsed as the specified type => ignore
22920  *         pass
22921  *     return None             # <<<<<<<<<<<<<<
22922  * 
22923  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
22924  */
22925   __Pyx_XDECREF(((PyObject *)__pyx_r));
22926   __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
22927   goto __pyx_L0;
22928
22929   /* "lxml/objectify.pyx":1450
22930  * # Type annotations
22931  * 
22932  * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):             # <<<<<<<<<<<<<<
22933  *     if pytype is None:
22934  *         return None
22935  */
22936
22937   /* function exit code */
22938   __pyx_L1_error:;
22939   __Pyx_XDECREF(__pyx_t_3);
22940   __Pyx_XDECREF(__pyx_t_7);
22941   __Pyx_XDECREF(__pyx_t_8);
22942   __Pyx_AddTraceback("lxml.objectify._check_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
22943   __pyx_r = 0;
22944   __pyx_L0:;
22945   __Pyx_XDECREF(__pyx_v_value);
22946   __Pyx_XGIVEREF((PyObject *)__pyx_r);
22947   __Pyx_RefNannyFinishContext();
22948   return __pyx_r;
22949 }
22950
22951 /* "lxml/objectify.pyx":1462
22952  *     return None
22953  * 
22954  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
22955  *              empty_pytype=None):
22956  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
22957  */
22958
22959 /* Python wrapper */
22960 static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22961 static char __pyx_doc_4lxml_9objectify_20pyannotate[] = "pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)\n\n    Recursively annotates the elements of an XML tree with 'pytype'\n    attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current 'pytype'\n    attributes will be ignored and replaced.  Otherwise, they will be checked\n    and only replaced if they no longer fit the current text value.\n\n    Setting the keyword argument ``ignore_xsi`` to True makes the function\n    additionally ignore existing ``xsi:type`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'str', for example, to make string values the default.\n    ";
22962 static PyMethodDef __pyx_mdef_4lxml_9objectify_21pyannotate = {"pyannotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_21pyannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_20pyannotate};
22963 static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22964   PyObject *__pyx_v_element_or_tree = 0;
22965   PyObject *__pyx_v_ignore_old = 0;
22966   PyObject *__pyx_v_ignore_xsi = 0;
22967   PyObject *__pyx_v_empty_pytype = 0;
22968   int __pyx_lineno = 0;
22969   const char *__pyx_filename = NULL;
22970   int __pyx_clineno = 0;
22971   PyObject *__pyx_r = 0;
22972   __Pyx_RefNannyDeclarations
22973   __Pyx_RefNannySetupContext("pyannotate (wrapper)", 0);
22974   {
22975     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element_or_tree,&__pyx_n_s_ignore_old,&__pyx_n_s_ignore_xsi,&__pyx_n_s_empty_pytype,0};
22976     PyObject* values[4] = {0,0,0,0};
22977     values[1] = ((PyObject *)((PyObject *)Py_False));
22978     values[2] = ((PyObject *)((PyObject *)Py_False));
22979
22980     /* "lxml/objectify.pyx":1463
22981  * 
22982  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
22983  *              empty_pytype=None):             # <<<<<<<<<<<<<<
22984  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
22985  * 
22986  */
22987     values[3] = ((PyObject *)((PyObject *)Py_None));
22988     if (unlikely(__pyx_kwds)) {
22989       Py_ssize_t kw_args;
22990       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22991       switch (pos_args) {
22992         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22993         CYTHON_FALLTHROUGH;
22994         case  0: break;
22995         default: goto __pyx_L5_argtuple_error;
22996       }
22997       kw_args = PyDict_Size(__pyx_kwds);
22998       switch (pos_args) {
22999         case  0:
23000         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23001         else goto __pyx_L5_argtuple_error;
23002       }
23003       if (kw_args > 0 && likely(kw_args <= 3)) {
23004         Py_ssize_t index;
23005         for (index = 1; index < 4 && kw_args > 0; index++) {
23006           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23007           if (value) { values[index] = value; kw_args--; }
23008         }
23009       }
23010       if (unlikely(kw_args > 0)) {
23011         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pyannotate") < 0)) __PYX_ERR(0, 1462, __pyx_L3_error)
23012       }
23013     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23014       goto __pyx_L5_argtuple_error;
23015     } else {
23016       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23017     }
23018     __pyx_v_element_or_tree = values[0];
23019     __pyx_v_ignore_old = values[1];
23020     __pyx_v_ignore_xsi = values[2];
23021     __pyx_v_empty_pytype = values[3];
23022   }
23023   goto __pyx_L4_argument_unpacking_done;
23024   __pyx_L5_argtuple_error:;
23025   __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1462, __pyx_L3_error)
23026   __pyx_L3_error:;
23027   __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23028   __Pyx_RefNannyFinishContext();
23029   return NULL;
23030   __pyx_L4_argument_unpacking_done:;
23031   __pyx_r = __pyx_pf_4lxml_9objectify_20pyannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype);
23032
23033   /* "lxml/objectify.pyx":1462
23034  *     return None
23035  * 
23036  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
23037  *              empty_pytype=None):
23038  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
23039  */
23040
23041   /* function exit code */
23042   __Pyx_RefNannyFinishContext();
23043   return __pyx_r;
23044 }
23045
23046 static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype) {
23047   struct LxmlElement *__pyx_v_element = 0;
23048   PyObject *__pyx_r = NULL;
23049   __Pyx_RefNannyDeclarations
23050   PyObject *__pyx_t_1 = NULL;
23051   int __pyx_t_2;
23052   int __pyx_t_3;
23053   int __pyx_lineno = 0;
23054   const char *__pyx_filename = NULL;
23055   int __pyx_clineno = 0;
23056   __Pyx_RefNannySetupContext("pyannotate", 0);
23057
23058   /* "lxml/objectify.pyx":1482
23059  *     """
23060  *     cdef _Element  element
23061  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
23062  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23063  * 
23064  */
23065   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
23066   __Pyx_GOTREF(__pyx_t_1);
23067   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23068   __pyx_t_1 = 0;
23069
23070   /* "lxml/objectify.pyx":1483
23071  *     cdef _Element  element
23072  *     element = cetree.rootNodeOrRaise(element_or_tree)
23073  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)             # <<<<<<<<<<<<<<
23074  * 
23075  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
23076  */
23077   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L1_error)
23078   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1483, __pyx_L1_error)
23079   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error)
23080   __Pyx_GOTREF(__pyx_t_1);
23081   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23082
23083   /* "lxml/objectify.pyx":1462
23084  *     return None
23085  * 
23086  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
23087  *              empty_pytype=None):
23088  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
23089  */
23090
23091   /* function exit code */
23092   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23093   goto __pyx_L0;
23094   __pyx_L1_error:;
23095   __Pyx_XDECREF(__pyx_t_1);
23096   __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23097   __pyx_r = NULL;
23098   __pyx_L0:;
23099   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23100   __Pyx_XGIVEREF(__pyx_r);
23101   __Pyx_RefNannyFinishContext();
23102   return __pyx_r;
23103 }
23104
23105 /* "lxml/objectify.pyx":1485
23106  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23107  * 
23108  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23109  *                 empty_type=None):
23110  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23111  */
23112
23113 /* Python wrapper */
23114 static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23115 static char __pyx_doc_4lxml_9objectify_22xsiannotate[] = "xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)\n\n    Recursively annotates the elements of an XML tree with 'xsi:type'\n    attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current\n    'xsi:type' attributes will be ignored and replaced.  Otherwise, they will be\n    checked and only replaced if they no longer fit the current text value.\n\n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    Setting the keyword argument ``ignore_pytype`` to True makes the function\n    additionally ignore existing ``pytype`` annotations.  The default is to\n    use them as a type hint.\n\n    The default annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'string', for example, to make string values the default.\n    ";
23116 static PyMethodDef __pyx_mdef_4lxml_9objectify_23xsiannotate = {"xsiannotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_23xsiannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_22xsiannotate};
23117 static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23118   PyObject *__pyx_v_element_or_tree = 0;
23119   PyObject *__pyx_v_ignore_old = 0;
23120   PyObject *__pyx_v_ignore_pytype = 0;
23121   PyObject *__pyx_v_empty_type = 0;
23122   int __pyx_lineno = 0;
23123   const char *__pyx_filename = NULL;
23124   int __pyx_clineno = 0;
23125   PyObject *__pyx_r = 0;
23126   __Pyx_RefNannyDeclarations
23127   __Pyx_RefNannySetupContext("xsiannotate (wrapper)", 0);
23128   {
23129     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element_or_tree,&__pyx_n_s_ignore_old,&__pyx_n_s_ignore_pytype,&__pyx_n_s_empty_type,0};
23130     PyObject* values[4] = {0,0,0,0};
23131     values[1] = ((PyObject *)((PyObject *)Py_False));
23132     values[2] = ((PyObject *)((PyObject *)Py_False));
23133
23134     /* "lxml/objectify.pyx":1486
23135  * 
23136  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
23137  *                 empty_type=None):             # <<<<<<<<<<<<<<
23138  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23139  * 
23140  */
23141     values[3] = ((PyObject *)((PyObject *)Py_None));
23142     if (unlikely(__pyx_kwds)) {
23143       Py_ssize_t kw_args;
23144       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23145       switch (pos_args) {
23146         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23147         CYTHON_FALLTHROUGH;
23148         case  0: break;
23149         default: goto __pyx_L5_argtuple_error;
23150       }
23151       kw_args = PyDict_Size(__pyx_kwds);
23152       switch (pos_args) {
23153         case  0:
23154         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23155         else goto __pyx_L5_argtuple_error;
23156       }
23157       if (kw_args > 0 && likely(kw_args <= 3)) {
23158         Py_ssize_t index;
23159         for (index = 1; index < 4 && kw_args > 0; index++) {
23160           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23161           if (value) { values[index] = value; kw_args--; }
23162         }
23163       }
23164       if (unlikely(kw_args > 0)) {
23165         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsiannotate") < 0)) __PYX_ERR(0, 1485, __pyx_L3_error)
23166       }
23167     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23168       goto __pyx_L5_argtuple_error;
23169     } else {
23170       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23171     }
23172     __pyx_v_element_or_tree = values[0];
23173     __pyx_v_ignore_old = values[1];
23174     __pyx_v_ignore_pytype = values[2];
23175     __pyx_v_empty_type = values[3];
23176   }
23177   goto __pyx_L4_argument_unpacking_done;
23178   __pyx_L5_argtuple_error:;
23179   __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1485, __pyx_L3_error)
23180   __pyx_L3_error:;
23181   __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23182   __Pyx_RefNannyFinishContext();
23183   return NULL;
23184   __pyx_L4_argument_unpacking_done:;
23185   __pyx_r = __pyx_pf_4lxml_9objectify_22xsiannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_pytype, __pyx_v_empty_type);
23186
23187   /* "lxml/objectify.pyx":1485
23188  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23189  * 
23190  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23191  *                 empty_type=None):
23192  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23193  */
23194
23195   /* function exit code */
23196   __Pyx_RefNannyFinishContext();
23197   return __pyx_r;
23198 }
23199
23200 static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type) {
23201   struct LxmlElement *__pyx_v_element = 0;
23202   PyObject *__pyx_r = NULL;
23203   __Pyx_RefNannyDeclarations
23204   PyObject *__pyx_t_1 = NULL;
23205   int __pyx_t_2;
23206   int __pyx_t_3;
23207   int __pyx_lineno = 0;
23208   const char *__pyx_filename = NULL;
23209   int __pyx_clineno = 0;
23210   __Pyx_RefNannySetupContext("xsiannotate", 0);
23211
23212   /* "lxml/objectify.pyx":1510
23213  *     """
23214  *     cdef _Element  element
23215  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
23216  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23217  * 
23218  */
23219   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error)
23220   __Pyx_GOTREF(__pyx_t_1);
23221   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23222   __pyx_t_1 = 0;
23223
23224   /* "lxml/objectify.pyx":1511
23225  *     cdef _Element  element
23226  *     element = cetree.rootNodeOrRaise(element_or_tree)
23227  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)             # <<<<<<<<<<<<<<
23228  * 
23229  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
23230  */
23231   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error)
23232   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L1_error)
23233   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
23234   __Pyx_GOTREF(__pyx_t_1);
23235   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23236
23237   /* "lxml/objectify.pyx":1485
23238  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
23239  * 
23240  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
23241  *                 empty_type=None):
23242  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
23243  */
23244
23245   /* function exit code */
23246   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23247   goto __pyx_L0;
23248   __pyx_L1_error:;
23249   __Pyx_XDECREF(__pyx_t_1);
23250   __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23251   __pyx_r = NULL;
23252   __pyx_L0:;
23253   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23254   __Pyx_XGIVEREF(__pyx_r);
23255   __Pyx_RefNannyFinishContext();
23256   return __pyx_r;
23257 }
23258
23259 /* "lxml/objectify.pyx":1513
23260  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23261  * 
23262  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23263  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23264  *              annotate_pytype=1):
23265  */
23266
23267 /* Python wrapper */
23268 static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23269 static char __pyx_doc_4lxml_9objectify_24annotate[] = "annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)\n\n    Recursively annotates the elements of an XML tree with 'xsi:type'\n    and/or 'py:pytype' attributes.\n\n    If the 'ignore_old' keyword argument is True (the default), current\n    'py:pytype' attributes will be ignored for the type annotation. Set to False\n    if you want reuse existing 'py:pytype' information (iff appropriate for the\n    element text value).\n\n    If the 'ignore_xsi' keyword argument is False (the default), existing\n    'xsi:type' attributes will be used for the type annotation, if they fit the\n    element text values. \n    \n    Note that the mapping from Python types to XSI types is usually ambiguous.\n    Currently, only the first XSI type name in the corresponding PyType\n    definition will be used for annotation.  Thus, you should consider naming\n    the widest type first if you define additional types.\n\n    The default 'py:pytype' annotation of empty elements can be set with the\n    ``empty_pytype`` keyword argument. Pass 'str', for example, to make\n    string values the default.\n\n    The default 'xsi:type' annotation of empty elements can be set with the\n    ``empty_type`` keyword argument.  The default is not to annotate empty\n    elements.  Pass 'string', for example, to make string values the default.\n\n    The keyword arguments 'annotate_xsi' (default: 0) and 'annotate_pytype'\n    (default: 1) control which kind(s) of annotation to use. \n    ";
23270 static PyMethodDef __pyx_mdef_4lxml_9objectify_25annotate = {"annotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_25annotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_24annotate};
23271 static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23272   PyObject *__pyx_v_element_or_tree = 0;
23273   PyObject *__pyx_v_ignore_old = 0;
23274   PyObject *__pyx_v_ignore_xsi = 0;
23275   PyObject *__pyx_v_empty_pytype = 0;
23276   PyObject *__pyx_v_empty_type = 0;
23277   PyObject *__pyx_v_annotate_xsi = 0;
23278   PyObject *__pyx_v_annotate_pytype = 0;
23279   int __pyx_lineno = 0;
23280   const char *__pyx_filename = NULL;
23281   int __pyx_clineno = 0;
23282   PyObject *__pyx_r = 0;
23283   __Pyx_RefNannyDeclarations
23284   __Pyx_RefNannySetupContext("annotate (wrapper)", 0);
23285   {
23286     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element_or_tree,&__pyx_n_s_ignore_old,&__pyx_n_s_ignore_xsi,&__pyx_n_s_empty_pytype,&__pyx_n_s_empty_type,&__pyx_n_s_annotate_xsi,&__pyx_n_s_annotate_pytype,0};
23287     PyObject* values[7] = {0,0,0,0,0,0,0};
23288     values[1] = ((PyObject *)((PyObject *)Py_True));
23289     values[2] = ((PyObject *)((PyObject *)Py_False));
23290
23291     /* "lxml/objectify.pyx":1514
23292  * 
23293  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
23294  *              empty_pytype=None, empty_type=None, annotate_xsi=0,             # <<<<<<<<<<<<<<
23295  *              annotate_pytype=1):
23296  *     u"""annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)
23297  */
23298     values[3] = ((PyObject *)((PyObject *)Py_None));
23299     values[4] = ((PyObject *)((PyObject *)Py_None));
23300     values[5] = ((PyObject *)((PyObject *)__pyx_int_0));
23301     values[6] = ((PyObject *)((PyObject *)__pyx_int_1));
23302     if (unlikely(__pyx_kwds)) {
23303       Py_ssize_t kw_args;
23304       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23305       switch (pos_args) {
23306         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23307         CYTHON_FALLTHROUGH;
23308         case  0: break;
23309         default: goto __pyx_L5_argtuple_error;
23310       }
23311       kw_args = PyDict_Size(__pyx_kwds);
23312       switch (pos_args) {
23313         case  0:
23314         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
23315         else goto __pyx_L5_argtuple_error;
23316       }
23317       if (kw_args > 0 && likely(kw_args <= 6)) {
23318         Py_ssize_t index;
23319         for (index = 1; index < 7 && kw_args > 0; index++) {
23320           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
23321           if (value) { values[index] = value; kw_args--; }
23322         }
23323       }
23324       if (unlikely(kw_args > 0)) {
23325         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "annotate") < 0)) __PYX_ERR(0, 1513, __pyx_L3_error)
23326       }
23327     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
23328       goto __pyx_L5_argtuple_error;
23329     } else {
23330       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23331     }
23332     __pyx_v_element_or_tree = values[0];
23333     __pyx_v_ignore_old = values[1];
23334     __pyx_v_ignore_xsi = values[2];
23335     __pyx_v_empty_pytype = values[3];
23336     __pyx_v_empty_type = values[4];
23337     __pyx_v_annotate_xsi = values[5];
23338     __pyx_v_annotate_pytype = values[6];
23339   }
23340   goto __pyx_L4_argument_unpacking_done;
23341   __pyx_L5_argtuple_error:;
23342   __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1513, __pyx_L3_error)
23343   __pyx_L3_error:;
23344   __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23345   __Pyx_RefNannyFinishContext();
23346   return NULL;
23347   __pyx_L4_argument_unpacking_done:;
23348   __pyx_r = __pyx_pf_4lxml_9objectify_24annotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype, __pyx_v_empty_type, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype);
23349
23350   /* "lxml/objectify.pyx":1513
23351  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23352  * 
23353  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23354  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23355  *              annotate_pytype=1):
23356  */
23357
23358   /* function exit code */
23359   __Pyx_RefNannyFinishContext();
23360   return __pyx_r;
23361 }
23362
23363 static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, PyObject *__pyx_v_ignore_old, PyObject *__pyx_v_ignore_xsi, PyObject *__pyx_v_empty_pytype, PyObject *__pyx_v_empty_type, PyObject *__pyx_v_annotate_xsi, PyObject *__pyx_v_annotate_pytype) {
23364   struct LxmlElement *__pyx_v_element = 0;
23365   PyObject *__pyx_r = NULL;
23366   __Pyx_RefNannyDeclarations
23367   PyObject *__pyx_t_1 = NULL;
23368   int __pyx_t_2;
23369   int __pyx_t_3;
23370   int __pyx_t_4;
23371   int __pyx_t_5;
23372   int __pyx_lineno = 0;
23373   const char *__pyx_filename = NULL;
23374   int __pyx_clineno = 0;
23375   __Pyx_RefNannySetupContext("annotate", 0);
23376
23377   /* "lxml/objectify.pyx":1547
23378  *     """
23379  *     cdef _Element  element
23380  *     element = cetree.rootNodeOrRaise(element_or_tree)             # <<<<<<<<<<<<<<
23381  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
23382  *               ignore_old, empty_type, empty_pytype)
23383  */
23384   __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
23385   __Pyx_GOTREF(__pyx_t_1);
23386   __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
23387   __pyx_t_1 = 0;
23388
23389   /* "lxml/objectify.pyx":1548
23390  *     cdef _Element  element
23391  *     element = cetree.rootNodeOrRaise(element_or_tree)
23392  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
23393  *               ignore_old, empty_type, empty_pytype)
23394  * 
23395  */
23396   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L1_error)
23397   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L1_error)
23398   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1548, __pyx_L1_error)
23399
23400   /* "lxml/objectify.pyx":1549
23401  *     element = cetree.rootNodeOrRaise(element_or_tree)
23402  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
23403  *               ignore_old, empty_type, empty_pytype)             # <<<<<<<<<<<<<<
23404  * 
23405  * 
23406  */
23407   __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1549, __pyx_L1_error)
23408
23409   /* "lxml/objectify.pyx":1548
23410  *     cdef _Element  element
23411  *     element = cetree.rootNodeOrRaise(element_or_tree)
23412  *     _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,             # <<<<<<<<<<<<<<
23413  *               ignore_old, empty_type, empty_pytype)
23414  * 
23415  */
23416   __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1548, __pyx_L1_error)
23417   __Pyx_GOTREF(__pyx_t_1);
23418   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23419
23420   /* "lxml/objectify.pyx":1513
23421  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
23422  * 
23423  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
23424  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
23425  *              annotate_pytype=1):
23426  */
23427
23428   /* function exit code */
23429   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23430   goto __pyx_L0;
23431   __pyx_L1_error:;
23432   __Pyx_XDECREF(__pyx_t_1);
23433   __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23434   __pyx_r = NULL;
23435   __pyx_L0:;
23436   __Pyx_XDECREF((PyObject *)__pyx_v_element);
23437   __Pyx_XGIVEREF(__pyx_r);
23438   __Pyx_RefNannyFinishContext();
23439   return __pyx_r;
23440 }
23441
23442 /* "lxml/objectify.pyx":1552
23443  * 
23444  * 
23445  * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
23446  *                bint ignore_xsi, bint ignore_pytype,
23447  *                empty_type_name, empty_pytype_name):
23448  */
23449
23450 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_element, int __pyx_v_annotate_xsi, int __pyx_v_annotate_pytype, int __pyx_v_ignore_xsi, int __pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type_name, PyObject *__pyx_v_empty_pytype_name) {
23451   struct LxmlDocument *__pyx_v_doc = 0;
23452   xmlNode *__pyx_v_c_node;
23453   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype = 0;
23454   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType = 0;
23455   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType = 0;
23456   PyObject *__pyx_r = NULL;
23457   __Pyx_RefNannyDeclarations
23458   int __pyx_t_1;
23459   int __pyx_t_2;
23460   PyObject *__pyx_t_3 = NULL;
23461   PyObject *__pyx_t_4 = NULL;
23462   xmlNode *__pyx_t_5;
23463   int __pyx_t_6;
23464   int __pyx_lineno = 0;
23465   const char *__pyx_filename = NULL;
23466   int __pyx_clineno = 0;
23467   __Pyx_RefNannySetupContext("_annotate", 0);
23468   __Pyx_INCREF(__pyx_v_empty_type_name);
23469   __Pyx_INCREF(__pyx_v_empty_pytype_name);
23470
23471   /* "lxml/objectify.pyx":1559
23472  *     cdef PyType empty_pytype, StrType, NoneType
23473  * 
23474  *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
23475  *         return
23476  * 
23477  */
23478   __pyx_t_2 = ((!(__pyx_v_annotate_xsi != 0)) != 0);
23479   if (__pyx_t_2) {
23480   } else {
23481     __pyx_t_1 = __pyx_t_2;
23482     goto __pyx_L4_bool_binop_done;
23483   }
23484   __pyx_t_2 = ((!(__pyx_v_annotate_pytype != 0)) != 0);
23485   __pyx_t_1 = __pyx_t_2;
23486   __pyx_L4_bool_binop_done:;
23487   if (__pyx_t_1) {
23488
23489     /* "lxml/objectify.pyx":1560
23490  * 
23491  *     if not annotate_xsi and not annotate_pytype:
23492  *         return             # <<<<<<<<<<<<<<
23493  * 
23494  *     if empty_type_name is not None:
23495  */
23496     __Pyx_XDECREF(__pyx_r);
23497     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23498     goto __pyx_L0;
23499
23500     /* "lxml/objectify.pyx":1559
23501  *     cdef PyType empty_pytype, StrType, NoneType
23502  * 
23503  *     if not annotate_xsi and not annotate_pytype:             # <<<<<<<<<<<<<<
23504  *         return
23505  * 
23506  */
23507   }
23508
23509   /* "lxml/objectify.pyx":1562
23510  *         return
23511  * 
23512  *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
23513  *         if isinstance(empty_type_name, bytes):
23514  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23515  */
23516   __pyx_t_1 = (__pyx_v_empty_type_name != Py_None);
23517   __pyx_t_2 = (__pyx_t_1 != 0);
23518   if (__pyx_t_2) {
23519
23520     /* "lxml/objectify.pyx":1563
23521  * 
23522  *     if empty_type_name is not None:
23523  *         if isinstance(empty_type_name, bytes):             # <<<<<<<<<<<<<<
23524  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23525  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23526  */
23527     __pyx_t_2 = PyBytes_Check(__pyx_v_empty_type_name); 
23528     __pyx_t_1 = (__pyx_t_2 != 0);
23529     if (__pyx_t_1) {
23530
23531       /* "lxml/objectify.pyx":1564
23532  *     if empty_type_name is not None:
23533  *         if isinstance(empty_type_name, bytes):
23534  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")             # <<<<<<<<<<<<<<
23535  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23536  *     elif empty_pytype_name is not None:
23537  */
23538       if (unlikely(__pyx_v_empty_type_name == Py_None)) {
23539         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
23540         __PYX_ERR(0, 1564, __pyx_L1_error)
23541       }
23542       __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_type_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error)
23543       __Pyx_GOTREF(__pyx_t_3);
23544       __Pyx_DECREF_SET(__pyx_v_empty_type_name, __pyx_t_3);
23545       __pyx_t_3 = 0;
23546
23547       /* "lxml/objectify.pyx":1563
23548  * 
23549  *     if empty_type_name is not None:
23550  *         if isinstance(empty_type_name, bytes):             # <<<<<<<<<<<<<<
23551  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23552  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23553  */
23554     }
23555
23556     /* "lxml/objectify.pyx":1565
23557  *         if isinstance(empty_type_name, bytes):
23558  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23559  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)             # <<<<<<<<<<<<<<
23560  *     elif empty_pytype_name is not None:
23561  *         if isinstance(empty_pytype_name, bytes):
23562  */
23563     if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
23564       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23565       __PYX_ERR(0, 1565, __pyx_L1_error)
23566     }
23567     __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_empty_type_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1565, __pyx_L1_error)
23568     __Pyx_GOTREF(__pyx_t_3);
23569     __pyx_t_4 = __pyx_t_3;
23570     __Pyx_INCREF(__pyx_t_4);
23571     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23572     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
23573     __pyx_t_4 = 0;
23574
23575     /* "lxml/objectify.pyx":1562
23576  *         return
23577  * 
23578  *     if empty_type_name is not None:             # <<<<<<<<<<<<<<
23579  *         if isinstance(empty_type_name, bytes):
23580  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23581  */
23582     goto __pyx_L6;
23583   }
23584
23585   /* "lxml/objectify.pyx":1566
23586  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23587  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23588  *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
23589  *         if isinstance(empty_pytype_name, bytes):
23590  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23591  */
23592   __pyx_t_1 = (__pyx_v_empty_pytype_name != Py_None);
23593   __pyx_t_2 = (__pyx_t_1 != 0);
23594   if (__pyx_t_2) {
23595
23596     /* "lxml/objectify.pyx":1567
23597  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23598  *     elif empty_pytype_name is not None:
23599  *         if isinstance(empty_pytype_name, bytes):             # <<<<<<<<<<<<<<
23600  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23601  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23602  */
23603     __pyx_t_2 = PyBytes_Check(__pyx_v_empty_pytype_name); 
23604     __pyx_t_1 = (__pyx_t_2 != 0);
23605     if (__pyx_t_1) {
23606
23607       /* "lxml/objectify.pyx":1568
23608  *     elif empty_pytype_name is not None:
23609  *         if isinstance(empty_pytype_name, bytes):
23610  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")             # <<<<<<<<<<<<<<
23611  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23612  *     else:
23613  */
23614       if (unlikely(__pyx_v_empty_pytype_name == Py_None)) {
23615         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
23616         __PYX_ERR(0, 1568, __pyx_L1_error)
23617       }
23618       __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_pytype_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error)
23619       __Pyx_GOTREF(__pyx_t_4);
23620       __Pyx_DECREF_SET(__pyx_v_empty_pytype_name, __pyx_t_4);
23621       __pyx_t_4 = 0;
23622
23623       /* "lxml/objectify.pyx":1567
23624  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23625  *     elif empty_pytype_name is not None:
23626  *         if isinstance(empty_pytype_name, bytes):             # <<<<<<<<<<<<<<
23627  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23628  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23629  */
23630     }
23631
23632     /* "lxml/objectify.pyx":1569
23633  *         if isinstance(empty_pytype_name, bytes):
23634  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23635  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)             # <<<<<<<<<<<<<<
23636  *     else:
23637  *         empty_pytype = None
23638  */
23639     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23640       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23641       __PYX_ERR(0, 1569, __pyx_L1_error)
23642     }
23643     __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_empty_pytype_name, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error)
23644     __Pyx_GOTREF(__pyx_t_4);
23645     __pyx_t_3 = __pyx_t_4;
23646     __Pyx_INCREF(__pyx_t_3);
23647     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23648     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
23649     __pyx_t_3 = 0;
23650
23651     /* "lxml/objectify.pyx":1566
23652  *             empty_type_name = (<bytes>empty_type_name).decode("ascii")
23653  *         empty_pytype = <PyType>_SCHEMA_TYPE_DICT.get(empty_type_name)
23654  *     elif empty_pytype_name is not None:             # <<<<<<<<<<<<<<
23655  *         if isinstance(empty_pytype_name, bytes):
23656  *             empty_pytype_name = (<bytes>empty_pytype_name).decode("ascii")
23657  */
23658     goto __pyx_L6;
23659   }
23660
23661   /* "lxml/objectify.pyx":1571
23662  *         empty_pytype = <PyType>_PYTYPE_DICT.get(empty_pytype_name)
23663  *     else:
23664  *         empty_pytype = None             # <<<<<<<<<<<<<<
23665  * 
23666  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')
23667  */
23668   /*else*/ {
23669     __Pyx_INCREF(Py_None);
23670     __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
23671   }
23672   __pyx_L6:;
23673
23674   /* "lxml/objectify.pyx":1573
23675  *         empty_pytype = None
23676  * 
23677  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')             # <<<<<<<<<<<<<<
23678  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')
23679  * 
23680  */
23681   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23682     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23683     __PYX_ERR(0, 1573, __pyx_L1_error)
23684   }
23685   __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_str, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error)
23686   __Pyx_GOTREF(__pyx_t_3);
23687   __pyx_t_4 = __pyx_t_3;
23688   __Pyx_INCREF(__pyx_t_4);
23689   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23690   __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
23691   __pyx_t_4 = 0;
23692
23693   /* "lxml/objectify.pyx":1574
23694  * 
23695  *     StrType  = <PyType>_PYTYPE_DICT.get(u'str')
23696  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')             # <<<<<<<<<<<<<<
23697  * 
23698  *     doc = element._doc
23699  */
23700   if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
23701     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23702     __PYX_ERR(0, 1574, __pyx_L1_error)
23703   }
23704   __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_NoneType, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1574, __pyx_L1_error)
23705   __Pyx_GOTREF(__pyx_t_4);
23706   __pyx_t_3 = __pyx_t_4;
23707   __Pyx_INCREF(__pyx_t_3);
23708   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23709   __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
23710   __pyx_t_3 = 0;
23711
23712   /* "lxml/objectify.pyx":1576
23713  *     NoneType = <PyType>_PYTYPE_DICT.get(u'NoneType')
23714  * 
23715  *     doc = element._doc             # <<<<<<<<<<<<<<
23716  *     c_node = element._c_node
23717  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23718  */
23719   __pyx_t_3 = ((PyObject *)__pyx_v_element->_doc);
23720   __Pyx_INCREF(__pyx_t_3);
23721   __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3);
23722   __pyx_t_3 = 0;
23723
23724   /* "lxml/objectify.pyx":1577
23725  * 
23726  *     doc = element._doc
23727  *     c_node = element._c_node             # <<<<<<<<<<<<<<
23728  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23729  *     if c_node.type == tree.XML_ELEMENT_NODE:
23730  */
23731   __pyx_t_5 = __pyx_v_element->_c_node;
23732   __pyx_v_c_node = __pyx_t_5;
23733
23734   /* "lxml/objectify.pyx":1578
23735  *     doc = element._doc
23736  *     c_node = element._c_node
23737  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)             # <<<<<<<<<<<<<<
23738  *     if c_node.type == tree.XML_ELEMENT_NODE:
23739  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23740  */
23741   BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1);
23742
23743   /* "lxml/objectify.pyx":1579
23744  *     c_node = element._c_node
23745  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23746  *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
23747  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23748  *                           ignore_xsi, ignore_pytype,
23749  */
23750   __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
23751   if (__pyx_t_1) {
23752
23753     /* "lxml/objectify.pyx":1580
23754  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23755  *     if c_node.type == tree.XML_ELEMENT_NODE:
23756  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,             # <<<<<<<<<<<<<<
23757  *                           ignore_xsi, ignore_pytype,
23758  *                           empty_type_name, empty_pytype, StrType, NoneType)
23759  */
23760     __pyx_t_6 = __pyx_f_4lxml_9objectify__annotate_element(__pyx_v_c_node, __pyx_v_doc, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype, __pyx_v_ignore_xsi, __pyx_v_ignore_pytype, __pyx_v_empty_type_name, __pyx_v_empty_pytype, __pyx_v_StrType, __pyx_v_NoneType); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1580, __pyx_L1_error)
23761
23762     /* "lxml/objectify.pyx":1579
23763  *     c_node = element._c_node
23764  *     tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
23765  *     if c_node.type == tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
23766  *         _annotate_element(c_node, doc, annotate_xsi, annotate_pytype,
23767  *                           ignore_xsi, ignore_pytype,
23768  */
23769   }
23770
23771   /* "lxml/objectify.pyx":1583
23772  *                           ignore_xsi, ignore_pytype,
23773  *                           empty_type_name, empty_pytype, StrType, NoneType)
23774  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)             # <<<<<<<<<<<<<<
23775  * 
23776  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,
23777  */
23778   END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
23779
23780   /* "lxml/objectify.pyx":1552
23781  * 
23782  * 
23783  * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype,             # <<<<<<<<<<<<<<
23784  *                bint ignore_xsi, bint ignore_pytype,
23785  *                empty_type_name, empty_pytype_name):
23786  */
23787
23788   /* function exit code */
23789   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23790   goto __pyx_L0;
23791   __pyx_L1_error:;
23792   __Pyx_XDECREF(__pyx_t_3);
23793   __Pyx_XDECREF(__pyx_t_4);
23794   __Pyx_AddTraceback("lxml.objectify._annotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
23795   __pyx_r = 0;
23796   __pyx_L0:;
23797   __Pyx_XDECREF((PyObject *)__pyx_v_doc);
23798   __Pyx_XDECREF((PyObject *)__pyx_v_empty_pytype);
23799   __Pyx_XDECREF((PyObject *)__pyx_v_StrType);
23800   __Pyx_XDECREF((PyObject *)__pyx_v_NoneType);
23801   __Pyx_XDECREF(__pyx_v_empty_type_name);
23802   __Pyx_XDECREF(__pyx_v_empty_pytype_name);
23803   __Pyx_XGIVEREF(__pyx_r);
23804   __Pyx_RefNannyFinishContext();
23805   return __pyx_r;
23806 }
23807
23808 /* "lxml/objectify.pyx":1585
23809  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
23810  * 
23811  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,             # <<<<<<<<<<<<<<
23812  *                            bint annotate_xsi, bint annotate_pytype,
23813  *                            bint ignore_xsi, bint ignore_pytype,
23814  */
23815
23816 static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, struct LxmlDocument *__pyx_v_doc, int __pyx_v_annotate_xsi, int __pyx_v_annotate_pytype, int __pyx_v_ignore_xsi, int __pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type_name, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType) {
23817   xmlNs *__pyx_v_c_ns;
23818   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype = 0;
23819   PyObject *__pyx_v_typename = NULL;
23820   long __pyx_v_istree;
23821   PyObject *__pyx_v_prefix = NULL;
23822   PyObject *__pyx_v_old_pytypename = NULL;
23823   PyObject *__pyx_v_typename_utf8 = NULL;
23824   PyObject *__pyx_v_name = NULL;
23825   PyObject *__pyx_v_pytype_name = NULL;
23826   int __pyx_r;
23827   __Pyx_RefNannyDeclarations
23828   PyObject *__pyx_t_1 = NULL;
23829   int __pyx_t_2;
23830   int __pyx_t_3;
23831   int __pyx_t_4;
23832   PyObject *__pyx_t_5 = NULL;
23833   PyObject *__pyx_t_6 = NULL;
23834   PyObject *__pyx_t_7 = NULL;
23835   PyObject *(*__pyx_t_8)(PyObject *);
23836   int __pyx_lineno = 0;
23837   const char *__pyx_filename = NULL;
23838   int __pyx_clineno = 0;
23839   __Pyx_RefNannySetupContext("_annotate_element", 0);
23840
23841   /* "lxml/objectify.pyx":1591
23842  *                            PyType StrType, PyType NoneType) except -1:
23843  *     cdef tree.xmlNs*   c_ns
23844  *     cdef PyType pytype = None             # <<<<<<<<<<<<<<
23845  *     typename = None
23846  *     istree = 0
23847  */
23848   __Pyx_INCREF(Py_None);
23849   __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
23850
23851   /* "lxml/objectify.pyx":1592
23852  *     cdef tree.xmlNs*   c_ns
23853  *     cdef PyType pytype = None
23854  *     typename = None             # <<<<<<<<<<<<<<
23855  *     istree = 0
23856  * 
23857  */
23858   __Pyx_INCREF(Py_None);
23859   __pyx_v_typename = Py_None;
23860
23861   /* "lxml/objectify.pyx":1593
23862  *     cdef PyType pytype = None
23863  *     typename = None
23864  *     istree = 0             # <<<<<<<<<<<<<<
23865  * 
23866  *     # if element is defined as xsi:nil, represent it as None
23867  */
23868   __pyx_v_istree = 0;
23869
23870   /* "lxml/objectify.pyx":1596
23871  * 
23872  *     # if element is defined as xsi:nil, represent it as None
23873  *     if cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23874  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23875  *         pytype = NoneType
23876  */
23877   __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error)
23878   __Pyx_GOTREF(__pyx_t_1);
23879   __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1597, __pyx_L1_error)
23880   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23881   if (__pyx_t_2) {
23882
23883     /* "lxml/objectify.pyx":1598
23884  *     if cetree.attributeValueFromNsName(
23885  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23886  *         pytype = NoneType             # <<<<<<<<<<<<<<
23887  * 
23888  *     if pytype is None and not ignore_xsi:
23889  */
23890     __Pyx_INCREF(((PyObject *)__pyx_v_NoneType));
23891     __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_NoneType);
23892
23893     /* "lxml/objectify.pyx":1596
23894  * 
23895  *     # if element is defined as xsi:nil, represent it as None
23896  *     if cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23897  *         c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"nil") == "true":
23898  *         pytype = NoneType
23899  */
23900   }
23901
23902   /* "lxml/objectify.pyx":1600
23903  *         pytype = NoneType
23904  * 
23905  *     if pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
23906  *         # check that old xsi type value is valid
23907  *         typename = cetree.attributeValueFromNsName(
23908  */
23909   __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
23910   __pyx_t_4 = (__pyx_t_3 != 0);
23911   if (__pyx_t_4) {
23912   } else {
23913     __pyx_t_2 = __pyx_t_4;
23914     goto __pyx_L5_bool_binop_done;
23915   }
23916   __pyx_t_4 = ((!(__pyx_v_ignore_xsi != 0)) != 0);
23917   __pyx_t_2 = __pyx_t_4;
23918   __pyx_L5_bool_binop_done:;
23919   if (__pyx_t_2) {
23920
23921     /* "lxml/objectify.pyx":1602
23922  *     if pytype is None and not ignore_xsi:
23923  *         # check that old xsi type value is valid
23924  *         typename = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
23925  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23926  *         if typename is not None:
23927  */
23928     __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
23929     __Pyx_GOTREF(__pyx_t_1);
23930     __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_1);
23931     __pyx_t_1 = 0;
23932
23933     /* "lxml/objectify.pyx":1604
23934  *         typename = cetree.attributeValueFromNsName(
23935  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23936  *         if typename is not None:             # <<<<<<<<<<<<<<
23937  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23938  *             if pytype is None and u':' in typename:
23939  */
23940     __pyx_t_2 = (__pyx_v_typename != Py_None);
23941     __pyx_t_4 = (__pyx_t_2 != 0);
23942     if (__pyx_t_4) {
23943
23944       /* "lxml/objectify.pyx":1605
23945  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
23946  *         if typename is not None:
23947  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)             # <<<<<<<<<<<<<<
23948  *             if pytype is None and u':' in typename:
23949  *                 prefix, typename = typename.split(u':', 1)
23950  */
23951       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
23952         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
23953         __PYX_ERR(0, 1605, __pyx_L1_error)
23954       }
23955       __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1605, __pyx_L1_error)
23956       __Pyx_GOTREF(__pyx_t_1);
23957       __pyx_t_5 = __pyx_t_1;
23958       __Pyx_INCREF(__pyx_t_5);
23959       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23960       __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5));
23961       __pyx_t_5 = 0;
23962
23963       /* "lxml/objectify.pyx":1606
23964  *         if typename is not None:
23965  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23966  *             if pytype is None and u':' in typename:             # <<<<<<<<<<<<<<
23967  *                 prefix, typename = typename.split(u':', 1)
23968  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23969  */
23970       __pyx_t_2 = (((PyObject *)__pyx_v_pytype) == Py_None);
23971       __pyx_t_3 = (__pyx_t_2 != 0);
23972       if (__pyx_t_3) {
23973       } else {
23974         __pyx_t_4 = __pyx_t_3;
23975         goto __pyx_L9_bool_binop_done;
23976       }
23977       __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_typename, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1606, __pyx_L1_error)
23978       __pyx_t_2 = (__pyx_t_3 != 0);
23979       __pyx_t_4 = __pyx_t_2;
23980       __pyx_L9_bool_binop_done:;
23981       if (__pyx_t_4) {
23982
23983         /* "lxml/objectify.pyx":1607
23984  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23985  *             if pytype is None and u':' in typename:
23986  *                 prefix, typename = typename.split(u':', 1)             # <<<<<<<<<<<<<<
23987  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
23988  *             if pytype is not None and pytype is not StrType:
23989  */
23990         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1607, __pyx_L1_error)
23991         __Pyx_GOTREF(__pyx_t_5);
23992         __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
23993         __Pyx_GOTREF(__pyx_t_1);
23994         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23995         if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
23996           PyObject* sequence = __pyx_t_1;
23997           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
23998           if (unlikely(size != 2)) {
23999             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24000             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24001             __PYX_ERR(0, 1607, __pyx_L1_error)
24002           }
24003           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24004           if (likely(PyTuple_CheckExact(sequence))) {
24005             __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
24006             __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
24007           } else {
24008             __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
24009             __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
24010           }
24011           __Pyx_INCREF(__pyx_t_5);
24012           __Pyx_INCREF(__pyx_t_6);
24013           #else
24014           __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1607, __pyx_L1_error)
24015           __Pyx_GOTREF(__pyx_t_5);
24016           __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1607, __pyx_L1_error)
24017           __Pyx_GOTREF(__pyx_t_6);
24018           #endif
24019           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24020         } else {
24021           Py_ssize_t index = -1;
24022           __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1607, __pyx_L1_error)
24023           __Pyx_GOTREF(__pyx_t_7);
24024           __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24025           __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
24026           index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
24027           __Pyx_GOTREF(__pyx_t_5);
24028           index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
24029           __Pyx_GOTREF(__pyx_t_6);
24030           if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1607, __pyx_L1_error)
24031           __pyx_t_8 = NULL;
24032           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24033           goto __pyx_L12_unpacking_done;
24034           __pyx_L11_unpacking_failed:;
24035           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24036           __pyx_t_8 = NULL;
24037           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
24038           __PYX_ERR(0, 1607, __pyx_L1_error)
24039           __pyx_L12_unpacking_done:;
24040         }
24041         __pyx_v_prefix = __pyx_t_5;
24042         __pyx_t_5 = 0;
24043         __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24044         __pyx_t_6 = 0;
24045
24046         /* "lxml/objectify.pyx":1608
24047  *             if pytype is None and u':' in typename:
24048  *                 prefix, typename = typename.split(u':', 1)
24049  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)             # <<<<<<<<<<<<<<
24050  *             if pytype is not None and pytype is not StrType:
24051  *                 # StrType does not have a typecheck but is the default
24052  */
24053         if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
24054           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
24055           __PYX_ERR(0, 1608, __pyx_L1_error)
24056         }
24057         __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
24058         __Pyx_GOTREF(__pyx_t_1);
24059         __pyx_t_6 = __pyx_t_1;
24060         __Pyx_INCREF(__pyx_t_6);
24061         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24062         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24063         __pyx_t_6 = 0;
24064
24065         /* "lxml/objectify.pyx":1606
24066  *         if typename is not None:
24067  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24068  *             if pytype is None and u':' in typename:             # <<<<<<<<<<<<<<
24069  *                 prefix, typename = typename.split(u':', 1)
24070  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24071  */
24072       }
24073
24074       /* "lxml/objectify.pyx":1609
24075  *                 prefix, typename = typename.split(u':', 1)
24076  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24077  *             if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24078  *                 # StrType does not have a typecheck but is the default
24079  *                 # anyway, so just accept it if given as type
24080  */
24081       __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24082       __pyx_t_3 = (__pyx_t_2 != 0);
24083       if (__pyx_t_3) {
24084       } else {
24085         __pyx_t_4 = __pyx_t_3;
24086         goto __pyx_L14_bool_binop_done;
24087       }
24088       __pyx_t_3 = (__pyx_v_pytype != __pyx_v_StrType);
24089       __pyx_t_2 = (__pyx_t_3 != 0);
24090       __pyx_t_4 = __pyx_t_2;
24091       __pyx_L14_bool_binop_done:;
24092       if (__pyx_t_4) {
24093
24094         /* "lxml/objectify.pyx":1613
24095  *                 # anyway, so just accept it if given as type
24096  *                 # information
24097  *                 pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
24098  *                 if pytype is None:
24099  *                     typename = None
24100  */
24101         __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1613, __pyx_L1_error)
24102         __Pyx_GOTREF(__pyx_t_6);
24103         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24104         __pyx_t_6 = 0;
24105
24106         /* "lxml/objectify.pyx":1614
24107  *                 # information
24108  *                 pytype = _check_type(c_node, pytype)
24109  *                 if pytype is None:             # <<<<<<<<<<<<<<
24110  *                     typename = None
24111  * 
24112  */
24113         __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
24114         __pyx_t_2 = (__pyx_t_4 != 0);
24115         if (__pyx_t_2) {
24116
24117           /* "lxml/objectify.pyx":1615
24118  *                 pytype = _check_type(c_node, pytype)
24119  *                 if pytype is None:
24120  *                     typename = None             # <<<<<<<<<<<<<<
24121  * 
24122  *     if pytype is None and not ignore_pytype:
24123  */
24124           __Pyx_INCREF(Py_None);
24125           __Pyx_DECREF_SET(__pyx_v_typename, Py_None);
24126
24127           /* "lxml/objectify.pyx":1614
24128  *                 # information
24129  *                 pytype = _check_type(c_node, pytype)
24130  *                 if pytype is None:             # <<<<<<<<<<<<<<
24131  *                     typename = None
24132  * 
24133  */
24134         }
24135
24136         /* "lxml/objectify.pyx":1609
24137  *                 prefix, typename = typename.split(u':', 1)
24138  *                 pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24139  *             if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24140  *                 # StrType does not have a typecheck but is the default
24141  *                 # anyway, so just accept it if given as type
24142  */
24143       }
24144
24145       /* "lxml/objectify.pyx":1604
24146  *         typename = cetree.attributeValueFromNsName(
24147  *             c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24148  *         if typename is not None:             # <<<<<<<<<<<<<<
24149  *             pytype = <PyType>_SCHEMA_TYPE_DICT.get(typename)
24150  *             if pytype is None and u':' in typename:
24151  */
24152     }
24153
24154     /* "lxml/objectify.pyx":1600
24155  *         pytype = NoneType
24156  * 
24157  *     if pytype is None and not ignore_xsi:             # <<<<<<<<<<<<<<
24158  *         # check that old xsi type value is valid
24159  *         typename = cetree.attributeValueFromNsName(
24160  */
24161   }
24162
24163   /* "lxml/objectify.pyx":1617
24164  *                     typename = None
24165  * 
24166  *     if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
24167  *         # check that old pytype value is valid
24168  *         old_pytypename = cetree.attributeValueFromNsName(
24169  */
24170   __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
24171   __pyx_t_3 = (__pyx_t_4 != 0);
24172   if (__pyx_t_3) {
24173   } else {
24174     __pyx_t_2 = __pyx_t_3;
24175     goto __pyx_L18_bool_binop_done;
24176   }
24177   __pyx_t_3 = ((!(__pyx_v_ignore_pytype != 0)) != 0);
24178   __pyx_t_2 = __pyx_t_3;
24179   __pyx_L18_bool_binop_done:;
24180   if (__pyx_t_2) {
24181
24182     /* "lxml/objectify.pyx":1619
24183  *     if pytype is None and not ignore_pytype:
24184  *         # check that old pytype value is valid
24185  *         old_pytypename = cetree.attributeValueFromNsName(             # <<<<<<<<<<<<<<
24186  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24187  *         if old_pytypename is not None:
24188  */
24189     __pyx_t_6 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1619, __pyx_L1_error)
24190     __Pyx_GOTREF(__pyx_t_6);
24191     __pyx_v_old_pytypename = __pyx_t_6;
24192     __pyx_t_6 = 0;
24193
24194     /* "lxml/objectify.pyx":1621
24195  *         old_pytypename = cetree.attributeValueFromNsName(
24196  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24197  *         if old_pytypename is not None:             # <<<<<<<<<<<<<<
24198  *             if old_pytypename == TREE_PYTYPE_NAME:
24199  *                 if not cetree.hasChild(c_node):
24200  */
24201     __pyx_t_2 = (__pyx_v_old_pytypename != Py_None);
24202     __pyx_t_3 = (__pyx_t_2 != 0);
24203     if (__pyx_t_3) {
24204
24205       /* "lxml/objectify.pyx":1622
24206  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24207  *         if old_pytypename is not None:
24208  *             if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
24209  *                 if not cetree.hasChild(c_node):
24210  *                     # only case where we should keep it,
24211  */
24212       __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error)
24213       if (__pyx_t_3) {
24214
24215         /* "lxml/objectify.pyx":1623
24216  *         if old_pytypename is not None:
24217  *             if old_pytypename == TREE_PYTYPE_NAME:
24218  *                 if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24219  *                     # only case where we should keep it,
24220  *                     # everything else is clear enough
24221  */
24222         __pyx_t_3 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0);
24223         if (__pyx_t_3) {
24224
24225           /* "lxml/objectify.pyx":1626
24226  *                     # only case where we should keep it,
24227  *                     # everything else is clear enough
24228  *                     pytype = TREE_PYTYPE             # <<<<<<<<<<<<<<
24229  *             else:
24230  *                 if old_pytypename == 'none':
24231  */
24232           __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
24233           __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE);
24234
24235           /* "lxml/objectify.pyx":1623
24236  *         if old_pytypename is not None:
24237  *             if old_pytypename == TREE_PYTYPE_NAME:
24238  *                 if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24239  *                     # only case where we should keep it,
24240  *                     # everything else is clear enough
24241  */
24242         }
24243
24244         /* "lxml/objectify.pyx":1622
24245  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24246  *         if old_pytypename is not None:
24247  *             if old_pytypename == TREE_PYTYPE_NAME:             # <<<<<<<<<<<<<<
24248  *                 if not cetree.hasChild(c_node):
24249  *                     # only case where we should keep it,
24250  */
24251         goto __pyx_L21;
24252       }
24253
24254       /* "lxml/objectify.pyx":1628
24255  *                     pytype = TREE_PYTYPE
24256  *             else:
24257  *                 if old_pytypename == 'none':             # <<<<<<<<<<<<<<
24258  *                     # transition from lxml 1.x
24259  *                     old_pytypename = "NoneType"
24260  */
24261       /*else*/ {
24262         __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_old_pytypename, __pyx_n_s_none, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1628, __pyx_L1_error)
24263         if (__pyx_t_3) {
24264
24265           /* "lxml/objectify.pyx":1630
24266  *                 if old_pytypename == 'none':
24267  *                     # transition from lxml 1.x
24268  *                     old_pytypename = "NoneType"             # <<<<<<<<<<<<<<
24269  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24270  *                 if pytype is not None and pytype is not StrType:
24271  */
24272           __Pyx_INCREF(__pyx_n_s_NoneType);
24273           __Pyx_DECREF_SET(__pyx_v_old_pytypename, __pyx_n_s_NoneType);
24274
24275           /* "lxml/objectify.pyx":1628
24276  *                     pytype = TREE_PYTYPE
24277  *             else:
24278  *                 if old_pytypename == 'none':             # <<<<<<<<<<<<<<
24279  *                     # transition from lxml 1.x
24280  *                     old_pytypename = "NoneType"
24281  */
24282         }
24283
24284         /* "lxml/objectify.pyx":1631
24285  *                     # transition from lxml 1.x
24286  *                     old_pytypename = "NoneType"
24287  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)             # <<<<<<<<<<<<<<
24288  *                 if pytype is not None and pytype is not StrType:
24289  *                     # StrType does not have a typecheck but is the
24290  */
24291         if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
24292           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
24293           __PYX_ERR(0, 1631, __pyx_L1_error)
24294         }
24295         __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_old_pytypename, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1631, __pyx_L1_error)
24296         __Pyx_GOTREF(__pyx_t_6);
24297         __pyx_t_1 = __pyx_t_6;
24298         __Pyx_INCREF(__pyx_t_1);
24299         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24300         __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
24301         __pyx_t_1 = 0;
24302
24303         /* "lxml/objectify.pyx":1632
24304  *                     old_pytypename = "NoneType"
24305  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24306  *                 if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24307  *                     # StrType does not have a typecheck but is the
24308  *                     # default anyway, so just accept it if given as
24309  */
24310         __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24311         __pyx_t_4 = (__pyx_t_2 != 0);
24312         if (__pyx_t_4) {
24313         } else {
24314           __pyx_t_3 = __pyx_t_4;
24315           goto __pyx_L25_bool_binop_done;
24316         }
24317         __pyx_t_4 = (__pyx_v_pytype != __pyx_v_StrType);
24318         __pyx_t_2 = (__pyx_t_4 != 0);
24319         __pyx_t_3 = __pyx_t_2;
24320         __pyx_L25_bool_binop_done:;
24321         if (__pyx_t_3) {
24322
24323           /* "lxml/objectify.pyx":1636
24324  *                     # default anyway, so just accept it if given as
24325  *                     # type information
24326  *                     pytype = _check_type(c_node, pytype)             # <<<<<<<<<<<<<<
24327  * 
24328  *     if pytype is None:
24329  */
24330           __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error)
24331           __Pyx_GOTREF(__pyx_t_1);
24332           __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1));
24333           __pyx_t_1 = 0;
24334
24335           /* "lxml/objectify.pyx":1632
24336  *                     old_pytypename = "NoneType"
24337  *                 pytype = <PyType>_PYTYPE_DICT.get(old_pytypename)
24338  *                 if pytype is not None and pytype is not StrType:             # <<<<<<<<<<<<<<
24339  *                     # StrType does not have a typecheck but is the
24340  *                     # default anyway, so just accept it if given as
24341  */
24342         }
24343       }
24344       __pyx_L21:;
24345
24346       /* "lxml/objectify.pyx":1621
24347  *         old_pytypename = cetree.attributeValueFromNsName(
24348  *             c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
24349  *         if old_pytypename is not None:             # <<<<<<<<<<<<<<
24350  *             if old_pytypename == TREE_PYTYPE_NAME:
24351  *                 if not cetree.hasChild(c_node):
24352  */
24353     }
24354
24355     /* "lxml/objectify.pyx":1617
24356  *                     typename = None
24357  * 
24358  *     if pytype is None and not ignore_pytype:             # <<<<<<<<<<<<<<
24359  *         # check that old pytype value is valid
24360  *         old_pytypename = cetree.attributeValueFromNsName(
24361  */
24362   }
24363
24364   /* "lxml/objectify.pyx":1638
24365  *                     pytype = _check_type(c_node, pytype)
24366  * 
24367  *     if pytype is None:             # <<<<<<<<<<<<<<
24368  *         # try to guess type
24369  *         if not cetree.hasChild(c_node):
24370  */
24371   __pyx_t_3 = (((PyObject *)__pyx_v_pytype) == Py_None);
24372   __pyx_t_2 = (__pyx_t_3 != 0);
24373   if (__pyx_t_2) {
24374
24375     /* "lxml/objectify.pyx":1640
24376  *     if pytype is None:
24377  *         # try to guess type
24378  *         if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24379  *             # element has no children => data class
24380  *             pytype = _guessPyType(textOf(c_node), StrType)
24381  */
24382     __pyx_t_2 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0);
24383     if (__pyx_t_2) {
24384
24385       /* "lxml/objectify.pyx":1642
24386  *         if not cetree.hasChild(c_node):
24387  *             # element has no children => data class
24388  *             pytype = _guessPyType(textOf(c_node), StrType)             # <<<<<<<<<<<<<<
24389  *         else:
24390  *             istree = 1
24391  */
24392       __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1642, __pyx_L1_error)
24393       __Pyx_GOTREF(__pyx_t_1);
24394       __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_1, __pyx_v_StrType)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1642, __pyx_L1_error)
24395       __Pyx_GOTREF(__pyx_t_6);
24396       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24397       __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
24398       __pyx_t_6 = 0;
24399
24400       /* "lxml/objectify.pyx":1640
24401  *     if pytype is None:
24402  *         # try to guess type
24403  *         if not cetree.hasChild(c_node):             # <<<<<<<<<<<<<<
24404  *             # element has no children => data class
24405  *             pytype = _guessPyType(textOf(c_node), StrType)
24406  */
24407       goto __pyx_L28;
24408     }
24409
24410     /* "lxml/objectify.pyx":1644
24411  *             pytype = _guessPyType(textOf(c_node), StrType)
24412  *         else:
24413  *             istree = 1             # <<<<<<<<<<<<<<
24414  * 
24415  *     if pytype is None:
24416  */
24417     /*else*/ {
24418       __pyx_v_istree = 1;
24419     }
24420     __pyx_L28:;
24421
24422     /* "lxml/objectify.pyx":1638
24423  *                     pytype = _check_type(c_node, pytype)
24424  * 
24425  *     if pytype is None:             # <<<<<<<<<<<<<<
24426  *         # try to guess type
24427  *         if not cetree.hasChild(c_node):
24428  */
24429   }
24430
24431   /* "lxml/objectify.pyx":1646
24432  *             istree = 1
24433  * 
24434  *     if pytype is None:             # <<<<<<<<<<<<<<
24435  *         # use default type for empty elements
24436  *         if cetree.hasText(c_node):
24437  */
24438   __pyx_t_2 = (((PyObject *)__pyx_v_pytype) == Py_None);
24439   __pyx_t_3 = (__pyx_t_2 != 0);
24440   if (__pyx_t_3) {
24441
24442     /* "lxml/objectify.pyx":1648
24443  *     if pytype is None:
24444  *         # use default type for empty elements
24445  *         if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
24446  *             pytype = StrType
24447  *         else:
24448  */
24449     __pyx_t_3 = (hasText(__pyx_v_c_node) != 0);
24450     if (__pyx_t_3) {
24451
24452       /* "lxml/objectify.pyx":1649
24453  *         # use default type for empty elements
24454  *         if cetree.hasText(c_node):
24455  *             pytype = StrType             # <<<<<<<<<<<<<<
24456  *         else:
24457  *             pytype = empty_pytype
24458  */
24459       __Pyx_INCREF(((PyObject *)__pyx_v_StrType));
24460       __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_StrType);
24461
24462       /* "lxml/objectify.pyx":1648
24463  *     if pytype is None:
24464  *         # use default type for empty elements
24465  *         if cetree.hasText(c_node):             # <<<<<<<<<<<<<<
24466  *             pytype = StrType
24467  *         else:
24468  */
24469       goto __pyx_L30;
24470     }
24471
24472     /* "lxml/objectify.pyx":1651
24473  *             pytype = StrType
24474  *         else:
24475  *             pytype = empty_pytype             # <<<<<<<<<<<<<<
24476  *             if typename is None:
24477  *                 typename = empty_type_name
24478  */
24479     /*else*/ {
24480       __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype));
24481       __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_empty_pytype);
24482
24483       /* "lxml/objectify.pyx":1652
24484  *         else:
24485  *             pytype = empty_pytype
24486  *             if typename is None:             # <<<<<<<<<<<<<<
24487  *                 typename = empty_type_name
24488  * 
24489  */
24490       __pyx_t_3 = (__pyx_v_typename == Py_None);
24491       __pyx_t_2 = (__pyx_t_3 != 0);
24492       if (__pyx_t_2) {
24493
24494         /* "lxml/objectify.pyx":1653
24495  *             pytype = empty_pytype
24496  *             if typename is None:
24497  *                 typename = empty_type_name             # <<<<<<<<<<<<<<
24498  * 
24499  *     if pytype is not None:
24500  */
24501         __Pyx_INCREF(__pyx_v_empty_type_name);
24502         __Pyx_DECREF_SET(__pyx_v_typename, __pyx_v_empty_type_name);
24503
24504         /* "lxml/objectify.pyx":1652
24505  *         else:
24506  *             pytype = empty_pytype
24507  *             if typename is None:             # <<<<<<<<<<<<<<
24508  *                 typename = empty_type_name
24509  * 
24510  */
24511       }
24512     }
24513     __pyx_L30:;
24514
24515     /* "lxml/objectify.pyx":1646
24516  *             istree = 1
24517  * 
24518  *     if pytype is None:             # <<<<<<<<<<<<<<
24519  *         # use default type for empty elements
24520  *         if cetree.hasText(c_node):
24521  */
24522   }
24523
24524   /* "lxml/objectify.pyx":1655
24525  *                 typename = empty_type_name
24526  * 
24527  *     if pytype is not None:             # <<<<<<<<<<<<<<
24528  *         if typename is None:
24529  *             if not istree:
24530  */
24531   __pyx_t_2 = (((PyObject *)__pyx_v_pytype) != Py_None);
24532   __pyx_t_3 = (__pyx_t_2 != 0);
24533   if (__pyx_t_3) {
24534
24535     /* "lxml/objectify.pyx":1656
24536  * 
24537  *     if pytype is not None:
24538  *         if typename is None:             # <<<<<<<<<<<<<<
24539  *             if not istree:
24540  *                 if pytype._schema_types:
24541  */
24542     __pyx_t_3 = (__pyx_v_typename == Py_None);
24543     __pyx_t_2 = (__pyx_t_3 != 0);
24544     if (__pyx_t_2) {
24545
24546       /* "lxml/objectify.pyx":1657
24547  *     if pytype is not None:
24548  *         if typename is None:
24549  *             if not istree:             # <<<<<<<<<<<<<<
24550  *                 if pytype._schema_types:
24551  *                     # pytype->xsi:type is a 1:n mapping
24552  */
24553       __pyx_t_2 = ((!(__pyx_v_istree != 0)) != 0);
24554       if (__pyx_t_2) {
24555
24556         /* "lxml/objectify.pyx":1658
24557  *         if typename is None:
24558  *             if not istree:
24559  *                 if pytype._schema_types:             # <<<<<<<<<<<<<<
24560  *                     # pytype->xsi:type is a 1:n mapping
24561  *                     # simply take the first
24562  */
24563         __pyx_t_2 = (__pyx_v_pytype->_schema_types != Py_None)&&(PyList_GET_SIZE(__pyx_v_pytype->_schema_types) != 0);
24564         if (__pyx_t_2) {
24565
24566           /* "lxml/objectify.pyx":1661
24567  *                     # pytype->xsi:type is a 1:n mapping
24568  *                     # simply take the first
24569  *                     typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
24570  *         elif typename not in pytype._schema_types:
24571  *             typename = pytype._schema_types[0]
24572  */
24573           if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) {
24574             PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24575             __PYX_ERR(0, 1661, __pyx_L1_error)
24576           }
24577           __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1661, __pyx_L1_error)
24578           __Pyx_GOTREF(__pyx_t_6);
24579           __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24580           __pyx_t_6 = 0;
24581
24582           /* "lxml/objectify.pyx":1658
24583  *         if typename is None:
24584  *             if not istree:
24585  *                 if pytype._schema_types:             # <<<<<<<<<<<<<<
24586  *                     # pytype->xsi:type is a 1:n mapping
24587  *                     # simply take the first
24588  */
24589         }
24590
24591         /* "lxml/objectify.pyx":1657
24592  *     if pytype is not None:
24593  *         if typename is None:
24594  *             if not istree:             # <<<<<<<<<<<<<<
24595  *                 if pytype._schema_types:
24596  *                     # pytype->xsi:type is a 1:n mapping
24597  */
24598       }
24599
24600       /* "lxml/objectify.pyx":1656
24601  * 
24602  *     if pytype is not None:
24603  *         if typename is None:             # <<<<<<<<<<<<<<
24604  *             if not istree:
24605  *                 if pytype._schema_types:
24606  */
24607       goto __pyx_L33;
24608     }
24609
24610     /* "lxml/objectify.pyx":1662
24611  *                     # simply take the first
24612  *                     typename = pytype._schema_types[0]
24613  *         elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
24614  *             typename = pytype._schema_types[0]
24615  * 
24616  */
24617     __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_typename, __pyx_v_pytype->_schema_types, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1662, __pyx_L1_error)
24618     __pyx_t_3 = (__pyx_t_2 != 0);
24619     if (__pyx_t_3) {
24620
24621       /* "lxml/objectify.pyx":1663
24622  *                     typename = pytype._schema_types[0]
24623  *         elif typename not in pytype._schema_types:
24624  *             typename = pytype._schema_types[0]             # <<<<<<<<<<<<<<
24625  * 
24626  *     if annotate_xsi:
24627  */
24628       if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) {
24629         PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
24630         __PYX_ERR(0, 1663, __pyx_L1_error)
24631       }
24632       __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1663, __pyx_L1_error)
24633       __Pyx_GOTREF(__pyx_t_6);
24634       __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6);
24635       __pyx_t_6 = 0;
24636
24637       /* "lxml/objectify.pyx":1662
24638  *                     # simply take the first
24639  *                     typename = pytype._schema_types[0]
24640  *         elif typename not in pytype._schema_types:             # <<<<<<<<<<<<<<
24641  *             typename = pytype._schema_types[0]
24642  * 
24643  */
24644     }
24645     __pyx_L33:;
24646
24647     /* "lxml/objectify.pyx":1655
24648  *                 typename = empty_type_name
24649  * 
24650  *     if pytype is not None:             # <<<<<<<<<<<<<<
24651  *         if typename is None:
24652  *             if not istree:
24653  */
24654   }
24655
24656   /* "lxml/objectify.pyx":1665
24657  *             typename = pytype._schema_types[0]
24658  * 
24659  *     if annotate_xsi:             # <<<<<<<<<<<<<<
24660  *         if typename is None or istree:
24661  *             cetree.delAttributeFromNsName(
24662  */
24663   __pyx_t_3 = (__pyx_v_annotate_xsi != 0);
24664   if (__pyx_t_3) {
24665
24666     /* "lxml/objectify.pyx":1666
24667  * 
24668  *     if annotate_xsi:
24669  *         if typename is None or istree:             # <<<<<<<<<<<<<<
24670  *             cetree.delAttributeFromNsName(
24671  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24672  */
24673     __pyx_t_2 = (__pyx_v_typename == Py_None);
24674     __pyx_t_4 = (__pyx_t_2 != 0);
24675     if (!__pyx_t_4) {
24676     } else {
24677       __pyx_t_3 = __pyx_t_4;
24678       goto __pyx_L38_bool_binop_done;
24679     }
24680     __pyx_t_4 = (__pyx_v_istree != 0);
24681     __pyx_t_3 = __pyx_t_4;
24682     __pyx_L38_bool_binop_done:;
24683     if (__pyx_t_3) {
24684
24685       /* "lxml/objectify.pyx":1667
24686  *     if annotate_xsi:
24687  *         if typename is None or istree:
24688  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
24689  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24690  *         else:
24691  */
24692       (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))));
24693
24694       /* "lxml/objectify.pyx":1666
24695  * 
24696  *     if annotate_xsi:
24697  *         if typename is None or istree:             # <<<<<<<<<<<<<<
24698  *             cetree.delAttributeFromNsName(
24699  *                 c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>"type")
24700  */
24701       goto __pyx_L37;
24702     }
24703
24704     /* "lxml/objectify.pyx":1671
24705  *         else:
24706  *             # update or create attribute
24707  *             typename_utf8 = cetree.utf8(typename)             # <<<<<<<<<<<<<<
24708  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24709  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24710  */
24711     /*else*/ {
24712       __pyx_t_6 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error)
24713       __Pyx_GOTREF(__pyx_t_6);
24714       __pyx_v_typename_utf8 = __pyx_t_6;
24715       __pyx_t_6 = 0;
24716
24717       /* "lxml/objectify.pyx":1672
24718  *             # update or create attribute
24719  *             typename_utf8 = cetree.utf8(typename)
24720  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
24721  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24722  *             if c_ns is not NULL:
24723  */
24724       __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, ((unsigned char *)((unsigned char *)((char const *)"xsd"))));
24725
24726       /* "lxml/objectify.pyx":1674
24727  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24728  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24729  *             if c_ns is not NULL:             # <<<<<<<<<<<<<<
24730  *                 if b':' in typename_utf8:
24731  *                     prefix, name = typename_utf8.split(b':', 1)
24732  */
24733       __pyx_t_3 = ((__pyx_v_c_ns != NULL) != 0);
24734       if (__pyx_t_3) {
24735
24736         /* "lxml/objectify.pyx":1675
24737  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24738  *             if c_ns is not NULL:
24739  *                 if b':' in typename_utf8:             # <<<<<<<<<<<<<<
24740  *                     prefix, name = typename_utf8.split(b':', 1)
24741  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24742  */
24743         __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__17, __pyx_v_typename_utf8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1675, __pyx_L1_error)
24744         __pyx_t_4 = (__pyx_t_3 != 0);
24745         if (__pyx_t_4) {
24746
24747           /* "lxml/objectify.pyx":1676
24748  *             if c_ns is not NULL:
24749  *                 if b':' in typename_utf8:
24750  *                     prefix, name = typename_utf8.split(b':', 1)             # <<<<<<<<<<<<<<
24751  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24752  *                         typename_utf8 = name
24753  */
24754           __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_split, __pyx_v_typename_utf8, __pyx_kp_b__17, __pyx_int_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
24755           __Pyx_GOTREF(__pyx_t_6);
24756           if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
24757             PyObject* sequence = __pyx_t_6;
24758             Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
24759             if (unlikely(size != 2)) {
24760               if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24761               else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24762               __PYX_ERR(0, 1676, __pyx_L1_error)
24763             }
24764             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24765             if (likely(PyTuple_CheckExact(sequence))) {
24766               __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
24767               __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
24768             } else {
24769               __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
24770               __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
24771             }
24772             __Pyx_INCREF(__pyx_t_1);
24773             __Pyx_INCREF(__pyx_t_5);
24774             #else
24775             __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error)
24776             __Pyx_GOTREF(__pyx_t_1);
24777             __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1676, __pyx_L1_error)
24778             __Pyx_GOTREF(__pyx_t_5);
24779             #endif
24780             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24781           } else {
24782             Py_ssize_t index = -1;
24783             __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1676, __pyx_L1_error)
24784             __Pyx_GOTREF(__pyx_t_7);
24785             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24786             __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
24787             index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L42_unpacking_failed;
24788             __Pyx_GOTREF(__pyx_t_1);
24789             index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L42_unpacking_failed;
24790             __Pyx_GOTREF(__pyx_t_5);
24791             if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1676, __pyx_L1_error)
24792             __pyx_t_8 = NULL;
24793             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24794             goto __pyx_L43_unpacking_done;
24795             __pyx_L42_unpacking_failed:;
24796             __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24797             __pyx_t_8 = NULL;
24798             if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
24799             __PYX_ERR(0, 1676, __pyx_L1_error)
24800             __pyx_L43_unpacking_done:;
24801           }
24802           __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1);
24803           __pyx_t_1 = 0;
24804           __pyx_v_name = __pyx_t_5;
24805           __pyx_t_5 = 0;
24806
24807           /* "lxml/objectify.pyx":1677
24808  *                 if b':' in typename_utf8:
24809  *                     prefix, name = typename_utf8.split(b':', 1)
24810  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
24811  *                         typename_utf8 = name
24812  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24813  */
24814           __pyx_t_3 = ((__pyx_v_c_ns->prefix == NULL) != 0);
24815           if (!__pyx_t_3) {
24816           } else {
24817             __pyx_t_4 = __pyx_t_3;
24818             goto __pyx_L45_bool_binop_done;
24819           }
24820           __pyx_t_3 = (((__pyx_v_c_ns->prefix[0]) == '\x00') != 0);
24821           __pyx_t_4 = __pyx_t_3;
24822           __pyx_L45_bool_binop_done:;
24823           if (__pyx_t_4) {
24824
24825             /* "lxml/objectify.pyx":1678
24826  *                     prefix, name = typename_utf8.split(b':', 1)
24827  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24828  *                         typename_utf8 = name             # <<<<<<<<<<<<<<
24829  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24830  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24831  */
24832             __Pyx_INCREF(__pyx_v_name);
24833             __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_v_name);
24834
24835             /* "lxml/objectify.pyx":1677
24836  *                 if b':' in typename_utf8:
24837  *                     prefix, name = typename_utf8.split(b':', 1)
24838  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':             # <<<<<<<<<<<<<<
24839  *                         typename_utf8 = name
24840  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24841  */
24842             goto __pyx_L44;
24843           }
24844
24845           /* "lxml/objectify.pyx":1679
24846  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24847  *                         typename_utf8 = name
24848  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
24849  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24850  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24851  */
24852           __pyx_t_4 = ((xmlStrcmp((const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0) != 0);
24853           if (__pyx_t_4) {
24854
24855             /* "lxml/objectify.pyx":1680
24856  *                         typename_utf8 = name
24857  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24858  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name             # <<<<<<<<<<<<<<
24859  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24860  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24861  */
24862             __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L1_error)
24863             __Pyx_GOTREF(__pyx_t_6);
24864             __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1680, __pyx_L1_error)
24865             __Pyx_GOTREF(__pyx_t_5);
24866             __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24867             __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1680, __pyx_L1_error)
24868             __Pyx_GOTREF(__pyx_t_6);
24869             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24870             __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6);
24871             __pyx_t_6 = 0;
24872
24873             /* "lxml/objectify.pyx":1679
24874  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24875  *                         typename_utf8 = name
24876  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:             # <<<<<<<<<<<<<<
24877  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24878  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24879  */
24880           }
24881           __pyx_L44:;
24882
24883           /* "lxml/objectify.pyx":1675
24884  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24885  *             if c_ns is not NULL:
24886  *                 if b':' in typename_utf8:             # <<<<<<<<<<<<<<
24887  *                     prefix, name = typename_utf8.split(b':', 1)
24888  *                     if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
24889  */
24890           goto __pyx_L41;
24891         }
24892
24893         /* "lxml/objectify.pyx":1681
24894  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24895  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24896  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
24897  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24898  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24899  */
24900         __pyx_t_3 = ((__pyx_v_c_ns->prefix != NULL) != 0);
24901         if (__pyx_t_3) {
24902         } else {
24903           __pyx_t_4 = __pyx_t_3;
24904           goto __pyx_L47_bool_binop_done;
24905         }
24906         __pyx_t_3 = (((__pyx_v_c_ns->prefix[0]) != '\x00') != 0);
24907         __pyx_t_4 = __pyx_t_3;
24908         __pyx_L47_bool_binop_done:;
24909         if (__pyx_t_4) {
24910
24911           /* "lxml/objectify.pyx":1682
24912  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24913  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24914  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8             # <<<<<<<<<<<<<<
24915  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24916  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24917  */
24918           __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1682, __pyx_L1_error)
24919           __Pyx_GOTREF(__pyx_t_6);
24920           __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1682, __pyx_L1_error)
24921           __Pyx_GOTREF(__pyx_t_5);
24922           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24923           __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1682, __pyx_L1_error)
24924           __Pyx_GOTREF(__pyx_t_6);
24925           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24926           __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6);
24927           __pyx_t_6 = 0;
24928
24929           /* "lxml/objectify.pyx":1681
24930  *                     elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0:
24931  *                         typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + name
24932  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':             # <<<<<<<<<<<<<<
24933  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24934  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24935  */
24936         }
24937         __pyx_L41:;
24938
24939         /* "lxml/objectify.pyx":1674
24940  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24941  *                 doc, c_node, _XML_SCHEMA_NS, <unsigned char*>'xsd')
24942  *             if c_ns is not NULL:             # <<<<<<<<<<<<<<
24943  *                 if b':' in typename_utf8:
24944  *                     prefix, name = typename_utf8.split(b':', 1)
24945  */
24946       }
24947
24948       /* "lxml/objectify.pyx":1683
24949  *                 elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0':
24950  *                     typename_utf8 = (<unsigned char*>c_ns.prefix) + b':' + typename_utf8
24951  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
24952  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24953  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
24954  */
24955       __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"xsi"))));
24956
24957       /* "lxml/objectify.pyx":1685
24958  *             c_ns = cetree.findOrBuildNodeNsPrefix(
24959  *                 doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
24960  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))             # <<<<<<<<<<<<<<
24961  * 
24962  *     if annotate_pytype:
24963  */
24964       (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)((char const *)"type"))), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_typename_utf8)));
24965     }
24966     __pyx_L37:;
24967
24968     /* "lxml/objectify.pyx":1665
24969  *             typename = pytype._schema_types[0]
24970  * 
24971  *     if annotate_xsi:             # <<<<<<<<<<<<<<
24972  *         if typename is None or istree:
24973  *             cetree.delAttributeFromNsName(
24974  */
24975   }
24976
24977   /* "lxml/objectify.pyx":1687
24978  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
24979  * 
24980  *     if annotate_pytype:             # <<<<<<<<<<<<<<
24981  *         if pytype is None:
24982  *             # delete attribute if it exists
24983  */
24984   __pyx_t_4 = (__pyx_v_annotate_pytype != 0);
24985   if (__pyx_t_4) {
24986
24987     /* "lxml/objectify.pyx":1688
24988  * 
24989  *     if annotate_pytype:
24990  *         if pytype is None:             # <<<<<<<<<<<<<<
24991  *             # delete attribute if it exists
24992  *             cetree.delAttributeFromNsName(
24993  */
24994     __pyx_t_4 = (((PyObject *)__pyx_v_pytype) == Py_None);
24995     __pyx_t_3 = (__pyx_t_4 != 0);
24996     if (__pyx_t_3) {
24997
24998       /* "lxml/objectify.pyx":1690
24999  *         if pytype is None:
25000  *             # delete attribute if it exists
25001  *             cetree.delAttributeFromNsName(             # <<<<<<<<<<<<<<
25002  *                 c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
25003  *         else:
25004  */
25005       (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME));
25006
25007       /* "lxml/objectify.pyx":1688
25008  * 
25009  *     if annotate_pytype:
25010  *         if pytype is None:             # <<<<<<<<<<<<<<
25011  *             # delete attribute if it exists
25012  *             cetree.delAttributeFromNsName(
25013  */
25014       goto __pyx_L50;
25015     }
25016
25017     /* "lxml/objectify.pyx":1694
25018  *         else:
25019  *             # update or create attribute
25020  *             c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
25021  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25022  *             pytype_name = cetree.utf8(pytype.name)
25023  */
25024     /*else*/ {
25025
25026       /* "lxml/objectify.pyx":1695
25027  *             # update or create attribute
25028  *             c_ns = cetree.findOrBuildNodeNsPrefix(
25029  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')             # <<<<<<<<<<<<<<
25030  *             pytype_name = cetree.utf8(pytype.name)
25031  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25032  */
25033       __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, ((unsigned char *)((unsigned char *)((char const *)"py"))));
25034
25035       /* "lxml/objectify.pyx":1696
25036  *             c_ns = cetree.findOrBuildNodeNsPrefix(
25037  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25038  *             pytype_name = cetree.utf8(pytype.name)             # <<<<<<<<<<<<<<
25039  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25040  *                               _xcstr(pytype_name))
25041  */
25042       __pyx_t_6 = __pyx_v_pytype->name;
25043       __Pyx_INCREF(__pyx_t_6);
25044       __pyx_t_5 = utf8(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error)
25045       __Pyx_GOTREF(__pyx_t_5);
25046       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25047       __pyx_v_pytype_name = ((PyObject*)__pyx_t_5);
25048       __pyx_t_5 = 0;
25049
25050       /* "lxml/objectify.pyx":1697
25051  *                 doc, c_node, _PYTYPE_NAMESPACE, <unsigned char*>'py')
25052  *             pytype_name = cetree.utf8(pytype.name)
25053  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,             # <<<<<<<<<<<<<<
25054  *                               _xcstr(pytype_name))
25055  *             if pytype is NoneType:
25056  */
25057       (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_pytype_name)));
25058
25059       /* "lxml/objectify.pyx":1699
25060  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25061  *                               _xcstr(pytype_name))
25062  *             if pytype is NoneType:             # <<<<<<<<<<<<<<
25063  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25064  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25065  */
25066       __pyx_t_3 = (__pyx_v_pytype == __pyx_v_NoneType);
25067       __pyx_t_4 = (__pyx_t_3 != 0);
25068       if (__pyx_t_4) {
25069
25070         /* "lxml/objectify.pyx":1700
25071  *                               _xcstr(pytype_name))
25072  *             if pytype is NoneType:
25073  *                 c_ns = cetree.findOrBuildNodeNsPrefix(             # <<<<<<<<<<<<<<
25074  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25075  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
25076  */
25077         __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"xsi"))));
25078
25079         /* "lxml/objectify.pyx":1702
25080  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25081  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25082  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")             # <<<<<<<<<<<<<<
25083  * 
25084  *     return 0
25085  */
25086         (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)((char const *)"nil"))), ((unsigned char *)((unsigned char *)((char const *)"true")))));
25087
25088         /* "lxml/objectify.pyx":1699
25089  *             tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
25090  *                               _xcstr(pytype_name))
25091  *             if pytype is NoneType:             # <<<<<<<<<<<<<<
25092  *                 c_ns = cetree.findOrBuildNodeNsPrefix(
25093  *                     doc, c_node, _XML_SCHEMA_INSTANCE_NS, <unsigned char*>'xsi')
25094  */
25095       }
25096     }
25097     __pyx_L50:;
25098
25099     /* "lxml/objectify.pyx":1687
25100  *             tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"type", _xcstr(typename_utf8))
25101  * 
25102  *     if annotate_pytype:             # <<<<<<<<<<<<<<
25103  *         if pytype is None:
25104  *             # delete attribute if it exists
25105  */
25106   }
25107
25108   /* "lxml/objectify.pyx":1704
25109  *                 tree.xmlSetNsProp(c_node, c_ns, <unsigned char*>"nil", <unsigned char*>"true")
25110  * 
25111  *     return 0             # <<<<<<<<<<<<<<
25112  * 
25113  * cdef object _strip_attributes = etree.strip_attributes
25114  */
25115   __pyx_r = 0;
25116   goto __pyx_L0;
25117
25118   /* "lxml/objectify.pyx":1585
25119  *     tree.END_FOR_EACH_ELEMENT_FROM(c_node)
25120  * 
25121  * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc,             # <<<<<<<<<<<<<<
25122  *                            bint annotate_xsi, bint annotate_pytype,
25123  *                            bint ignore_xsi, bint ignore_pytype,
25124  */
25125
25126   /* function exit code */
25127   __pyx_L1_error:;
25128   __Pyx_XDECREF(__pyx_t_1);
25129   __Pyx_XDECREF(__pyx_t_5);
25130   __Pyx_XDECREF(__pyx_t_6);
25131   __Pyx_XDECREF(__pyx_t_7);
25132   __Pyx_AddTraceback("lxml.objectify._annotate_element", __pyx_clineno, __pyx_lineno, __pyx_filename);
25133   __pyx_r = -1;
25134   __pyx_L0:;
25135   __Pyx_XDECREF((PyObject *)__pyx_v_pytype);
25136   __Pyx_XDECREF(__pyx_v_typename);
25137   __Pyx_XDECREF(__pyx_v_prefix);
25138   __Pyx_XDECREF(__pyx_v_old_pytypename);
25139   __Pyx_XDECREF(__pyx_v_typename_utf8);
25140   __Pyx_XDECREF(__pyx_v_name);
25141   __Pyx_XDECREF(__pyx_v_pytype_name);
25142   __Pyx_RefNannyFinishContext();
25143   return __pyx_r;
25144 }
25145
25146 /* "lxml/objectify.pyx":1709
25147  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25148  * 
25149  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25150  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25151  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25152  */
25153
25154 /* Python wrapper */
25155 static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25156 static char __pyx_doc_4lxml_9objectify_26deannotate[] = "deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)\n\n    Recursively de-annotate the elements of an XML tree by removing 'py:pytype'\n    and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.\n\n    If the 'pytype' keyword argument is True (the default), 'py:pytype'\n    attributes will be removed. If the 'xsi' keyword argument is True (the \n    default), 'xsi:type' attributes will be removed.\n    If the 'xsi_nil' keyword argument is True (default: False), 'xsi:nil'\n    attributes will be removed.\n\n    Note that this does not touch the namespace declarations by\n    default.  If you want to remove unused namespace declarations from\n    the tree, pass the option ``cleanup_namespaces=True``.\n    ";
25157 static PyMethodDef __pyx_mdef_4lxml_9objectify_27deannotate = {"deannotate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_27deannotate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_26deannotate};
25158 static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25159   PyObject *__pyx_v_element_or_tree = 0;
25160   int __pyx_v_pytype;
25161   int __pyx_v_xsi;
25162   int __pyx_v_xsi_nil;
25163   int __pyx_v_cleanup_namespaces;
25164   int __pyx_lineno = 0;
25165   const char *__pyx_filename = NULL;
25166   int __pyx_clineno = 0;
25167   PyObject *__pyx_r = 0;
25168   __Pyx_RefNannyDeclarations
25169   __Pyx_RefNannySetupContext("deannotate (wrapper)", 0);
25170   {
25171     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_element_or_tree,&__pyx_n_s_pytype,&__pyx_n_s_xsi_2,&__pyx_n_s_xsi_nil,&__pyx_n_s_cleanup_namespaces,0};
25172     PyObject* values[5] = {0,0,0,0,0};
25173     if (unlikely(__pyx_kwds)) {
25174       Py_ssize_t kw_args;
25175       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25176       switch (pos_args) {
25177         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25178         CYTHON_FALLTHROUGH;
25179         case  0: break;
25180         default: goto __pyx_L5_argtuple_error;
25181       }
25182       kw_args = PyDict_Size(__pyx_kwds);
25183       switch (pos_args) {
25184         case  0:
25185         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element_or_tree)) != 0)) kw_args--;
25186         else goto __pyx_L5_argtuple_error;
25187       }
25188       if (kw_args > 0 && likely(kw_args <= 4)) {
25189         Py_ssize_t index;
25190         for (index = 1; index < 5 && kw_args > 0; index++) {
25191           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
25192           if (value) { values[index] = value; kw_args--; }
25193         }
25194       }
25195       if (unlikely(kw_args > 0)) {
25196         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deannotate") < 0)) __PYX_ERR(0, 1709, __pyx_L3_error)
25197       }
25198     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
25199       goto __pyx_L5_argtuple_error;
25200     } else {
25201       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25202     }
25203     __pyx_v_element_or_tree = values[0];
25204     if (values[1]) {
25205       __pyx_v_pytype = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pytype == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L3_error)
25206     } else {
25207       __pyx_v_pytype = ((int)((int)1));
25208     }
25209     if (values[2]) {
25210       __pyx_v_xsi = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_xsi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1709, __pyx_L3_error)
25211     } else {
25212       __pyx_v_xsi = ((int)((int)1));
25213     }
25214     if (values[3]) {
25215       __pyx_v_xsi_nil = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_xsi_nil == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1710, __pyx_L3_error)
25216     } else {
25217
25218       /* "lxml/objectify.pyx":1710
25219  * 
25220  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
25221  *                bint xsi_nil=False, bint cleanup_namespaces=False):             # <<<<<<<<<<<<<<
25222  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25223  * 
25224  */
25225       __pyx_v_xsi_nil = ((int)((int)0));
25226     }
25227     if (values[4]) {
25228       __pyx_v_cleanup_namespaces = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_cleanup_namespaces == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1710, __pyx_L3_error)
25229     } else {
25230       __pyx_v_cleanup_namespaces = ((int)((int)0));
25231     }
25232   }
25233   goto __pyx_L4_argument_unpacking_done;
25234   __pyx_L5_argtuple_error:;
25235   __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1709, __pyx_L3_error)
25236   __pyx_L3_error:;
25237   __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
25238   __Pyx_RefNannyFinishContext();
25239   return NULL;
25240   __pyx_L4_argument_unpacking_done:;
25241   __pyx_r = __pyx_pf_4lxml_9objectify_26deannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_pytype, __pyx_v_xsi, __pyx_v_xsi_nil, __pyx_v_cleanup_namespaces);
25242
25243   /* "lxml/objectify.pyx":1709
25244  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25245  * 
25246  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25247  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25248  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25249  */
25250
25251   /* function exit code */
25252   __Pyx_RefNannyFinishContext();
25253   return __pyx_r;
25254 }
25255
25256 static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_element_or_tree, int __pyx_v_pytype, int __pyx_v_xsi, int __pyx_v_xsi_nil, int __pyx_v_cleanup_namespaces) {
25257   PyObject *__pyx_v_attribute_names = 0;
25258   PyObject *__pyx_r = NULL;
25259   __Pyx_RefNannyDeclarations
25260   PyObject *__pyx_t_1 = NULL;
25261   int __pyx_t_2;
25262   int __pyx_t_3;
25263   PyObject *__pyx_t_4 = NULL;
25264   PyObject *__pyx_t_5 = NULL;
25265   int __pyx_lineno = 0;
25266   const char *__pyx_filename = NULL;
25267   int __pyx_clineno = 0;
25268   __Pyx_RefNannySetupContext("deannotate", 0);
25269
25270   /* "lxml/objectify.pyx":1726
25271  *     the tree, pass the option ``cleanup_namespaces=True``.
25272  *     """
25273  *     cdef list attribute_names = []             # <<<<<<<<<<<<<<
25274  * 
25275  *     if pytype:
25276  */
25277   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L1_error)
25278   __Pyx_GOTREF(__pyx_t_1);
25279   __pyx_v_attribute_names = ((PyObject*)__pyx_t_1);
25280   __pyx_t_1 = 0;
25281
25282   /* "lxml/objectify.pyx":1728
25283  *     cdef list attribute_names = []
25284  * 
25285  *     if pytype:             # <<<<<<<<<<<<<<
25286  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25287  *     if xsi:
25288  */
25289   __pyx_t_2 = (__pyx_v_pytype != 0);
25290   if (__pyx_t_2) {
25291
25292     /* "lxml/objectify.pyx":1729
25293  * 
25294  *     if pytype:
25295  *         attribute_names.append(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
25296  *     if xsi:
25297  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25298  */
25299     __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error)
25300     __Pyx_GOTREF(__pyx_t_1);
25301     __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1729, __pyx_L1_error)
25302     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25303
25304     /* "lxml/objectify.pyx":1728
25305  *     cdef list attribute_names = []
25306  * 
25307  *     if pytype:             # <<<<<<<<<<<<<<
25308  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25309  *     if xsi:
25310  */
25311   }
25312
25313   /* "lxml/objectify.pyx":1730
25314  *     if pytype:
25315  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25316  *     if xsi:             # <<<<<<<<<<<<<<
25317  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25318  *     if xsi_nil:
25319  */
25320   __pyx_t_2 = (__pyx_v_xsi != 0);
25321   if (__pyx_t_2) {
25322
25323     /* "lxml/objectify.pyx":1731
25324  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25325  *     if xsi:
25326  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
25327  *     if xsi_nil:
25328  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25329  */
25330     __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR;
25331     __Pyx_INCREF(__pyx_t_1);
25332     __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1731, __pyx_L1_error)
25333     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25334
25335     /* "lxml/objectify.pyx":1730
25336  *     if pytype:
25337  *         attribute_names.append(PYTYPE_ATTRIBUTE)
25338  *     if xsi:             # <<<<<<<<<<<<<<
25339  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25340  *     if xsi_nil:
25341  */
25342   }
25343
25344   /* "lxml/objectify.pyx":1732
25345  *     if xsi:
25346  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25347  *     if xsi_nil:             # <<<<<<<<<<<<<<
25348  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25349  * 
25350  */
25351   __pyx_t_2 = (__pyx_v_xsi_nil != 0);
25352   if (__pyx_t_2) {
25353
25354     /* "lxml/objectify.pyx":1733
25355  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25356  *     if xsi_nil:
25357  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)             # <<<<<<<<<<<<<<
25358  * 
25359  *     _strip_attributes(element_or_tree, *attribute_names)
25360  */
25361     __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR;
25362     __Pyx_INCREF(__pyx_t_1);
25363     __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1733, __pyx_L1_error)
25364     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25365
25366     /* "lxml/objectify.pyx":1732
25367  *     if xsi:
25368  *         attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
25369  *     if xsi_nil:             # <<<<<<<<<<<<<<
25370  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25371  * 
25372  */
25373   }
25374
25375   /* "lxml/objectify.pyx":1735
25376  *         attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
25377  * 
25378  *     _strip_attributes(element_or_tree, *attribute_names)             # <<<<<<<<<<<<<<
25379  *     if cleanup_namespaces:
25380  *         _cleanup_namespaces(element_or_tree)
25381  */
25382   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error)
25383   __Pyx_GOTREF(__pyx_t_1);
25384   __Pyx_INCREF(__pyx_v_element_or_tree);
25385   __Pyx_GIVEREF(__pyx_v_element_or_tree);
25386   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree);
25387   __pyx_t_4 = PySequence_Tuple(__pyx_v_attribute_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L1_error)
25388   __Pyx_GOTREF(__pyx_t_4);
25389   __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1735, __pyx_L1_error)
25390   __Pyx_GOTREF(__pyx_t_5);
25391   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25392   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25393   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1735, __pyx_L1_error)
25394   __Pyx_GOTREF(__pyx_t_4);
25395   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25396   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25397
25398   /* "lxml/objectify.pyx":1736
25399  * 
25400  *     _strip_attributes(element_or_tree, *attribute_names)
25401  *     if cleanup_namespaces:             # <<<<<<<<<<<<<<
25402  *         _cleanup_namespaces(element_or_tree)
25403  * 
25404  */
25405   __pyx_t_2 = (__pyx_v_cleanup_namespaces != 0);
25406   if (__pyx_t_2) {
25407
25408     /* "lxml/objectify.pyx":1737
25409  *     _strip_attributes(element_or_tree, *attribute_names)
25410  *     if cleanup_namespaces:
25411  *         _cleanup_namespaces(element_or_tree)             # <<<<<<<<<<<<<<
25412  * 
25413  * ################################################################################
25414  */
25415     __Pyx_INCREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
25416     __pyx_t_5 = __pyx_v_4lxml_9objectify__cleanup_namespaces; __pyx_t_1 = NULL;
25417     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
25418       __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
25419       if (likely(__pyx_t_1)) {
25420         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
25421         __Pyx_INCREF(__pyx_t_1);
25422         __Pyx_INCREF(function);
25423         __Pyx_DECREF_SET(__pyx_t_5, function);
25424       }
25425     }
25426     __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_element_or_tree) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_element_or_tree);
25427     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25428     if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L1_error)
25429     __Pyx_GOTREF(__pyx_t_4);
25430     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25431     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25432
25433     /* "lxml/objectify.pyx":1736
25434  * 
25435  *     _strip_attributes(element_or_tree, *attribute_names)
25436  *     if cleanup_namespaces:             # <<<<<<<<<<<<<<
25437  *         _cleanup_namespaces(element_or_tree)
25438  * 
25439  */
25440   }
25441
25442   /* "lxml/objectify.pyx":1709
25443  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
25444  * 
25445  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
25446  *                bint xsi_nil=False, bint cleanup_namespaces=False):
25447  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
25448  */
25449
25450   /* function exit code */
25451   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25452   goto __pyx_L0;
25453   __pyx_L1_error:;
25454   __Pyx_XDECREF(__pyx_t_1);
25455   __Pyx_XDECREF(__pyx_t_4);
25456   __Pyx_XDECREF(__pyx_t_5);
25457   __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename);
25458   __pyx_r = NULL;
25459   __pyx_L0:;
25460   __Pyx_XDECREF(__pyx_v_attribute_names);
25461   __Pyx_XGIVEREF(__pyx_r);
25462   __Pyx_RefNannyFinishContext();
25463   return __pyx_r;
25464 }
25465
25466 /* "lxml/objectify.pyx":1749
25467  * objectify_parser = __DEFAULT_PARSER
25468  * 
25469  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
25470  *     u"""set_default_parser(new_parser = None)
25471  * 
25472  */
25473
25474 /* Python wrapper */
25475 static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25476 static char __pyx_doc_4lxml_9objectify_28set_default_parser[] = "set_default_parser(new_parser = None)\n\n    Replace the default parser used by objectify's Element() and\n    fromstring() functions.\n\n    The new parser must be an etree.XMLParser.\n\n    Call without arguments to reset to the original parser.\n    ";
25477 static PyMethodDef __pyx_mdef_4lxml_9objectify_29set_default_parser = {"set_default_parser", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_29set_default_parser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_28set_default_parser};
25478 static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25479   PyObject *__pyx_v_new_parser = 0;
25480   int __pyx_lineno = 0;
25481   const char *__pyx_filename = NULL;
25482   int __pyx_clineno = 0;
25483   PyObject *__pyx_r = 0;
25484   __Pyx_RefNannyDeclarations
25485   __Pyx_RefNannySetupContext("set_default_parser (wrapper)", 0);
25486   {
25487     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_new_parser,0};
25488     PyObject* values[1] = {0};
25489     values[0] = ((PyObject *)((PyObject *)Py_None));
25490     if (unlikely(__pyx_kwds)) {
25491       Py_ssize_t kw_args;
25492       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25493       switch (pos_args) {
25494         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25495         CYTHON_FALLTHROUGH;
25496         case  0: break;
25497         default: goto __pyx_L5_argtuple_error;
25498       }
25499       kw_args = PyDict_Size(__pyx_kwds);
25500       switch (pos_args) {
25501         case  0:
25502         if (kw_args > 0) {
25503           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_new_parser);
25504           if (value) { values[0] = value; kw_args--; }
25505         }
25506       }
25507       if (unlikely(kw_args > 0)) {
25508         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) __PYX_ERR(0, 1749, __pyx_L3_error)
25509       }
25510     } else {
25511       switch (PyTuple_GET_SIZE(__pyx_args)) {
25512         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25513         CYTHON_FALLTHROUGH;
25514         case  0: break;
25515         default: goto __pyx_L5_argtuple_error;
25516       }
25517     }
25518     __pyx_v_new_parser = values[0];
25519   }
25520   goto __pyx_L4_argument_unpacking_done;
25521   __pyx_L5_argtuple_error:;
25522   __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1749, __pyx_L3_error)
25523   __pyx_L3_error:;
25524   __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25525   __Pyx_RefNannyFinishContext();
25526   return NULL;
25527   __pyx_L4_argument_unpacking_done:;
25528   __pyx_r = __pyx_pf_4lxml_9objectify_28set_default_parser(__pyx_self, __pyx_v_new_parser);
25529
25530   /* function exit code */
25531   __Pyx_RefNannyFinishContext();
25532   return __pyx_r;
25533 }
25534
25535 static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_parser) {
25536   PyObject *__pyx_r = NULL;
25537   __Pyx_RefNannyDeclarations
25538   int __pyx_t_1;
25539   int __pyx_t_2;
25540   PyObject *__pyx_t_3 = NULL;
25541   int __pyx_lineno = 0;
25542   const char *__pyx_filename = NULL;
25543   int __pyx_clineno = 0;
25544   __Pyx_RefNannySetupContext("set_default_parser", 0);
25545
25546   /* "lxml/objectify.pyx":1760
25547  *     """
25548  *     global objectify_parser
25549  *     if new_parser is None:             # <<<<<<<<<<<<<<
25550  *         objectify_parser = __DEFAULT_PARSER
25551  *     elif isinstance(new_parser, etree.XMLParser):
25552  */
25553   __pyx_t_1 = (__pyx_v_new_parser == Py_None);
25554   __pyx_t_2 = (__pyx_t_1 != 0);
25555   if (__pyx_t_2) {
25556
25557     /* "lxml/objectify.pyx":1761
25558  *     global objectify_parser
25559  *     if new_parser is None:
25560  *         objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
25561  *     elif isinstance(new_parser, etree.XMLParser):
25562  *         objectify_parser = new_parser
25563  */
25564     __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25565     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
25566     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25567     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
25568
25569     /* "lxml/objectify.pyx":1760
25570  *     """
25571  *     global objectify_parser
25572  *     if new_parser is None:             # <<<<<<<<<<<<<<
25573  *         objectify_parser = __DEFAULT_PARSER
25574  *     elif isinstance(new_parser, etree.XMLParser):
25575  */
25576     goto __pyx_L3;
25577   }
25578
25579   /* "lxml/objectify.pyx":1762
25580  *     if new_parser is None:
25581  *         objectify_parser = __DEFAULT_PARSER
25582  *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
25583  *         objectify_parser = new_parser
25584  *     else:
25585  */
25586   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
25587   __Pyx_GOTREF(__pyx_t_3);
25588   __pyx_t_2 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1762, __pyx_L1_error)
25589   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25590   __pyx_t_1 = (__pyx_t_2 != 0);
25591   if (likely(__pyx_t_1)) {
25592
25593     /* "lxml/objectify.pyx":1763
25594  *         objectify_parser = __DEFAULT_PARSER
25595  *     elif isinstance(new_parser, etree.XMLParser):
25596  *         objectify_parser = new_parser             # <<<<<<<<<<<<<<
25597  *     else:
25598  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25599  */
25600     __Pyx_INCREF(__pyx_v_new_parser);
25601     __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
25602     __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_new_parser);
25603     __Pyx_GIVEREF(__pyx_v_new_parser);
25604
25605     /* "lxml/objectify.pyx":1762
25606  *     if new_parser is None:
25607  *         objectify_parser = __DEFAULT_PARSER
25608  *     elif isinstance(new_parser, etree.XMLParser):             # <<<<<<<<<<<<<<
25609  *         objectify_parser = new_parser
25610  *     else:
25611  */
25612     goto __pyx_L3;
25613   }
25614
25615   /* "lxml/objectify.pyx":1765
25616  *         objectify_parser = new_parser
25617  *     else:
25618  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"             # <<<<<<<<<<<<<<
25619  * 
25620  * def makeparser(**kw):
25621  */
25622   /*else*/ {
25623     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_parser_must_inherit_from_lxml_et, 0, 0);
25624     __PYX_ERR(0, 1765, __pyx_L1_error)
25625   }
25626   __pyx_L3:;
25627
25628   /* "lxml/objectify.pyx":1749
25629  * objectify_parser = __DEFAULT_PARSER
25630  * 
25631  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
25632  *     u"""set_default_parser(new_parser = None)
25633  * 
25634  */
25635
25636   /* function exit code */
25637   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25638   goto __pyx_L0;
25639   __pyx_L1_error:;
25640   __Pyx_XDECREF(__pyx_t_3);
25641   __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25642   __pyx_r = NULL;
25643   __pyx_L0:;
25644   __Pyx_XGIVEREF(__pyx_r);
25645   __Pyx_RefNannyFinishContext();
25646   return __pyx_r;
25647 }
25648
25649 /* "lxml/objectify.pyx":1767
25650  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25651  * 
25652  * def makeparser(**kw):             # <<<<<<<<<<<<<<
25653  *     u"""makeparser(remove_blank_text=True, **kw)
25654  * 
25655  */
25656
25657 /* Python wrapper */
25658 static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25659 static char __pyx_doc_4lxml_9objectify_30makeparser[] = "makeparser(remove_blank_text=True, **kw)\n\n    Create a new XML parser for objectify trees.\n\n    You can pass all keyword arguments that are supported by\n    ``etree.XMLParser()``.  Note that this parser defaults to removing\n    blank text.  You can disable this by passing the\n    ``remove_blank_text`` boolean keyword option yourself.\n    ";
25660 static PyMethodDef __pyx_mdef_4lxml_9objectify_31makeparser = {"makeparser", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_31makeparser, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_30makeparser};
25661 static PyObject *__pyx_pw_4lxml_9objectify_31makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25662   PyObject *__pyx_v_kw = 0;
25663   PyObject *__pyx_r = 0;
25664   __Pyx_RefNannyDeclarations
25665   __Pyx_RefNannySetupContext("makeparser (wrapper)", 0);
25666   if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
25667     __Pyx_RaiseArgtupleInvalid("makeparser", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
25668   if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "makeparser", 1))) return NULL;
25669   __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kw)) return NULL;
25670   __Pyx_GOTREF(__pyx_v_kw);
25671   __pyx_r = __pyx_pf_4lxml_9objectify_30makeparser(__pyx_self, __pyx_v_kw);
25672
25673   /* function exit code */
25674   __Pyx_XDECREF(__pyx_v_kw);
25675   __Pyx_RefNannyFinishContext();
25676   return __pyx_r;
25677 }
25678
25679 static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kw) {
25680   PyObject *__pyx_v_parser = NULL;
25681   PyObject *__pyx_r = NULL;
25682   __Pyx_RefNannyDeclarations
25683   int __pyx_t_1;
25684   int __pyx_t_2;
25685   PyObject *__pyx_t_3 = NULL;
25686   PyObject *__pyx_t_4 = NULL;
25687   PyObject *__pyx_t_5 = NULL;
25688   PyObject *__pyx_t_6 = NULL;
25689   int __pyx_lineno = 0;
25690   const char *__pyx_filename = NULL;
25691   int __pyx_clineno = 0;
25692   __Pyx_RefNannySetupContext("makeparser", 0);
25693
25694   /* "lxml/objectify.pyx":1777
25695  *     ``remove_blank_text`` boolean keyword option yourself.
25696  *     """
25697  *     if 'remove_blank_text' not in kw:             # <<<<<<<<<<<<<<
25698  *         kw['remove_blank_text'] = True
25699  *     parser = etree.XMLParser(**kw)
25700  */
25701   __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_remove_blank_text, __pyx_v_kw, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1777, __pyx_L1_error)
25702   __pyx_t_2 = (__pyx_t_1 != 0);
25703   if (__pyx_t_2) {
25704
25705     /* "lxml/objectify.pyx":1778
25706  *     """
25707  *     if 'remove_blank_text' not in kw:
25708  *         kw['remove_blank_text'] = True             # <<<<<<<<<<<<<<
25709  *     parser = etree.XMLParser(**kw)
25710  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25711  */
25712     if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_remove_blank_text, Py_True) < 0)) __PYX_ERR(0, 1778, __pyx_L1_error)
25713
25714     /* "lxml/objectify.pyx":1777
25715  *     ``remove_blank_text`` boolean keyword option yourself.
25716  *     """
25717  *     if 'remove_blank_text' not in kw:             # <<<<<<<<<<<<<<
25718  *         kw['remove_blank_text'] = True
25719  *     parser = etree.XMLParser(**kw)
25720  */
25721   }
25722
25723   /* "lxml/objectify.pyx":1779
25724  *     if 'remove_blank_text' not in kw:
25725  *         kw['remove_blank_text'] = True
25726  *     parser = etree.XMLParser(**kw)             # <<<<<<<<<<<<<<
25727  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25728  *     return parser
25729  */
25730   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
25731   __Pyx_GOTREF(__pyx_t_3);
25732   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error)
25733   __Pyx_GOTREF(__pyx_t_4);
25734   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25735   __pyx_v_parser = __pyx_t_4;
25736   __pyx_t_4 = 0;
25737
25738   /* "lxml/objectify.pyx":1780
25739  *         kw['remove_blank_text'] = True
25740  *     parser = etree.XMLParser(**kw)
25741  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
25742  *     return parser
25743  * 
25744  */
25745   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L1_error)
25746   __Pyx_GOTREF(__pyx_t_3);
25747   __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error)
25748   __Pyx_GOTREF(__pyx_t_5);
25749   __pyx_t_6 = NULL;
25750   if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25751     __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
25752     if (likely(__pyx_t_6)) {
25753       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25754       __Pyx_INCREF(__pyx_t_6);
25755       __Pyx_INCREF(function);
25756       __Pyx_DECREF_SET(__pyx_t_3, function);
25757     }
25758   }
25759   __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
25760   __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25761   __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25762   if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error)
25763   __Pyx_GOTREF(__pyx_t_4);
25764   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25765   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25766
25767   /* "lxml/objectify.pyx":1781
25768  *     parser = etree.XMLParser(**kw)
25769  *     parser.set_element_class_lookup( ObjectifyElementClassLookup() )
25770  *     return parser             # <<<<<<<<<<<<<<
25771  * 
25772  * cdef _Element _makeElement(tag, text, attrib, nsmap):
25773  */
25774   __Pyx_XDECREF(__pyx_r);
25775   __Pyx_INCREF(__pyx_v_parser);
25776   __pyx_r = __pyx_v_parser;
25777   goto __pyx_L0;
25778
25779   /* "lxml/objectify.pyx":1767
25780  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
25781  * 
25782  * def makeparser(**kw):             # <<<<<<<<<<<<<<
25783  *     u"""makeparser(remove_blank_text=True, **kw)
25784  * 
25785  */
25786
25787   /* function exit code */
25788   __pyx_L1_error:;
25789   __Pyx_XDECREF(__pyx_t_3);
25790   __Pyx_XDECREF(__pyx_t_4);
25791   __Pyx_XDECREF(__pyx_t_5);
25792   __Pyx_XDECREF(__pyx_t_6);
25793   __Pyx_AddTraceback("lxml.objectify.makeparser", __pyx_clineno, __pyx_lineno, __pyx_filename);
25794   __pyx_r = NULL;
25795   __pyx_L0:;
25796   __Pyx_XDECREF(__pyx_v_parser);
25797   __Pyx_XGIVEREF(__pyx_r);
25798   __Pyx_RefNannyFinishContext();
25799   return __pyx_r;
25800 }
25801
25802 /* "lxml/objectify.pyx":1783
25803  *     return parser
25804  * 
25805  * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
25806  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
25807  * 
25808  */
25809
25810 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) {
25811   struct LxmlElement *__pyx_r = NULL;
25812   __Pyx_RefNannyDeclarations
25813   PyObject *__pyx_t_1 = NULL;
25814   PyObject *__pyx_t_2 = NULL;
25815   int __pyx_lineno = 0;
25816   const char *__pyx_filename = NULL;
25817   int __pyx_clineno = 0;
25818   __Pyx_RefNannySetupContext("_makeElement", 0);
25819
25820   /* "lxml/objectify.pyx":1784
25821  * 
25822  * cdef _Element _makeElement(tag, text, attrib, nsmap):
25823  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)             # <<<<<<<<<<<<<<
25824  * 
25825  * ################################################################################
25826  */
25827   __Pyx_XDECREF(((PyObject *)__pyx_r));
25828   __pyx_t_1 = __pyx_v_4lxml_9objectify_objectify_parser;
25829   __Pyx_INCREF(__pyx_t_1);
25830   __pyx_t_2 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)Py_None), __pyx_t_1, __pyx_v_text, Py_None, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
25831   __Pyx_GOTREF(__pyx_t_2);
25832   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25833   __pyx_r = ((struct LxmlElement *)__pyx_t_2);
25834   __pyx_t_2 = 0;
25835   goto __pyx_L0;
25836
25837   /* "lxml/objectify.pyx":1783
25838  *     return parser
25839  * 
25840  * cdef _Element _makeElement(tag, text, attrib, nsmap):             # <<<<<<<<<<<<<<
25841  *     return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
25842  * 
25843  */
25844
25845   /* function exit code */
25846   __pyx_L1_error:;
25847   __Pyx_XDECREF(__pyx_t_1);
25848   __Pyx_XDECREF(__pyx_t_2);
25849   __Pyx_AddTraceback("lxml.objectify._makeElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
25850   __pyx_r = 0;
25851   __pyx_L0:;
25852   __Pyx_XGIVEREF((PyObject *)__pyx_r);
25853   __Pyx_RefNannyFinishContext();
25854   return __pyx_r;
25855 }
25856
25857 /* "lxml/objectify.pyx":1794
25858  * SubElement = etree.SubElement
25859  * 
25860  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
25861  *     u"""fromstring(xml, parser=None, base_url=None)
25862  * 
25863  */
25864
25865 /* Python wrapper */
25866 static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
25867 static char __pyx_doc_4lxml_9objectify_32fromstring[] = "fromstring(xml, parser=None, base_url=None)\n\n    Objectify specific version of the lxml.etree fromstring() function\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
25868 static PyMethodDef __pyx_mdef_4lxml_9objectify_33fromstring = {"fromstring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_33fromstring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_32fromstring};
25869 static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
25870   PyObject *__pyx_v_xml = 0;
25871   PyObject *__pyx_v_parser = 0;
25872   PyObject *__pyx_v_base_url = 0;
25873   int __pyx_lineno = 0;
25874   const char *__pyx_filename = NULL;
25875   int __pyx_clineno = 0;
25876   PyObject *__pyx_r = 0;
25877   __Pyx_RefNannyDeclarations
25878   __Pyx_RefNannySetupContext("fromstring (wrapper)", 0);
25879   {
25880     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xml,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
25881     PyObject* values[3] = {0,0,0};
25882     values[1] = ((PyObject *)((PyObject *)Py_None));
25883     values[2] = ((PyObject *)((PyObject *)Py_None));
25884     if (unlikely(__pyx_kwds)) {
25885       Py_ssize_t kw_args;
25886       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
25887       switch (pos_args) {
25888         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25889         CYTHON_FALLTHROUGH;
25890         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25891         CYTHON_FALLTHROUGH;
25892         case  0: break;
25893         default: goto __pyx_L5_argtuple_error;
25894       }
25895       kw_args = PyDict_Size(__pyx_kwds);
25896       switch (pos_args) {
25897         case  0:
25898         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xml)) != 0)) kw_args--;
25899         else goto __pyx_L5_argtuple_error;
25900         CYTHON_FALLTHROUGH;
25901         case  1:
25902         if (kw_args > 0) {
25903           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
25904           if (value) { values[1] = value; kw_args--; }
25905         }
25906       }
25907       if (kw_args == 1) {
25908         const Py_ssize_t index = 2;
25909         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
25910         if (value) { values[index] = value; kw_args--; }
25911       }
25912       if (unlikely(kw_args > 0)) {
25913         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 1794, __pyx_L3_error)
25914       }
25915     } else {
25916       switch (PyTuple_GET_SIZE(__pyx_args)) {
25917         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
25918         CYTHON_FALLTHROUGH;
25919         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
25920         break;
25921         default: goto __pyx_L5_argtuple_error;
25922       }
25923     }
25924     __pyx_v_xml = values[0];
25925     __pyx_v_parser = values[1];
25926     __pyx_v_base_url = values[2];
25927   }
25928   goto __pyx_L4_argument_unpacking_done;
25929   __pyx_L5_argtuple_error:;
25930   __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1794, __pyx_L3_error)
25931   __pyx_L3_error:;
25932   __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
25933   __Pyx_RefNannyFinishContext();
25934   return NULL;
25935   __pyx_L4_argument_unpacking_done:;
25936   __pyx_r = __pyx_pf_4lxml_9objectify_32fromstring(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
25937
25938   /* function exit code */
25939   __Pyx_RefNannyFinishContext();
25940   return __pyx_r;
25941 }
25942
25943 static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
25944   PyObject *__pyx_r = NULL;
25945   __Pyx_RefNannyDeclarations
25946   int __pyx_t_1;
25947   int __pyx_t_2;
25948   PyObject *__pyx_t_3 = NULL;
25949   PyObject *__pyx_t_4 = NULL;
25950   PyObject *__pyx_t_5 = NULL;
25951   int __pyx_lineno = 0;
25952   const char *__pyx_filename = NULL;
25953   int __pyx_clineno = 0;
25954   __Pyx_RefNannySetupContext("fromstring", 0);
25955   __Pyx_INCREF(__pyx_v_parser);
25956
25957   /* "lxml/objectify.pyx":1806
25958  *     (DTD, XInclude, ...).
25959  *     """
25960  *     if parser is None:             # <<<<<<<<<<<<<<
25961  *         parser = objectify_parser
25962  *     return _fromstring(xml, parser, base_url=base_url)
25963  */
25964   __pyx_t_1 = (__pyx_v_parser == Py_None);
25965   __pyx_t_2 = (__pyx_t_1 != 0);
25966   if (__pyx_t_2) {
25967
25968     /* "lxml/objectify.pyx":1807
25969  *     """
25970  *     if parser is None:
25971  *         parser = objectify_parser             # <<<<<<<<<<<<<<
25972  *     return _fromstring(xml, parser, base_url=base_url)
25973  * 
25974  */
25975     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
25976     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
25977
25978     /* "lxml/objectify.pyx":1806
25979  *     (DTD, XInclude, ...).
25980  *     """
25981  *     if parser is None:             # <<<<<<<<<<<<<<
25982  *         parser = objectify_parser
25983  *     return _fromstring(xml, parser, base_url=base_url)
25984  */
25985   }
25986
25987   /* "lxml/objectify.pyx":1808
25988  *     if parser is None:
25989  *         parser = objectify_parser
25990  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
25991  * 
25992  * def XML(xml, parser=None, *, base_url=None):
25993  */
25994   __Pyx_XDECREF(__pyx_r);
25995   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
25996   __Pyx_GOTREF(__pyx_t_3);
25997   __Pyx_INCREF(__pyx_v_xml);
25998   __Pyx_GIVEREF(__pyx_v_xml);
25999   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xml);
26000   __Pyx_INCREF(__pyx_v_parser);
26001   __Pyx_GIVEREF(__pyx_v_parser);
26002   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26003   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error)
26004   __Pyx_GOTREF(__pyx_t_4);
26005   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)
26006   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1808, __pyx_L1_error)
26007   __Pyx_GOTREF(__pyx_t_5);
26008   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26009   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26010   __pyx_r = __pyx_t_5;
26011   __pyx_t_5 = 0;
26012   goto __pyx_L0;
26013
26014   /* "lxml/objectify.pyx":1794
26015  * SubElement = etree.SubElement
26016  * 
26017  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26018  *     u"""fromstring(xml, parser=None, base_url=None)
26019  * 
26020  */
26021
26022   /* function exit code */
26023   __pyx_L1_error:;
26024   __Pyx_XDECREF(__pyx_t_3);
26025   __Pyx_XDECREF(__pyx_t_4);
26026   __Pyx_XDECREF(__pyx_t_5);
26027   __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename);
26028   __pyx_r = NULL;
26029   __pyx_L0:;
26030   __Pyx_XDECREF(__pyx_v_parser);
26031   __Pyx_XGIVEREF(__pyx_r);
26032   __Pyx_RefNannyFinishContext();
26033   return __pyx_r;
26034 }
26035
26036 /* "lxml/objectify.pyx":1810
26037  *     return _fromstring(xml, parser, base_url=base_url)
26038  * 
26039  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26040  *     u"""XML(xml, parser=None, base_url=None)
26041  * 
26042  */
26043
26044 /* Python wrapper */
26045 static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26046 static char __pyx_doc_4lxml_9objectify_34XML[] = "XML(xml, parser=None, base_url=None)\n\n    Objectify specific version of the lxml.etree XML() literal factory\n    that uses the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword argument allows to set the original base URL of\n    the document to support relative Paths when looking up external entities\n    (DTD, XInclude, ...).\n    ";
26047 static PyMethodDef __pyx_mdef_4lxml_9objectify_35XML = {"XML", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_35XML, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_34XML};
26048 static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26049   PyObject *__pyx_v_xml = 0;
26050   PyObject *__pyx_v_parser = 0;
26051   PyObject *__pyx_v_base_url = 0;
26052   int __pyx_lineno = 0;
26053   const char *__pyx_filename = NULL;
26054   int __pyx_clineno = 0;
26055   PyObject *__pyx_r = 0;
26056   __Pyx_RefNannyDeclarations
26057   __Pyx_RefNannySetupContext("XML (wrapper)", 0);
26058   {
26059     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xml,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
26060     PyObject* values[3] = {0,0,0};
26061     values[1] = ((PyObject *)((PyObject *)Py_None));
26062     values[2] = ((PyObject *)((PyObject *)Py_None));
26063     if (unlikely(__pyx_kwds)) {
26064       Py_ssize_t kw_args;
26065       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26066       switch (pos_args) {
26067         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26068         CYTHON_FALLTHROUGH;
26069         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26070         CYTHON_FALLTHROUGH;
26071         case  0: break;
26072         default: goto __pyx_L5_argtuple_error;
26073       }
26074       kw_args = PyDict_Size(__pyx_kwds);
26075       switch (pos_args) {
26076         case  0:
26077         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xml)) != 0)) kw_args--;
26078         else goto __pyx_L5_argtuple_error;
26079         CYTHON_FALLTHROUGH;
26080         case  1:
26081         if (kw_args > 0) {
26082           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
26083           if (value) { values[1] = value; kw_args--; }
26084         }
26085       }
26086       if (kw_args == 1) {
26087         const Py_ssize_t index = 2;
26088         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26089         if (value) { values[index] = value; kw_args--; }
26090       }
26091       if (unlikely(kw_args > 0)) {
26092         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 1810, __pyx_L3_error)
26093       }
26094     } else {
26095       switch (PyTuple_GET_SIZE(__pyx_args)) {
26096         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26097         CYTHON_FALLTHROUGH;
26098         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26099         break;
26100         default: goto __pyx_L5_argtuple_error;
26101       }
26102     }
26103     __pyx_v_xml = values[0];
26104     __pyx_v_parser = values[1];
26105     __pyx_v_base_url = values[2];
26106   }
26107   goto __pyx_L4_argument_unpacking_done;
26108   __pyx_L5_argtuple_error:;
26109   __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1810, __pyx_L3_error)
26110   __pyx_L3_error:;
26111   __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
26112   __Pyx_RefNannyFinishContext();
26113   return NULL;
26114   __pyx_L4_argument_unpacking_done:;
26115   __pyx_r = __pyx_pf_4lxml_9objectify_34XML(__pyx_self, __pyx_v_xml, __pyx_v_parser, __pyx_v_base_url);
26116
26117   /* function exit code */
26118   __Pyx_RefNannyFinishContext();
26119   return __pyx_r;
26120 }
26121
26122 static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_xml, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
26123   PyObject *__pyx_r = NULL;
26124   __Pyx_RefNannyDeclarations
26125   int __pyx_t_1;
26126   int __pyx_t_2;
26127   PyObject *__pyx_t_3 = NULL;
26128   PyObject *__pyx_t_4 = NULL;
26129   PyObject *__pyx_t_5 = NULL;
26130   int __pyx_lineno = 0;
26131   const char *__pyx_filename = NULL;
26132   int __pyx_clineno = 0;
26133   __Pyx_RefNannySetupContext("XML", 0);
26134   __Pyx_INCREF(__pyx_v_parser);
26135
26136   /* "lxml/objectify.pyx":1822
26137  *     (DTD, XInclude, ...).
26138  *     """
26139  *     if parser is None:             # <<<<<<<<<<<<<<
26140  *         parser = objectify_parser
26141  *     return _fromstring(xml, parser, base_url=base_url)
26142  */
26143   __pyx_t_1 = (__pyx_v_parser == Py_None);
26144   __pyx_t_2 = (__pyx_t_1 != 0);
26145   if (__pyx_t_2) {
26146
26147     /* "lxml/objectify.pyx":1823
26148  *     """
26149  *     if parser is None:
26150  *         parser = objectify_parser             # <<<<<<<<<<<<<<
26151  *     return _fromstring(xml, parser, base_url=base_url)
26152  * 
26153  */
26154     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
26155     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
26156
26157     /* "lxml/objectify.pyx":1822
26158  *     (DTD, XInclude, ...).
26159  *     """
26160  *     if parser is None:             # <<<<<<<<<<<<<<
26161  *         parser = objectify_parser
26162  *     return _fromstring(xml, parser, base_url=base_url)
26163  */
26164   }
26165
26166   /* "lxml/objectify.pyx":1824
26167  *     if parser is None:
26168  *         parser = objectify_parser
26169  *     return _fromstring(xml, parser, base_url=base_url)             # <<<<<<<<<<<<<<
26170  * 
26171  * cdef object _parse
26172  */
26173   __Pyx_XDECREF(__pyx_r);
26174   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1824, __pyx_L1_error)
26175   __Pyx_GOTREF(__pyx_t_3);
26176   __Pyx_INCREF(__pyx_v_xml);
26177   __Pyx_GIVEREF(__pyx_v_xml);
26178   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xml);
26179   __Pyx_INCREF(__pyx_v_parser);
26180   __Pyx_GIVEREF(__pyx_v_parser);
26181   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26182   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __pyx_L1_error)
26183   __Pyx_GOTREF(__pyx_t_4);
26184   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1824, __pyx_L1_error)
26185   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1824, __pyx_L1_error)
26186   __Pyx_GOTREF(__pyx_t_5);
26187   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26188   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26189   __pyx_r = __pyx_t_5;
26190   __pyx_t_5 = 0;
26191   goto __pyx_L0;
26192
26193   /* "lxml/objectify.pyx":1810
26194  *     return _fromstring(xml, parser, base_url=base_url)
26195  * 
26196  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26197  *     u"""XML(xml, parser=None, base_url=None)
26198  * 
26199  */
26200
26201   /* function exit code */
26202   __pyx_L1_error:;
26203   __Pyx_XDECREF(__pyx_t_3);
26204   __Pyx_XDECREF(__pyx_t_4);
26205   __Pyx_XDECREF(__pyx_t_5);
26206   __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename);
26207   __pyx_r = NULL;
26208   __pyx_L0:;
26209   __Pyx_XDECREF(__pyx_v_parser);
26210   __Pyx_XGIVEREF(__pyx_r);
26211   __Pyx_RefNannyFinishContext();
26212   return __pyx_r;
26213 }
26214
26215 /* "lxml/objectify.pyx":1829
26216  * _parse = etree.parse
26217  * 
26218  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26219  *     u"""parse(f, parser=None, base_url=None)
26220  * 
26221  */
26222
26223 /* Python wrapper */
26224 static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26225 static char __pyx_doc_4lxml_9objectify_36parse[] = "parse(f, parser=None, base_url=None)\n\n    Parse a file or file-like object with the objectify parser.\n\n    You can pass a different parser as second argument.\n\n    The ``base_url`` keyword allows setting a URL for the document\n    when parsing from a file-like object.  This is needed when looking\n    up external entities (DTD, XInclude, ...) with relative paths.\n    ";
26226 static PyMethodDef __pyx_mdef_4lxml_9objectify_37parse = {"parse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_37parse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_36parse};
26227 static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26228   PyObject *__pyx_v_f = 0;
26229   PyObject *__pyx_v_parser = 0;
26230   PyObject *__pyx_v_base_url = 0;
26231   int __pyx_lineno = 0;
26232   const char *__pyx_filename = NULL;
26233   int __pyx_clineno = 0;
26234   PyObject *__pyx_r = 0;
26235   __Pyx_RefNannyDeclarations
26236   __Pyx_RefNannySetupContext("parse (wrapper)", 0);
26237   {
26238     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f,&__pyx_n_s_parser,&__pyx_n_s_base_url,0};
26239     PyObject* values[3] = {0,0,0};
26240     values[1] = ((PyObject *)((PyObject *)Py_None));
26241     values[2] = ((PyObject *)((PyObject *)Py_None));
26242     if (unlikely(__pyx_kwds)) {
26243       Py_ssize_t kw_args;
26244       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26245       switch (pos_args) {
26246         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26247         CYTHON_FALLTHROUGH;
26248         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26249         CYTHON_FALLTHROUGH;
26250         case  0: break;
26251         default: goto __pyx_L5_argtuple_error;
26252       }
26253       kw_args = PyDict_Size(__pyx_kwds);
26254       switch (pos_args) {
26255         case  0:
26256         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
26257         else goto __pyx_L5_argtuple_error;
26258         CYTHON_FALLTHROUGH;
26259         case  1:
26260         if (kw_args > 0) {
26261           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_parser);
26262           if (value) { values[1] = value; kw_args--; }
26263         }
26264       }
26265       if (kw_args == 1) {
26266         const Py_ssize_t index = 2;
26267         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26268         if (value) { values[index] = value; kw_args--; }
26269       }
26270       if (unlikely(kw_args > 0)) {
26271         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1829, __pyx_L3_error)
26272       }
26273     } else {
26274       switch (PyTuple_GET_SIZE(__pyx_args)) {
26275         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26276         CYTHON_FALLTHROUGH;
26277         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26278         break;
26279         default: goto __pyx_L5_argtuple_error;
26280       }
26281     }
26282     __pyx_v_f = values[0];
26283     __pyx_v_parser = values[1];
26284     __pyx_v_base_url = values[2];
26285   }
26286   goto __pyx_L4_argument_unpacking_done;
26287   __pyx_L5_argtuple_error:;
26288   __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1829, __pyx_L3_error)
26289   __pyx_L3_error:;
26290   __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
26291   __Pyx_RefNannyFinishContext();
26292   return NULL;
26293   __pyx_L4_argument_unpacking_done:;
26294   __pyx_r = __pyx_pf_4lxml_9objectify_36parse(__pyx_self, __pyx_v_f, __pyx_v_parser, __pyx_v_base_url);
26295
26296   /* function exit code */
26297   __Pyx_RefNannyFinishContext();
26298   return __pyx_r;
26299 }
26300
26301 static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f, PyObject *__pyx_v_parser, PyObject *__pyx_v_base_url) {
26302   PyObject *__pyx_r = NULL;
26303   __Pyx_RefNannyDeclarations
26304   int __pyx_t_1;
26305   int __pyx_t_2;
26306   PyObject *__pyx_t_3 = NULL;
26307   PyObject *__pyx_t_4 = NULL;
26308   PyObject *__pyx_t_5 = NULL;
26309   int __pyx_lineno = 0;
26310   const char *__pyx_filename = NULL;
26311   int __pyx_clineno = 0;
26312   __Pyx_RefNannySetupContext("parse", 0);
26313   __Pyx_INCREF(__pyx_v_parser);
26314
26315   /* "lxml/objectify.pyx":1840
26316  *     up external entities (DTD, XInclude, ...) with relative paths.
26317  *     """
26318  *     if parser is None:             # <<<<<<<<<<<<<<
26319  *         parser = objectify_parser
26320  *     return _parse(f, parser, base_url=base_url)
26321  */
26322   __pyx_t_1 = (__pyx_v_parser == Py_None);
26323   __pyx_t_2 = (__pyx_t_1 != 0);
26324   if (__pyx_t_2) {
26325
26326     /* "lxml/objectify.pyx":1841
26327  *     """
26328  *     if parser is None:
26329  *         parser = objectify_parser             # <<<<<<<<<<<<<<
26330  *     return _parse(f, parser, base_url=base_url)
26331  * 
26332  */
26333     __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
26334     __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser);
26335
26336     /* "lxml/objectify.pyx":1840
26337  *     up external entities (DTD, XInclude, ...) with relative paths.
26338  *     """
26339  *     if parser is None:             # <<<<<<<<<<<<<<
26340  *         parser = objectify_parser
26341  *     return _parse(f, parser, base_url=base_url)
26342  */
26343   }
26344
26345   /* "lxml/objectify.pyx":1842
26346  *     if parser is None:
26347  *         parser = objectify_parser
26348  *     return _parse(f, parser, base_url=base_url)             # <<<<<<<<<<<<<<
26349  * 
26350  * cdef dict _DEFAULT_NSMAP = {
26351  */
26352   __Pyx_XDECREF(__pyx_r);
26353   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1842, __pyx_L1_error)
26354   __Pyx_GOTREF(__pyx_t_3);
26355   __Pyx_INCREF(__pyx_v_f);
26356   __Pyx_GIVEREF(__pyx_v_f);
26357   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
26358   __Pyx_INCREF(__pyx_v_parser);
26359   __Pyx_GIVEREF(__pyx_v_parser);
26360   PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser);
26361   __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error)
26362   __Pyx_GOTREF(__pyx_t_4);
26363   if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)
26364   __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__parse, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error)
26365   __Pyx_GOTREF(__pyx_t_5);
26366   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26367   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26368   __pyx_r = __pyx_t_5;
26369   __pyx_t_5 = 0;
26370   goto __pyx_L0;
26371
26372   /* "lxml/objectify.pyx":1829
26373  * _parse = etree.parse
26374  * 
26375  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
26376  *     u"""parse(f, parser=None, base_url=None)
26377  * 
26378  */
26379
26380   /* function exit code */
26381   __pyx_L1_error:;
26382   __Pyx_XDECREF(__pyx_t_3);
26383   __Pyx_XDECREF(__pyx_t_4);
26384   __Pyx_XDECREF(__pyx_t_5);
26385   __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
26386   __pyx_r = NULL;
26387   __pyx_L0:;
26388   __Pyx_XDECREF(__pyx_v_parser);
26389   __Pyx_XGIVEREF(__pyx_r);
26390   __Pyx_RefNannyFinishContext();
26391   return __pyx_r;
26392 }
26393
26394 /* "lxml/objectify.pyx":1852
26395  * E = ElementMaker()
26396  * 
26397  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
26398  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
26399  * 
26400  */
26401
26402 /* Python wrapper */
26403 static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26404 static char __pyx_doc_4lxml_9objectify_38Element[] = "Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)\n\n    Objectify specific version of the lxml.etree Element() factory that\n    always creates a structural (tree) element.\n\n    NOTE: requires parser based element class lookup activated in lxml.etree!\n    ";
26405 static PyMethodDef __pyx_mdef_4lxml_9objectify_39Element = {"Element", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_39Element, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_38Element};
26406 static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26407   PyObject *__pyx_v__tag = 0;
26408   PyObject *__pyx_v_attrib = 0;
26409   PyObject *__pyx_v_nsmap = 0;
26410   PyObject *__pyx_v__pytype = 0;
26411   PyObject *__pyx_v__attributes = 0;
26412   int __pyx_lineno = 0;
26413   const char *__pyx_filename = NULL;
26414   int __pyx_clineno = 0;
26415   PyObject *__pyx_r = 0;
26416   __Pyx_RefNannyDeclarations
26417   __Pyx_RefNannySetupContext("Element (wrapper)", 0);
26418   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
26419   __Pyx_GOTREF(__pyx_v__attributes);
26420   {
26421     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag_2,&__pyx_n_s_attrib,&__pyx_n_s_nsmap,&__pyx_n_s_pytype_2,0};
26422     PyObject* values[4] = {0,0,0,0};
26423     values[1] = ((PyObject *)((PyObject *)Py_None));
26424     values[2] = ((PyObject *)((PyObject *)Py_None));
26425     values[3] = ((PyObject *)((PyObject *)Py_None));
26426     if (unlikely(__pyx_kwds)) {
26427       Py_ssize_t kw_args;
26428       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26429       switch (pos_args) {
26430         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26431         CYTHON_FALLTHROUGH;
26432         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26433         CYTHON_FALLTHROUGH;
26434         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26435         CYTHON_FALLTHROUGH;
26436         case  0: break;
26437         default: goto __pyx_L5_argtuple_error;
26438       }
26439       kw_args = PyDict_Size(__pyx_kwds);
26440       switch (pos_args) {
26441         case  0:
26442         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag_2)) != 0)) kw_args--;
26443         else goto __pyx_L5_argtuple_error;
26444         CYTHON_FALLTHROUGH;
26445         case  1:
26446         if (kw_args > 0) {
26447           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib);
26448           if (value) { values[1] = value; kw_args--; }
26449         }
26450         CYTHON_FALLTHROUGH;
26451         case  2:
26452         if (kw_args > 0) {
26453           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsmap);
26454           if (value) { values[2] = value; kw_args--; }
26455         }
26456       }
26457       if (kw_args == 1) {
26458         const Py_ssize_t index = 3;
26459         PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26460         if (value) { values[index] = value; kw_args--; }
26461       }
26462       if (unlikely(kw_args > 0)) {
26463         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "Element") < 0)) __PYX_ERR(0, 1852, __pyx_L3_error)
26464       }
26465     } else {
26466       switch (PyTuple_GET_SIZE(__pyx_args)) {
26467         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26468         CYTHON_FALLTHROUGH;
26469         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26470         CYTHON_FALLTHROUGH;
26471         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26472         break;
26473         default: goto __pyx_L5_argtuple_error;
26474       }
26475     }
26476     __pyx_v__tag = values[0];
26477     __pyx_v_attrib = values[1];
26478     __pyx_v_nsmap = values[2];
26479     __pyx_v__pytype = values[3];
26480   }
26481   goto __pyx_L4_argument_unpacking_done;
26482   __pyx_L5_argtuple_error:;
26483   __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1852, __pyx_L3_error)
26484   __pyx_L3_error:;
26485   __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
26486   __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
26487   __Pyx_RefNannyFinishContext();
26488   return NULL;
26489   __pyx_L4_argument_unpacking_done:;
26490   __pyx_r = __pyx_pf_4lxml_9objectify_38Element(__pyx_self, __pyx_v__tag, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__pytype, __pyx_v__attributes);
26491
26492   /* function exit code */
26493   __Pyx_XDECREF(__pyx_v__attributes);
26494   __Pyx_RefNannyFinishContext();
26495   return __pyx_r;
26496 }
26497
26498 static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__tag, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__attributes) {
26499   PyObject *__pyx_r = NULL;
26500   __Pyx_RefNannyDeclarations
26501   int __pyx_t_1;
26502   int __pyx_t_2;
26503   PyObject *__pyx_t_3 = NULL;
26504   PyObject *__pyx_t_4 = NULL;
26505   PyObject *__pyx_t_5 = NULL;
26506   int __pyx_lineno = 0;
26507   const char *__pyx_filename = NULL;
26508   int __pyx_clineno = 0;
26509   __Pyx_RefNannySetupContext("Element", 0);
26510   __Pyx_INCREF(__pyx_v_attrib);
26511   __Pyx_INCREF(__pyx_v_nsmap);
26512   __Pyx_INCREF(__pyx_v__pytype);
26513   __Pyx_INCREF(__pyx_v__attributes);
26514
26515   /* "lxml/objectify.pyx":1860
26516  *     NOTE: requires parser based element class lookup activated in lxml.etree!
26517  *     """
26518  *     if attrib is not None:             # <<<<<<<<<<<<<<
26519  *         if _attributes:
26520  *             attrib = dict(attrib)
26521  */
26522   __pyx_t_1 = (__pyx_v_attrib != Py_None);
26523   __pyx_t_2 = (__pyx_t_1 != 0);
26524   if (__pyx_t_2) {
26525
26526     /* "lxml/objectify.pyx":1861
26527  *     """
26528  *     if attrib is not None:
26529  *         if _attributes:             # <<<<<<<<<<<<<<
26530  *             attrib = dict(attrib)
26531  *             attrib.update(_attributes)
26532  */
26533     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1861, __pyx_L1_error)
26534     if (__pyx_t_2) {
26535
26536       /* "lxml/objectify.pyx":1862
26537  *     if attrib is not None:
26538  *         if _attributes:
26539  *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
26540  *             attrib.update(_attributes)
26541  *         _attributes = attrib
26542  */
26543       __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error)
26544       __Pyx_GOTREF(__pyx_t_3);
26545       __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_3);
26546       __pyx_t_3 = 0;
26547
26548       /* "lxml/objectify.pyx":1863
26549  *         if _attributes:
26550  *             attrib = dict(attrib)
26551  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
26552  *         _attributes = attrib
26553  *     if _pytype is None:
26554  */
26555       __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1863, __pyx_L1_error)
26556       __Pyx_GOTREF(__pyx_t_4);
26557       __pyx_t_5 = NULL;
26558       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
26559         __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
26560         if (likely(__pyx_t_5)) {
26561           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
26562           __Pyx_INCREF(__pyx_t_5);
26563           __Pyx_INCREF(function);
26564           __Pyx_DECREF_SET(__pyx_t_4, function);
26565         }
26566       }
26567       __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v__attributes);
26568       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26569       if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error)
26570       __Pyx_GOTREF(__pyx_t_3);
26571       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26572       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26573
26574       /* "lxml/objectify.pyx":1861
26575  *     """
26576  *     if attrib is not None:
26577  *         if _attributes:             # <<<<<<<<<<<<<<
26578  *             attrib = dict(attrib)
26579  *             attrib.update(_attributes)
26580  */
26581     }
26582
26583     /* "lxml/objectify.pyx":1864
26584  *             attrib = dict(attrib)
26585  *             attrib.update(_attributes)
26586  *         _attributes = attrib             # <<<<<<<<<<<<<<
26587  *     if _pytype is None:
26588  *         _pytype = TREE_PYTYPE_NAME
26589  */
26590     __Pyx_INCREF(__pyx_v_attrib);
26591     __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib);
26592
26593     /* "lxml/objectify.pyx":1860
26594  *     NOTE: requires parser based element class lookup activated in lxml.etree!
26595  *     """
26596  *     if attrib is not None:             # <<<<<<<<<<<<<<
26597  *         if _attributes:
26598  *             attrib = dict(attrib)
26599  */
26600   }
26601
26602   /* "lxml/objectify.pyx":1865
26603  *             attrib.update(_attributes)
26604  *         _attributes = attrib
26605  *     if _pytype is None:             # <<<<<<<<<<<<<<
26606  *         _pytype = TREE_PYTYPE_NAME
26607  *     if nsmap is None:
26608  */
26609   __pyx_t_2 = (__pyx_v__pytype == Py_None);
26610   __pyx_t_1 = (__pyx_t_2 != 0);
26611   if (__pyx_t_1) {
26612
26613     /* "lxml/objectify.pyx":1866
26614  *         _attributes = attrib
26615  *     if _pytype is None:
26616  *         _pytype = TREE_PYTYPE_NAME             # <<<<<<<<<<<<<<
26617  *     if nsmap is None:
26618  *         nsmap = _DEFAULT_NSMAP
26619  */
26620     __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
26621     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
26622
26623     /* "lxml/objectify.pyx":1865
26624  *             attrib.update(_attributes)
26625  *         _attributes = attrib
26626  *     if _pytype is None:             # <<<<<<<<<<<<<<
26627  *         _pytype = TREE_PYTYPE_NAME
26628  *     if nsmap is None:
26629  */
26630   }
26631
26632   /* "lxml/objectify.pyx":1867
26633  *     if _pytype is None:
26634  *         _pytype = TREE_PYTYPE_NAME
26635  *     if nsmap is None:             # <<<<<<<<<<<<<<
26636  *         nsmap = _DEFAULT_NSMAP
26637  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26638  */
26639   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
26640   __pyx_t_2 = (__pyx_t_1 != 0);
26641   if (__pyx_t_2) {
26642
26643     /* "lxml/objectify.pyx":1868
26644  *         _pytype = TREE_PYTYPE_NAME
26645  *     if nsmap is None:
26646  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
26647  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26648  *     return _makeElement(_tag, None, _attributes, nsmap)
26649  */
26650     __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26651     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26652
26653     /* "lxml/objectify.pyx":1867
26654  *     if _pytype is None:
26655  *         _pytype = TREE_PYTYPE_NAME
26656  *     if nsmap is None:             # <<<<<<<<<<<<<<
26657  *         nsmap = _DEFAULT_NSMAP
26658  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26659  */
26660   }
26661
26662   /* "lxml/objectify.pyx":1869
26663  *     if nsmap is None:
26664  *         nsmap = _DEFAULT_NSMAP
26665  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
26666  *     return _makeElement(_tag, None, _attributes, nsmap)
26667  * 
26668  */
26669   __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L1_error)
26670   __Pyx_GOTREF(__pyx_t_3);
26671   if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_3, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1869, __pyx_L1_error)
26672   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26673
26674   /* "lxml/objectify.pyx":1870
26675  *         nsmap = _DEFAULT_NSMAP
26676  *     _attributes[PYTYPE_ATTRIBUTE] = _pytype
26677  *     return _makeElement(_tag, None, _attributes, nsmap)             # <<<<<<<<<<<<<<
26678  * 
26679  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
26680  */
26681   __Pyx_XDECREF(__pyx_r);
26682   __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1870, __pyx_L1_error)
26683   __Pyx_GOTREF(__pyx_t_3);
26684   __pyx_r = __pyx_t_3;
26685   __pyx_t_3 = 0;
26686   goto __pyx_L0;
26687
26688   /* "lxml/objectify.pyx":1852
26689  * E = ElementMaker()
26690  * 
26691  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
26692  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
26693  * 
26694  */
26695
26696   /* function exit code */
26697   __pyx_L1_error:;
26698   __Pyx_XDECREF(__pyx_t_3);
26699   __Pyx_XDECREF(__pyx_t_4);
26700   __Pyx_XDECREF(__pyx_t_5);
26701   __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename);
26702   __pyx_r = NULL;
26703   __pyx_L0:;
26704   __Pyx_XDECREF(__pyx_v__attributes);
26705   __Pyx_XDECREF(__pyx_v_attrib);
26706   __Pyx_XDECREF(__pyx_v_nsmap);
26707   __Pyx_XDECREF(__pyx_v__pytype);
26708   __Pyx_XGIVEREF(__pyx_r);
26709   __Pyx_RefNannyFinishContext();
26710   return __pyx_r;
26711 }
26712
26713 /* "lxml/objectify.pyx":1872
26714  *     return _makeElement(_tag, None, _attributes, nsmap)
26715  * 
26716  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
26717  *                 **_attributes):
26718  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
26719  */
26720
26721 /* Python wrapper */
26722 static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
26723 static char __pyx_doc_4lxml_9objectify_40DataElement[] = "DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)\n\n    Create a new element from a Python value and XML attributes taken from\n    keyword arguments or a dictionary passed as second argument.\n\n    Automatically adds a 'pytype' attribute for the Python type of the value,\n    if the type can be identified.  If '_pytype' or '_xsi' are among the\n    keyword arguments, they will be used instead.\n\n    If the _value argument is an ObjectifiedDataElement instance, its py:pytype,\n    xsi:type and other attributes and nsmap are reused unless they are redefined\n    in attrib and/or keyword arguments.\n    ";
26724 static PyMethodDef __pyx_mdef_4lxml_9objectify_41DataElement = {"DataElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_41DataElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_40DataElement};
26725 static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
26726   PyObject *__pyx_v__value = 0;
26727   PyObject *__pyx_v_attrib = 0;
26728   PyObject *__pyx_v_nsmap = 0;
26729   PyObject *__pyx_v__pytype = 0;
26730   PyObject *__pyx_v__xsi = 0;
26731   PyObject *__pyx_v__attributes = 0;
26732   int __pyx_lineno = 0;
26733   const char *__pyx_filename = NULL;
26734   int __pyx_clineno = 0;
26735   PyObject *__pyx_r = 0;
26736   __Pyx_RefNannyDeclarations
26737   __Pyx_RefNannySetupContext("DataElement (wrapper)", 0);
26738   __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
26739   __Pyx_GOTREF(__pyx_v__attributes);
26740   {
26741     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_2,&__pyx_n_s_attrib,&__pyx_n_s_nsmap,&__pyx_n_s_pytype_2,&__pyx_n_s_xsi_3,0};
26742     PyObject* values[5] = {0,0,0,0,0};
26743     values[1] = ((PyObject *)((PyObject *)Py_None));
26744     values[2] = ((PyObject *)((PyObject *)Py_None));
26745     values[3] = ((PyObject *)((PyObject *)Py_None));
26746     values[4] = ((PyObject *)((PyObject *)Py_None));
26747     if (unlikely(__pyx_kwds)) {
26748       Py_ssize_t kw_args;
26749       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
26750       switch (pos_args) {
26751         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26752         CYTHON_FALLTHROUGH;
26753         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26754         CYTHON_FALLTHROUGH;
26755         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26756         CYTHON_FALLTHROUGH;
26757         case  0: break;
26758         default: goto __pyx_L5_argtuple_error;
26759       }
26760       kw_args = PyDict_Size(__pyx_kwds);
26761       switch (pos_args) {
26762         case  0:
26763         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_2)) != 0)) kw_args--;
26764         else goto __pyx_L5_argtuple_error;
26765         CYTHON_FALLTHROUGH;
26766         case  1:
26767         if (kw_args > 0) {
26768           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrib);
26769           if (value) { values[1] = value; kw_args--; }
26770         }
26771         CYTHON_FALLTHROUGH;
26772         case  2:
26773         if (kw_args > 0) {
26774           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nsmap);
26775           if (value) { values[2] = value; kw_args--; }
26776         }
26777       }
26778       if (kw_args > 0 && (kw_args <= 2)) {
26779         Py_ssize_t index;
26780         for (index = 3; index < 5 && kw_args > 0; index++) {
26781           PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, *__pyx_pyargnames[index]);
26782           if (value) { values[index] = value; kw_args--; }
26783         }
26784       }
26785       if (unlikely(kw_args > 0)) {
26786         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "DataElement") < 0)) __PYX_ERR(0, 1872, __pyx_L3_error)
26787       }
26788     } else {
26789       switch (PyTuple_GET_SIZE(__pyx_args)) {
26790         case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
26791         CYTHON_FALLTHROUGH;
26792         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
26793         CYTHON_FALLTHROUGH;
26794         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
26795         break;
26796         default: goto __pyx_L5_argtuple_error;
26797       }
26798     }
26799     __pyx_v__value = values[0];
26800     __pyx_v_attrib = values[1];
26801     __pyx_v_nsmap = values[2];
26802     __pyx_v__pytype = values[3];
26803     __pyx_v__xsi = values[4];
26804   }
26805   goto __pyx_L4_argument_unpacking_done;
26806   __pyx_L5_argtuple_error:;
26807   __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1872, __pyx_L3_error)
26808   __pyx_L3_error:;
26809   __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0;
26810   __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
26811   __Pyx_RefNannyFinishContext();
26812   return NULL;
26813   __pyx_L4_argument_unpacking_done:;
26814   __pyx_r = __pyx_pf_4lxml_9objectify_40DataElement(__pyx_self, __pyx_v__value, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__pytype, __pyx_v__xsi, __pyx_v__attributes);
26815
26816   /* function exit code */
26817   __Pyx_XDECREF(__pyx_v__attributes);
26818   __Pyx_RefNannyFinishContext();
26819   return __pyx_r;
26820 }
26821
26822 static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__value, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap, PyObject *__pyx_v__pytype, PyObject *__pyx_v__xsi, PyObject *__pyx_v__attributes) {
26823   PyObject *__pyx_v_temp = NULL;
26824   PyObject *__pyx_v_prefix = NULL;
26825   PyObject *__pyx_v_name = NULL;
26826   PyObject *__pyx_v_ns = NULL;
26827   struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_py_type = NULL;
26828   PyObject *__pyx_v_strval = NULL;
26829   PyObject *__pyx_v_stringify = NULL;
26830   PyObject *__pyx_r = NULL;
26831   __Pyx_RefNannyDeclarations
26832   int __pyx_t_1;
26833   int __pyx_t_2;
26834   int __pyx_t_3;
26835   PyObject *__pyx_t_4 = NULL;
26836   PyObject *__pyx_t_5 = NULL;
26837   PyObject *__pyx_t_6 = NULL;
26838   PyObject *__pyx_t_7 = NULL;
26839   PyObject *(*__pyx_t_8)(PyObject *);
26840   Py_ssize_t __pyx_t_9;
26841   PyObject *(*__pyx_t_10)(PyObject *);
26842   PyObject *__pyx_t_11 = NULL;
26843   int __pyx_lineno = 0;
26844   const char *__pyx_filename = NULL;
26845   int __pyx_clineno = 0;
26846   __Pyx_RefNannySetupContext("DataElement", 0);
26847   __Pyx_INCREF(__pyx_v_attrib);
26848   __Pyx_INCREF(__pyx_v_nsmap);
26849   __Pyx_INCREF(__pyx_v__pytype);
26850   __Pyx_INCREF(__pyx_v__xsi);
26851   __Pyx_INCREF(__pyx_v__attributes);
26852
26853   /* "lxml/objectify.pyx":1887
26854  *     in attrib and/or keyword arguments.
26855  *     """
26856  *     if nsmap is None:             # <<<<<<<<<<<<<<
26857  *         nsmap = _DEFAULT_NSMAP
26858  *     if attrib is not None and attrib:
26859  */
26860   __pyx_t_1 = (__pyx_v_nsmap == Py_None);
26861   __pyx_t_2 = (__pyx_t_1 != 0);
26862   if (__pyx_t_2) {
26863
26864     /* "lxml/objectify.pyx":1888
26865  *     """
26866  *     if nsmap is None:
26867  *         nsmap = _DEFAULT_NSMAP             # <<<<<<<<<<<<<<
26868  *     if attrib is not None and attrib:
26869  *         if _attributes:
26870  */
26871     __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26872     __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
26873
26874     /* "lxml/objectify.pyx":1887
26875  *     in attrib and/or keyword arguments.
26876  *     """
26877  *     if nsmap is None:             # <<<<<<<<<<<<<<
26878  *         nsmap = _DEFAULT_NSMAP
26879  *     if attrib is not None and attrib:
26880  */
26881   }
26882
26883   /* "lxml/objectify.pyx":1889
26884  *     if nsmap is None:
26885  *         nsmap = _DEFAULT_NSMAP
26886  *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
26887  *         if _attributes:
26888  *             attrib = dict(attrib)
26889  */
26890   __pyx_t_1 = (__pyx_v_attrib != Py_None);
26891   __pyx_t_3 = (__pyx_t_1 != 0);
26892   if (__pyx_t_3) {
26893   } else {
26894     __pyx_t_2 = __pyx_t_3;
26895     goto __pyx_L5_bool_binop_done;
26896   }
26897   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1889, __pyx_L1_error)
26898   __pyx_t_2 = __pyx_t_3;
26899   __pyx_L5_bool_binop_done:;
26900   if (__pyx_t_2) {
26901
26902     /* "lxml/objectify.pyx":1890
26903  *         nsmap = _DEFAULT_NSMAP
26904  *     if attrib is not None and attrib:
26905  *         if _attributes:             # <<<<<<<<<<<<<<
26906  *             attrib = dict(attrib)
26907  *             attrib.update(_attributes)
26908  */
26909     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1890, __pyx_L1_error)
26910     if (__pyx_t_2) {
26911
26912       /* "lxml/objectify.pyx":1891
26913  *     if attrib is not None and attrib:
26914  *         if _attributes:
26915  *             attrib = dict(attrib)             # <<<<<<<<<<<<<<
26916  *             attrib.update(_attributes)
26917  *         _attributes = attrib
26918  */
26919       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __pyx_L1_error)
26920       __Pyx_GOTREF(__pyx_t_4);
26921       __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_4);
26922       __pyx_t_4 = 0;
26923
26924       /* "lxml/objectify.pyx":1892
26925  *         if _attributes:
26926  *             attrib = dict(attrib)
26927  *             attrib.update(_attributes)             # <<<<<<<<<<<<<<
26928  *         _attributes = attrib
26929  *     if isinstance(_value, ObjectifiedElement):
26930  */
26931       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error)
26932       __Pyx_GOTREF(__pyx_t_5);
26933       __pyx_t_6 = NULL;
26934       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
26935         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
26936         if (likely(__pyx_t_6)) {
26937           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
26938           __Pyx_INCREF(__pyx_t_6);
26939           __Pyx_INCREF(function);
26940           __Pyx_DECREF_SET(__pyx_t_5, function);
26941         }
26942       }
26943       __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v__attributes);
26944       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
26945       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
26946       __Pyx_GOTREF(__pyx_t_4);
26947       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
26948       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26949
26950       /* "lxml/objectify.pyx":1890
26951  *         nsmap = _DEFAULT_NSMAP
26952  *     if attrib is not None and attrib:
26953  *         if _attributes:             # <<<<<<<<<<<<<<
26954  *             attrib = dict(attrib)
26955  *             attrib.update(_attributes)
26956  */
26957     }
26958
26959     /* "lxml/objectify.pyx":1893
26960  *             attrib = dict(attrib)
26961  *             attrib.update(_attributes)
26962  *         _attributes = attrib             # <<<<<<<<<<<<<<
26963  *     if isinstance(_value, ObjectifiedElement):
26964  *         if _pytype is None:
26965  */
26966     __Pyx_INCREF(__pyx_v_attrib);
26967     __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib);
26968
26969     /* "lxml/objectify.pyx":1889
26970  *     if nsmap is None:
26971  *         nsmap = _DEFAULT_NSMAP
26972  *     if attrib is not None and attrib:             # <<<<<<<<<<<<<<
26973  *         if _attributes:
26974  *             attrib = dict(attrib)
26975  */
26976   }
26977
26978   /* "lxml/objectify.pyx":1894
26979  *             attrib.update(_attributes)
26980  *         _attributes = attrib
26981  *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
26982  *         if _pytype is None:
26983  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
26984  */
26985   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__value, __pyx_ptype_4lxml_9objectify_ObjectifiedElement); 
26986   __pyx_t_3 = (__pyx_t_2 != 0);
26987   if (__pyx_t_3) {
26988
26989     /* "lxml/objectify.pyx":1895
26990  *         _attributes = attrib
26991  *     if isinstance(_value, ObjectifiedElement):
26992  *         if _pytype is None:             # <<<<<<<<<<<<<<
26993  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
26994  *                 # special case: no change!
26995  */
26996     __pyx_t_3 = (__pyx_v__pytype == Py_None);
26997     __pyx_t_2 = (__pyx_t_3 != 0);
26998     if (__pyx_t_2) {
26999
27000       /* "lxml/objectify.pyx":1896
27001  *     if isinstance(_value, ObjectifiedElement):
27002  *         if _pytype is None:
27003  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27004  *                 # special case: no change!
27005  *                 return _value.__copy__()
27006  */
27007       __pyx_t_3 = (__pyx_v__xsi == Py_None);
27008       __pyx_t_1 = (__pyx_t_3 != 0);
27009       if (__pyx_t_1) {
27010       } else {
27011         __pyx_t_2 = __pyx_t_1;
27012         goto __pyx_L11_bool_binop_done;
27013       }
27014       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1896, __pyx_L1_error)
27015       __pyx_t_3 = ((!__pyx_t_1) != 0);
27016       if (__pyx_t_3) {
27017       } else {
27018         __pyx_t_2 = __pyx_t_3;
27019         goto __pyx_L11_bool_binop_done;
27020       }
27021       __pyx_t_3 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
27022       __pyx_t_1 = (__pyx_t_3 != 0);
27023       __pyx_t_2 = __pyx_t_1;
27024       __pyx_L11_bool_binop_done:;
27025       if (__pyx_t_2) {
27026
27027         /* "lxml/objectify.pyx":1898
27028  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27029  *                 # special case: no change!
27030  *                 return _value.__copy__()             # <<<<<<<<<<<<<<
27031  *     if isinstance(_value, ObjectifiedDataElement):
27032  *         # reuse existing nsmap unless redefined in nsmap parameter
27033  */
27034         __Pyx_XDECREF(__pyx_r);
27035         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1898, __pyx_L1_error)
27036         __Pyx_GOTREF(__pyx_t_5);
27037         __pyx_t_6 = NULL;
27038         if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27039           __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27040           if (likely(__pyx_t_6)) {
27041             PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27042             __Pyx_INCREF(__pyx_t_6);
27043             __Pyx_INCREF(function);
27044             __Pyx_DECREF_SET(__pyx_t_5, function);
27045           }
27046         }
27047         __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
27048         __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27049         if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error)
27050         __Pyx_GOTREF(__pyx_t_4);
27051         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27052         __pyx_r = __pyx_t_4;
27053         __pyx_t_4 = 0;
27054         goto __pyx_L0;
27055
27056         /* "lxml/objectify.pyx":1896
27057  *     if isinstance(_value, ObjectifiedElement):
27058  *         if _pytype is None:
27059  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27060  *                 # special case: no change!
27061  *                 return _value.__copy__()
27062  */
27063       }
27064
27065       /* "lxml/objectify.pyx":1895
27066  *         _attributes = attrib
27067  *     if isinstance(_value, ObjectifiedElement):
27068  *         if _pytype is None:             # <<<<<<<<<<<<<<
27069  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27070  *                 # special case: no change!
27071  */
27072     }
27073
27074     /* "lxml/objectify.pyx":1894
27075  *             attrib.update(_attributes)
27076  *         _attributes = attrib
27077  *     if isinstance(_value, ObjectifiedElement):             # <<<<<<<<<<<<<<
27078  *         if _pytype is None:
27079  *             if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
27080  */
27081   }
27082
27083   /* "lxml/objectify.pyx":1899
27084  *                 # special case: no change!
27085  *                 return _value.__copy__()
27086  *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
27087  *         # reuse existing nsmap unless redefined in nsmap parameter
27088  *         temp = _value.nsmap
27089  */
27090   __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__value, __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement); 
27091   __pyx_t_1 = (__pyx_t_2 != 0);
27092   if (__pyx_t_1) {
27093
27094     /* "lxml/objectify.pyx":1901
27095  *     if isinstance(_value, ObjectifiedDataElement):
27096  *         # reuse existing nsmap unless redefined in nsmap parameter
27097  *         temp = _value.nsmap             # <<<<<<<<<<<<<<
27098  *         if temp is not None and temp:
27099  *             temp = dict(temp)
27100  */
27101     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_nsmap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L1_error)
27102     __Pyx_GOTREF(__pyx_t_4);
27103     __pyx_v_temp = __pyx_t_4;
27104     __pyx_t_4 = 0;
27105
27106     /* "lxml/objectify.pyx":1902
27107  *         # reuse existing nsmap unless redefined in nsmap parameter
27108  *         temp = _value.nsmap
27109  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27110  *             temp = dict(temp)
27111  *             temp.update(nsmap)
27112  */
27113     __pyx_t_2 = (__pyx_v_temp != Py_None);
27114     __pyx_t_3 = (__pyx_t_2 != 0);
27115     if (__pyx_t_3) {
27116     } else {
27117       __pyx_t_1 = __pyx_t_3;
27118       goto __pyx_L16_bool_binop_done;
27119     }
27120     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1902, __pyx_L1_error)
27121     __pyx_t_1 = __pyx_t_3;
27122     __pyx_L16_bool_binop_done:;
27123     if (__pyx_t_1) {
27124
27125       /* "lxml/objectify.pyx":1903
27126  *         temp = _value.nsmap
27127  *         if temp is not None and temp:
27128  *             temp = dict(temp)             # <<<<<<<<<<<<<<
27129  *             temp.update(nsmap)
27130  *             nsmap = temp
27131  */
27132       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error)
27133       __Pyx_GOTREF(__pyx_t_4);
27134       __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27135       __pyx_t_4 = 0;
27136
27137       /* "lxml/objectify.pyx":1904
27138  *         if temp is not None and temp:
27139  *             temp = dict(temp)
27140  *             temp.update(nsmap)             # <<<<<<<<<<<<<<
27141  *             nsmap = temp
27142  *         # reuse existing attributes unless redefined in attrib/_attributes
27143  */
27144       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L1_error)
27145       __Pyx_GOTREF(__pyx_t_5);
27146       __pyx_t_6 = NULL;
27147       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27148         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27149         if (likely(__pyx_t_6)) {
27150           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27151           __Pyx_INCREF(__pyx_t_6);
27152           __Pyx_INCREF(function);
27153           __Pyx_DECREF_SET(__pyx_t_5, function);
27154         }
27155       }
27156       __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_nsmap) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_nsmap);
27157       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27158       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error)
27159       __Pyx_GOTREF(__pyx_t_4);
27160       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27161       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27162
27163       /* "lxml/objectify.pyx":1905
27164  *             temp = dict(temp)
27165  *             temp.update(nsmap)
27166  *             nsmap = temp             # <<<<<<<<<<<<<<
27167  *         # reuse existing attributes unless redefined in attrib/_attributes
27168  *         temp = _value.attrib
27169  */
27170       __Pyx_INCREF(__pyx_v_temp);
27171       __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_temp);
27172
27173       /* "lxml/objectify.pyx":1902
27174  *         # reuse existing nsmap unless redefined in nsmap parameter
27175  *         temp = _value.nsmap
27176  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27177  *             temp = dict(temp)
27178  *             temp.update(nsmap)
27179  */
27180     }
27181
27182     /* "lxml/objectify.pyx":1907
27183  *             nsmap = temp
27184  *         # reuse existing attributes unless redefined in attrib/_attributes
27185  *         temp = _value.attrib             # <<<<<<<<<<<<<<
27186  *         if temp is not None and temp:
27187  *             temp = dict(temp)
27188  */
27189     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1907, __pyx_L1_error)
27190     __Pyx_GOTREF(__pyx_t_4);
27191     __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27192     __pyx_t_4 = 0;
27193
27194     /* "lxml/objectify.pyx":1908
27195  *         # reuse existing attributes unless redefined in attrib/_attributes
27196  *         temp = _value.attrib
27197  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27198  *             temp = dict(temp)
27199  *             temp.update(_attributes)
27200  */
27201     __pyx_t_3 = (__pyx_v_temp != Py_None);
27202     __pyx_t_2 = (__pyx_t_3 != 0);
27203     if (__pyx_t_2) {
27204     } else {
27205       __pyx_t_1 = __pyx_t_2;
27206       goto __pyx_L19_bool_binop_done;
27207     }
27208     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1908, __pyx_L1_error)
27209     __pyx_t_1 = __pyx_t_2;
27210     __pyx_L19_bool_binop_done:;
27211     if (__pyx_t_1) {
27212
27213       /* "lxml/objectify.pyx":1909
27214  *         temp = _value.attrib
27215  *         if temp is not None and temp:
27216  *             temp = dict(temp)             # <<<<<<<<<<<<<<
27217  *             temp.update(_attributes)
27218  *             _attributes = temp
27219  */
27220       __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error)
27221       __Pyx_GOTREF(__pyx_t_4);
27222       __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4);
27223       __pyx_t_4 = 0;
27224
27225       /* "lxml/objectify.pyx":1910
27226  *         if temp is not None and temp:
27227  *             temp = dict(temp)
27228  *             temp.update(_attributes)             # <<<<<<<<<<<<<<
27229  *             _attributes = temp
27230  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27231  */
27232       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L1_error)
27233       __Pyx_GOTREF(__pyx_t_5);
27234       __pyx_t_6 = NULL;
27235       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27236         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27237         if (likely(__pyx_t_6)) {
27238           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27239           __Pyx_INCREF(__pyx_t_6);
27240           __Pyx_INCREF(function);
27241           __Pyx_DECREF_SET(__pyx_t_5, function);
27242         }
27243       }
27244       __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v__attributes);
27245       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27246       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error)
27247       __Pyx_GOTREF(__pyx_t_4);
27248       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27249       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27250
27251       /* "lxml/objectify.pyx":1911
27252  *             temp = dict(temp)
27253  *             temp.update(_attributes)
27254  *             _attributes = temp             # <<<<<<<<<<<<<<
27255  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27256  *         # arguments
27257  */
27258       __Pyx_INCREF(__pyx_v_temp);
27259       __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_temp);
27260
27261       /* "lxml/objectify.pyx":1908
27262  *         # reuse existing attributes unless redefined in attrib/_attributes
27263  *         temp = _value.attrib
27264  *         if temp is not None and temp:             # <<<<<<<<<<<<<<
27265  *             temp = dict(temp)
27266  *             temp.update(_attributes)
27267  */
27268     }
27269
27270     /* "lxml/objectify.pyx":1914
27271  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27272  *         # arguments
27273  *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
27274  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27275  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27276  */
27277     __pyx_t_2 = (__pyx_v__xsi == Py_None);
27278     __pyx_t_3 = (__pyx_t_2 != 0);
27279     if (__pyx_t_3) {
27280     } else {
27281       __pyx_t_1 = __pyx_t_3;
27282       goto __pyx_L22_bool_binop_done;
27283     }
27284     __pyx_t_3 = (__pyx_v__pytype == Py_None);
27285     __pyx_t_2 = (__pyx_t_3 != 0);
27286     __pyx_t_1 = __pyx_t_2;
27287     __pyx_L22_bool_binop_done:;
27288     if (__pyx_t_1) {
27289
27290       /* "lxml/objectify.pyx":1915
27291  *         # arguments
27292  *         if _xsi is None and _pytype is None:
27293  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)             # <<<<<<<<<<<<<<
27294  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27295  * 
27296  */
27297       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1915, __pyx_L1_error)
27298       __Pyx_GOTREF(__pyx_t_5);
27299       __pyx_t_6 = NULL;
27300       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27301         __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
27302         if (likely(__pyx_t_6)) {
27303           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27304           __Pyx_INCREF(__pyx_t_6);
27305           __Pyx_INCREF(function);
27306           __Pyx_DECREF_SET(__pyx_t_5, function);
27307         }
27308       }
27309       __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
27310       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27311       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
27312       __Pyx_GOTREF(__pyx_t_4);
27313       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27314       __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_4);
27315       __pyx_t_4 = 0;
27316
27317       /* "lxml/objectify.pyx":1916
27318  *         if _xsi is None and _pytype is None:
27319  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27320  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)             # <<<<<<<<<<<<<<
27321  * 
27322  *     if _xsi is not None:
27323  */
27324       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1916, __pyx_L1_error)
27325       __Pyx_GOTREF(__pyx_t_5);
27326       __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1916, __pyx_L1_error)
27327       __Pyx_GOTREF(__pyx_t_6);
27328       __pyx_t_7 = NULL;
27329       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
27330         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
27331         if (likely(__pyx_t_7)) {
27332           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
27333           __Pyx_INCREF(__pyx_t_7);
27334           __Pyx_INCREF(function);
27335           __Pyx_DECREF_SET(__pyx_t_5, function);
27336         }
27337       }
27338       __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
27339       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27340       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27341       if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
27342       __Pyx_GOTREF(__pyx_t_4);
27343       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27344       __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_4);
27345       __pyx_t_4 = 0;
27346
27347       /* "lxml/objectify.pyx":1914
27348  *         # reuse existing xsi:type or py:pytype attributes, unless provided as
27349  *         # arguments
27350  *         if _xsi is None and _pytype is None:             # <<<<<<<<<<<<<<
27351  *             _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR)
27352  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27353  */
27354     }
27355
27356     /* "lxml/objectify.pyx":1899
27357  *                 # special case: no change!
27358  *                 return _value.__copy__()
27359  *     if isinstance(_value, ObjectifiedDataElement):             # <<<<<<<<<<<<<<
27360  *         # reuse existing nsmap unless redefined in nsmap parameter
27361  *         temp = _value.nsmap
27362  */
27363   }
27364
27365   /* "lxml/objectify.pyx":1918
27366  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27367  * 
27368  *     if _xsi is not None:             # <<<<<<<<<<<<<<
27369  *         if u':' in _xsi:
27370  *             prefix, name = _xsi.split(u':', 1)
27371  */
27372   __pyx_t_1 = (__pyx_v__xsi != Py_None);
27373   __pyx_t_2 = (__pyx_t_1 != 0);
27374   if (__pyx_t_2) {
27375
27376     /* "lxml/objectify.pyx":1919
27377  * 
27378  *     if _xsi is not None:
27379  *         if u':' in _xsi:             # <<<<<<<<<<<<<<
27380  *             prefix, name = _xsi.split(u':', 1)
27381  *             ns = nsmap.get(prefix)
27382  */
27383     __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v__xsi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1919, __pyx_L1_error)
27384     __pyx_t_1 = (__pyx_t_2 != 0);
27385     if (__pyx_t_1) {
27386
27387       /* "lxml/objectify.pyx":1920
27388  *     if _xsi is not None:
27389  *         if u':' in _xsi:
27390  *             prefix, name = _xsi.split(u':', 1)             # <<<<<<<<<<<<<<
27391  *             ns = nsmap.get(prefix)
27392  *             if ns != XML_SCHEMA_NS:
27393  */
27394       __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__xsi, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
27395       __Pyx_GOTREF(__pyx_t_4);
27396       __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error)
27397       __Pyx_GOTREF(__pyx_t_5);
27398       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27399       if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
27400         PyObject* sequence = __pyx_t_5;
27401         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
27402         if (unlikely(size != 2)) {
27403           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27404           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27405           __PYX_ERR(0, 1920, __pyx_L1_error)
27406         }
27407         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27408         if (likely(PyTuple_CheckExact(sequence))) {
27409           __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
27410           __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
27411         } else {
27412           __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
27413           __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
27414         }
27415         __Pyx_INCREF(__pyx_t_4);
27416         __Pyx_INCREF(__pyx_t_6);
27417         #else
27418         __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error)
27419         __Pyx_GOTREF(__pyx_t_4);
27420         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1920, __pyx_L1_error)
27421         __Pyx_GOTREF(__pyx_t_6);
27422         #endif
27423         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27424       } else {
27425         Py_ssize_t index = -1;
27426         __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1920, __pyx_L1_error)
27427         __Pyx_GOTREF(__pyx_t_7);
27428         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27429         __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
27430         index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L26_unpacking_failed;
27431         __Pyx_GOTREF(__pyx_t_4);
27432         index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed;
27433         __Pyx_GOTREF(__pyx_t_6);
27434         if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1920, __pyx_L1_error)
27435         __pyx_t_8 = NULL;
27436         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27437         goto __pyx_L27_unpacking_done;
27438         __pyx_L26_unpacking_failed:;
27439         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27440         __pyx_t_8 = NULL;
27441         if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
27442         __PYX_ERR(0, 1920, __pyx_L1_error)
27443         __pyx_L27_unpacking_done:;
27444       }
27445       __pyx_v_prefix = __pyx_t_4;
27446       __pyx_t_4 = 0;
27447       __pyx_v_name = __pyx_t_6;
27448       __pyx_t_6 = 0;
27449
27450       /* "lxml/objectify.pyx":1921
27451  *         if u':' in _xsi:
27452  *             prefix, name = _xsi.split(u':', 1)
27453  *             ns = nsmap.get(prefix)             # <<<<<<<<<<<<<<
27454  *             if ns != XML_SCHEMA_NS:
27455  *                 raise ValueError, u"XSD types require the XSD namespace"
27456  */
27457       __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1921, __pyx_L1_error)
27458       __Pyx_GOTREF(__pyx_t_6);
27459       __pyx_t_4 = NULL;
27460       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
27461         __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
27462         if (likely(__pyx_t_4)) {
27463           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
27464           __Pyx_INCREF(__pyx_t_4);
27465           __Pyx_INCREF(function);
27466           __Pyx_DECREF_SET(__pyx_t_6, function);
27467         }
27468       }
27469       __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_prefix) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_prefix);
27470       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27471       if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1921, __pyx_L1_error)
27472       __Pyx_GOTREF(__pyx_t_5);
27473       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27474       __pyx_v_ns = __pyx_t_5;
27475       __pyx_t_5 = 0;
27476
27477       /* "lxml/objectify.pyx":1922
27478  *             prefix, name = _xsi.split(u':', 1)
27479  *             ns = nsmap.get(prefix)
27480  *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27481  *                 raise ValueError, u"XSD types require the XSD namespace"
27482  *         elif nsmap is _DEFAULT_NSMAP:
27483  */
27484       __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L1_error)
27485       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1922, __pyx_L1_error)
27486       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27487       if (unlikely(__pyx_t_1)) {
27488
27489         /* "lxml/objectify.pyx":1923
27490  *             ns = nsmap.get(prefix)
27491  *             if ns != XML_SCHEMA_NS:
27492  *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
27493  *         elif nsmap is _DEFAULT_NSMAP:
27494  *             name = _xsi
27495  */
27496         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0);
27497         __PYX_ERR(0, 1923, __pyx_L1_error)
27498
27499         /* "lxml/objectify.pyx":1922
27500  *             prefix, name = _xsi.split(u':', 1)
27501  *             ns = nsmap.get(prefix)
27502  *             if ns != XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27503  *                 raise ValueError, u"XSD types require the XSD namespace"
27504  *         elif nsmap is _DEFAULT_NSMAP:
27505  */
27506       }
27507
27508       /* "lxml/objectify.pyx":1919
27509  * 
27510  *     if _xsi is not None:
27511  *         if u':' in _xsi:             # <<<<<<<<<<<<<<
27512  *             prefix, name = _xsi.split(u':', 1)
27513  *             ns = nsmap.get(prefix)
27514  */
27515       goto __pyx_L25;
27516     }
27517
27518     /* "lxml/objectify.pyx":1924
27519  *             if ns != XML_SCHEMA_NS:
27520  *                 raise ValueError, u"XSD types require the XSD namespace"
27521  *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27522  *             name = _xsi
27523  *             _xsi = u'xsd:' + _xsi
27524  */
27525     __pyx_t_1 = (__pyx_v_nsmap == __pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
27526     __pyx_t_2 = (__pyx_t_1 != 0);
27527     if (__pyx_t_2) {
27528
27529       /* "lxml/objectify.pyx":1925
27530  *                 raise ValueError, u"XSD types require the XSD namespace"
27531  *         elif nsmap is _DEFAULT_NSMAP:
27532  *             name = _xsi             # <<<<<<<<<<<<<<
27533  *             _xsi = u'xsd:' + _xsi
27534  *         else:
27535  */
27536       __Pyx_INCREF(__pyx_v__xsi);
27537       __pyx_v_name = __pyx_v__xsi;
27538
27539       /* "lxml/objectify.pyx":1926
27540  *         elif nsmap is _DEFAULT_NSMAP:
27541  *             name = _xsi
27542  *             _xsi = u'xsd:' + _xsi             # <<<<<<<<<<<<<<
27543  *         else:
27544  *             name = _xsi
27545  */
27546       __pyx_t_5 = PyNumber_Add(__pyx_kp_u_xsd, __pyx_v__xsi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L1_error)
27547       __Pyx_GOTREF(__pyx_t_5);
27548       __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_5);
27549       __pyx_t_5 = 0;
27550
27551       /* "lxml/objectify.pyx":1924
27552  *             if ns != XML_SCHEMA_NS:
27553  *                 raise ValueError, u"XSD types require the XSD namespace"
27554  *         elif nsmap is _DEFAULT_NSMAP:             # <<<<<<<<<<<<<<
27555  *             name = _xsi
27556  *             _xsi = u'xsd:' + _xsi
27557  */
27558       goto __pyx_L25;
27559     }
27560
27561     /* "lxml/objectify.pyx":1928
27562  *             _xsi = u'xsd:' + _xsi
27563  *         else:
27564  *             name = _xsi             # <<<<<<<<<<<<<<
27565  *             for prefix, ns in nsmap.items():
27566  *                 if ns == XML_SCHEMA_NS:
27567  */
27568     /*else*/ {
27569       __Pyx_INCREF(__pyx_v__xsi);
27570       __pyx_v_name = __pyx_v__xsi;
27571
27572       /* "lxml/objectify.pyx":1929
27573  *         else:
27574  *             name = _xsi
27575  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27576  *                 if ns == XML_SCHEMA_NS:
27577  *                     if prefix is not None and prefix:
27578  */
27579       __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
27580       __Pyx_GOTREF(__pyx_t_6);
27581       __pyx_t_4 = NULL;
27582       if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
27583         __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
27584         if (likely(__pyx_t_4)) {
27585           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
27586           __Pyx_INCREF(__pyx_t_4);
27587           __Pyx_INCREF(function);
27588           __Pyx_DECREF_SET(__pyx_t_6, function);
27589         }
27590       }
27591       __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
27592       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27593       if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L1_error)
27594       __Pyx_GOTREF(__pyx_t_5);
27595       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27596       if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
27597         __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
27598         __pyx_t_10 = NULL;
27599       } else {
27600         __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1929, __pyx_L1_error)
27601         __Pyx_GOTREF(__pyx_t_6);
27602         __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1929, __pyx_L1_error)
27603       }
27604       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27605       for (;;) {
27606         if (likely(!__pyx_t_10)) {
27607           if (likely(PyList_CheckExact(__pyx_t_6))) {
27608             if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
27609             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27610             __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1929, __pyx_L1_error)
27611             #else
27612             __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L1_error)
27613             __Pyx_GOTREF(__pyx_t_5);
27614             #endif
27615           } else {
27616             if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
27617             #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27618             __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1929, __pyx_L1_error)
27619             #else
27620             __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L1_error)
27621             __Pyx_GOTREF(__pyx_t_5);
27622             #endif
27623           }
27624         } else {
27625           __pyx_t_5 = __pyx_t_10(__pyx_t_6);
27626           if (unlikely(!__pyx_t_5)) {
27627             PyObject* exc_type = PyErr_Occurred();
27628             if (exc_type) {
27629               if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
27630               else __PYX_ERR(0, 1929, __pyx_L1_error)
27631             }
27632             break;
27633           }
27634           __Pyx_GOTREF(__pyx_t_5);
27635         }
27636         if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
27637           PyObject* sequence = __pyx_t_5;
27638           Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
27639           if (unlikely(size != 2)) {
27640             if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27641             else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27642             __PYX_ERR(0, 1929, __pyx_L1_error)
27643           }
27644           #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27645           if (likely(PyTuple_CheckExact(sequence))) {
27646             __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
27647             __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
27648           } else {
27649             __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
27650             __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
27651           }
27652           __Pyx_INCREF(__pyx_t_4);
27653           __Pyx_INCREF(__pyx_t_7);
27654           #else
27655           __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1929, __pyx_L1_error)
27656           __Pyx_GOTREF(__pyx_t_4);
27657           __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1929, __pyx_L1_error)
27658           __Pyx_GOTREF(__pyx_t_7);
27659           #endif
27660           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27661         } else {
27662           Py_ssize_t index = -1;
27663           __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1929, __pyx_L1_error)
27664           __Pyx_GOTREF(__pyx_t_11);
27665           __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27666           __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
27667           index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_4)) goto __pyx_L31_unpacking_failed;
27668           __Pyx_GOTREF(__pyx_t_4);
27669           index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L31_unpacking_failed;
27670           __Pyx_GOTREF(__pyx_t_7);
27671           if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1929, __pyx_L1_error)
27672           __pyx_t_8 = NULL;
27673           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27674           goto __pyx_L32_unpacking_done;
27675           __pyx_L31_unpacking_failed:;
27676           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27677           __pyx_t_8 = NULL;
27678           if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
27679           __PYX_ERR(0, 1929, __pyx_L1_error)
27680           __pyx_L32_unpacking_done:;
27681         }
27682         __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_4);
27683         __pyx_t_4 = 0;
27684         __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_7);
27685         __pyx_t_7 = 0;
27686
27687         /* "lxml/objectify.pyx":1930
27688  *             name = _xsi
27689  *             for prefix, ns in nsmap.items():
27690  *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27691  *                     if prefix is not None and prefix:
27692  *                         _xsi = prefix + u':' + _xsi
27693  */
27694         __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1930, __pyx_L1_error)
27695         __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1930, __pyx_L1_error)
27696         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27697         if (__pyx_t_2) {
27698
27699           /* "lxml/objectify.pyx":1931
27700  *             for prefix, ns in nsmap.items():
27701  *                 if ns == XML_SCHEMA_NS:
27702  *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
27703  *                         _xsi = prefix + u':' + _xsi
27704  *                     break
27705  */
27706           __pyx_t_1 = (__pyx_v_prefix != Py_None);
27707           __pyx_t_3 = (__pyx_t_1 != 0);
27708           if (__pyx_t_3) {
27709           } else {
27710             __pyx_t_2 = __pyx_t_3;
27711             goto __pyx_L35_bool_binop_done;
27712           }
27713           __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1931, __pyx_L1_error)
27714           __pyx_t_2 = __pyx_t_3;
27715           __pyx_L35_bool_binop_done:;
27716           if (__pyx_t_2) {
27717
27718             /* "lxml/objectify.pyx":1932
27719  *                 if ns == XML_SCHEMA_NS:
27720  *                     if prefix is not None and prefix:
27721  *                         _xsi = prefix + u':' + _xsi             # <<<<<<<<<<<<<<
27722  *                     break
27723  *             else:
27724  */
27725             __pyx_t_5 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_u__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1932, __pyx_L1_error)
27726             __Pyx_GOTREF(__pyx_t_5);
27727             __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v__xsi); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1932, __pyx_L1_error)
27728             __Pyx_GOTREF(__pyx_t_7);
27729             __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27730             __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_7);
27731             __pyx_t_7 = 0;
27732
27733             /* "lxml/objectify.pyx":1931
27734  *             for prefix, ns in nsmap.items():
27735  *                 if ns == XML_SCHEMA_NS:
27736  *                     if prefix is not None and prefix:             # <<<<<<<<<<<<<<
27737  *                         _xsi = prefix + u':' + _xsi
27738  *                     break
27739  */
27740           }
27741
27742           /* "lxml/objectify.pyx":1933
27743  *                     if prefix is not None and prefix:
27744  *                         _xsi = prefix + u':' + _xsi
27745  *                     break             # <<<<<<<<<<<<<<
27746  *             else:
27747  *                 raise ValueError, u"XSD types require the XSD namespace"
27748  */
27749           goto __pyx_L30_break;
27750
27751           /* "lxml/objectify.pyx":1930
27752  *             name = _xsi
27753  *             for prefix, ns in nsmap.items():
27754  *                 if ns == XML_SCHEMA_NS:             # <<<<<<<<<<<<<<
27755  *                     if prefix is not None and prefix:
27756  *                         _xsi = prefix + u':' + _xsi
27757  */
27758         }
27759
27760         /* "lxml/objectify.pyx":1929
27761  *         else:
27762  *             name = _xsi
27763  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27764  *                 if ns == XML_SCHEMA_NS:
27765  *                     if prefix is not None and prefix:
27766  */
27767       }
27768       /*else*/ {
27769
27770         /* "lxml/objectify.pyx":1935
27771  *                     break
27772  *             else:
27773  *                 raise ValueError, u"XSD types require the XSD namespace"             # <<<<<<<<<<<<<<
27774  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27775  *         if _pytype is None:
27776  */
27777         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0);
27778         __PYX_ERR(0, 1935, __pyx_L1_error)
27779       }
27780
27781       /* "lxml/objectify.pyx":1929
27782  *         else:
27783  *             name = _xsi
27784  *             for prefix, ns in nsmap.items():             # <<<<<<<<<<<<<<
27785  *                 if ns == XML_SCHEMA_NS:
27786  *                     if prefix is not None and prefix:
27787  */
27788       __pyx_L30_break:;
27789       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27790     }
27791     __pyx_L25:;
27792
27793     /* "lxml/objectify.pyx":1936
27794  *             else:
27795  *                 raise ValueError, u"XSD types require the XSD namespace"
27796  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi             # <<<<<<<<<<<<<<
27797  *         if _pytype is None:
27798  *             # allow using unregistered or even wrong xsi:type names
27799  */
27800     if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0)) __PYX_ERR(0, 1936, __pyx_L1_error)
27801
27802     /* "lxml/objectify.pyx":1937
27803  *                 raise ValueError, u"XSD types require the XSD namespace"
27804  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27805  *         if _pytype is None:             # <<<<<<<<<<<<<<
27806  *             # allow using unregistered or even wrong xsi:type names
27807  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27808  */
27809     __pyx_t_2 = (__pyx_v__pytype == Py_None);
27810     __pyx_t_3 = (__pyx_t_2 != 0);
27811     if (__pyx_t_3) {
27812
27813       /* "lxml/objectify.pyx":1939
27814  *         if _pytype is None:
27815  *             # allow using unregistered or even wrong xsi:type names
27816  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)             # <<<<<<<<<<<<<<
27817  *             if py_type is None:
27818  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27819  */
27820       if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
27821         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
27822         __PYX_ERR(0, 1939, __pyx_L1_error)
27823       }
27824       __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v__xsi, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1939, __pyx_L1_error)
27825       __Pyx_GOTREF(__pyx_t_6);
27826       __pyx_t_7 = __pyx_t_6;
27827       __Pyx_INCREF(__pyx_t_7);
27828       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27829       __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7);
27830       __pyx_t_7 = 0;
27831
27832       /* "lxml/objectify.pyx":1940
27833  *             # allow using unregistered or even wrong xsi:type names
27834  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27835  *             if py_type is None:             # <<<<<<<<<<<<<<
27836  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27837  *             if py_type is not None:
27838  */
27839       __pyx_t_3 = (((PyObject *)__pyx_v_py_type) == Py_None);
27840       __pyx_t_2 = (__pyx_t_3 != 0);
27841       if (__pyx_t_2) {
27842
27843         /* "lxml/objectify.pyx":1941
27844  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27845  *             if py_type is None:
27846  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)             # <<<<<<<<<<<<<<
27847  *             if py_type is not None:
27848  *                 _pytype = py_type.name
27849  */
27850         if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) {
27851           PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
27852           __PYX_ERR(0, 1941, __pyx_L1_error)
27853         }
27854         __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1941, __pyx_L1_error)
27855         __Pyx_GOTREF(__pyx_t_7);
27856         __pyx_t_6 = __pyx_t_7;
27857         __Pyx_INCREF(__pyx_t_6);
27858         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27859         __Pyx_DECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
27860         __pyx_t_6 = 0;
27861
27862         /* "lxml/objectify.pyx":1940
27863  *             # allow using unregistered or even wrong xsi:type names
27864  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27865  *             if py_type is None:             # <<<<<<<<<<<<<<
27866  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27867  *             if py_type is not None:
27868  */
27869       }
27870
27871       /* "lxml/objectify.pyx":1942
27872  *             if py_type is None:
27873  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27874  *             if py_type is not None:             # <<<<<<<<<<<<<<
27875  *                 _pytype = py_type.name
27876  * 
27877  */
27878       __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
27879       __pyx_t_3 = (__pyx_t_2 != 0);
27880       if (__pyx_t_3) {
27881
27882         /* "lxml/objectify.pyx":1943
27883  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27884  *             if py_type is not None:
27885  *                 _pytype = py_type.name             # <<<<<<<<<<<<<<
27886  * 
27887  *     if _pytype is None:
27888  */
27889         __pyx_t_6 = __pyx_v_py_type->name;
27890         __Pyx_INCREF(__pyx_t_6);
27891         __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
27892         __pyx_t_6 = 0;
27893
27894         /* "lxml/objectify.pyx":1942
27895  *             if py_type is None:
27896  *                 py_type = <PyType>_SCHEMA_TYPE_DICT.get(name)
27897  *             if py_type is not None:             # <<<<<<<<<<<<<<
27898  *                 _pytype = py_type.name
27899  * 
27900  */
27901       }
27902
27903       /* "lxml/objectify.pyx":1937
27904  *                 raise ValueError, u"XSD types require the XSD namespace"
27905  *         _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
27906  *         if _pytype is None:             # <<<<<<<<<<<<<<
27907  *             # allow using unregistered or even wrong xsi:type names
27908  *             py_type = <PyType>_SCHEMA_TYPE_DICT.get(_xsi)
27909  */
27910     }
27911
27912     /* "lxml/objectify.pyx":1918
27913  *             _pytype = _attributes.get(PYTYPE_ATTRIBUTE)
27914  * 
27915  *     if _xsi is not None:             # <<<<<<<<<<<<<<
27916  *         if u':' in _xsi:
27917  *             prefix, name = _xsi.split(u':', 1)
27918  */
27919   }
27920
27921   /* "lxml/objectify.pyx":1945
27922  *                 _pytype = py_type.name
27923  * 
27924  *     if _pytype is None:             # <<<<<<<<<<<<<<
27925  *         _pytype = _pytypename(_value)
27926  * 
27927  */
27928   __pyx_t_3 = (__pyx_v__pytype == Py_None);
27929   __pyx_t_2 = (__pyx_t_3 != 0);
27930   if (__pyx_t_2) {
27931
27932     /* "lxml/objectify.pyx":1946
27933  * 
27934  *     if _pytype is None:
27935  *         _pytype = _pytypename(_value)             # <<<<<<<<<<<<<<
27936  * 
27937  *     if _value is None and _pytype != u"str":
27938  */
27939     __pyx_t_6 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1946, __pyx_L1_error)
27940     __Pyx_GOTREF(__pyx_t_6);
27941     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
27942     __pyx_t_6 = 0;
27943
27944     /* "lxml/objectify.pyx":1945
27945  *                 _pytype = py_type.name
27946  * 
27947  *     if _pytype is None:             # <<<<<<<<<<<<<<
27948  *         _pytype = _pytypename(_value)
27949  * 
27950  */
27951   }
27952
27953   /* "lxml/objectify.pyx":1948
27954  *         _pytype = _pytypename(_value)
27955  * 
27956  *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
27957  *         _pytype = _pytype or u"NoneType"
27958  *         strval = None
27959  */
27960   __pyx_t_3 = (__pyx_v__value == Py_None);
27961   __pyx_t_1 = (__pyx_t_3 != 0);
27962   if (__pyx_t_1) {
27963   } else {
27964     __pyx_t_2 = __pyx_t_1;
27965     goto __pyx_L43_bool_binop_done;
27966   }
27967   __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_str, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1948, __pyx_L1_error)
27968   __pyx_t_2 = __pyx_t_1;
27969   __pyx_L43_bool_binop_done:;
27970   if (__pyx_t_2) {
27971
27972     /* "lxml/objectify.pyx":1949
27973  * 
27974  *     if _value is None and _pytype != u"str":
27975  *         _pytype = _pytype or u"NoneType"             # <<<<<<<<<<<<<<
27976  *         strval = None
27977  *     elif python._isString(_value):
27978  */
27979     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error)
27980     if (!__pyx_t_2) {
27981     } else {
27982       __Pyx_INCREF(__pyx_v__pytype);
27983       __pyx_t_6 = __pyx_v__pytype;
27984       goto __pyx_L45_bool_binop_done;
27985     }
27986     __Pyx_INCREF(__pyx_n_u_NoneType);
27987     __pyx_t_6 = __pyx_n_u_NoneType;
27988     __pyx_L45_bool_binop_done:;
27989     __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6);
27990     __pyx_t_6 = 0;
27991
27992     /* "lxml/objectify.pyx":1950
27993  *     if _value is None and _pytype != u"str":
27994  *         _pytype = _pytype or u"NoneType"
27995  *         strval = None             # <<<<<<<<<<<<<<
27996  *     elif python._isString(_value):
27997  *         strval = _value
27998  */
27999     __Pyx_INCREF(Py_None);
28000     __pyx_v_strval = Py_None;
28001
28002     /* "lxml/objectify.pyx":1948
28003  *         _pytype = _pytypename(_value)
28004  * 
28005  *     if _value is None and _pytype != u"str":             # <<<<<<<<<<<<<<
28006  *         _pytype = _pytype or u"NoneType"
28007  *         strval = None
28008  */
28009     goto __pyx_L42;
28010   }
28011
28012   /* "lxml/objectify.pyx":1951
28013  *         _pytype = _pytype or u"NoneType"
28014  *         strval = None
28015  *     elif python._isString(_value):             # <<<<<<<<<<<<<<
28016  *         strval = _value
28017  *     elif isinstance(_value, bool):
28018  */
28019   __pyx_t_2 = (_isString(__pyx_v__value) != 0);
28020   if (__pyx_t_2) {
28021
28022     /* "lxml/objectify.pyx":1952
28023  *         strval = None
28024  *     elif python._isString(_value):
28025  *         strval = _value             # <<<<<<<<<<<<<<
28026  *     elif isinstance(_value, bool):
28027  *         if _value:
28028  */
28029     __Pyx_INCREF(__pyx_v__value);
28030     __pyx_v_strval = __pyx_v__value;
28031
28032     /* "lxml/objectify.pyx":1951
28033  *         _pytype = _pytype or u"NoneType"
28034  *         strval = None
28035  *     elif python._isString(_value):             # <<<<<<<<<<<<<<
28036  *         strval = _value
28037  *     elif isinstance(_value, bool):
28038  */
28039     goto __pyx_L42;
28040   }
28041
28042   /* "lxml/objectify.pyx":1953
28043  *     elif python._isString(_value):
28044  *         strval = _value
28045  *     elif isinstance(_value, bool):             # <<<<<<<<<<<<<<
28046  *         if _value:
28047  *             strval = u"true"
28048  */
28049   __pyx_t_6 = ((PyObject*)&PyBool_Type);
28050   __Pyx_INCREF(__pyx_t_6);
28051   __pyx_t_2 = PyObject_IsInstance(__pyx_v__value, __pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1953, __pyx_L1_error)
28052   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28053   __pyx_t_1 = (__pyx_t_2 != 0);
28054   if (__pyx_t_1) {
28055
28056     /* "lxml/objectify.pyx":1954
28057  *         strval = _value
28058  *     elif isinstance(_value, bool):
28059  *         if _value:             # <<<<<<<<<<<<<<
28060  *             strval = u"true"
28061  *         else:
28062  */
28063     __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1954, __pyx_L1_error)
28064     if (__pyx_t_1) {
28065
28066       /* "lxml/objectify.pyx":1955
28067  *     elif isinstance(_value, bool):
28068  *         if _value:
28069  *             strval = u"true"             # <<<<<<<<<<<<<<
28070  *         else:
28071  *             strval = u"false"
28072  */
28073       __Pyx_INCREF(__pyx_n_u_true);
28074       __pyx_v_strval = __pyx_n_u_true;
28075
28076       /* "lxml/objectify.pyx":1954
28077  *         strval = _value
28078  *     elif isinstance(_value, bool):
28079  *         if _value:             # <<<<<<<<<<<<<<
28080  *             strval = u"true"
28081  *         else:
28082  */
28083       goto __pyx_L47;
28084     }
28085
28086     /* "lxml/objectify.pyx":1957
28087  *             strval = u"true"
28088  *         else:
28089  *             strval = u"false"             # <<<<<<<<<<<<<<
28090  *     else:
28091  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28092  */
28093     /*else*/ {
28094       __Pyx_INCREF(__pyx_n_u_false);
28095       __pyx_v_strval = __pyx_n_u_false;
28096     }
28097     __pyx_L47:;
28098
28099     /* "lxml/objectify.pyx":1953
28100  *     elif python._isString(_value):
28101  *         strval = _value
28102  *     elif isinstance(_value, bool):             # <<<<<<<<<<<<<<
28103  *         if _value:
28104  *             strval = u"true"
28105  */
28106     goto __pyx_L42;
28107   }
28108
28109   /* "lxml/objectify.pyx":1959
28110  *             strval = u"false"
28111  *     else:
28112  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)             # <<<<<<<<<<<<<<
28113  *         stringify = unicode if py_type is None else py_type.stringify
28114  *         strval = stringify(_value)
28115  */
28116   /*else*/ {
28117     if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
28118       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
28119       __PYX_ERR(0, 1959, __pyx_L1_error)
28120     }
28121     __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1959, __pyx_L1_error)
28122     __Pyx_GOTREF(__pyx_t_6);
28123     __pyx_t_7 = __pyx_t_6;
28124     __Pyx_INCREF(__pyx_t_7);
28125     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28126     __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7));
28127     __pyx_t_7 = 0;
28128
28129     /* "lxml/objectify.pyx":1960
28130  *     else:
28131  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28132  *         stringify = unicode if py_type is None else py_type.stringify             # <<<<<<<<<<<<<<
28133  *         strval = stringify(_value)
28134  * 
28135  */
28136     __pyx_t_1 = (((PyObject *)__pyx_v_py_type) == Py_None);
28137     if ((__pyx_t_1 != 0)) {
28138       __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
28139       __pyx_t_7 = ((PyObject *)(&PyUnicode_Type));
28140     } else {
28141       __Pyx_INCREF(__pyx_v_py_type->stringify);
28142       __pyx_t_7 = __pyx_v_py_type->stringify;
28143     }
28144     __pyx_v_stringify = __pyx_t_7;
28145     __pyx_t_7 = 0;
28146
28147     /* "lxml/objectify.pyx":1961
28148  *         py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28149  *         stringify = unicode if py_type is None else py_type.stringify
28150  *         strval = stringify(_value)             # <<<<<<<<<<<<<<
28151  * 
28152  *     if _pytype is not None:
28153  */
28154     __Pyx_INCREF(__pyx_v_stringify);
28155     __pyx_t_6 = __pyx_v_stringify; __pyx_t_5 = NULL;
28156     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
28157       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
28158       if (likely(__pyx_t_5)) {
28159         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
28160         __Pyx_INCREF(__pyx_t_5);
28161         __Pyx_INCREF(function);
28162         __Pyx_DECREF_SET(__pyx_t_6, function);
28163       }
28164     }
28165     __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v__value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v__value);
28166     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28167     if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
28168     __Pyx_GOTREF(__pyx_t_7);
28169     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28170     __pyx_v_strval = __pyx_t_7;
28171     __pyx_t_7 = 0;
28172   }
28173   __pyx_L42:;
28174
28175   /* "lxml/objectify.pyx":1963
28176  *         strval = stringify(_value)
28177  * 
28178  *     if _pytype is not None:             # <<<<<<<<<<<<<<
28179  *         if _pytype == u"NoneType" or _pytype == u"none":
28180  *             strval = None
28181  */
28182   __pyx_t_1 = (__pyx_v__pytype != Py_None);
28183   __pyx_t_2 = (__pyx_t_1 != 0);
28184   if (__pyx_t_2) {
28185
28186     /* "lxml/objectify.pyx":1964
28187  * 
28188  *     if _pytype is not None:
28189  *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
28190  *             strval = None
28191  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28192  */
28193     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_NoneType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1964, __pyx_L1_error)
28194     if (!__pyx_t_1) {
28195     } else {
28196       __pyx_t_2 = __pyx_t_1;
28197       goto __pyx_L50_bool_binop_done;
28198     }
28199     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_none, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1964, __pyx_L1_error)
28200     __pyx_t_2 = __pyx_t_1;
28201     __pyx_L50_bool_binop_done:;
28202     if (__pyx_t_2) {
28203
28204       /* "lxml/objectify.pyx":1965
28205  *     if _pytype is not None:
28206  *         if _pytype == u"NoneType" or _pytype == u"none":
28207  *             strval = None             # <<<<<<<<<<<<<<
28208  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28209  *         else:
28210  */
28211       __Pyx_INCREF(Py_None);
28212       __Pyx_DECREF_SET(__pyx_v_strval, Py_None);
28213
28214       /* "lxml/objectify.pyx":1966
28215  *         if _pytype == u"NoneType" or _pytype == u"none":
28216  *             strval = None
28217  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"             # <<<<<<<<<<<<<<
28218  *         else:
28219  *             # check if type information from arguments is valid
28220  */
28221       if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, __pyx_n_u_true) < 0)) __PYX_ERR(0, 1966, __pyx_L1_error)
28222
28223       /* "lxml/objectify.pyx":1964
28224  * 
28225  *     if _pytype is not None:
28226  *         if _pytype == u"NoneType" or _pytype == u"none":             # <<<<<<<<<<<<<<
28227  *             strval = None
28228  *             _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
28229  */
28230       goto __pyx_L49;
28231     }
28232
28233     /* "lxml/objectify.pyx":1969
28234  *         else:
28235  *             # check if type information from arguments is valid
28236  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)             # <<<<<<<<<<<<<<
28237  *             if py_type is not None:
28238  *                 if py_type.type_check is not None:
28239  */
28240     /*else*/ {
28241       if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) {
28242         PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
28243         __PYX_ERR(0, 1969, __pyx_L1_error)
28244       }
28245       __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1969, __pyx_L1_error)
28246       __Pyx_GOTREF(__pyx_t_7);
28247       __pyx_t_6 = __pyx_t_7;
28248       __Pyx_INCREF(__pyx_t_6);
28249       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28250       __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6));
28251       __pyx_t_6 = 0;
28252
28253       /* "lxml/objectify.pyx":1970
28254  *             # check if type information from arguments is valid
28255  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28256  *             if py_type is not None:             # <<<<<<<<<<<<<<
28257  *                 if py_type.type_check is not None:
28258  *                     py_type.type_check(strval)
28259  */
28260       __pyx_t_2 = (((PyObject *)__pyx_v_py_type) != Py_None);
28261       __pyx_t_1 = (__pyx_t_2 != 0);
28262       if (__pyx_t_1) {
28263
28264         /* "lxml/objectify.pyx":1971
28265  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28266  *             if py_type is not None:
28267  *                 if py_type.type_check is not None:             # <<<<<<<<<<<<<<
28268  *                     py_type.type_check(strval)
28269  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28270  */
28271         __pyx_t_1 = (__pyx_v_py_type->type_check != Py_None);
28272         __pyx_t_2 = (__pyx_t_1 != 0);
28273         if (__pyx_t_2) {
28274
28275           /* "lxml/objectify.pyx":1972
28276  *             if py_type is not None:
28277  *                 if py_type.type_check is not None:
28278  *                     py_type.type_check(strval)             # <<<<<<<<<<<<<<
28279  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28280  * 
28281  */
28282           __Pyx_INCREF(__pyx_v_py_type->type_check);
28283           __pyx_t_7 = __pyx_v_py_type->type_check; __pyx_t_5 = NULL;
28284           if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
28285             __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
28286             if (likely(__pyx_t_5)) {
28287               PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
28288               __Pyx_INCREF(__pyx_t_5);
28289               __Pyx_INCREF(function);
28290               __Pyx_DECREF_SET(__pyx_t_7, function);
28291             }
28292           }
28293           __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_strval) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_strval);
28294           __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28295           if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1972, __pyx_L1_error)
28296           __Pyx_GOTREF(__pyx_t_6);
28297           __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28298           __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28299
28300           /* "lxml/objectify.pyx":1971
28301  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28302  *             if py_type is not None:
28303  *                 if py_type.type_check is not None:             # <<<<<<<<<<<<<<
28304  *                     py_type.type_check(strval)
28305  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28306  */
28307         }
28308
28309         /* "lxml/objectify.pyx":1973
28310  *                 if py_type.type_check is not None:
28311  *                     py_type.type_check(strval)
28312  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype             # <<<<<<<<<<<<<<
28313  * 
28314  *     return _makeElement(u"value", strval, _attributes, nsmap)
28315  */
28316         __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1973, __pyx_L1_error)
28317         __Pyx_GOTREF(__pyx_t_6);
28318         if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1973, __pyx_L1_error)
28319         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
28320
28321         /* "lxml/objectify.pyx":1970
28322  *             # check if type information from arguments is valid
28323  *             py_type = <PyType>_PYTYPE_DICT.get(_pytype)
28324  *             if py_type is not None:             # <<<<<<<<<<<<<<
28325  *                 if py_type.type_check is not None:
28326  *                     py_type.type_check(strval)
28327  */
28328       }
28329     }
28330     __pyx_L49:;
28331
28332     /* "lxml/objectify.pyx":1963
28333  *         strval = stringify(_value)
28334  * 
28335  *     if _pytype is not None:             # <<<<<<<<<<<<<<
28336  *         if _pytype == u"NoneType" or _pytype == u"none":
28337  *             strval = None
28338  */
28339   }
28340
28341   /* "lxml/objectify.pyx":1975
28342  *                 _attributes[PYTYPE_ATTRIBUTE] = _pytype
28343  * 
28344  *     return _makeElement(u"value", strval, _attributes, nsmap)             # <<<<<<<<<<<<<<
28345  * 
28346  * 
28347  */
28348   __Pyx_XDECREF(__pyx_r);
28349   __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_n_u_value, __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1975, __pyx_L1_error)
28350   __Pyx_GOTREF(__pyx_t_6);
28351   __pyx_r = __pyx_t_6;
28352   __pyx_t_6 = 0;
28353   goto __pyx_L0;
28354
28355   /* "lxml/objectify.pyx":1872
28356  *     return _makeElement(_tag, None, _attributes, nsmap)
28357  * 
28358  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
28359  *                 **_attributes):
28360  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
28361  */
28362
28363   /* function exit code */
28364   __pyx_L1_error:;
28365   __Pyx_XDECREF(__pyx_t_4);
28366   __Pyx_XDECREF(__pyx_t_5);
28367   __Pyx_XDECREF(__pyx_t_6);
28368   __Pyx_XDECREF(__pyx_t_7);
28369   __Pyx_XDECREF(__pyx_t_11);
28370   __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
28371   __pyx_r = NULL;
28372   __pyx_L0:;
28373   __Pyx_XDECREF(__pyx_v__attributes);
28374   __Pyx_XDECREF(__pyx_v_temp);
28375   __Pyx_XDECREF(__pyx_v_prefix);
28376   __Pyx_XDECREF(__pyx_v_name);
28377   __Pyx_XDECREF(__pyx_v_ns);
28378   __Pyx_XDECREF((PyObject *)__pyx_v_py_type);
28379   __Pyx_XDECREF(__pyx_v_strval);
28380   __Pyx_XDECREF(__pyx_v_stringify);
28381   __Pyx_XDECREF(__pyx_v_attrib);
28382   __Pyx_XDECREF(__pyx_v_nsmap);
28383   __Pyx_XDECREF(__pyx_v__pytype);
28384   __Pyx_XDECREF(__pyx_v__xsi);
28385   __Pyx_XGIVEREF(__pyx_r);
28386   __Pyx_RefNannyFinishContext();
28387   return __pyx_r;
28388 }
28389
28390 /* "src/lxml/objectpath.pxi":24
28391  *     cdef _ObjectPath*  _c_path
28392  *     cdef Py_ssize_t _path_len
28393  *     def __init__(self, path):             # <<<<<<<<<<<<<<
28394  *         if python._isString(path):
28395  *             self._path = _parse_object_path_string(path)
28396  */
28397
28398 /* Python wrapper */
28399 static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28400 static int __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28401   PyObject *__pyx_v_path = 0;
28402   int __pyx_lineno = 0;
28403   const char *__pyx_filename = NULL;
28404   int __pyx_clineno = 0;
28405   int __pyx_r;
28406   __Pyx_RefNannyDeclarations
28407   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
28408   {
28409     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,0};
28410     PyObject* values[1] = {0};
28411     if (unlikely(__pyx_kwds)) {
28412       Py_ssize_t kw_args;
28413       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28414       switch (pos_args) {
28415         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28416         CYTHON_FALLTHROUGH;
28417         case  0: break;
28418         default: goto __pyx_L5_argtuple_error;
28419       }
28420       kw_args = PyDict_Size(__pyx_kwds);
28421       switch (pos_args) {
28422         case  0:
28423         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
28424         else goto __pyx_L5_argtuple_error;
28425       }
28426       if (unlikely(kw_args > 0)) {
28427         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 24, __pyx_L3_error)
28428       }
28429     } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
28430       goto __pyx_L5_argtuple_error;
28431     } else {
28432       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28433     }
28434     __pyx_v_path = values[0];
28435   }
28436   goto __pyx_L4_argument_unpacking_done;
28437   __pyx_L5_argtuple_error:;
28438   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 24, __pyx_L3_error)
28439   __pyx_L3_error:;
28440   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28441   __Pyx_RefNannyFinishContext();
28442   return -1;
28443   __pyx_L4_argument_unpacking_done:;
28444   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath___init__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_path);
28445
28446   /* function exit code */
28447   __Pyx_RefNannyFinishContext();
28448   return __pyx_r;
28449 }
28450
28451 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, PyObject *__pyx_v_path) {
28452   int __pyx_r;
28453   __Pyx_RefNannyDeclarations
28454   int __pyx_t_1;
28455   PyObject *__pyx_t_2 = NULL;
28456   Py_ssize_t __pyx_t_3;
28457   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_4;
28458   int __pyx_lineno = 0;
28459   const char *__pyx_filename = NULL;
28460   int __pyx_clineno = 0;
28461   __Pyx_RefNannySetupContext("__init__", 0);
28462
28463   /* "src/lxml/objectpath.pxi":25
28464  *     cdef Py_ssize_t _path_len
28465  *     def __init__(self, path):
28466  *         if python._isString(path):             # <<<<<<<<<<<<<<
28467  *             self._path = _parse_object_path_string(path)
28468  *             self._path_str = path
28469  */
28470   __pyx_t_1 = (_isString(__pyx_v_path) != 0);
28471   if (__pyx_t_1) {
28472
28473     /* "src/lxml/objectpath.pxi":26
28474  *     def __init__(self, path):
28475  *         if python._isString(path):
28476  *             self._path = _parse_object_path_string(path)             # <<<<<<<<<<<<<<
28477  *             self._path_str = path
28478  *         else:
28479  */
28480     __pyx_t_2 = __pyx_f_4lxml_9objectify__parse_object_path_string(__pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error)
28481     __Pyx_GOTREF(__pyx_t_2);
28482     __Pyx_GIVEREF(__pyx_t_2);
28483     __Pyx_GOTREF(__pyx_v_self->_path);
28484     __Pyx_DECREF(__pyx_v_self->_path);
28485     __pyx_v_self->_path = ((PyObject*)__pyx_t_2);
28486     __pyx_t_2 = 0;
28487
28488     /* "src/lxml/objectpath.pxi":27
28489  *         if python._isString(path):
28490  *             self._path = _parse_object_path_string(path)
28491  *             self._path_str = path             # <<<<<<<<<<<<<<
28492  *         else:
28493  *             self._path = _parse_object_path_list(path)
28494  */
28495     __Pyx_INCREF(__pyx_v_path);
28496     __Pyx_GIVEREF(__pyx_v_path);
28497     __Pyx_GOTREF(__pyx_v_self->_path_str);
28498     __Pyx_DECREF(__pyx_v_self->_path_str);
28499     __pyx_v_self->_path_str = __pyx_v_path;
28500
28501     /* "src/lxml/objectpath.pxi":25
28502  *     cdef Py_ssize_t _path_len
28503  *     def __init__(self, path):
28504  *         if python._isString(path):             # <<<<<<<<<<<<<<
28505  *             self._path = _parse_object_path_string(path)
28506  *             self._path_str = path
28507  */
28508     goto __pyx_L3;
28509   }
28510
28511   /* "src/lxml/objectpath.pxi":29
28512  *             self._path_str = path
28513  *         else:
28514  *             self._path = _parse_object_path_list(path)             # <<<<<<<<<<<<<<
28515  *             self._path_str = u'.'.join(path)
28516  *         self._path_len = len(self._path)
28517  */
28518   /*else*/ {
28519     __pyx_t_2 = __pyx_f_4lxml_9objectify__parse_object_path_list(__pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error)
28520     __Pyx_GOTREF(__pyx_t_2);
28521     __Pyx_GIVEREF(__pyx_t_2);
28522     __Pyx_GOTREF(__pyx_v_self->_path);
28523     __Pyx_DECREF(__pyx_v_self->_path);
28524     __pyx_v_self->_path = ((PyObject*)__pyx_t_2);
28525     __pyx_t_2 = 0;
28526
28527     /* "src/lxml/objectpath.pxi":30
28528  *         else:
28529  *             self._path = _parse_object_path_list(path)
28530  *             self._path_str = u'.'.join(path)             # <<<<<<<<<<<<<<
28531  *         self._path_len = len(self._path)
28532  *         self._c_path = _build_object_path_segments(self._path)
28533  */
28534     __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 30, __pyx_L1_error)
28535     __Pyx_GOTREF(__pyx_t_2);
28536     __Pyx_GIVEREF(__pyx_t_2);
28537     __Pyx_GOTREF(__pyx_v_self->_path_str);
28538     __Pyx_DECREF(__pyx_v_self->_path_str);
28539     __pyx_v_self->_path_str = __pyx_t_2;
28540     __pyx_t_2 = 0;
28541   }
28542   __pyx_L3:;
28543
28544   /* "src/lxml/objectpath.pxi":31
28545  *             self._path = _parse_object_path_list(path)
28546  *             self._path_str = u'.'.join(path)
28547  *         self._path_len = len(self._path)             # <<<<<<<<<<<<<<
28548  *         self._c_path = _build_object_path_segments(self._path)
28549  *         self.find = self.__call__
28550  */
28551   __pyx_t_2 = __pyx_v_self->_path;
28552   __Pyx_INCREF(__pyx_t_2);
28553   if (unlikely(__pyx_t_2 == Py_None)) {
28554     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
28555     __PYX_ERR(1, 31, __pyx_L1_error)
28556   }
28557   __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 31, __pyx_L1_error)
28558   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28559   __pyx_v_self->_path_len = __pyx_t_3;
28560
28561   /* "src/lxml/objectpath.pxi":32
28562  *             self._path_str = u'.'.join(path)
28563  *         self._path_len = len(self._path)
28564  *         self._c_path = _build_object_path_segments(self._path)             # <<<<<<<<<<<<<<
28565  *         self.find = self.__call__
28566  * 
28567  */
28568   __pyx_t_2 = __pyx_v_self->_path;
28569   __Pyx_INCREF(__pyx_t_2);
28570   __pyx_t_4 = __pyx_f_4lxml_9objectify__build_object_path_segments(((PyObject*)__pyx_t_2)); if (unlikely(__pyx_t_4 == ((__pyx_t_4lxml_9objectify__ObjectPath *)NULL))) __PYX_ERR(1, 32, __pyx_L1_error)
28571   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28572   __pyx_v_self->_c_path = __pyx_t_4;
28573
28574   /* "src/lxml/objectpath.pxi":33
28575  *         self._path_len = len(self._path)
28576  *         self._c_path = _build_object_path_segments(self._path)
28577  *         self.find = self.__call__             # <<<<<<<<<<<<<<
28578  * 
28579  *     def __dealloc__(self):
28580  */
28581   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 33, __pyx_L1_error)
28582   __Pyx_GOTREF(__pyx_t_2);
28583   __Pyx_GIVEREF(__pyx_t_2);
28584   __Pyx_GOTREF(__pyx_v_self->find);
28585   __Pyx_DECREF(__pyx_v_self->find);
28586   __pyx_v_self->find = __pyx_t_2;
28587   __pyx_t_2 = 0;
28588
28589   /* "src/lxml/objectpath.pxi":24
28590  *     cdef _ObjectPath*  _c_path
28591  *     cdef Py_ssize_t _path_len
28592  *     def __init__(self, path):             # <<<<<<<<<<<<<<
28593  *         if python._isString(path):
28594  *             self._path = _parse_object_path_string(path)
28595  */
28596
28597   /* function exit code */
28598   __pyx_r = 0;
28599   goto __pyx_L0;
28600   __pyx_L1_error:;
28601   __Pyx_XDECREF(__pyx_t_2);
28602   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28603   __pyx_r = -1;
28604   __pyx_L0:;
28605   __Pyx_RefNannyFinishContext();
28606   return __pyx_r;
28607 }
28608
28609 /* "src/lxml/objectpath.pxi":35
28610  *         self.find = self.__call__
28611  * 
28612  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
28613  *         if self._c_path is not NULL:
28614  *             python.lxml_free(self._c_path)
28615  */
28616
28617 /* Python wrapper */
28618 static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
28619 static void __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(PyObject *__pyx_v_self) {
28620   __Pyx_RefNannyDeclarations
28621   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
28622   __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
28623
28624   /* function exit code */
28625   __Pyx_RefNannyFinishContext();
28626 }
28627
28628 static void __pyx_pf_4lxml_9objectify_10ObjectPath_2__dealloc__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
28629   __Pyx_RefNannyDeclarations
28630   int __pyx_t_1;
28631   __Pyx_RefNannySetupContext("__dealloc__", 0);
28632
28633   /* "src/lxml/objectpath.pxi":36
28634  * 
28635  *     def __dealloc__(self):
28636  *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
28637  *             python.lxml_free(self._c_path)
28638  * 
28639  */
28640   __pyx_t_1 = ((__pyx_v_self->_c_path != NULL) != 0);
28641   if (__pyx_t_1) {
28642
28643     /* "src/lxml/objectpath.pxi":37
28644  *     def __dealloc__(self):
28645  *         if self._c_path is not NULL:
28646  *             python.lxml_free(self._c_path)             # <<<<<<<<<<<<<<
28647  * 
28648  *     def __str__(self):
28649  */
28650     lxml_free(__pyx_v_self->_c_path);
28651
28652     /* "src/lxml/objectpath.pxi":36
28653  * 
28654  *     def __dealloc__(self):
28655  *         if self._c_path is not NULL:             # <<<<<<<<<<<<<<
28656  *             python.lxml_free(self._c_path)
28657  * 
28658  */
28659   }
28660
28661   /* "src/lxml/objectpath.pxi":35
28662  *         self.find = self.__call__
28663  * 
28664  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
28665  *         if self._c_path is not NULL:
28666  *             python.lxml_free(self._c_path)
28667  */
28668
28669   /* function exit code */
28670   __Pyx_RefNannyFinishContext();
28671 }
28672
28673 /* "src/lxml/objectpath.pxi":39
28674  *             python.lxml_free(self._c_path)
28675  * 
28676  *     def __str__(self):             # <<<<<<<<<<<<<<
28677  *         return self._path_str
28678  * 
28679  */
28680
28681 /* Python wrapper */
28682 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self); /*proto*/
28683 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_5__str__(PyObject *__pyx_v_self) {
28684   PyObject *__pyx_r = 0;
28685   __Pyx_RefNannyDeclarations
28686   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
28687   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
28688
28689   /* function exit code */
28690   __Pyx_RefNannyFinishContext();
28691   return __pyx_r;
28692 }
28693
28694 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4__str__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
28695   PyObject *__pyx_r = NULL;
28696   __Pyx_RefNannyDeclarations
28697   __Pyx_RefNannySetupContext("__str__", 0);
28698
28699   /* "src/lxml/objectpath.pxi":40
28700  * 
28701  *     def __str__(self):
28702  *         return self._path_str             # <<<<<<<<<<<<<<
28703  * 
28704  *     def __call__(self, _Element root not None, *_default):
28705  */
28706   __Pyx_XDECREF(__pyx_r);
28707   __Pyx_INCREF(__pyx_v_self->_path_str);
28708   __pyx_r = __pyx_v_self->_path_str;
28709   goto __pyx_L0;
28710
28711   /* "src/lxml/objectpath.pxi":39
28712  *             python.lxml_free(self._c_path)
28713  * 
28714  *     def __str__(self):             # <<<<<<<<<<<<<<
28715  *         return self._path_str
28716  * 
28717  */
28718
28719   /* function exit code */
28720   __pyx_L0:;
28721   __Pyx_XGIVEREF(__pyx_r);
28722   __Pyx_RefNannyFinishContext();
28723   return __pyx_r;
28724 }
28725
28726 /* "src/lxml/objectpath.pxi":42
28727  *         return self._path_str
28728  * 
28729  *     def __call__(self, _Element root not None, *_default):             # <<<<<<<<<<<<<<
28730  *         u"""Follow the attribute path in the object structure and return the
28731  *         target attribute value.
28732  */
28733
28734 /* Python wrapper */
28735 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
28736 static char __pyx_doc_4lxml_9objectify_10ObjectPath_6__call__[] = "Follow the attribute path in the object structure and return the\n        target attribute value.\n\n        If it it not found, either returns a default value (if one was passed\n        as second argument) or raises AttributeError.\n        ";
28737 #if CYTHON_COMPILING_IN_CPYTHON
28738 struct wrapperbase __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
28739 #endif
28740 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
28741   struct LxmlElement *__pyx_v_root = 0;
28742   PyObject *__pyx_v__default = 0;
28743   int __pyx_lineno = 0;
28744   const char *__pyx_filename = NULL;
28745   int __pyx_clineno = 0;
28746   PyObject *__pyx_r = 0;
28747   __Pyx_RefNannyDeclarations
28748   __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
28749   if (PyTuple_GET_SIZE(__pyx_args) > 1) {
28750     __pyx_v__default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
28751     if (unlikely(!__pyx_v__default)) {
28752       __Pyx_RefNannyFinishContext();
28753       return NULL;
28754     }
28755     __Pyx_GOTREF(__pyx_v__default);
28756   } else {
28757     __pyx_v__default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
28758   }
28759   {
28760     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,0};
28761     PyObject* values[1] = {0};
28762     if (unlikely(__pyx_kwds)) {
28763       Py_ssize_t kw_args;
28764       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
28765       switch (pos_args) {
28766         default:
28767         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28768         CYTHON_FALLTHROUGH;
28769         case  0: break;
28770       }
28771       kw_args = PyDict_Size(__pyx_kwds);
28772       switch (pos_args) {
28773         case  0:
28774         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
28775         else goto __pyx_L5_argtuple_error;
28776       }
28777       if (unlikely(kw_args > 0)) {
28778         const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
28779         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__call__") < 0)) __PYX_ERR(1, 42, __pyx_L3_error)
28780       }
28781     } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
28782       goto __pyx_L5_argtuple_error;
28783     } else {
28784       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
28785     }
28786     __pyx_v_root = ((struct LxmlElement *)values[0]);
28787   }
28788   goto __pyx_L4_argument_unpacking_done;
28789   __pyx_L5_argtuple_error:;
28790   __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 42, __pyx_L3_error)
28791   __pyx_L3_error:;
28792   __Pyx_DECREF(__pyx_v__default); __pyx_v__default = 0;
28793   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28794   __Pyx_RefNannyFinishContext();
28795   return NULL;
28796   __pyx_L4_argument_unpacking_done:;
28797   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 42, __pyx_L1_error)
28798   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v__default);
28799
28800   /* function exit code */
28801   goto __pyx_L0;
28802   __pyx_L1_error:;
28803   __pyx_r = NULL;
28804   __pyx_L0:;
28805   __Pyx_XDECREF(__pyx_v__default);
28806   __Pyx_RefNannyFinishContext();
28807   return __pyx_r;
28808 }
28809
28810 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_6__call__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v__default) {
28811   PyObject *__pyx_v_default = NULL;
28812   PyObject *__pyx_r = NULL;
28813   __Pyx_RefNannyDeclarations
28814   int __pyx_t_1;
28815   Py_ssize_t __pyx_t_2;
28816   PyObject *__pyx_t_3 = NULL;
28817   int __pyx_lineno = 0;
28818   const char *__pyx_filename = NULL;
28819   int __pyx_clineno = 0;
28820   __Pyx_RefNannySetupContext("__call__", 0);
28821
28822   /* "src/lxml/objectpath.pxi":49
28823  *         as second argument) or raises AttributeError.
28824  *         """
28825  *         if _default:             # <<<<<<<<<<<<<<
28826  *             if len(_default) > 1:
28827  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28828  */
28829   __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v__default) != 0);
28830   if (__pyx_t_1) {
28831
28832     /* "src/lxml/objectpath.pxi":50
28833  *         """
28834  *         if _default:
28835  *             if len(_default) > 1:             # <<<<<<<<<<<<<<
28836  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28837  *             default = _default[0]
28838  */
28839     __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v__default); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 50, __pyx_L1_error)
28840     __pyx_t_1 = ((__pyx_t_2 > 1) != 0);
28841     if (unlikely(__pyx_t_1)) {
28842
28843       /* "src/lxml/objectpath.pxi":51
28844  *         if _default:
28845  *             if len(_default) > 1:
28846  *                 raise TypeError, u"invalid number of arguments: needs one or two"             # <<<<<<<<<<<<<<
28847  *             default = _default[0]
28848  *         else:
28849  */
28850       __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_invalid_number_of_arguments_need, 0, 0);
28851       __PYX_ERR(1, 51, __pyx_L1_error)
28852
28853       /* "src/lxml/objectpath.pxi":50
28854  *         """
28855  *         if _default:
28856  *             if len(_default) > 1:             # <<<<<<<<<<<<<<
28857  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28858  *             default = _default[0]
28859  */
28860     }
28861
28862     /* "src/lxml/objectpath.pxi":52
28863  *             if len(_default) > 1:
28864  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28865  *             default = _default[0]             # <<<<<<<<<<<<<<
28866  *         else:
28867  *             default = _NO_DEFAULT
28868  */
28869     __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v__default, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
28870     __Pyx_GOTREF(__pyx_t_3);
28871     __pyx_v_default = __pyx_t_3;
28872     __pyx_t_3 = 0;
28873
28874     /* "src/lxml/objectpath.pxi":49
28875  *         as second argument) or raises AttributeError.
28876  *         """
28877  *         if _default:             # <<<<<<<<<<<<<<
28878  *             if len(_default) > 1:
28879  *                 raise TypeError, u"invalid number of arguments: needs one or two"
28880  */
28881     goto __pyx_L3;
28882   }
28883
28884   /* "src/lxml/objectpath.pxi":54
28885  *             default = _default[0]
28886  *         else:
28887  *             default = _NO_DEFAULT             # <<<<<<<<<<<<<<
28888  *         return _find_object_path(root, self._c_path, self._path_len, default)
28889  * 
28890  */
28891   /*else*/ {
28892     __Pyx_INCREF(__pyx_v_4lxml_9objectify__NO_DEFAULT);
28893     __pyx_v_default = __pyx_v_4lxml_9objectify__NO_DEFAULT;
28894   }
28895   __pyx_L3:;
28896
28897   /* "src/lxml/objectpath.pxi":55
28898  *         else:
28899  *             default = _NO_DEFAULT
28900  *         return _find_object_path(root, self._c_path, self._path_len, default)             # <<<<<<<<<<<<<<
28901  * 
28902  *     def hasattr(self, _Element root not None):
28903  */
28904   __Pyx_XDECREF(__pyx_r);
28905   __pyx_t_3 = __pyx_f_4lxml_9objectify__find_object_path(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, __pyx_v_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
28906   __Pyx_GOTREF(__pyx_t_3);
28907   __pyx_r = __pyx_t_3;
28908   __pyx_t_3 = 0;
28909   goto __pyx_L0;
28910
28911   /* "src/lxml/objectpath.pxi":42
28912  *         return self._path_str
28913  * 
28914  *     def __call__(self, _Element root not None, *_default):             # <<<<<<<<<<<<<<
28915  *         u"""Follow the attribute path in the object structure and return the
28916  *         target attribute value.
28917  */
28918
28919   /* function exit code */
28920   __pyx_L1_error:;
28921   __Pyx_XDECREF(__pyx_t_3);
28922   __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
28923   __pyx_r = NULL;
28924   __pyx_L0:;
28925   __Pyx_XDECREF(__pyx_v_default);
28926   __Pyx_XGIVEREF(__pyx_r);
28927   __Pyx_RefNannyFinishContext();
28928   return __pyx_r;
28929 }
28930
28931 /* "src/lxml/objectpath.pxi":57
28932  *         return _find_object_path(root, self._c_path, self._path_len, default)
28933  * 
28934  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
28935  *         u"hasattr(self, root)"
28936  *         try:
28937  */
28938
28939 /* Python wrapper */
28940 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
28941 static char __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr[] = "hasattr(self, root)";
28942 static PyMethodDef __pyx_mdef_4lxml_9objectify_10ObjectPath_9hasattr = {"hasattr", (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr, METH_O, __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr};
28943 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
28944   int __pyx_lineno = 0;
28945   const char *__pyx_filename = NULL;
28946   int __pyx_clineno = 0;
28947   PyObject *__pyx_r = 0;
28948   __Pyx_RefNannyDeclarations
28949   __Pyx_RefNannySetupContext("hasattr (wrapper)", 0);
28950   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 57, __pyx_L1_error)
28951   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_root));
28952
28953   /* function exit code */
28954   goto __pyx_L0;
28955   __pyx_L1_error:;
28956   __pyx_r = NULL;
28957   __pyx_L0:;
28958   __Pyx_RefNannyFinishContext();
28959   return __pyx_r;
28960 }
28961
28962 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_8hasattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root) {
28963   PyObject *__pyx_r = NULL;
28964   __Pyx_RefNannyDeclarations
28965   PyObject *__pyx_t_1 = NULL;
28966   PyObject *__pyx_t_2 = NULL;
28967   PyObject *__pyx_t_3 = NULL;
28968   PyObject *__pyx_t_4 = NULL;
28969   PyObject *__pyx_t_5 = NULL;
28970   int __pyx_t_6;
28971   PyObject *__pyx_t_7 = NULL;
28972   int __pyx_lineno = 0;
28973   const char *__pyx_filename = NULL;
28974   int __pyx_clineno = 0;
28975   __Pyx_RefNannySetupContext("hasattr", 0);
28976
28977   /* "src/lxml/objectpath.pxi":59
28978  *     def hasattr(self, _Element root not None):
28979  *         u"hasattr(self, root)"
28980  *         try:             # <<<<<<<<<<<<<<
28981  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
28982  *         except AttributeError:
28983  */
28984   {
28985     __Pyx_PyThreadState_declare
28986     __Pyx_PyThreadState_assign
28987     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
28988     __Pyx_XGOTREF(__pyx_t_1);
28989     __Pyx_XGOTREF(__pyx_t_2);
28990     __Pyx_XGOTREF(__pyx_t_3);
28991     /*try:*/ {
28992
28993       /* "src/lxml/objectpath.pxi":60
28994  *         u"hasattr(self, root)"
28995  *         try:
28996  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)             # <<<<<<<<<<<<<<
28997  *         except AttributeError:
28998  *             return False
28999  */
29000       __pyx_t_4 = __pyx_v_4lxml_9objectify__NO_DEFAULT;
29001       __Pyx_INCREF(__pyx_t_4);
29002       __pyx_t_5 = __pyx_f_4lxml_9objectify__find_object_path(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L3_error)
29003       __Pyx_GOTREF(__pyx_t_5);
29004       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29005       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29006
29007       /* "src/lxml/objectpath.pxi":59
29008  *     def hasattr(self, _Element root not None):
29009  *         u"hasattr(self, root)"
29010  *         try:             # <<<<<<<<<<<<<<
29011  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29012  *         except AttributeError:
29013  */
29014     }
29015     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
29016     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29017     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
29018     goto __pyx_L8_try_end;
29019     __pyx_L3_error:;
29020     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
29021     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29022
29023     /* "src/lxml/objectpath.pxi":61
29024  *         try:
29025  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29026  *         except AttributeError:             # <<<<<<<<<<<<<<
29027  *             return False
29028  *         return True
29029  */
29030     __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
29031     if (__pyx_t_6) {
29032       __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29033       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 61, __pyx_L5_except_error)
29034       __Pyx_GOTREF(__pyx_t_5);
29035       __Pyx_GOTREF(__pyx_t_4);
29036       __Pyx_GOTREF(__pyx_t_7);
29037
29038       /* "src/lxml/objectpath.pxi":62
29039  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29040  *         except AttributeError:
29041  *             return False             # <<<<<<<<<<<<<<
29042  *         return True
29043  * 
29044  */
29045       __Pyx_XDECREF(__pyx_r);
29046       __Pyx_INCREF(Py_False);
29047       __pyx_r = Py_False;
29048       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29049       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29050       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29051       goto __pyx_L6_except_return;
29052     }
29053     goto __pyx_L5_except_error;
29054     __pyx_L5_except_error:;
29055
29056     /* "src/lxml/objectpath.pxi":59
29057  *     def hasattr(self, _Element root not None):
29058  *         u"hasattr(self, root)"
29059  *         try:             # <<<<<<<<<<<<<<
29060  *             _find_object_path(root, self._c_path, self._path_len, _NO_DEFAULT)
29061  *         except AttributeError:
29062  */
29063     __Pyx_XGIVEREF(__pyx_t_1);
29064     __Pyx_XGIVEREF(__pyx_t_2);
29065     __Pyx_XGIVEREF(__pyx_t_3);
29066     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
29067     goto __pyx_L1_error;
29068     __pyx_L6_except_return:;
29069     __Pyx_XGIVEREF(__pyx_t_1);
29070     __Pyx_XGIVEREF(__pyx_t_2);
29071     __Pyx_XGIVEREF(__pyx_t_3);
29072     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
29073     goto __pyx_L0;
29074     __pyx_L8_try_end:;
29075   }
29076
29077   /* "src/lxml/objectpath.pxi":63
29078  *         except AttributeError:
29079  *             return False
29080  *         return True             # <<<<<<<<<<<<<<
29081  * 
29082  *     def setattr(self, _Element root not None, value):
29083  */
29084   __Pyx_XDECREF(__pyx_r);
29085   __Pyx_INCREF(Py_True);
29086   __pyx_r = Py_True;
29087   goto __pyx_L0;
29088
29089   /* "src/lxml/objectpath.pxi":57
29090  *         return _find_object_path(root, self._c_path, self._path_len, default)
29091  * 
29092  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
29093  *         u"hasattr(self, root)"
29094  *         try:
29095  */
29096
29097   /* function exit code */
29098   __pyx_L1_error:;
29099   __Pyx_XDECREF(__pyx_t_4);
29100   __Pyx_XDECREF(__pyx_t_5);
29101   __Pyx_XDECREF(__pyx_t_7);
29102   __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29103   __pyx_r = NULL;
29104   __pyx_L0:;
29105   __Pyx_XGIVEREF(__pyx_r);
29106   __Pyx_RefNannyFinishContext();
29107   return __pyx_r;
29108 }
29109
29110 /* "src/lxml/objectpath.pxi":65
29111  *         return True
29112  * 
29113  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29114  *         u"""setattr(self, root, value)
29115  * 
29116  */
29117
29118 /* Python wrapper */
29119 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29120 static char __pyx_doc_4lxml_9objectify_10ObjectPath_10setattr[] = "setattr(self, root, value)\n\n        Set the value of the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
29121 static PyMethodDef __pyx_mdef_4lxml_9objectify_10ObjectPath_11setattr = {"setattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_10setattr};
29122 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29123   struct LxmlElement *__pyx_v_root = 0;
29124   PyObject *__pyx_v_value = 0;
29125   int __pyx_lineno = 0;
29126   const char *__pyx_filename = NULL;
29127   int __pyx_clineno = 0;
29128   PyObject *__pyx_r = 0;
29129   __Pyx_RefNannyDeclarations
29130   __Pyx_RefNannySetupContext("setattr (wrapper)", 0);
29131   {
29132     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_value,0};
29133     PyObject* values[2] = {0,0};
29134     if (unlikely(__pyx_kwds)) {
29135       Py_ssize_t kw_args;
29136       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29137       switch (pos_args) {
29138         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29139         CYTHON_FALLTHROUGH;
29140         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29141         CYTHON_FALLTHROUGH;
29142         case  0: break;
29143         default: goto __pyx_L5_argtuple_error;
29144       }
29145       kw_args = PyDict_Size(__pyx_kwds);
29146       switch (pos_args) {
29147         case  0:
29148         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
29149         else goto __pyx_L5_argtuple_error;
29150         CYTHON_FALLTHROUGH;
29151         case  1:
29152         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
29153         else {
29154           __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, 1); __PYX_ERR(1, 65, __pyx_L3_error)
29155         }
29156       }
29157       if (unlikely(kw_args > 0)) {
29158         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setattr") < 0)) __PYX_ERR(1, 65, __pyx_L3_error)
29159       }
29160     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
29161       goto __pyx_L5_argtuple_error;
29162     } else {
29163       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29164       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29165     }
29166     __pyx_v_root = ((struct LxmlElement *)values[0]);
29167     __pyx_v_value = values[1];
29168   }
29169   goto __pyx_L4_argument_unpacking_done;
29170   __pyx_L5_argtuple_error:;
29171   __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 65, __pyx_L3_error)
29172   __pyx_L3_error:;
29173   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29174   __Pyx_RefNannyFinishContext();
29175   return NULL;
29176   __pyx_L4_argument_unpacking_done:;
29177   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 65, __pyx_L1_error)
29178   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
29179
29180   /* function exit code */
29181   goto __pyx_L0;
29182   __pyx_L1_error:;
29183   __pyx_r = NULL;
29184   __pyx_L0:;
29185   __Pyx_RefNannyFinishContext();
29186   return __pyx_r;
29187 }
29188
29189 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_10setattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value) {
29190   PyObject *__pyx_r = NULL;
29191   __Pyx_RefNannyDeclarations
29192   PyObject *__pyx_t_1 = NULL;
29193   int __pyx_lineno = 0;
29194   const char *__pyx_filename = NULL;
29195   int __pyx_clineno = 0;
29196   __Pyx_RefNannySetupContext("setattr", 0);
29197
29198   /* "src/lxml/objectpath.pxi":72
29199  *         If any of the children on the path does not exist, it is created.
29200  *         """
29201  *         _create_object_path(root, self._c_path, self._path_len, 1, value)             # <<<<<<<<<<<<<<
29202  * 
29203  *     def addattr(self, _Element root not None, value):
29204  */
29205   __pyx_t_1 = __pyx_f_4lxml_9objectify__create_object_path(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, 1, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 72, __pyx_L1_error)
29206   __Pyx_GOTREF(__pyx_t_1);
29207   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29208
29209   /* "src/lxml/objectpath.pxi":65
29210  *         return True
29211  * 
29212  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29213  *         u"""setattr(self, root, value)
29214  * 
29215  */
29216
29217   /* function exit code */
29218   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29219   goto __pyx_L0;
29220   __pyx_L1_error:;
29221   __Pyx_XDECREF(__pyx_t_1);
29222   __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29223   __pyx_r = NULL;
29224   __pyx_L0:;
29225   __Pyx_XGIVEREF(__pyx_r);
29226   __Pyx_RefNannyFinishContext();
29227   return __pyx_r;
29228 }
29229
29230 /* "src/lxml/objectpath.pxi":74
29231  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
29232  * 
29233  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29234  *         u"""addattr(self, root, value)
29235  * 
29236  */
29237
29238 /* Python wrapper */
29239 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29240 static char __pyx_doc_4lxml_9objectify_10ObjectPath_12addattr[] = "addattr(self, root, value)\n\n        Append a value to the target element in a subtree.\n\n        If any of the children on the path does not exist, it is created.\n        ";
29241 static PyMethodDef __pyx_mdef_4lxml_9objectify_10ObjectPath_13addattr = {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_12addattr};
29242 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29243   struct LxmlElement *__pyx_v_root = 0;
29244   PyObject *__pyx_v_value = 0;
29245   int __pyx_lineno = 0;
29246   const char *__pyx_filename = NULL;
29247   int __pyx_clineno = 0;
29248   PyObject *__pyx_r = 0;
29249   __Pyx_RefNannyDeclarations
29250   __Pyx_RefNannySetupContext("addattr (wrapper)", 0);
29251   {
29252     static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_root,&__pyx_n_s_value,0};
29253     PyObject* values[2] = {0,0};
29254     if (unlikely(__pyx_kwds)) {
29255       Py_ssize_t kw_args;
29256       const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29257       switch (pos_args) {
29258         case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29259         CYTHON_FALLTHROUGH;
29260         case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29261         CYTHON_FALLTHROUGH;
29262         case  0: break;
29263         default: goto __pyx_L5_argtuple_error;
29264       }
29265       kw_args = PyDict_Size(__pyx_kwds);
29266       switch (pos_args) {
29267         case  0:
29268         if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root)) != 0)) kw_args--;
29269         else goto __pyx_L5_argtuple_error;
29270         CYTHON_FALLTHROUGH;
29271         case  1:
29272         if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
29273         else {
29274           __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); __PYX_ERR(1, 74, __pyx_L3_error)
29275         }
29276       }
29277       if (unlikely(kw_args > 0)) {
29278         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addattr") < 0)) __PYX_ERR(1, 74, __pyx_L3_error)
29279       }
29280     } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
29281       goto __pyx_L5_argtuple_error;
29282     } else {
29283       values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29284       values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29285     }
29286     __pyx_v_root = ((struct LxmlElement *)values[0]);
29287     __pyx_v_value = values[1];
29288   }
29289   goto __pyx_L4_argument_unpacking_done;
29290   __pyx_L5_argtuple_error:;
29291   __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 74, __pyx_L3_error)
29292   __pyx_L3_error:;
29293   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29294   __Pyx_RefNannyFinishContext();
29295   return NULL;
29296   __pyx_L4_argument_unpacking_done:;
29297   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "root", 0))) __PYX_ERR(1, 74, __pyx_L1_error)
29298   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self), __pyx_v_root, __pyx_v_value);
29299
29300   /* function exit code */
29301   goto __pyx_L0;
29302   __pyx_L1_error:;
29303   __pyx_r = NULL;
29304   __pyx_L0:;
29305   __Pyx_RefNannyFinishContext();
29306   return __pyx_r;
29307 }
29308
29309 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_12addattr(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self, struct LxmlElement *__pyx_v_root, PyObject *__pyx_v_value) {
29310   PyObject *__pyx_r = NULL;
29311   __Pyx_RefNannyDeclarations
29312   PyObject *__pyx_t_1 = NULL;
29313   int __pyx_lineno = 0;
29314   const char *__pyx_filename = NULL;
29315   int __pyx_clineno = 0;
29316   __Pyx_RefNannySetupContext("addattr", 0);
29317
29318   /* "src/lxml/objectpath.pxi":81
29319  *         If any of the children on the path does not exist, it is created.
29320  *         """
29321  *         _create_object_path(root, self._c_path, self._path_len, 0, value)             # <<<<<<<<<<<<<<
29322  * 
29323  * 
29324  */
29325   __pyx_t_1 = __pyx_f_4lxml_9objectify__create_object_path(__pyx_v_root, __pyx_v_self->_c_path, __pyx_v_self->_path_len, 0, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 81, __pyx_L1_error)
29326   __Pyx_GOTREF(__pyx_t_1);
29327   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29328
29329   /* "src/lxml/objectpath.pxi":74
29330  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
29331  * 
29332  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
29333  *         u"""addattr(self, root, value)
29334  * 
29335  */
29336
29337   /* function exit code */
29338   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29339   goto __pyx_L0;
29340   __pyx_L1_error:;
29341   __Pyx_XDECREF(__pyx_t_1);
29342   __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr", __pyx_clineno, __pyx_lineno, __pyx_filename);
29343   __pyx_r = NULL;
29344   __pyx_L0:;
29345   __Pyx_XGIVEREF(__pyx_r);
29346   __Pyx_RefNannyFinishContext();
29347   return __pyx_r;
29348 }
29349
29350 /* "src/lxml/objectpath.pxi":19
29351  *     Example for a path: 'root.child[1].{other}child[25]'
29352  *     """
29353  *     cdef readonly object find             # <<<<<<<<<<<<<<
29354  *     cdef list _path
29355  *     cdef object _path_str
29356  */
29357
29358 /* Python wrapper */
29359 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self); /*proto*/
29360 static PyObject *__pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(PyObject *__pyx_v_self) {
29361   PyObject *__pyx_r = 0;
29362   __Pyx_RefNannyDeclarations
29363   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29364   __pyx_r = __pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self));
29365
29366   /* function exit code */
29367   __Pyx_RefNannyFinishContext();
29368   return __pyx_r;
29369 }
29370
29371 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_4find___get__(struct __pyx_obj_4lxml_9objectify_ObjectPath *__pyx_v_self) {
29372   PyObject *__pyx_r = NULL;
29373   __Pyx_RefNannyDeclarations
29374   __Pyx_RefNannySetupContext("__get__", 0);
29375   __Pyx_XDECREF(__pyx_r);
29376   __Pyx_INCREF(__pyx_v_self->find);
29377   __pyx_r = __pyx_v_self->find;
29378   goto __pyx_L0;
29379
29380   /* function exit code */
29381   __pyx_L0:;
29382   __Pyx_XGIVEREF(__pyx_r);
29383   __Pyx_RefNannyFinishContext();
29384   return __pyx_r;
29385 }
29386
29387 /* "src/lxml/objectpath.pxi":91
29388  * 
29389  * 
29390  * cdef list _parse_object_path_string(_path):             # <<<<<<<<<<<<<<
29391  *     u"""Parse object path string into a (ns, name, index) list.
29392  *     """
29393  */
29394
29395 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_string(PyObject *__pyx_v__path) {
29396   int __pyx_v_has_dot;
29397   PyObject *__pyx_v_path = 0;
29398   PyObject *__pyx_v_new_path = NULL;
29399   PyObject *__pyx_v_path_pos = NULL;
29400   PyObject *__pyx_v_match = NULL;
29401   PyObject *__pyx_v_dot = NULL;
29402   PyObject *__pyx_v_ns = NULL;
29403   PyObject *__pyx_v_name = NULL;
29404   PyObject *__pyx_v_index = NULL;
29405   PyObject *__pyx_r = NULL;
29406   __Pyx_RefNannyDeclarations
29407   PyObject *__pyx_t_1 = NULL;
29408   int __pyx_t_2;
29409   int __pyx_t_3;
29410   PyObject *__pyx_t_4 = NULL;
29411   PyObject *__pyx_t_5 = NULL;
29412   int __pyx_t_6;
29413   PyObject *__pyx_t_7 = NULL;
29414   PyObject *__pyx_t_8 = NULL;
29415   PyObject *__pyx_t_9 = NULL;
29416   PyObject *(*__pyx_t_10)(PyObject *);
29417   int __pyx_t_11;
29418   int __pyx_t_12;
29419   Py_ssize_t __pyx_t_13;
29420   int __pyx_lineno = 0;
29421   const char *__pyx_filename = NULL;
29422   int __pyx_clineno = 0;
29423   __Pyx_RefNannySetupContext("_parse_object_path_string", 0);
29424
29425   /* "src/lxml/objectpath.pxi":96
29426  *     cdef bint has_dot
29427  *     cdef unicode path
29428  *     new_path = []             # <<<<<<<<<<<<<<
29429  *     if isinstance(_path, bytes):
29430  *         path = (<bytes>_path).decode('ascii')
29431  */
29432   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 96, __pyx_L1_error)
29433   __Pyx_GOTREF(__pyx_t_1);
29434   __pyx_v_new_path = ((PyObject*)__pyx_t_1);
29435   __pyx_t_1 = 0;
29436
29437   /* "src/lxml/objectpath.pxi":97
29438  *     cdef unicode path
29439  *     new_path = []
29440  *     if isinstance(_path, bytes):             # <<<<<<<<<<<<<<
29441  *         path = (<bytes>_path).decode('ascii')
29442  *     elif type(_path) is not unicode:
29443  */
29444   __pyx_t_2 = PyBytes_Check(__pyx_v__path); 
29445   __pyx_t_3 = (__pyx_t_2 != 0);
29446   if (__pyx_t_3) {
29447
29448     /* "src/lxml/objectpath.pxi":98
29449  *     new_path = []
29450  *     if isinstance(_path, bytes):
29451  *         path = (<bytes>_path).decode('ascii')             # <<<<<<<<<<<<<<
29452  *     elif type(_path) is not unicode:
29453  *         path = unicode(_path)
29454  */
29455     if (unlikely(__pyx_v__path == Py_None)) {
29456       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
29457       __PYX_ERR(1, 98, __pyx_L1_error)
29458     }
29459     __pyx_t_1 = __Pyx_decode_bytes(((PyObject*)__pyx_v__path), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 98, __pyx_L1_error)
29460     __Pyx_GOTREF(__pyx_t_1);
29461     __pyx_v_path = ((PyObject*)__pyx_t_1);
29462     __pyx_t_1 = 0;
29463
29464     /* "src/lxml/objectpath.pxi":97
29465  *     cdef unicode path
29466  *     new_path = []
29467  *     if isinstance(_path, bytes):             # <<<<<<<<<<<<<<
29468  *         path = (<bytes>_path).decode('ascii')
29469  *     elif type(_path) is not unicode:
29470  */
29471     goto __pyx_L3;
29472   }
29473
29474   /* "src/lxml/objectpath.pxi":99
29475  *     if isinstance(_path, bytes):
29476  *         path = (<bytes>_path).decode('ascii')
29477  *     elif type(_path) is not unicode:             # <<<<<<<<<<<<<<
29478  *         path = unicode(_path)
29479  *     else:
29480  */
29481   __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v__path)) != ((PyObject *)(&PyUnicode_Type)));
29482   __pyx_t_2 = (__pyx_t_3 != 0);
29483   if (__pyx_t_2) {
29484
29485     /* "src/lxml/objectpath.pxi":100
29486  *         path = (<bytes>_path).decode('ascii')
29487  *     elif type(_path) is not unicode:
29488  *         path = unicode(_path)             # <<<<<<<<<<<<<<
29489  *     else:
29490  *         path = _path
29491  */
29492     __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v__path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 100, __pyx_L1_error)
29493     __Pyx_GOTREF(__pyx_t_1);
29494     __pyx_v_path = ((PyObject*)__pyx_t_1);
29495     __pyx_t_1 = 0;
29496
29497     /* "src/lxml/objectpath.pxi":99
29498  *     if isinstance(_path, bytes):
29499  *         path = (<bytes>_path).decode('ascii')
29500  *     elif type(_path) is not unicode:             # <<<<<<<<<<<<<<
29501  *         path = unicode(_path)
29502  *     else:
29503  */
29504     goto __pyx_L3;
29505   }
29506
29507   /* "src/lxml/objectpath.pxi":102
29508  *         path = unicode(_path)
29509  *     else:
29510  *         path = _path             # <<<<<<<<<<<<<<
29511  *     path = path.strip()
29512  *     if path == u'.':
29513  */
29514   /*else*/ {
29515     if (!(likely(PyUnicode_CheckExact(__pyx_v__path))||((__pyx_v__path) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v__path)->tp_name), 0))) __PYX_ERR(1, 102, __pyx_L1_error)
29516     __pyx_t_1 = __pyx_v__path;
29517     __Pyx_INCREF(__pyx_t_1);
29518     __pyx_v_path = ((PyObject*)__pyx_t_1);
29519     __pyx_t_1 = 0;
29520   }
29521   __pyx_L3:;
29522
29523   /* "src/lxml/objectpath.pxi":103
29524  *     else:
29525  *         path = _path
29526  *     path = path.strip()             # <<<<<<<<<<<<<<
29527  *     if path == u'.':
29528  *         return [_RELATIVE_PATH_SEGMENT]
29529  */
29530   __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_strip, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 103, __pyx_L1_error)
29531   __Pyx_GOTREF(__pyx_t_1);
29532   if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 103, __pyx_L1_error)
29533   __Pyx_DECREF_SET(__pyx_v_path, ((PyObject*)__pyx_t_1));
29534   __pyx_t_1 = 0;
29535
29536   /* "src/lxml/objectpath.pxi":104
29537  *         path = _path
29538  *     path = path.strip()
29539  *     if path == u'.':             # <<<<<<<<<<<<<<
29540  *         return [_RELATIVE_PATH_SEGMENT]
29541  *     path_pos = 0
29542  */
29543   __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_path, __pyx_kp_u__2, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 104, __pyx_L1_error)
29544   __pyx_t_3 = (__pyx_t_2 != 0);
29545   if (__pyx_t_3) {
29546
29547     /* "src/lxml/objectpath.pxi":105
29548  *     path = path.strip()
29549  *     if path == u'.':
29550  *         return [_RELATIVE_PATH_SEGMENT]             # <<<<<<<<<<<<<<
29551  *     path_pos = 0
29552  *     while path:
29553  */
29554     __Pyx_XDECREF(__pyx_r);
29555     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 105, __pyx_L1_error)
29556     __Pyx_GOTREF(__pyx_t_1);
29557     __Pyx_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29558     __Pyx_GIVEREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29559     PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
29560     __pyx_r = ((PyObject*)__pyx_t_1);
29561     __pyx_t_1 = 0;
29562     goto __pyx_L0;
29563
29564     /* "src/lxml/objectpath.pxi":104
29565  *         path = _path
29566  *     path = path.strip()
29567  *     if path == u'.':             # <<<<<<<<<<<<<<
29568  *         return [_RELATIVE_PATH_SEGMENT]
29569  *     path_pos = 0
29570  */
29571   }
29572
29573   /* "src/lxml/objectpath.pxi":106
29574  *     if path == u'.':
29575  *         return [_RELATIVE_PATH_SEGMENT]
29576  *     path_pos = 0             # <<<<<<<<<<<<<<
29577  *     while path:
29578  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29579  */
29580   __Pyx_INCREF(__pyx_int_0);
29581   __pyx_v_path_pos = __pyx_int_0;
29582
29583   /* "src/lxml/objectpath.pxi":107
29584  *         return [_RELATIVE_PATH_SEGMENT]
29585  *     path_pos = 0
29586  *     while path:             # <<<<<<<<<<<<<<
29587  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29588  *         if match is None:
29589  */
29590   while (1) {
29591     __pyx_t_3 = (__pyx_v_path != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_path) != 0);
29592     if (!__pyx_t_3) break;
29593
29594     /* "src/lxml/objectpath.pxi":108
29595  *     path_pos = 0
29596  *     while path:
29597  *         match = __MATCH_PATH_SEGMENT(path, path_pos)             # <<<<<<<<<<<<<<
29598  *         if match is None:
29599  *             break
29600  */
29601     __Pyx_INCREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
29602     __pyx_t_4 = __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT; __pyx_t_5 = NULL;
29603     __pyx_t_6 = 0;
29604     if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
29605       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
29606       if (likely(__pyx_t_5)) {
29607         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
29608         __Pyx_INCREF(__pyx_t_5);
29609         __Pyx_INCREF(function);
29610         __Pyx_DECREF_SET(__pyx_t_4, function);
29611         __pyx_t_6 = 1;
29612       }
29613     }
29614     #if CYTHON_FAST_PYCALL
29615     if (PyFunction_Check(__pyx_t_4)) {
29616       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_path_pos};
29617       __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
29618       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29619       __Pyx_GOTREF(__pyx_t_1);
29620     } else
29621     #endif
29622     #if CYTHON_FAST_PYCCALL
29623     if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
29624       PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_path, __pyx_v_path_pos};
29625       __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
29626       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29627       __Pyx_GOTREF(__pyx_t_1);
29628     } else
29629     #endif
29630     {
29631       __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 108, __pyx_L1_error)
29632       __Pyx_GOTREF(__pyx_t_7);
29633       if (__pyx_t_5) {
29634         __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
29635       }
29636       __Pyx_INCREF(__pyx_v_path);
29637       __Pyx_GIVEREF(__pyx_v_path);
29638       PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_path);
29639       __Pyx_INCREF(__pyx_v_path_pos);
29640       __Pyx_GIVEREF(__pyx_v_path_pos);
29641       PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_path_pos);
29642       __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 108, __pyx_L1_error)
29643       __Pyx_GOTREF(__pyx_t_1);
29644       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29645     }
29646     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29647     __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_1);
29648     __pyx_t_1 = 0;
29649
29650     /* "src/lxml/objectpath.pxi":109
29651  *     while path:
29652  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29653  *         if match is None:             # <<<<<<<<<<<<<<
29654  *             break
29655  * 
29656  */
29657     __pyx_t_3 = (__pyx_v_match == Py_None);
29658     __pyx_t_2 = (__pyx_t_3 != 0);
29659     if (__pyx_t_2) {
29660
29661       /* "src/lxml/objectpath.pxi":110
29662  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29663  *         if match is None:
29664  *             break             # <<<<<<<<<<<<<<
29665  * 
29666  *         dot, ns, name, index = match.groups()
29667  */
29668       goto __pyx_L6_break;
29669
29670       /* "src/lxml/objectpath.pxi":109
29671  *     while path:
29672  *         match = __MATCH_PATH_SEGMENT(path, path_pos)
29673  *         if match is None:             # <<<<<<<<<<<<<<
29674  *             break
29675  * 
29676  */
29677     }
29678
29679     /* "src/lxml/objectpath.pxi":112
29680  *             break
29681  * 
29682  *         dot, ns, name, index = match.groups()             # <<<<<<<<<<<<<<
29683  *         index = int(index) if index else 0
29684  *         has_dot = dot == u'.'
29685  */
29686     __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 112, __pyx_L1_error)
29687     __Pyx_GOTREF(__pyx_t_4);
29688     __pyx_t_7 = NULL;
29689     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
29690       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
29691       if (likely(__pyx_t_7)) {
29692         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
29693         __Pyx_INCREF(__pyx_t_7);
29694         __Pyx_INCREF(function);
29695         __Pyx_DECREF_SET(__pyx_t_4, function);
29696       }
29697     }
29698     __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
29699     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
29700     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
29701     __Pyx_GOTREF(__pyx_t_1);
29702     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29703     if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
29704       PyObject* sequence = __pyx_t_1;
29705       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
29706       if (unlikely(size != 4)) {
29707         if (size > 4) __Pyx_RaiseTooManyValuesError(4);
29708         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
29709         __PYX_ERR(1, 112, __pyx_L1_error)
29710       }
29711       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
29712       if (likely(PyTuple_CheckExact(sequence))) {
29713         __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
29714         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
29715         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
29716         __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); 
29717       } else {
29718         __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
29719         __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
29720         __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
29721         __pyx_t_8 = PyList_GET_ITEM(sequence, 3); 
29722       }
29723       __Pyx_INCREF(__pyx_t_4);
29724       __Pyx_INCREF(__pyx_t_7);
29725       __Pyx_INCREF(__pyx_t_5);
29726       __Pyx_INCREF(__pyx_t_8);
29727       #else
29728       {
29729         Py_ssize_t i;
29730         PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_7,&__pyx_t_5,&__pyx_t_8};
29731         for (i=0; i < 4; i++) {
29732           PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(1, 112, __pyx_L1_error)
29733           __Pyx_GOTREF(item);
29734           *(temps[i]) = item;
29735         }
29736       }
29737       #endif
29738       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29739     } else {
29740       Py_ssize_t index = -1;
29741       PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_7,&__pyx_t_5,&__pyx_t_8};
29742       __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 112, __pyx_L1_error)
29743       __Pyx_GOTREF(__pyx_t_9);
29744       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29745       __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
29746       for (index=0; index < 4; index++) {
29747         PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
29748         __Pyx_GOTREF(item);
29749         *(temps[index]) = item;
29750       }
29751       if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 4) < 0) __PYX_ERR(1, 112, __pyx_L1_error)
29752       __pyx_t_10 = NULL;
29753       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29754       goto __pyx_L9_unpacking_done;
29755       __pyx_L8_unpacking_failed:;
29756       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
29757       __pyx_t_10 = NULL;
29758       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
29759       __PYX_ERR(1, 112, __pyx_L1_error)
29760       __pyx_L9_unpacking_done:;
29761     }
29762     __Pyx_XDECREF_SET(__pyx_v_dot, __pyx_t_4);
29763     __pyx_t_4 = 0;
29764     __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_7);
29765     __pyx_t_7 = 0;
29766     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5);
29767     __pyx_t_5 = 0;
29768     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
29769     __pyx_t_8 = 0;
29770
29771     /* "src/lxml/objectpath.pxi":113
29772  * 
29773  *         dot, ns, name, index = match.groups()
29774  *         index = int(index) if index else 0             # <<<<<<<<<<<<<<
29775  *         has_dot = dot == u'.'
29776  *         if not new_path:
29777  */
29778     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 113, __pyx_L1_error)
29779     if (__pyx_t_2) {
29780       __pyx_t_8 = __Pyx_PyNumber_Int(__pyx_v_index); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 113, __pyx_L1_error)
29781       __Pyx_GOTREF(__pyx_t_8);
29782       __pyx_t_1 = __pyx_t_8;
29783       __pyx_t_8 = 0;
29784     } else {
29785       __Pyx_INCREF(__pyx_int_0);
29786       __pyx_t_1 = __pyx_int_0;
29787     }
29788     __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
29789     __pyx_t_1 = 0;
29790
29791     /* "src/lxml/objectpath.pxi":114
29792  *         dot, ns, name, index = match.groups()
29793  *         index = int(index) if index else 0
29794  *         has_dot = dot == u'.'             # <<<<<<<<<<<<<<
29795  *         if not new_path:
29796  *             if has_dot:
29797  */
29798     __pyx_t_1 = PyObject_RichCompare(__pyx_v_dot, __pyx_kp_u__2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 114, __pyx_L1_error)
29799     __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 114, __pyx_L1_error)
29800     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29801     __pyx_v_has_dot = __pyx_t_2;
29802
29803     /* "src/lxml/objectpath.pxi":115
29804  *         index = int(index) if index else 0
29805  *         has_dot = dot == u'.'
29806  *         if not new_path:             # <<<<<<<<<<<<<<
29807  *             if has_dot:
29808  *                 # path '.child' => ignore root
29809  */
29810     __pyx_t_2 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
29811     __pyx_t_3 = ((!__pyx_t_2) != 0);
29812     if (__pyx_t_3) {
29813
29814       /* "src/lxml/objectpath.pxi":116
29815  *         has_dot = dot == u'.'
29816  *         if not new_path:
29817  *             if has_dot:             # <<<<<<<<<<<<<<
29818  *                 # path '.child' => ignore root
29819  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29820  */
29821       __pyx_t_3 = (__pyx_v_has_dot != 0);
29822       if (__pyx_t_3) {
29823
29824         /* "src/lxml/objectpath.pxi":118
29825  *             if has_dot:
29826  *                 # path '.child' => ignore root
29827  *                 new_path.append(_RELATIVE_PATH_SEGMENT)             # <<<<<<<<<<<<<<
29828  *             elif index:
29829  *                 raise ValueError, u"index not allowed on root node"
29830  */
29831         __pyx_t_1 = __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT;
29832         __Pyx_INCREF(__pyx_t_1);
29833         __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_new_path, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 118, __pyx_L1_error)
29834         __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29835
29836         /* "src/lxml/objectpath.pxi":116
29837  *         has_dot = dot == u'.'
29838  *         if not new_path:
29839  *             if has_dot:             # <<<<<<<<<<<<<<
29840  *                 # path '.child' => ignore root
29841  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29842  */
29843         goto __pyx_L11;
29844       }
29845
29846       /* "src/lxml/objectpath.pxi":119
29847  *                 # path '.child' => ignore root
29848  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29849  *             elif index:             # <<<<<<<<<<<<<<
29850  *                 raise ValueError, u"index not allowed on root node"
29851  *         elif not has_dot:
29852  */
29853       __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 119, __pyx_L1_error)
29854       if (unlikely(__pyx_t_3)) {
29855
29856         /* "src/lxml/objectpath.pxi":120
29857  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29858  *             elif index:
29859  *                 raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
29860  *         elif not has_dot:
29861  *             raise ValueError, u"invalid path"
29862  */
29863         __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_not_allowed_on_root_node, 0, 0);
29864         __PYX_ERR(1, 120, __pyx_L1_error)
29865
29866         /* "src/lxml/objectpath.pxi":119
29867  *                 # path '.child' => ignore root
29868  *                 new_path.append(_RELATIVE_PATH_SEGMENT)
29869  *             elif index:             # <<<<<<<<<<<<<<
29870  *                 raise ValueError, u"index not allowed on root node"
29871  *         elif not has_dot:
29872  */
29873       }
29874       __pyx_L11:;
29875
29876       /* "src/lxml/objectpath.pxi":115
29877  *         index = int(index) if index else 0
29878  *         has_dot = dot == u'.'
29879  *         if not new_path:             # <<<<<<<<<<<<<<
29880  *             if has_dot:
29881  *                 # path '.child' => ignore root
29882  */
29883       goto __pyx_L10;
29884     }
29885
29886     /* "src/lxml/objectpath.pxi":121
29887  *             elif index:
29888  *                 raise ValueError, u"index not allowed on root node"
29889  *         elif not has_dot:             # <<<<<<<<<<<<<<
29890  *             raise ValueError, u"invalid path"
29891  *         if ns is not None:
29892  */
29893     __pyx_t_3 = ((!(__pyx_v_has_dot != 0)) != 0);
29894     if (unlikely(__pyx_t_3)) {
29895
29896       /* "src/lxml/objectpath.pxi":122
29897  *                 raise ValueError, u"index not allowed on root node"
29898  *         elif not has_dot:
29899  *             raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
29900  *         if ns is not None:
29901  *             ns = python.PyUnicode_AsUTF8String(ns)
29902  */
29903       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
29904       __PYX_ERR(1, 122, __pyx_L1_error)
29905
29906       /* "src/lxml/objectpath.pxi":121
29907  *             elif index:
29908  *                 raise ValueError, u"index not allowed on root node"
29909  *         elif not has_dot:             # <<<<<<<<<<<<<<
29910  *             raise ValueError, u"invalid path"
29911  *         if ns is not None:
29912  */
29913     }
29914     __pyx_L10:;
29915
29916     /* "src/lxml/objectpath.pxi":123
29917  *         elif not has_dot:
29918  *             raise ValueError, u"invalid path"
29919  *         if ns is not None:             # <<<<<<<<<<<<<<
29920  *             ns = python.PyUnicode_AsUTF8String(ns)
29921  *         name = python.PyUnicode_AsUTF8String(name)
29922  */
29923     __pyx_t_3 = (__pyx_v_ns != Py_None);
29924     __pyx_t_2 = (__pyx_t_3 != 0);
29925     if (__pyx_t_2) {
29926
29927       /* "src/lxml/objectpath.pxi":124
29928  *             raise ValueError, u"invalid path"
29929  *         if ns is not None:
29930  *             ns = python.PyUnicode_AsUTF8String(ns)             # <<<<<<<<<<<<<<
29931  *         name = python.PyUnicode_AsUTF8String(name)
29932  *         new_path.append( (ns, name, index) )
29933  */
29934       __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_ns); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 124, __pyx_L1_error)
29935       __Pyx_GOTREF(__pyx_t_1);
29936       __Pyx_DECREF_SET(__pyx_v_ns, __pyx_t_1);
29937       __pyx_t_1 = 0;
29938
29939       /* "src/lxml/objectpath.pxi":123
29940  *         elif not has_dot:
29941  *             raise ValueError, u"invalid path"
29942  *         if ns is not None:             # <<<<<<<<<<<<<<
29943  *             ns = python.PyUnicode_AsUTF8String(ns)
29944  *         name = python.PyUnicode_AsUTF8String(name)
29945  */
29946     }
29947
29948     /* "src/lxml/objectpath.pxi":125
29949  *         if ns is not None:
29950  *             ns = python.PyUnicode_AsUTF8String(ns)
29951  *         name = python.PyUnicode_AsUTF8String(name)             # <<<<<<<<<<<<<<
29952  *         new_path.append( (ns, name, index) )
29953  * 
29954  */
29955     __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 125, __pyx_L1_error)
29956     __Pyx_GOTREF(__pyx_t_1);
29957     __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
29958     __pyx_t_1 = 0;
29959
29960     /* "src/lxml/objectpath.pxi":126
29961  *             ns = python.PyUnicode_AsUTF8String(ns)
29962  *         name = python.PyUnicode_AsUTF8String(name)
29963  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
29964  * 
29965  *         path_pos = match.end()
29966  */
29967     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 126, __pyx_L1_error)
29968     __Pyx_GOTREF(__pyx_t_1);
29969     __Pyx_INCREF(__pyx_v_ns);
29970     __Pyx_GIVEREF(__pyx_v_ns);
29971     PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ns);
29972     __Pyx_INCREF(__pyx_v_name);
29973     __Pyx_GIVEREF(__pyx_v_name);
29974     PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name);
29975     __Pyx_INCREF(__pyx_v_index);
29976     __Pyx_GIVEREF(__pyx_v_index);
29977     PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_index);
29978     __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_new_path, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 126, __pyx_L1_error)
29979     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29980
29981     /* "src/lxml/objectpath.pxi":128
29982  *         new_path.append( (ns, name, index) )
29983  * 
29984  *         path_pos = match.end()             # <<<<<<<<<<<<<<
29985  *     if not new_path or len(path) > path_pos:
29986  *         raise ValueError, u"invalid path"
29987  */
29988     __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 128, __pyx_L1_error)
29989     __Pyx_GOTREF(__pyx_t_8);
29990     __pyx_t_5 = NULL;
29991     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
29992       __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
29993       if (likely(__pyx_t_5)) {
29994         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
29995         __Pyx_INCREF(__pyx_t_5);
29996         __Pyx_INCREF(function);
29997         __Pyx_DECREF_SET(__pyx_t_8, function);
29998       }
29999     }
30000     __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
30001     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
30002     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 128, __pyx_L1_error)
30003     __Pyx_GOTREF(__pyx_t_1);
30004     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30005     __Pyx_DECREF_SET(__pyx_v_path_pos, __pyx_t_1);
30006     __pyx_t_1 = 0;
30007   }
30008   __pyx_L6_break:;
30009
30010   /* "src/lxml/objectpath.pxi":129
30011  * 
30012  *         path_pos = match.end()
30013  *     if not new_path or len(path) > path_pos:             # <<<<<<<<<<<<<<
30014  *         raise ValueError, u"invalid path"
30015  *     return new_path
30016  */
30017   __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30018   __pyx_t_12 = ((!__pyx_t_3) != 0);
30019   if (!__pyx_t_12) {
30020   } else {
30021     __pyx_t_2 = __pyx_t_12;
30022     goto __pyx_L14_bool_binop_done;
30023   }
30024   if (unlikely(__pyx_v_path == Py_None)) {
30025     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
30026     __PYX_ERR(1, 129, __pyx_L1_error)
30027   }
30028   __pyx_t_13 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_path); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error)
30029   __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
30030   __Pyx_GOTREF(__pyx_t_1);
30031   __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_path_pos, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 129, __pyx_L1_error)
30032   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30033   __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(1, 129, __pyx_L1_error)
30034   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30035   __pyx_t_2 = __pyx_t_12;
30036   __pyx_L14_bool_binop_done:;
30037   if (unlikely(__pyx_t_2)) {
30038
30039     /* "src/lxml/objectpath.pxi":130
30040  *         path_pos = match.end()
30041  *     if not new_path or len(path) > path_pos:
30042  *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
30043  *     return new_path
30044  * 
30045  */
30046     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
30047     __PYX_ERR(1, 130, __pyx_L1_error)
30048
30049     /* "src/lxml/objectpath.pxi":129
30050  * 
30051  *         path_pos = match.end()
30052  *     if not new_path or len(path) > path_pos:             # <<<<<<<<<<<<<<
30053  *         raise ValueError, u"invalid path"
30054  *     return new_path
30055  */
30056   }
30057
30058   /* "src/lxml/objectpath.pxi":131
30059  *     if not new_path or len(path) > path_pos:
30060  *         raise ValueError, u"invalid path"
30061  *     return new_path             # <<<<<<<<<<<<<<
30062  * 
30063  * 
30064  */
30065   __Pyx_XDECREF(__pyx_r);
30066   __Pyx_INCREF(__pyx_v_new_path);
30067   __pyx_r = __pyx_v_new_path;
30068   goto __pyx_L0;
30069
30070   /* "src/lxml/objectpath.pxi":91
30071  * 
30072  * 
30073  * cdef list _parse_object_path_string(_path):             # <<<<<<<<<<<<<<
30074  *     u"""Parse object path string into a (ns, name, index) list.
30075  *     """
30076  */
30077
30078   /* function exit code */
30079   __pyx_L1_error:;
30080   __Pyx_XDECREF(__pyx_t_1);
30081   __Pyx_XDECREF(__pyx_t_4);
30082   __Pyx_XDECREF(__pyx_t_5);
30083   __Pyx_XDECREF(__pyx_t_7);
30084   __Pyx_XDECREF(__pyx_t_8);
30085   __Pyx_XDECREF(__pyx_t_9);
30086   __Pyx_AddTraceback("lxml.objectify._parse_object_path_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
30087   __pyx_r = 0;
30088   __pyx_L0:;
30089   __Pyx_XDECREF(__pyx_v_path);
30090   __Pyx_XDECREF(__pyx_v_new_path);
30091   __Pyx_XDECREF(__pyx_v_path_pos);
30092   __Pyx_XDECREF(__pyx_v_match);
30093   __Pyx_XDECREF(__pyx_v_dot);
30094   __Pyx_XDECREF(__pyx_v_ns);
30095   __Pyx_XDECREF(__pyx_v_name);
30096   __Pyx_XDECREF(__pyx_v_index);
30097   __Pyx_XGIVEREF(__pyx_r);
30098   __Pyx_RefNannyFinishContext();
30099   return __pyx_r;
30100 }
30101
30102 /* "src/lxml/objectpath.pxi":134
30103  * 
30104  * 
30105  * cdef list _parse_object_path_list(path):             # <<<<<<<<<<<<<<
30106  *     u"""Parse object path sequence into a (ns, name, index) list.
30107  *     """
30108  */
30109
30110 static PyObject *__pyx_f_4lxml_9objectify__parse_object_path_list(PyObject *__pyx_v_path) {
30111   PyObject *__pyx_v_new_path = NULL;
30112   PyObject *__pyx_v_item = NULL;
30113   PyObject *__pyx_v_ns = NULL;
30114   PyObject *__pyx_v_name = NULL;
30115   PyObject *__pyx_v_index = NULL;
30116   const xmlChar *__pyx_v_c_name;
30117   const xmlChar *__pyx_v_index_pos;
30118   const xmlChar *__pyx_v_index_end;
30119   PyObject *__pyx_r = NULL;
30120   __Pyx_RefNannyDeclarations
30121   PyObject *__pyx_t_1 = NULL;
30122   Py_ssize_t __pyx_t_2;
30123   PyObject *(*__pyx_t_3)(PyObject *);
30124   PyObject *__pyx_t_4 = NULL;
30125   PyObject *__pyx_t_5 = NULL;
30126   PyObject *__pyx_t_6 = NULL;
30127   int __pyx_t_7;
30128   int __pyx_t_8;
30129   int __pyx_t_9;
30130   int __pyx_t_10;
30131   int __pyx_lineno = 0;
30132   const char *__pyx_filename = NULL;
30133   int __pyx_clineno = 0;
30134   __Pyx_RefNannySetupContext("_parse_object_path_list", 0);
30135
30136   /* "src/lxml/objectpath.pxi":137
30137  *     u"""Parse object path sequence into a (ns, name, index) list.
30138  *     """
30139  *     new_path = []             # <<<<<<<<<<<<<<
30140  *     for item in path:
30141  *         item = item.strip()
30142  */
30143   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 137, __pyx_L1_error)
30144   __Pyx_GOTREF(__pyx_t_1);
30145   __pyx_v_new_path = ((PyObject*)__pyx_t_1);
30146   __pyx_t_1 = 0;
30147
30148   /* "src/lxml/objectpath.pxi":138
30149  *     """
30150  *     new_path = []
30151  *     for item in path:             # <<<<<<<<<<<<<<
30152  *         item = item.strip()
30153  *         if not new_path and item == u'':
30154  */
30155   if (likely(PyList_CheckExact(__pyx_v_path)) || PyTuple_CheckExact(__pyx_v_path)) {
30156     __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
30157     __pyx_t_3 = NULL;
30158   } else {
30159     __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error)
30160     __Pyx_GOTREF(__pyx_t_1);
30161     __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error)
30162   }
30163   for (;;) {
30164     if (likely(!__pyx_t_3)) {
30165       if (likely(PyList_CheckExact(__pyx_t_1))) {
30166         if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
30167         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30168         __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 138, __pyx_L1_error)
30169         #else
30170         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L1_error)
30171         __Pyx_GOTREF(__pyx_t_4);
30172         #endif
30173       } else {
30174         if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
30175         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30176         __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 138, __pyx_L1_error)
30177         #else
30178         __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 138, __pyx_L1_error)
30179         __Pyx_GOTREF(__pyx_t_4);
30180         #endif
30181       }
30182     } else {
30183       __pyx_t_4 = __pyx_t_3(__pyx_t_1);
30184       if (unlikely(!__pyx_t_4)) {
30185         PyObject* exc_type = PyErr_Occurred();
30186         if (exc_type) {
30187           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
30188           else __PYX_ERR(1, 138, __pyx_L1_error)
30189         }
30190         break;
30191       }
30192       __Pyx_GOTREF(__pyx_t_4);
30193     }
30194     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
30195     __pyx_t_4 = 0;
30196
30197     /* "src/lxml/objectpath.pxi":139
30198  *     new_path = []
30199  *     for item in path:
30200  *         item = item.strip()             # <<<<<<<<<<<<<<
30201  *         if not new_path and item == u'':
30202  *             # path '.child' => ignore root
30203  */
30204     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
30205     __Pyx_GOTREF(__pyx_t_5);
30206     __pyx_t_6 = NULL;
30207     if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
30208       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
30209       if (likely(__pyx_t_6)) {
30210         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
30211         __Pyx_INCREF(__pyx_t_6);
30212         __Pyx_INCREF(function);
30213         __Pyx_DECREF_SET(__pyx_t_5, function);
30214       }
30215     }
30216     __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
30217     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
30218     if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 139, __pyx_L1_error)
30219     __Pyx_GOTREF(__pyx_t_4);
30220     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
30221     __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_4);
30222     __pyx_t_4 = 0;
30223
30224     /* "src/lxml/objectpath.pxi":140
30225  *     for item in path:
30226  *         item = item.strip()
30227  *         if not new_path and item == u'':             # <<<<<<<<<<<<<<
30228  *             # path '.child' => ignore root
30229  *             ns = name = None
30230  */
30231     __pyx_t_8 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30232     __pyx_t_9 = ((!__pyx_t_8) != 0);
30233     if (__pyx_t_9) {
30234     } else {
30235       __pyx_t_7 = __pyx_t_9;
30236       goto __pyx_L6_bool_binop_done;
30237     }
30238     __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_item, __pyx_kp_u_, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 140, __pyx_L1_error)
30239     __pyx_t_7 = __pyx_t_9;
30240     __pyx_L6_bool_binop_done:;
30241     if (__pyx_t_7) {
30242
30243       /* "src/lxml/objectpath.pxi":142
30244  *         if not new_path and item == u'':
30245  *             # path '.child' => ignore root
30246  *             ns = name = None             # <<<<<<<<<<<<<<
30247  *             index = 0
30248  *         else:
30249  */
30250       __Pyx_INCREF(Py_None);
30251       __Pyx_XDECREF_SET(__pyx_v_ns, Py_None);
30252       __Pyx_INCREF(Py_None);
30253       __Pyx_XDECREF_SET(__pyx_v_name, Py_None);
30254
30255       /* "src/lxml/objectpath.pxi":143
30256  *             # path '.child' => ignore root
30257  *             ns = name = None
30258  *             index = 0             # <<<<<<<<<<<<<<
30259  *         else:
30260  *             ns, name = cetree.getNsTag(item)
30261  */
30262       __Pyx_INCREF(__pyx_int_0);
30263       __Pyx_XDECREF_SET(__pyx_v_index, __pyx_int_0);
30264
30265       /* "src/lxml/objectpath.pxi":140
30266  *     for item in path:
30267  *         item = item.strip()
30268  *         if not new_path and item == u'':             # <<<<<<<<<<<<<<
30269  *             # path '.child' => ignore root
30270  *             ns = name = None
30271  */
30272       goto __pyx_L5;
30273     }
30274
30275     /* "src/lxml/objectpath.pxi":145
30276  *             index = 0
30277  *         else:
30278  *             ns, name = cetree.getNsTag(item)             # <<<<<<<<<<<<<<
30279  *             c_name = _xcstr(name)
30280  *             index_pos = tree.xmlStrchr(c_name, c'[')
30281  */
30282     /*else*/ {
30283       __pyx_t_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 145, __pyx_L1_error)
30284       __Pyx_GOTREF(__pyx_t_4);
30285       if (likely(__pyx_t_4 != Py_None)) {
30286         PyObject* sequence = __pyx_t_4;
30287         Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
30288         if (unlikely(size != 2)) {
30289           if (size > 2) __Pyx_RaiseTooManyValuesError(2);
30290           else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
30291           __PYX_ERR(1, 145, __pyx_L1_error)
30292         }
30293         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30294         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
30295         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
30296         __Pyx_INCREF(__pyx_t_5);
30297         __Pyx_INCREF(__pyx_t_6);
30298         #else
30299         __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 145, __pyx_L1_error)
30300         __Pyx_GOTREF(__pyx_t_5);
30301         __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 145, __pyx_L1_error)
30302         __Pyx_GOTREF(__pyx_t_6);
30303         #endif
30304         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30305       } else {
30306         __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 145, __pyx_L1_error)
30307       }
30308       __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_5);
30309       __pyx_t_5 = 0;
30310       __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
30311       __pyx_t_6 = 0;
30312
30313       /* "src/lxml/objectpath.pxi":146
30314  *         else:
30315  *             ns, name = cetree.getNsTag(item)
30316  *             c_name = _xcstr(name)             # <<<<<<<<<<<<<<
30317  *             index_pos = tree.xmlStrchr(c_name, c'[')
30318  *             if index_pos is NULL:
30319  */
30320       __pyx_v_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name);
30321
30322       /* "src/lxml/objectpath.pxi":147
30323  *             ns, name = cetree.getNsTag(item)
30324  *             c_name = _xcstr(name)
30325  *             index_pos = tree.xmlStrchr(c_name, c'[')             # <<<<<<<<<<<<<<
30326  *             if index_pos is NULL:
30327  *                 index = 0
30328  */
30329       __pyx_v_index_pos = xmlStrchr(__pyx_v_c_name, '[');
30330
30331       /* "src/lxml/objectpath.pxi":148
30332  *             c_name = _xcstr(name)
30333  *             index_pos = tree.xmlStrchr(c_name, c'[')
30334  *             if index_pos is NULL:             # <<<<<<<<<<<<<<
30335  *                 index = 0
30336  *             else:
30337  */
30338       __pyx_t_7 = ((__pyx_v_index_pos == NULL) != 0);
30339       if (__pyx_t_7) {
30340
30341         /* "src/lxml/objectpath.pxi":149
30342  *             index_pos = tree.xmlStrchr(c_name, c'[')
30343  *             if index_pos is NULL:
30344  *                 index = 0             # <<<<<<<<<<<<<<
30345  *             else:
30346  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30347  */
30348         __Pyx_INCREF(__pyx_int_0);
30349         __Pyx_XDECREF_SET(__pyx_v_index, __pyx_int_0);
30350
30351         /* "src/lxml/objectpath.pxi":148
30352  *             c_name = _xcstr(name)
30353  *             index_pos = tree.xmlStrchr(c_name, c'[')
30354  *             if index_pos is NULL:             # <<<<<<<<<<<<<<
30355  *                 index = 0
30356  *             else:
30357  */
30358         goto __pyx_L8;
30359       }
30360
30361       /* "src/lxml/objectpath.pxi":151
30362  *                 index = 0
30363  *             else:
30364  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')             # <<<<<<<<<<<<<<
30365  *                 if index_end is NULL:
30366  *                     raise ValueError, u"index must be enclosed in []"
30367  */
30368       /*else*/ {
30369         __pyx_v_index_end = xmlStrchr((__pyx_v_index_pos + 1), ']');
30370
30371         /* "src/lxml/objectpath.pxi":152
30372  *             else:
30373  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30374  *                 if index_end is NULL:             # <<<<<<<<<<<<<<
30375  *                     raise ValueError, u"index must be enclosed in []"
30376  *                 index = int(index_pos[1:index_end - index_pos])
30377  */
30378         __pyx_t_7 = ((__pyx_v_index_end == NULL) != 0);
30379         if (unlikely(__pyx_t_7)) {
30380
30381           /* "src/lxml/objectpath.pxi":153
30382  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30383  *                 if index_end is NULL:
30384  *                     raise ValueError, u"index must be enclosed in []"             # <<<<<<<<<<<<<<
30385  *                 index = int(index_pos[1:index_end - index_pos])
30386  *                 if not new_path and index != 0:
30387  */
30388           __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_must_be_enclosed_in, 0, 0);
30389           __PYX_ERR(1, 153, __pyx_L1_error)
30390
30391           /* "src/lxml/objectpath.pxi":152
30392  *             else:
30393  *                 index_end = tree.xmlStrchr(index_pos + 1, c']')
30394  *                 if index_end is NULL:             # <<<<<<<<<<<<<<
30395  *                     raise ValueError, u"index must be enclosed in []"
30396  *                 index = int(index_pos[1:index_end - index_pos])
30397  */
30398         }
30399
30400         /* "src/lxml/objectpath.pxi":154
30401  *                 if index_end is NULL:
30402  *                     raise ValueError, u"index must be enclosed in []"
30403  *                 index = int(index_pos[1:index_end - index_pos])             # <<<<<<<<<<<<<<
30404  *                 if not new_path and index != 0:
30405  *                     raise ValueError, u"index not allowed on root node"
30406  */
30407         __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_index_pos) + 1, (__pyx_v_index_end - __pyx_v_index_pos) - 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 154, __pyx_L1_error)
30408         __Pyx_GOTREF(__pyx_t_4);
30409         __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 154, __pyx_L1_error)
30410         __Pyx_GOTREF(__pyx_t_6);
30411         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30412         __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_6);
30413         __pyx_t_6 = 0;
30414
30415         /* "src/lxml/objectpath.pxi":155
30416  *                     raise ValueError, u"index must be enclosed in []"
30417  *                 index = int(index_pos[1:index_end - index_pos])
30418  *                 if not new_path and index != 0:             # <<<<<<<<<<<<<<
30419  *                     raise ValueError, u"index not allowed on root node"
30420  *                 name = <bytes>c_name[:index_pos - c_name]
30421  */
30422         __pyx_t_9 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30423         __pyx_t_8 = ((!__pyx_t_9) != 0);
30424         if (__pyx_t_8) {
30425         } else {
30426           __pyx_t_7 = __pyx_t_8;
30427           goto __pyx_L11_bool_binop_done;
30428         }
30429         __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 155, __pyx_L1_error)
30430         __Pyx_GOTREF(__pyx_t_6);
30431         __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(1, 155, __pyx_L1_error)
30432         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
30433         __pyx_t_7 = __pyx_t_8;
30434         __pyx_L11_bool_binop_done:;
30435         if (unlikely(__pyx_t_7)) {
30436
30437           /* "src/lxml/objectpath.pxi":156
30438  *                 index = int(index_pos[1:index_end - index_pos])
30439  *                 if not new_path and index != 0:
30440  *                     raise ValueError, u"index not allowed on root node"             # <<<<<<<<<<<<<<
30441  *                 name = <bytes>c_name[:index_pos - c_name]
30442  *         new_path.append( (ns, name, index) )
30443  */
30444           __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_index_not_allowed_on_root_node, 0, 0);
30445           __PYX_ERR(1, 156, __pyx_L1_error)
30446
30447           /* "src/lxml/objectpath.pxi":155
30448  *                     raise ValueError, u"index must be enclosed in []"
30449  *                 index = int(index_pos[1:index_end - index_pos])
30450  *                 if not new_path and index != 0:             # <<<<<<<<<<<<<<
30451  *                     raise ValueError, u"index not allowed on root node"
30452  *                 name = <bytes>c_name[:index_pos - c_name]
30453  */
30454         }
30455
30456         /* "src/lxml/objectpath.pxi":157
30457  *                 if not new_path and index != 0:
30458  *                     raise ValueError, u"index not allowed on root node"
30459  *                 name = <bytes>c_name[:index_pos - c_name]             # <<<<<<<<<<<<<<
30460  *         new_path.append( (ns, name, index) )
30461  *     if not new_path:
30462  */
30463         __pyx_t_6 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_c_name) + 0, (__pyx_v_index_pos - __pyx_v_c_name) - 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 157, __pyx_L1_error)
30464         __Pyx_GOTREF(__pyx_t_6);
30465         __pyx_t_4 = __pyx_t_6;
30466         __Pyx_INCREF(__pyx_t_4);
30467         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
30468         __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_4);
30469         __pyx_t_4 = 0;
30470       }
30471       __pyx_L8:;
30472     }
30473     __pyx_L5:;
30474
30475     /* "src/lxml/objectpath.pxi":158
30476  *                     raise ValueError, u"index not allowed on root node"
30477  *                 name = <bytes>c_name[:index_pos - c_name]
30478  *         new_path.append( (ns, name, index) )             # <<<<<<<<<<<<<<
30479  *     if not new_path:
30480  *         raise ValueError, u"invalid path"
30481  */
30482     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 158, __pyx_L1_error)
30483     __Pyx_GOTREF(__pyx_t_4);
30484     __Pyx_INCREF(__pyx_v_ns);
30485     __Pyx_GIVEREF(__pyx_v_ns);
30486     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
30487     __Pyx_INCREF(__pyx_v_name);
30488     __Pyx_GIVEREF(__pyx_v_name);
30489     PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
30490     __Pyx_INCREF(__pyx_v_index);
30491     __Pyx_GIVEREF(__pyx_v_index);
30492     PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_index);
30493     __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_new_path, __pyx_t_4); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 158, __pyx_L1_error)
30494     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30495
30496     /* "src/lxml/objectpath.pxi":138
30497  *     """
30498  *     new_path = []
30499  *     for item in path:             # <<<<<<<<<<<<<<
30500  *         item = item.strip()
30501  *         if not new_path and item == u'':
30502  */
30503   }
30504   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
30505
30506   /* "src/lxml/objectpath.pxi":159
30507  *                 name = <bytes>c_name[:index_pos - c_name]
30508  *         new_path.append( (ns, name, index) )
30509  *     if not new_path:             # <<<<<<<<<<<<<<
30510  *         raise ValueError, u"invalid path"
30511  *     return new_path
30512  */
30513   __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_new_path) != 0);
30514   __pyx_t_8 = ((!__pyx_t_7) != 0);
30515   if (unlikely(__pyx_t_8)) {
30516
30517     /* "src/lxml/objectpath.pxi":160
30518  *         new_path.append( (ns, name, index) )
30519  *     if not new_path:
30520  *         raise ValueError, u"invalid path"             # <<<<<<<<<<<<<<
30521  *     return new_path
30522  * 
30523  */
30524     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_invalid_path, 0, 0);
30525     __PYX_ERR(1, 160, __pyx_L1_error)
30526
30527     /* "src/lxml/objectpath.pxi":159
30528  *                 name = <bytes>c_name[:index_pos - c_name]
30529  *         new_path.append( (ns, name, index) )
30530  *     if not new_path:             # <<<<<<<<<<<<<<
30531  *         raise ValueError, u"invalid path"
30532  *     return new_path
30533  */
30534   }
30535
30536   /* "src/lxml/objectpath.pxi":161
30537  *     if not new_path:
30538  *         raise ValueError, u"invalid path"
30539  *     return new_path             # <<<<<<<<<<<<<<
30540  * 
30541  * 
30542  */
30543   __Pyx_XDECREF(__pyx_r);
30544   __Pyx_INCREF(__pyx_v_new_path);
30545   __pyx_r = __pyx_v_new_path;
30546   goto __pyx_L0;
30547
30548   /* "src/lxml/objectpath.pxi":134
30549  * 
30550  * 
30551  * cdef list _parse_object_path_list(path):             # <<<<<<<<<<<<<<
30552  *     u"""Parse object path sequence into a (ns, name, index) list.
30553  *     """
30554  */
30555
30556   /* function exit code */
30557   __pyx_L1_error:;
30558   __Pyx_XDECREF(__pyx_t_1);
30559   __Pyx_XDECREF(__pyx_t_4);
30560   __Pyx_XDECREF(__pyx_t_5);
30561   __Pyx_XDECREF(__pyx_t_6);
30562   __Pyx_AddTraceback("lxml.objectify._parse_object_path_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
30563   __pyx_r = 0;
30564   __pyx_L0:;
30565   __Pyx_XDECREF(__pyx_v_new_path);
30566   __Pyx_XDECREF(__pyx_v_item);
30567   __Pyx_XDECREF(__pyx_v_ns);
30568   __Pyx_XDECREF(__pyx_v_name);
30569   __Pyx_XDECREF(__pyx_v_index);
30570   __Pyx_XGIVEREF(__pyx_r);
30571   __Pyx_RefNannyFinishContext();
30572   return __pyx_r;
30573 }
30574
30575 /* "src/lxml/objectpath.pxi":164
30576  * 
30577  * 
30578  * cdef _ObjectPath* _build_object_path_segments(list path_list) except NULL:             # <<<<<<<<<<<<<<
30579  *     cdef _ObjectPath* c_path
30580  *     cdef _ObjectPath* c_path_segments
30581  */
30582
30583 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__build_object_path_segments(PyObject *__pyx_v_path_list) {
30584   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
30585   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
30586   PyObject *__pyx_v_href = NULL;
30587   PyObject *__pyx_v_name = NULL;
30588   PyObject *__pyx_v_index = NULL;
30589   __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
30590   __Pyx_RefNannyDeclarations
30591   Py_ssize_t __pyx_t_1;
30592   int __pyx_t_2;
30593   PyObject *__pyx_t_3 = NULL;
30594   PyObject *__pyx_t_4 = NULL;
30595   PyObject *__pyx_t_5 = NULL;
30596   PyObject *__pyx_t_6 = NULL;
30597   PyObject *__pyx_t_7 = NULL;
30598   PyObject *__pyx_t_8 = NULL;
30599   PyObject *(*__pyx_t_9)(PyObject *);
30600   const xmlChar *__pyx_t_10;
30601   Py_ssize_t __pyx_t_11;
30602   int __pyx_lineno = 0;
30603   const char *__pyx_filename = NULL;
30604   int __pyx_clineno = 0;
30605   __Pyx_RefNannySetupContext("_build_object_path_segments", 0);
30606
30607   /* "src/lxml/objectpath.pxi":167
30608  *     cdef _ObjectPath* c_path
30609  *     cdef _ObjectPath* c_path_segments
30610  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))             # <<<<<<<<<<<<<<
30611  *     if c_path_segments is NULL:
30612  *         raise MemoryError()
30613  */
30614   if (unlikely(__pyx_v_path_list == Py_None)) {
30615     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
30616     __PYX_ERR(1, 167, __pyx_L1_error)
30617   }
30618   __pyx_t_1 = PyList_GET_SIZE(__pyx_v_path_list); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 167, __pyx_L1_error)
30619   __pyx_v_c_path_segments = ((__pyx_t_4lxml_9objectify__ObjectPath *)lxml_malloc(__pyx_t_1, (sizeof(__pyx_t_4lxml_9objectify__ObjectPath))));
30620
30621   /* "src/lxml/objectpath.pxi":168
30622  *     cdef _ObjectPath* c_path_segments
30623  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30624  *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
30625  *         raise MemoryError()
30626  *     c_path = c_path_segments
30627  */
30628   __pyx_t_2 = ((__pyx_v_c_path_segments == NULL) != 0);
30629   if (unlikely(__pyx_t_2)) {
30630
30631     /* "src/lxml/objectpath.pxi":169
30632  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30633  *     if c_path_segments is NULL:
30634  *         raise MemoryError()             # <<<<<<<<<<<<<<
30635  *     c_path = c_path_segments
30636  *     for href, name, index in path_list:
30637  */
30638     PyErr_NoMemory(); __PYX_ERR(1, 169, __pyx_L1_error)
30639
30640     /* "src/lxml/objectpath.pxi":168
30641  *     cdef _ObjectPath* c_path_segments
30642  *     c_path_segments = <_ObjectPath*>python.lxml_malloc(len(path_list), sizeof(_ObjectPath))
30643  *     if c_path_segments is NULL:             # <<<<<<<<<<<<<<
30644  *         raise MemoryError()
30645  *     c_path = c_path_segments
30646  */
30647   }
30648
30649   /* "src/lxml/objectpath.pxi":170
30650  *     if c_path_segments is NULL:
30651  *         raise MemoryError()
30652  *     c_path = c_path_segments             # <<<<<<<<<<<<<<
30653  *     for href, name, index in path_list:
30654  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30655  */
30656   __pyx_v_c_path = __pyx_v_c_path_segments;
30657
30658   /* "src/lxml/objectpath.pxi":171
30659  *         raise MemoryError()
30660  *     c_path = c_path_segments
30661  *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
30662  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30663  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30664  */
30665   if (unlikely(__pyx_v_path_list == Py_None)) {
30666     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
30667     __PYX_ERR(1, 171, __pyx_L1_error)
30668   }
30669   __pyx_t_3 = __pyx_v_path_list; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
30670   for (;;) {
30671     if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
30672     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30673     __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 171, __pyx_L1_error)
30674     #else
30675     __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 171, __pyx_L1_error)
30676     __Pyx_GOTREF(__pyx_t_4);
30677     #endif
30678     if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
30679       PyObject* sequence = __pyx_t_4;
30680       Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
30681       if (unlikely(size != 3)) {
30682         if (size > 3) __Pyx_RaiseTooManyValuesError(3);
30683         else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
30684         __PYX_ERR(1, 171, __pyx_L1_error)
30685       }
30686       #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
30687       if (likely(PyTuple_CheckExact(sequence))) {
30688         __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
30689         __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
30690         __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
30691       } else {
30692         __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
30693         __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
30694         __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
30695       }
30696       __Pyx_INCREF(__pyx_t_5);
30697       __Pyx_INCREF(__pyx_t_6);
30698       __Pyx_INCREF(__pyx_t_7);
30699       #else
30700       __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 171, __pyx_L1_error)
30701       __Pyx_GOTREF(__pyx_t_5);
30702       __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 171, __pyx_L1_error)
30703       __Pyx_GOTREF(__pyx_t_6);
30704       __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 171, __pyx_L1_error)
30705       __Pyx_GOTREF(__pyx_t_7);
30706       #endif
30707       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30708     } else {
30709       Py_ssize_t index = -1;
30710       __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 171, __pyx_L1_error)
30711       __Pyx_GOTREF(__pyx_t_8);
30712       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
30713       __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
30714       index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
30715       __Pyx_GOTREF(__pyx_t_5);
30716       index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
30717       __Pyx_GOTREF(__pyx_t_6);
30718       index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
30719       __Pyx_GOTREF(__pyx_t_7);
30720       if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(1, 171, __pyx_L1_error)
30721       __pyx_t_9 = NULL;
30722       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30723       goto __pyx_L7_unpacking_done;
30724       __pyx_L6_unpacking_failed:;
30725       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
30726       __pyx_t_9 = NULL;
30727       if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
30728       __PYX_ERR(1, 171, __pyx_L1_error)
30729       __pyx_L7_unpacking_done:;
30730     }
30731     __Pyx_XDECREF_SET(__pyx_v_href, __pyx_t_5);
30732     __pyx_t_5 = 0;
30733     __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6);
30734     __pyx_t_6 = 0;
30735     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_7);
30736     __pyx_t_7 = 0;
30737
30738     /* "src/lxml/objectpath.pxi":172
30739  *     c_path = c_path_segments
30740  *     for href, name, index in path_list:
30741  *         c_path[0].href = _xcstr(href) if href is not None else NULL             # <<<<<<<<<<<<<<
30742  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30743  *         c_path[0].index = index
30744  */
30745     __pyx_t_2 = (__pyx_v_href != Py_None);
30746     if ((__pyx_t_2 != 0)) {
30747       __pyx_t_10 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_href);
30748     } else {
30749       __pyx_t_10 = NULL;
30750     }
30751     (__pyx_v_c_path[0]).href = __pyx_t_10;
30752
30753     /* "src/lxml/objectpath.pxi":173
30754  *     for href, name, index in path_list:
30755  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30756  *         c_path[0].name = _xcstr(name) if name is not None else NULL             # <<<<<<<<<<<<<<
30757  *         c_path[0].index = index
30758  *         c_path += 1
30759  */
30760     __pyx_t_2 = (__pyx_v_name != Py_None);
30761     if ((__pyx_t_2 != 0)) {
30762       __pyx_t_10 = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name);
30763     } else {
30764       __pyx_t_10 = NULL;
30765     }
30766     (__pyx_v_c_path[0]).name = __pyx_t_10;
30767
30768     /* "src/lxml/objectpath.pxi":174
30769  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30770  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30771  *         c_path[0].index = index             # <<<<<<<<<<<<<<
30772  *         c_path += 1
30773  *     return c_path_segments
30774  */
30775     __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 174, __pyx_L1_error)
30776     (__pyx_v_c_path[0]).index = __pyx_t_11;
30777
30778     /* "src/lxml/objectpath.pxi":175
30779  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30780  *         c_path[0].index = index
30781  *         c_path += 1             # <<<<<<<<<<<<<<
30782  *     return c_path_segments
30783  * 
30784  */
30785     __pyx_v_c_path = (__pyx_v_c_path + 1);
30786
30787     /* "src/lxml/objectpath.pxi":171
30788  *         raise MemoryError()
30789  *     c_path = c_path_segments
30790  *     for href, name, index in path_list:             # <<<<<<<<<<<<<<
30791  *         c_path[0].href = _xcstr(href) if href is not None else NULL
30792  *         c_path[0].name = _xcstr(name) if name is not None else NULL
30793  */
30794   }
30795   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30796
30797   /* "src/lxml/objectpath.pxi":176
30798  *         c_path[0].index = index
30799  *         c_path += 1
30800  *     return c_path_segments             # <<<<<<<<<<<<<<
30801  * 
30802  * 
30803  */
30804   __pyx_r = __pyx_v_c_path_segments;
30805   goto __pyx_L0;
30806
30807   /* "src/lxml/objectpath.pxi":164
30808  * 
30809  * 
30810  * cdef _ObjectPath* _build_object_path_segments(list path_list) except NULL:             # <<<<<<<<<<<<<<
30811  *     cdef _ObjectPath* c_path
30812  *     cdef _ObjectPath* c_path_segments
30813  */
30814
30815   /* function exit code */
30816   __pyx_L1_error:;
30817   __Pyx_XDECREF(__pyx_t_3);
30818   __Pyx_XDECREF(__pyx_t_4);
30819   __Pyx_XDECREF(__pyx_t_5);
30820   __Pyx_XDECREF(__pyx_t_6);
30821   __Pyx_XDECREF(__pyx_t_7);
30822   __Pyx_XDECREF(__pyx_t_8);
30823   __Pyx_AddTraceback("lxml.objectify._build_object_path_segments", __pyx_clineno, __pyx_lineno, __pyx_filename);
30824   __pyx_r = NULL;
30825   __pyx_L0:;
30826   __Pyx_XDECREF(__pyx_v_href);
30827   __Pyx_XDECREF(__pyx_v_name);
30828   __Pyx_XDECREF(__pyx_v_index);
30829   __Pyx_RefNannyFinishContext();
30830   return __pyx_r;
30831 }
30832
30833 /* "src/lxml/objectpath.pxi":179
30834  * 
30835  * 
30836  * cdef _find_object_path(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len, default_value):             # <<<<<<<<<<<<<<
30837  *     u"""Follow the path to find the target element.
30838  *     """
30839  */
30840
30841 static PyObject *__pyx_f_4lxml_9objectify__find_object_path(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, PyObject *__pyx_v_default_value) {
30842   xmlNode *__pyx_v_c_node;
30843   Py_ssize_t __pyx_v_c_index;
30844   const xmlChar *__pyx_v_c_name;
30845   const xmlChar *__pyx_v_c_href;
30846   PyObject *__pyx_v_tag = NULL;
30847   PyObject *__pyx_r = NULL;
30848   __Pyx_RefNannyDeclarations
30849   xmlNode *__pyx_t_1;
30850   const xmlChar *__pyx_t_2;
30851   int __pyx_t_3;
30852   int __pyx_t_4;
30853   PyObject *__pyx_t_5 = NULL;
30854   Py_ssize_t __pyx_t_6;
30855   Py_UCS4 __pyx_t_7;
30856   PyObject *__pyx_t_8 = NULL;
30857   PyObject *__pyx_t_9 = NULL;
30858   int __pyx_lineno = 0;
30859   const char *__pyx_filename = NULL;
30860   int __pyx_clineno = 0;
30861   __Pyx_RefNannySetupContext("_find_object_path", 0);
30862
30863   /* "src/lxml/objectpath.pxi":184
30864  *     cdef tree.xmlNode* c_node
30865  *     cdef Py_ssize_t c_index
30866  *     c_node = root._c_node             # <<<<<<<<<<<<<<
30867  *     c_name = c_path[0].name
30868  *     c_href = c_path[0].href
30869  */
30870   __pyx_t_1 = __pyx_v_root->_c_node;
30871   __pyx_v_c_node = __pyx_t_1;
30872
30873   /* "src/lxml/objectpath.pxi":185
30874  *     cdef Py_ssize_t c_index
30875  *     c_node = root._c_node
30876  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
30877  *     c_href = c_path[0].href
30878  *     if c_href is NULL or c_href[0] == c'\0':
30879  */
30880   __pyx_t_2 = (__pyx_v_c_path[0]).name;
30881   __pyx_v_c_name = __pyx_t_2;
30882
30883   /* "src/lxml/objectpath.pxi":186
30884  *     c_node = root._c_node
30885  *     c_name = c_path[0].name
30886  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
30887  *     if c_href is NULL or c_href[0] == c'\0':
30888  *         c_href = tree._getNs(c_node)
30889  */
30890   __pyx_t_2 = (__pyx_v_c_path[0]).href;
30891   __pyx_v_c_href = __pyx_t_2;
30892
30893   /* "src/lxml/objectpath.pxi":187
30894  *     c_name = c_path[0].name
30895  *     c_href = c_path[0].href
30896  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
30897  *         c_href = tree._getNs(c_node)
30898  *     if not cetree.tagMatches(c_node, c_href, c_name):
30899  */
30900   __pyx_t_4 = ((__pyx_v_c_href == NULL) != 0);
30901   if (!__pyx_t_4) {
30902   } else {
30903     __pyx_t_3 = __pyx_t_4;
30904     goto __pyx_L4_bool_binop_done;
30905   }
30906   __pyx_t_4 = (((__pyx_v_c_href[0]) == '\x00') != 0);
30907   __pyx_t_3 = __pyx_t_4;
30908   __pyx_L4_bool_binop_done:;
30909   if (__pyx_t_3) {
30910
30911     /* "src/lxml/objectpath.pxi":188
30912  *     c_href = c_path[0].href
30913  *     if c_href is NULL or c_href[0] == c'\0':
30914  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
30915  *     if not cetree.tagMatches(c_node, c_href, c_name):
30916  *         if default_value is not _NO_DEFAULT:
30917  */
30918     __pyx_v_c_href = _getNs(__pyx_v_c_node);
30919
30920     /* "src/lxml/objectpath.pxi":187
30921  *     c_name = c_path[0].name
30922  *     c_href = c_path[0].href
30923  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
30924  *         c_href = tree._getNs(c_node)
30925  *     if not cetree.tagMatches(c_node, c_href, c_name):
30926  */
30927   }
30928
30929   /* "src/lxml/objectpath.pxi":189
30930  *     if c_href is NULL or c_href[0] == c'\0':
30931  *         c_href = tree._getNs(c_node)
30932  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
30933  *         if default_value is not _NO_DEFAULT:
30934  *             return default_value
30935  */
30936   __pyx_t_3 = ((!(tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0)) != 0);
30937   if (__pyx_t_3) {
30938
30939     /* "src/lxml/objectpath.pxi":190
30940  *         c_href = tree._getNs(c_node)
30941  *     if not cetree.tagMatches(c_node, c_href, c_name):
30942  *         if default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
30943  *             return default_value
30944  *         else:
30945  */
30946     __pyx_t_3 = (__pyx_v_default_value != __pyx_v_4lxml_9objectify__NO_DEFAULT);
30947     __pyx_t_4 = (__pyx_t_3 != 0);
30948     if (likely(__pyx_t_4)) {
30949
30950       /* "src/lxml/objectpath.pxi":191
30951  *     if not cetree.tagMatches(c_node, c_href, c_name):
30952  *         if default_value is not _NO_DEFAULT:
30953  *             return default_value             # <<<<<<<<<<<<<<
30954  *         else:
30955  *             raise ValueError(
30956  */
30957       __Pyx_XDECREF(__pyx_r);
30958       __Pyx_INCREF(__pyx_v_default_value);
30959       __pyx_r = __pyx_v_default_value;
30960       goto __pyx_L0;
30961
30962       /* "src/lxml/objectpath.pxi":190
30963  *         c_href = tree._getNs(c_node)
30964  *     if not cetree.tagMatches(c_node, c_href, c_name):
30965  *         if default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
30966  *             return default_value
30967  *         else:
30968  */
30969     }
30970
30971     /* "src/lxml/objectpath.pxi":193
30972  *             return default_value
30973  *         else:
30974  *             raise ValueError(             # <<<<<<<<<<<<<<
30975  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
30976  * 
30977  */
30978     /*else*/ {
30979
30980       /* "src/lxml/objectpath.pxi":194
30981  *         else:
30982  *             raise ValueError(
30983  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")             # <<<<<<<<<<<<<<
30984  * 
30985  *     while c_node is not NULL:
30986  */
30987       __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 194, __pyx_L1_error)
30988       __Pyx_GOTREF(__pyx_t_5);
30989       __pyx_t_6 = 0;
30990       __pyx_t_7 = 127;
30991       __Pyx_INCREF(__pyx_kp_u_root_element_does_not_match_need);
30992       __pyx_t_6 += 34;
30993       __Pyx_GIVEREF(__pyx_kp_u_root_element_does_not_match_need);
30994       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_root_element_does_not_match_need);
30995       __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 194, __pyx_L1_error)
30996       __Pyx_GOTREF(__pyx_t_8);
30997       __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 194, __pyx_L1_error)
30998       __Pyx_GOTREF(__pyx_t_9);
30999       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31000       __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_7;
31001       __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
31002       __Pyx_GIVEREF(__pyx_t_9);
31003       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
31004       __pyx_t_9 = 0;
31005       __Pyx_INCREF(__pyx_kp_u_got);
31006       __pyx_t_6 += 6;
31007       __Pyx_GIVEREF(__pyx_kp_u_got);
31008       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_got);
31009       __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_root), __pyx_n_s_tag); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 194, __pyx_L1_error)
31010       __Pyx_GOTREF(__pyx_t_9);
31011       __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 194, __pyx_L1_error)
31012       __Pyx_GOTREF(__pyx_t_8);
31013       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31014       __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
31015       __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
31016       __Pyx_GIVEREF(__pyx_t_8);
31017       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8);
31018       __pyx_t_8 = 0;
31019       __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 194, __pyx_L1_error)
31020       __Pyx_GOTREF(__pyx_t_8);
31021       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31022
31023       /* "src/lxml/objectpath.pxi":193
31024  *             return default_value
31025  *         else:
31026  *             raise ValueError(             # <<<<<<<<<<<<<<
31027  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31028  * 
31029  */
31030       __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 193, __pyx_L1_error)
31031       __Pyx_GOTREF(__pyx_t_5);
31032       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31033       __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31034       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31035       __PYX_ERR(1, 193, __pyx_L1_error)
31036     }
31037
31038     /* "src/lxml/objectpath.pxi":189
31039  *     if c_href is NULL or c_href[0] == c'\0':
31040  *         c_href = tree._getNs(c_node)
31041  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31042  *         if default_value is not _NO_DEFAULT:
31043  *             return default_value
31044  */
31045   }
31046
31047   /* "src/lxml/objectpath.pxi":196
31048  *                 f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31049  * 
31050  *     while c_node is not NULL:             # <<<<<<<<<<<<<<
31051  *         c_path_len -= 1
31052  *         if c_path_len <= 0:
31053  */
31054   while (1) {
31055     __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0);
31056     if (!__pyx_t_4) break;
31057
31058     /* "src/lxml/objectpath.pxi":197
31059  * 
31060  *     while c_node is not NULL:
31061  *         c_path_len -= 1             # <<<<<<<<<<<<<<
31062  *         if c_path_len <= 0:
31063  *             break
31064  */
31065     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
31066
31067     /* "src/lxml/objectpath.pxi":198
31068  *     while c_node is not NULL:
31069  *         c_path_len -= 1
31070  *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
31071  *             break
31072  * 
31073  */
31074     __pyx_t_4 = ((__pyx_v_c_path_len <= 0) != 0);
31075     if (__pyx_t_4) {
31076
31077       /* "src/lxml/objectpath.pxi":199
31078  *         c_path_len -= 1
31079  *         if c_path_len <= 0:
31080  *             break             # <<<<<<<<<<<<<<
31081  * 
31082  *         c_path += 1
31083  */
31084       goto __pyx_L9_break;
31085
31086       /* "src/lxml/objectpath.pxi":198
31087  *     while c_node is not NULL:
31088  *         c_path_len -= 1
31089  *         if c_path_len <= 0:             # <<<<<<<<<<<<<<
31090  *             break
31091  * 
31092  */
31093     }
31094
31095     /* "src/lxml/objectpath.pxi":201
31096  *             break
31097  * 
31098  *         c_path += 1             # <<<<<<<<<<<<<<
31099  *         if c_path[0].href is not NULL:
31100  *             c_href = c_path[0].href # otherwise: keep parent namespace
31101  */
31102     __pyx_v_c_path = (__pyx_v_c_path + 1);
31103
31104     /* "src/lxml/objectpath.pxi":202
31105  * 
31106  *         c_path += 1
31107  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31108  *             c_href = c_path[0].href # otherwise: keep parent namespace
31109  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31110  */
31111     __pyx_t_4 = (((__pyx_v_c_path[0]).href != NULL) != 0);
31112     if (__pyx_t_4) {
31113
31114       /* "src/lxml/objectpath.pxi":203
31115  *         c_path += 1
31116  *         if c_path[0].href is not NULL:
31117  *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
31118  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31119  *         if c_name is NULL:
31120  */
31121       __pyx_t_2 = (__pyx_v_c_path[0]).href;
31122       __pyx_v_c_href = __pyx_t_2;
31123
31124       /* "src/lxml/objectpath.pxi":202
31125  * 
31126  *         c_path += 1
31127  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31128  *             c_href = c_path[0].href # otherwise: keep parent namespace
31129  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31130  */
31131     }
31132
31133     /* "src/lxml/objectpath.pxi":204
31134  *         if c_path[0].href is not NULL:
31135  *             c_href = c_path[0].href # otherwise: keep parent namespace
31136  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
31137  *         if c_name is NULL:
31138  *             c_name = c_path[0].name
31139  */
31140     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
31141
31142     /* "src/lxml/objectpath.pxi":205
31143  *             c_href = c_path[0].href # otherwise: keep parent namespace
31144  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31145  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31146  *             c_name = c_path[0].name
31147  *             c_node = NULL
31148  */
31149     __pyx_t_4 = ((__pyx_v_c_name == NULL) != 0);
31150     if (__pyx_t_4) {
31151
31152       /* "src/lxml/objectpath.pxi":206
31153  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31154  *         if c_name is NULL:
31155  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
31156  *             c_node = NULL
31157  *             break
31158  */
31159       __pyx_t_2 = (__pyx_v_c_path[0]).name;
31160       __pyx_v_c_name = __pyx_t_2;
31161
31162       /* "src/lxml/objectpath.pxi":207
31163  *         if c_name is NULL:
31164  *             c_name = c_path[0].name
31165  *             c_node = NULL             # <<<<<<<<<<<<<<
31166  *             break
31167  *         c_index = c_path[0].index
31168  */
31169       __pyx_v_c_node = NULL;
31170
31171       /* "src/lxml/objectpath.pxi":208
31172  *             c_name = c_path[0].name
31173  *             c_node = NULL
31174  *             break             # <<<<<<<<<<<<<<
31175  *         c_index = c_path[0].index
31176  *         c_node = c_node.last if c_index < 0 else c_node.children
31177  */
31178       goto __pyx_L9_break;
31179
31180       /* "src/lxml/objectpath.pxi":205
31181  *             c_href = c_path[0].href # otherwise: keep parent namespace
31182  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31183  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31184  *             c_name = c_path[0].name
31185  *             c_node = NULL
31186  */
31187     }
31188
31189     /* "src/lxml/objectpath.pxi":209
31190  *             c_node = NULL
31191  *             break
31192  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
31193  *         c_node = c_node.last if c_index < 0 else c_node.children
31194  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31195  */
31196     __pyx_t_6 = (__pyx_v_c_path[0]).index;
31197     __pyx_v_c_index = __pyx_t_6;
31198
31199     /* "src/lxml/objectpath.pxi":210
31200  *             break
31201  *         c_index = c_path[0].index
31202  *         c_node = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
31203  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31204  * 
31205  */
31206     if (((__pyx_v_c_index < 0) != 0)) {
31207       __pyx_t_1 = __pyx_v_c_node->last;
31208     } else {
31209       __pyx_t_1 = __pyx_v_c_node->children;
31210     }
31211     __pyx_v_c_node = __pyx_t_1;
31212
31213     /* "src/lxml/objectpath.pxi":211
31214  *         c_index = c_path[0].index
31215  *         c_node = c_node.last if c_index < 0 else c_node.children
31216  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
31217  * 
31218  *     if c_node is not NULL:
31219  */
31220     __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
31221   }
31222   __pyx_L9_break:;
31223
31224   /* "src/lxml/objectpath.pxi":213
31225  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31226  * 
31227  *     if c_node is not NULL:             # <<<<<<<<<<<<<<
31228  *         return cetree.elementFactory(root._doc, c_node)
31229  *     elif default_value is not _NO_DEFAULT:
31230  */
31231   __pyx_t_4 = ((__pyx_v_c_node != NULL) != 0);
31232   if (__pyx_t_4) {
31233
31234     /* "src/lxml/objectpath.pxi":214
31235  * 
31236  *     if c_node is not NULL:
31237  *         return cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
31238  *     elif default_value is not _NO_DEFAULT:
31239  *         return default_value
31240  */
31241     __Pyx_XDECREF(__pyx_r);
31242     __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
31243     __Pyx_INCREF(__pyx_t_5);
31244     __pyx_t_8 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 214, __pyx_L1_error)
31245     __Pyx_GOTREF(__pyx_t_8);
31246     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31247     __pyx_r = __pyx_t_8;
31248     __pyx_t_8 = 0;
31249     goto __pyx_L0;
31250
31251     /* "src/lxml/objectpath.pxi":213
31252  *         c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
31253  * 
31254  *     if c_node is not NULL:             # <<<<<<<<<<<<<<
31255  *         return cetree.elementFactory(root._doc, c_node)
31256  *     elif default_value is not _NO_DEFAULT:
31257  */
31258   }
31259
31260   /* "src/lxml/objectpath.pxi":215
31261  *     if c_node is not NULL:
31262  *         return cetree.elementFactory(root._doc, c_node)
31263  *     elif default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
31264  *         return default_value
31265  *     else:
31266  */
31267   __pyx_t_4 = (__pyx_v_default_value != __pyx_v_4lxml_9objectify__NO_DEFAULT);
31268   __pyx_t_3 = (__pyx_t_4 != 0);
31269   if (likely(__pyx_t_3)) {
31270
31271     /* "src/lxml/objectpath.pxi":216
31272  *         return cetree.elementFactory(root._doc, c_node)
31273  *     elif default_value is not _NO_DEFAULT:
31274  *         return default_value             # <<<<<<<<<<<<<<
31275  *     else:
31276  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
31277  */
31278     __Pyx_XDECREF(__pyx_r);
31279     __Pyx_INCREF(__pyx_v_default_value);
31280     __pyx_r = __pyx_v_default_value;
31281     goto __pyx_L0;
31282
31283     /* "src/lxml/objectpath.pxi":215
31284  *     if c_node is not NULL:
31285  *         return cetree.elementFactory(root._doc, c_node)
31286  *     elif default_value is not _NO_DEFAULT:             # <<<<<<<<<<<<<<
31287  *         return default_value
31288  *     else:
31289  */
31290   }
31291
31292   /* "src/lxml/objectpath.pxi":218
31293  *         return default_value
31294  *     else:
31295  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)             # <<<<<<<<<<<<<<
31296  *         raise AttributeError, f"no such child: {tag}"
31297  * 
31298  */
31299   /*else*/ {
31300     __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 218, __pyx_L1_error)
31301     __Pyx_GOTREF(__pyx_t_8);
31302     __pyx_v_tag = __pyx_t_8;
31303     __pyx_t_8 = 0;
31304
31305     /* "src/lxml/objectpath.pxi":219
31306  *     else:
31307  *         tag = cetree.namespacedNameFromNsName(c_href, c_name)
31308  *         raise AttributeError, f"no such child: {tag}"             # <<<<<<<<<<<<<<
31309  * 
31310  * 
31311  */
31312     __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 219, __pyx_L1_error)
31313     __Pyx_GOTREF(__pyx_t_8);
31314     __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_no_such_child, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 219, __pyx_L1_error)
31315     __Pyx_GOTREF(__pyx_t_5);
31316     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31317     __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_5, 0, 0);
31318     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31319     __PYX_ERR(1, 219, __pyx_L1_error)
31320   }
31321
31322   /* "src/lxml/objectpath.pxi":179
31323  * 
31324  * 
31325  * cdef _find_object_path(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len, default_value):             # <<<<<<<<<<<<<<
31326  *     u"""Follow the path to find the target element.
31327  *     """
31328  */
31329
31330   /* function exit code */
31331   __pyx_L1_error:;
31332   __Pyx_XDECREF(__pyx_t_5);
31333   __Pyx_XDECREF(__pyx_t_8);
31334   __Pyx_XDECREF(__pyx_t_9);
31335   __Pyx_AddTraceback("lxml.objectify._find_object_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
31336   __pyx_r = 0;
31337   __pyx_L0:;
31338   __Pyx_XDECREF(__pyx_v_tag);
31339   __Pyx_XGIVEREF(__pyx_r);
31340   __Pyx_RefNannyFinishContext();
31341   return __pyx_r;
31342 }
31343
31344 /* "src/lxml/objectpath.pxi":222
31345  * 
31346  * 
31347  * cdef _create_object_path(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
31348  *                          Py_ssize_t c_path_len, int replace, value):
31349  *     u"""Follow the path to find the target element, build the missing children
31350  */
31351
31352 static PyObject *__pyx_f_4lxml_9objectify__create_object_path(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, int __pyx_v_replace, PyObject *__pyx_v_value) {
31353   struct LxmlElement *__pyx_v_child = 0;
31354   xmlNode *__pyx_v_c_node;
31355   xmlNode *__pyx_v_c_child;
31356   Py_ssize_t __pyx_v_c_index;
31357   const xmlChar *__pyx_v_c_name;
31358   const xmlChar *__pyx_v_c_href;
31359   struct LxmlElement *__pyx_v_element = NULL;
31360   PyObject *__pyx_r = NULL;
31361   __Pyx_RefNannyDeclarations
31362   int __pyx_t_1;
31363   xmlNode *__pyx_t_2;
31364   const xmlChar *__pyx_t_3;
31365   int __pyx_t_4;
31366   PyObject *__pyx_t_5 = NULL;
31367   Py_ssize_t __pyx_t_6;
31368   Py_UCS4 __pyx_t_7;
31369   PyObject *__pyx_t_8 = NULL;
31370   PyObject *__pyx_t_9 = NULL;
31371   int __pyx_lineno = 0;
31372   const char *__pyx_filename = NULL;
31373   int __pyx_clineno = 0;
31374   __Pyx_RefNannySetupContext("_create_object_path", 0);
31375
31376   /* "src/lxml/objectpath.pxi":232
31377  *     cdef tree.xmlNode* c_child
31378  *     cdef Py_ssize_t c_index
31379  *     if c_path_len == 1:             # <<<<<<<<<<<<<<
31380  *         raise TypeError, u"cannot update root node"
31381  * 
31382  */
31383   __pyx_t_1 = ((__pyx_v_c_path_len == 1) != 0);
31384   if (unlikely(__pyx_t_1)) {
31385
31386     /* "src/lxml/objectpath.pxi":233
31387  *     cdef Py_ssize_t c_index
31388  *     if c_path_len == 1:
31389  *         raise TypeError, u"cannot update root node"             # <<<<<<<<<<<<<<
31390  * 
31391  *     c_node = root._c_node
31392  */
31393     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_cannot_update_root_node, 0, 0);
31394     __PYX_ERR(1, 233, __pyx_L1_error)
31395
31396     /* "src/lxml/objectpath.pxi":232
31397  *     cdef tree.xmlNode* c_child
31398  *     cdef Py_ssize_t c_index
31399  *     if c_path_len == 1:             # <<<<<<<<<<<<<<
31400  *         raise TypeError, u"cannot update root node"
31401  * 
31402  */
31403   }
31404
31405   /* "src/lxml/objectpath.pxi":235
31406  *         raise TypeError, u"cannot update root node"
31407  * 
31408  *     c_node = root._c_node             # <<<<<<<<<<<<<<
31409  *     c_name = c_path[0].name
31410  *     c_href = c_path[0].href
31411  */
31412   __pyx_t_2 = __pyx_v_root->_c_node;
31413   __pyx_v_c_node = __pyx_t_2;
31414
31415   /* "src/lxml/objectpath.pxi":236
31416  * 
31417  *     c_node = root._c_node
31418  *     c_name = c_path[0].name             # <<<<<<<<<<<<<<
31419  *     c_href = c_path[0].href
31420  *     if c_href is NULL or c_href[0] == c'\0':
31421  */
31422   __pyx_t_3 = (__pyx_v_c_path[0]).name;
31423   __pyx_v_c_name = __pyx_t_3;
31424
31425   /* "src/lxml/objectpath.pxi":237
31426  *     c_node = root._c_node
31427  *     c_name = c_path[0].name
31428  *     c_href = c_path[0].href             # <<<<<<<<<<<<<<
31429  *     if c_href is NULL or c_href[0] == c'\0':
31430  *         c_href = tree._getNs(c_node)
31431  */
31432   __pyx_t_3 = (__pyx_v_c_path[0]).href;
31433   __pyx_v_c_href = __pyx_t_3;
31434
31435   /* "src/lxml/objectpath.pxi":238
31436  *     c_name = c_path[0].name
31437  *     c_href = c_path[0].href
31438  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
31439  *         c_href = tree._getNs(c_node)
31440  *     if not cetree.tagMatches(c_node, c_href, c_name):
31441  */
31442   __pyx_t_4 = ((__pyx_v_c_href == NULL) != 0);
31443   if (!__pyx_t_4) {
31444   } else {
31445     __pyx_t_1 = __pyx_t_4;
31446     goto __pyx_L5_bool_binop_done;
31447   }
31448   __pyx_t_4 = (((__pyx_v_c_href[0]) == '\x00') != 0);
31449   __pyx_t_1 = __pyx_t_4;
31450   __pyx_L5_bool_binop_done:;
31451   if (__pyx_t_1) {
31452
31453     /* "src/lxml/objectpath.pxi":239
31454  *     c_href = c_path[0].href
31455  *     if c_href is NULL or c_href[0] == c'\0':
31456  *         c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
31457  *     if not cetree.tagMatches(c_node, c_href, c_name):
31458  *         raise ValueError(
31459  */
31460     __pyx_v_c_href = _getNs(__pyx_v_c_node);
31461
31462     /* "src/lxml/objectpath.pxi":238
31463  *     c_name = c_path[0].name
31464  *     c_href = c_path[0].href
31465  *     if c_href is NULL or c_href[0] == c'\0':             # <<<<<<<<<<<<<<
31466  *         c_href = tree._getNs(c_node)
31467  *     if not cetree.tagMatches(c_node, c_href, c_name):
31468  */
31469   }
31470
31471   /* "src/lxml/objectpath.pxi":240
31472  *     if c_href is NULL or c_href[0] == c'\0':
31473  *         c_href = tree._getNs(c_node)
31474  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31475  *         raise ValueError(
31476  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31477  */
31478   __pyx_t_1 = ((!(tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0)) != 0);
31479   if (unlikely(__pyx_t_1)) {
31480
31481     /* "src/lxml/objectpath.pxi":242
31482  *     if not cetree.tagMatches(c_node, c_href, c_name):
31483  *         raise ValueError(
31484  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")             # <<<<<<<<<<<<<<
31485  * 
31486  *     while c_path_len > 1:
31487  */
31488     __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 242, __pyx_L1_error)
31489     __Pyx_GOTREF(__pyx_t_5);
31490     __pyx_t_6 = 0;
31491     __pyx_t_7 = 127;
31492     __Pyx_INCREF(__pyx_kp_u_root_element_does_not_match_need);
31493     __pyx_t_6 += 34;
31494     __Pyx_GIVEREF(__pyx_kp_u_root_element_does_not_match_need);
31495     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_root_element_does_not_match_need);
31496     __pyx_t_8 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 242, __pyx_L1_error)
31497     __Pyx_GOTREF(__pyx_t_8);
31498     __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 242, __pyx_L1_error)
31499     __Pyx_GOTREF(__pyx_t_9);
31500     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31501     __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_7;
31502     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
31503     __Pyx_GIVEREF(__pyx_t_9);
31504     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
31505     __pyx_t_9 = 0;
31506     __Pyx_INCREF(__pyx_kp_u_got);
31507     __pyx_t_6 += 6;
31508     __Pyx_GIVEREF(__pyx_kp_u_got);
31509     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_got);
31510     __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_root), __pyx_n_s_tag); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 242, __pyx_L1_error)
31511     __Pyx_GOTREF(__pyx_t_9);
31512     __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 242, __pyx_L1_error)
31513     __Pyx_GOTREF(__pyx_t_8);
31514     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31515     __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7;
31516     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
31517     __Pyx_GIVEREF(__pyx_t_8);
31518     PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8);
31519     __pyx_t_8 = 0;
31520     __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 4, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 242, __pyx_L1_error)
31521     __Pyx_GOTREF(__pyx_t_8);
31522     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31523
31524     /* "src/lxml/objectpath.pxi":241
31525  *         c_href = tree._getNs(c_node)
31526  *     if not cetree.tagMatches(c_node, c_href, c_name):
31527  *         raise ValueError(             # <<<<<<<<<<<<<<
31528  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31529  * 
31530  */
31531     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 241, __pyx_L1_error)
31532     __Pyx_GOTREF(__pyx_t_5);
31533     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31534     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
31535     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31536     __PYX_ERR(1, 241, __pyx_L1_error)
31537
31538     /* "src/lxml/objectpath.pxi":240
31539  *     if c_href is NULL or c_href[0] == c'\0':
31540  *         c_href = tree._getNs(c_node)
31541  *     if not cetree.tagMatches(c_node, c_href, c_name):             # <<<<<<<<<<<<<<
31542  *         raise ValueError(
31543  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31544  */
31545   }
31546
31547   /* "src/lxml/objectpath.pxi":244
31548  *             f"root element does not match: need {cetree.namespacedNameFromNsName(c_href, c_name)}, got {root.tag}")
31549  * 
31550  *     while c_path_len > 1:             # <<<<<<<<<<<<<<
31551  *         c_path_len -= 1
31552  *         c_path += 1
31553  */
31554   while (1) {
31555     __pyx_t_1 = ((__pyx_v_c_path_len > 1) != 0);
31556     if (!__pyx_t_1) break;
31557
31558     /* "src/lxml/objectpath.pxi":245
31559  * 
31560  *     while c_path_len > 1:
31561  *         c_path_len -= 1             # <<<<<<<<<<<<<<
31562  *         c_path += 1
31563  *         if c_path[0].href is not NULL:
31564  */
31565     __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
31566
31567     /* "src/lxml/objectpath.pxi":246
31568  *     while c_path_len > 1:
31569  *         c_path_len -= 1
31570  *         c_path += 1             # <<<<<<<<<<<<<<
31571  *         if c_path[0].href is not NULL:
31572  *             c_href = c_path[0].href # otherwise: keep parent namespace
31573  */
31574     __pyx_v_c_path = (__pyx_v_c_path + 1);
31575
31576     /* "src/lxml/objectpath.pxi":247
31577  *         c_path_len -= 1
31578  *         c_path += 1
31579  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31580  *             c_href = c_path[0].href # otherwise: keep parent namespace
31581  *         c_index = c_path[0].index
31582  */
31583     __pyx_t_1 = (((__pyx_v_c_path[0]).href != NULL) != 0);
31584     if (__pyx_t_1) {
31585
31586       /* "src/lxml/objectpath.pxi":248
31587  *         c_path += 1
31588  *         if c_path[0].href is not NULL:
31589  *             c_href = c_path[0].href # otherwise: keep parent namespace             # <<<<<<<<<<<<<<
31590  *         c_index = c_path[0].index
31591  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31592  */
31593       __pyx_t_3 = (__pyx_v_c_path[0]).href;
31594       __pyx_v_c_href = __pyx_t_3;
31595
31596       /* "src/lxml/objectpath.pxi":247
31597  *         c_path_len -= 1
31598  *         c_path += 1
31599  *         if c_path[0].href is not NULL:             # <<<<<<<<<<<<<<
31600  *             c_href = c_path[0].href # otherwise: keep parent namespace
31601  *         c_index = c_path[0].index
31602  */
31603     }
31604
31605     /* "src/lxml/objectpath.pxi":249
31606  *         if c_path[0].href is not NULL:
31607  *             c_href = c_path[0].href # otherwise: keep parent namespace
31608  *         c_index = c_path[0].index             # <<<<<<<<<<<<<<
31609  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31610  *         if c_name is NULL:
31611  */
31612     __pyx_t_6 = (__pyx_v_c_path[0]).index;
31613     __pyx_v_c_index = __pyx_t_6;
31614
31615     /* "src/lxml/objectpath.pxi":250
31616  *             c_href = c_path[0].href # otherwise: keep parent namespace
31617  *         c_index = c_path[0].index
31618  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)             # <<<<<<<<<<<<<<
31619  *         if c_name is NULL:
31620  *             c_name = c_path[0].name
31621  */
31622     __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
31623
31624     /* "src/lxml/objectpath.pxi":251
31625  *         c_index = c_path[0].index
31626  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31627  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31628  *             c_name = c_path[0].name
31629  *             c_child = NULL
31630  */
31631     __pyx_t_1 = ((__pyx_v_c_name == NULL) != 0);
31632     if (__pyx_t_1) {
31633
31634       /* "src/lxml/objectpath.pxi":252
31635  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31636  *         if c_name is NULL:
31637  *             c_name = c_path[0].name             # <<<<<<<<<<<<<<
31638  *             c_child = NULL
31639  *         else:
31640  */
31641       __pyx_t_3 = (__pyx_v_c_path[0]).name;
31642       __pyx_v_c_name = __pyx_t_3;
31643
31644       /* "src/lxml/objectpath.pxi":253
31645  *         if c_name is NULL:
31646  *             c_name = c_path[0].name
31647  *             c_child = NULL             # <<<<<<<<<<<<<<
31648  *         else:
31649  *             c_child = c_node.last if c_index < 0 else c_node.children
31650  */
31651       __pyx_v_c_child = NULL;
31652
31653       /* "src/lxml/objectpath.pxi":251
31654  *         c_index = c_path[0].index
31655  *         c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
31656  *         if c_name is NULL:             # <<<<<<<<<<<<<<
31657  *             c_name = c_path[0].name
31658  *             c_child = NULL
31659  */
31660       goto __pyx_L11;
31661     }
31662
31663     /* "src/lxml/objectpath.pxi":255
31664  *             c_child = NULL
31665  *         else:
31666  *             c_child = c_node.last if c_index < 0 else c_node.children             # <<<<<<<<<<<<<<
31667  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31668  * 
31669  */
31670     /*else*/ {
31671       if (((__pyx_v_c_index < 0) != 0)) {
31672         __pyx_t_2 = __pyx_v_c_node->last;
31673       } else {
31674         __pyx_t_2 = __pyx_v_c_node->children;
31675       }
31676       __pyx_v_c_child = __pyx_t_2;
31677
31678       /* "src/lxml/objectpath.pxi":256
31679  *         else:
31680  *             c_child = c_node.last if c_index < 0 else c_node.children
31681  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)             # <<<<<<<<<<<<<<
31682  * 
31683  *         if c_child is not NULL:
31684  */
31685       __pyx_v_c_child = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_child, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
31686     }
31687     __pyx_L11:;
31688
31689     /* "src/lxml/objectpath.pxi":258
31690  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31691  * 
31692  *         if c_child is not NULL:             # <<<<<<<<<<<<<<
31693  *             c_node = c_child
31694  *         elif c_index != 0:
31695  */
31696     __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
31697     if (__pyx_t_1) {
31698
31699       /* "src/lxml/objectpath.pxi":259
31700  * 
31701  *         if c_child is not NULL:
31702  *             c_node = c_child             # <<<<<<<<<<<<<<
31703  *         elif c_index != 0:
31704  *             raise TypeError, u"creating indexed path attributes is not supported"
31705  */
31706       __pyx_v_c_node = __pyx_v_c_child;
31707
31708       /* "src/lxml/objectpath.pxi":258
31709  *             c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
31710  * 
31711  *         if c_child is not NULL:             # <<<<<<<<<<<<<<
31712  *             c_node = c_child
31713  *         elif c_index != 0:
31714  */
31715       goto __pyx_L12;
31716     }
31717
31718     /* "src/lxml/objectpath.pxi":260
31719  *         if c_child is not NULL:
31720  *             c_node = c_child
31721  *         elif c_index != 0:             # <<<<<<<<<<<<<<
31722  *             raise TypeError, u"creating indexed path attributes is not supported"
31723  *         elif c_path_len == 1:
31724  */
31725     __pyx_t_1 = ((__pyx_v_c_index != 0) != 0);
31726     if (unlikely(__pyx_t_1)) {
31727
31728       /* "src/lxml/objectpath.pxi":261
31729  *             c_node = c_child
31730  *         elif c_index != 0:
31731  *             raise TypeError, u"creating indexed path attributes is not supported"             # <<<<<<<<<<<<<<
31732  *         elif c_path_len == 1:
31733  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31734  */
31735       __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_creating_indexed_path_attributes, 0, 0);
31736       __PYX_ERR(1, 261, __pyx_L1_error)
31737
31738       /* "src/lxml/objectpath.pxi":260
31739  *         if c_child is not NULL:
31740  *             c_node = c_child
31741  *         elif c_index != 0:             # <<<<<<<<<<<<<<
31742  *             raise TypeError, u"creating indexed path attributes is not supported"
31743  *         elif c_path_len == 1:
31744  */
31745     }
31746
31747     /* "src/lxml/objectpath.pxi":262
31748  *         elif c_index != 0:
31749  *             raise TypeError, u"creating indexed path attributes is not supported"
31750  *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
31751  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31752  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31753  */
31754     __pyx_t_1 = ((__pyx_v_c_path_len == 1) != 0);
31755     if (__pyx_t_1) {
31756
31757       /* "src/lxml/objectpath.pxi":263
31758  *             raise TypeError, u"creating indexed path attributes is not supported"
31759  *         elif c_path_len == 1:
31760  *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31761  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31762  *                          value)
31763  */
31764       __pyx_t_5 = ((PyObject *)__pyx_v_root->_doc);
31765       __Pyx_INCREF(__pyx_t_5);
31766       __pyx_t_8 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 263, __pyx_L1_error)
31767       __Pyx_GOTREF(__pyx_t_8);
31768       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31769
31770       /* "src/lxml/objectpath.pxi":264
31771  *         elif c_path_len == 1:
31772  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31773  *                          cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
31774  *                          value)
31775  *             return
31776  */
31777       __pyx_t_5 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 264, __pyx_L1_error)
31778       __Pyx_GOTREF(__pyx_t_5);
31779
31780       /* "src/lxml/objectpath.pxi":263
31781  *             raise TypeError, u"creating indexed path attributes is not supported"
31782  *         elif c_path_len == 1:
31783  *             _appendValue(cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31784  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31785  *                          value)
31786  */
31787       __pyx_t_9 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_8), __pyx_t_5, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 263, __pyx_L1_error)
31788       __Pyx_GOTREF(__pyx_t_9);
31789       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31790       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31791       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31792
31793       /* "src/lxml/objectpath.pxi":266
31794  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31795  *                          value)
31796  *             return             # <<<<<<<<<<<<<<
31797  *         else:
31798  *             child = cetree.makeSubElement(
31799  */
31800       __Pyx_XDECREF(__pyx_r);
31801       __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31802       goto __pyx_L0;
31803
31804       /* "src/lxml/objectpath.pxi":262
31805  *         elif c_index != 0:
31806  *             raise TypeError, u"creating indexed path attributes is not supported"
31807  *         elif c_path_len == 1:             # <<<<<<<<<<<<<<
31808  *             _appendValue(cetree.elementFactory(root._doc, c_node),
31809  *                          cetree.namespacedNameFromNsName(c_href, c_name),
31810  */
31811     }
31812
31813     /* "src/lxml/objectpath.pxi":268
31814  *             return
31815  *         else:
31816  *             child = cetree.makeSubElement(             # <<<<<<<<<<<<<<
31817  *                 cetree.elementFactory(root._doc, c_node),
31818  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31819  */
31820     /*else*/ {
31821
31822       /* "src/lxml/objectpath.pxi":269
31823  *         else:
31824  *             child = cetree.makeSubElement(
31825  *                 cetree.elementFactory(root._doc, c_node),             # <<<<<<<<<<<<<<
31826  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31827  *                 None, None, None, None)
31828  */
31829       __pyx_t_9 = ((PyObject *)__pyx_v_root->_doc);
31830       __Pyx_INCREF(__pyx_t_9);
31831       __pyx_t_5 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_9), __pyx_v_c_node)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 269, __pyx_L1_error)
31832       __Pyx_GOTREF(__pyx_t_5);
31833       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31834
31835       /* "src/lxml/objectpath.pxi":270
31836  *             child = cetree.makeSubElement(
31837  *                 cetree.elementFactory(root._doc, c_node),
31838  *                 cetree.namespacedNameFromNsName(c_href, c_name),             # <<<<<<<<<<<<<<
31839  *                 None, None, None, None)
31840  *             c_node = child._c_node
31841  */
31842       __pyx_t_9 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 270, __pyx_L1_error)
31843       __Pyx_GOTREF(__pyx_t_9);
31844
31845       /* "src/lxml/objectpath.pxi":268
31846  *             return
31847  *         else:
31848  *             child = cetree.makeSubElement(             # <<<<<<<<<<<<<<
31849  *                 cetree.elementFactory(root._doc, c_node),
31850  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31851  */
31852       __pyx_t_8 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_t_5), __pyx_t_9, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 268, __pyx_L1_error)
31853       __Pyx_GOTREF(__pyx_t_8);
31854       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31855       __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31856       __Pyx_XDECREF_SET(__pyx_v_child, ((struct LxmlElement *)__pyx_t_8));
31857       __pyx_t_8 = 0;
31858
31859       /* "src/lxml/objectpath.pxi":272
31860  *                 cetree.namespacedNameFromNsName(c_href, c_name),
31861  *                 None, None, None, None)
31862  *             c_node = child._c_node             # <<<<<<<<<<<<<<
31863  * 
31864  *     # if we get here, the entire path was already there
31865  */
31866       __pyx_t_2 = __pyx_v_child->_c_node;
31867       __pyx_v_c_node = __pyx_t_2;
31868     }
31869     __pyx_L12:;
31870   }
31871
31872   /* "src/lxml/objectpath.pxi":275
31873  * 
31874  *     # if we get here, the entire path was already there
31875  *     if replace:             # <<<<<<<<<<<<<<
31876  *         element = cetree.elementFactory(root._doc, c_node)
31877  *         _replaceElement(element, value)
31878  */
31879   __pyx_t_1 = (__pyx_v_replace != 0);
31880   if (__pyx_t_1) {
31881
31882     /* "src/lxml/objectpath.pxi":276
31883  *     # if we get here, the entire path was already there
31884  *     if replace:
31885  *         element = cetree.elementFactory(root._doc, c_node)             # <<<<<<<<<<<<<<
31886  *         _replaceElement(element, value)
31887  *     else:
31888  */
31889     __pyx_t_8 = ((PyObject *)__pyx_v_root->_doc);
31890     __Pyx_INCREF(__pyx_t_8);
31891     __pyx_t_9 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_8), __pyx_v_c_node)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 276, __pyx_L1_error)
31892     __Pyx_GOTREF(__pyx_t_9);
31893     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31894     __pyx_v_element = ((struct LxmlElement *)__pyx_t_9);
31895     __pyx_t_9 = 0;
31896
31897     /* "src/lxml/objectpath.pxi":277
31898  *     if replace:
31899  *         element = cetree.elementFactory(root._doc, c_node)
31900  *         _replaceElement(element, value)             # <<<<<<<<<<<<<<
31901  *     else:
31902  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
31903  */
31904     __pyx_t_9 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 277, __pyx_L1_error)
31905     __Pyx_GOTREF(__pyx_t_9);
31906     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31907
31908     /* "src/lxml/objectpath.pxi":275
31909  * 
31910  *     # if we get here, the entire path was already there
31911  *     if replace:             # <<<<<<<<<<<<<<
31912  *         element = cetree.elementFactory(root._doc, c_node)
31913  *         _replaceElement(element, value)
31914  */
31915     goto __pyx_L13;
31916   }
31917
31918   /* "src/lxml/objectpath.pxi":279
31919  *         _replaceElement(element, value)
31920  *     else:
31921  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
31922  *                      cetree.namespacedName(c_node), value)
31923  * 
31924  */
31925   /*else*/ {
31926     __pyx_t_9 = ((PyObject *)__pyx_v_root->_doc);
31927     __Pyx_INCREF(__pyx_t_9);
31928     __pyx_t_8 = ((PyObject *)elementFactory(((struct LxmlDocument *)__pyx_t_9), __pyx_v_c_node->parent)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 279, __pyx_L1_error)
31929     __Pyx_GOTREF(__pyx_t_8);
31930     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31931
31932     /* "src/lxml/objectpath.pxi":280
31933  *     else:
31934  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),
31935  *                      cetree.namespacedName(c_node), value)             # <<<<<<<<<<<<<<
31936  * 
31937  * 
31938  */
31939     __pyx_t_9 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 280, __pyx_L1_error)
31940     __Pyx_GOTREF(__pyx_t_9);
31941
31942     /* "src/lxml/objectpath.pxi":279
31943  *         _replaceElement(element, value)
31944  *     else:
31945  *         _appendValue(cetree.elementFactory(root._doc, c_node.parent),             # <<<<<<<<<<<<<<
31946  *                      cetree.namespacedName(c_node), value)
31947  * 
31948  */
31949     __pyx_t_5 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_8), __pyx_t_9, __pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 279, __pyx_L1_error)
31950     __Pyx_GOTREF(__pyx_t_5);
31951     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
31952     __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
31953     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
31954   }
31955   __pyx_L13:;
31956
31957   /* "src/lxml/objectpath.pxi":222
31958  * 
31959  * 
31960  * cdef _create_object_path(_Element root, _ObjectPath* c_path,             # <<<<<<<<<<<<<<
31961  *                          Py_ssize_t c_path_len, int replace, value):
31962  *     u"""Follow the path to find the target element, build the missing children
31963  */
31964
31965   /* function exit code */
31966   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
31967   goto __pyx_L0;
31968   __pyx_L1_error:;
31969   __Pyx_XDECREF(__pyx_t_5);
31970   __Pyx_XDECREF(__pyx_t_8);
31971   __Pyx_XDECREF(__pyx_t_9);
31972   __Pyx_AddTraceback("lxml.objectify._create_object_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
31973   __pyx_r = 0;
31974   __pyx_L0:;
31975   __Pyx_XDECREF((PyObject *)__pyx_v_child);
31976   __Pyx_XDECREF((PyObject *)__pyx_v_element);
31977   __Pyx_XGIVEREF(__pyx_r);
31978   __Pyx_RefNannyFinishContext();
31979   return __pyx_r;
31980 }
31981
31982 /* "src/lxml/objectpath.pxi":283
31983  * 
31984  * 
31985  * cdef list _build_descendant_paths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
31986  *     u"""Returns a list of all descendant paths.
31987  *     """
31988  */
31989
31990 static PyObject *__pyx_f_4lxml_9objectify__build_descendant_paths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_prefix_string) {
31991   PyObject *__pyx_v_path = 0;
31992   PyObject *__pyx_v_path_list = 0;
31993   PyObject *__pyx_v_tag = NULL;
31994   PyObject *__pyx_r = NULL;
31995   __Pyx_RefNannyDeclarations
31996   PyObject *__pyx_t_1 = NULL;
31997   int __pyx_t_2;
31998   int __pyx_t_3;
31999   int __pyx_lineno = 0;
32000   const char *__pyx_filename = NULL;
32001   int __pyx_clineno = 0;
32002   __Pyx_RefNannySetupContext("_build_descendant_paths", 0);
32003   __Pyx_INCREF(__pyx_v_prefix_string);
32004
32005   /* "src/lxml/objectpath.pxi":287
32006  *     """
32007  *     cdef list path, path_list
32008  *     tag = cetree.namespacedName(c_node)             # <<<<<<<<<<<<<<
32009  *     if prefix_string:
32010  *         if prefix_string[-1] != u'.':
32011  */
32012   __pyx_t_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error)
32013   __Pyx_GOTREF(__pyx_t_1);
32014   __pyx_v_tag = __pyx_t_1;
32015   __pyx_t_1 = 0;
32016
32017   /* "src/lxml/objectpath.pxi":288
32018  *     cdef list path, path_list
32019  *     tag = cetree.namespacedName(c_node)
32020  *     if prefix_string:             # <<<<<<<<<<<<<<
32021  *         if prefix_string[-1] != u'.':
32022  *             prefix_string += u'.'
32023  */
32024   __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
32025   if (__pyx_t_2) {
32026
32027     /* "src/lxml/objectpath.pxi":289
32028  *     tag = cetree.namespacedName(c_node)
32029  *     if prefix_string:
32030  *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
32031  *             prefix_string += u'.'
32032  *         prefix_string = prefix_string + tag
32033  */
32034     __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_prefix_string, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
32035     __Pyx_GOTREF(__pyx_t_1);
32036     __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__2, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 289, __pyx_L1_error)
32037     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32038     if (__pyx_t_2) {
32039
32040       /* "src/lxml/objectpath.pxi":290
32041  *     if prefix_string:
32042  *         if prefix_string[-1] != u'.':
32043  *             prefix_string += u'.'             # <<<<<<<<<<<<<<
32044  *         prefix_string = prefix_string + tag
32045  *     else:
32046  */
32047       __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_prefix_string, __pyx_kp_u__2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error)
32048       __Pyx_GOTREF(__pyx_t_1);
32049       __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_t_1);
32050       __pyx_t_1 = 0;
32051
32052       /* "src/lxml/objectpath.pxi":289
32053  *     tag = cetree.namespacedName(c_node)
32054  *     if prefix_string:
32055  *         if prefix_string[-1] != u'.':             # <<<<<<<<<<<<<<
32056  *             prefix_string += u'.'
32057  *         prefix_string = prefix_string + tag
32058  */
32059     }
32060
32061     /* "src/lxml/objectpath.pxi":291
32062  *         if prefix_string[-1] != u'.':
32063  *             prefix_string += u'.'
32064  *         prefix_string = prefix_string + tag             # <<<<<<<<<<<<<<
32065  *     else:
32066  *         prefix_string = tag
32067  */
32068     __pyx_t_1 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)
32069     __Pyx_GOTREF(__pyx_t_1);
32070     __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_t_1);
32071     __pyx_t_1 = 0;
32072
32073     /* "src/lxml/objectpath.pxi":288
32074  *     cdef list path, path_list
32075  *     tag = cetree.namespacedName(c_node)
32076  *     if prefix_string:             # <<<<<<<<<<<<<<
32077  *         if prefix_string[-1] != u'.':
32078  *             prefix_string += u'.'
32079  */
32080     goto __pyx_L3;
32081   }
32082
32083   /* "src/lxml/objectpath.pxi":293
32084  *         prefix_string = prefix_string + tag
32085  *     else:
32086  *         prefix_string = tag             # <<<<<<<<<<<<<<
32087  *     path = [prefix_string]
32088  *     path_list = []
32089  */
32090   /*else*/ {
32091     __Pyx_INCREF(__pyx_v_tag);
32092     __Pyx_DECREF_SET(__pyx_v_prefix_string, __pyx_v_tag);
32093   }
32094   __pyx_L3:;
32095
32096   /* "src/lxml/objectpath.pxi":294
32097  *     else:
32098  *         prefix_string = tag
32099  *     path = [prefix_string]             # <<<<<<<<<<<<<<
32100  *     path_list = []
32101  *     _recursive_build_descendant_paths(c_node, path, path_list)
32102  */
32103   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 294, __pyx_L1_error)
32104   __Pyx_GOTREF(__pyx_t_1);
32105   __Pyx_INCREF(__pyx_v_prefix_string);
32106   __Pyx_GIVEREF(__pyx_v_prefix_string);
32107   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_prefix_string);
32108   __pyx_v_path = ((PyObject*)__pyx_t_1);
32109   __pyx_t_1 = 0;
32110
32111   /* "src/lxml/objectpath.pxi":295
32112  *         prefix_string = tag
32113  *     path = [prefix_string]
32114  *     path_list = []             # <<<<<<<<<<<<<<
32115  *     _recursive_build_descendant_paths(c_node, path, path_list)
32116  *     return path_list
32117  */
32118   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
32119   __Pyx_GOTREF(__pyx_t_1);
32120   __pyx_v_path_list = ((PyObject*)__pyx_t_1);
32121   __pyx_t_1 = 0;
32122
32123   /* "src/lxml/objectpath.pxi":296
32124  *     path = [prefix_string]
32125  *     path_list = []
32126  *     _recursive_build_descendant_paths(c_node, path, path_list)             # <<<<<<<<<<<<<<
32127  *     return path_list
32128  * 
32129  */
32130   __pyx_t_3 = __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(__pyx_v_c_node, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 296, __pyx_L1_error)
32131
32132   /* "src/lxml/objectpath.pxi":297
32133  *     path_list = []
32134  *     _recursive_build_descendant_paths(c_node, path, path_list)
32135  *     return path_list             # <<<<<<<<<<<<<<
32136  * 
32137  * 
32138  */
32139   __Pyx_XDECREF(__pyx_r);
32140   __Pyx_INCREF(__pyx_v_path_list);
32141   __pyx_r = __pyx_v_path_list;
32142   goto __pyx_L0;
32143
32144   /* "src/lxml/objectpath.pxi":283
32145  * 
32146  * 
32147  * cdef list _build_descendant_paths(tree.xmlNode* c_node, prefix_string):             # <<<<<<<<<<<<<<
32148  *     u"""Returns a list of all descendant paths.
32149  *     """
32150  */
32151
32152   /* function exit code */
32153   __pyx_L1_error:;
32154   __Pyx_XDECREF(__pyx_t_1);
32155   __Pyx_AddTraceback("lxml.objectify._build_descendant_paths", __pyx_clineno, __pyx_lineno, __pyx_filename);
32156   __pyx_r = 0;
32157   __pyx_L0:;
32158   __Pyx_XDECREF(__pyx_v_path);
32159   __Pyx_XDECREF(__pyx_v_path_list);
32160   __Pyx_XDECREF(__pyx_v_tag);
32161   __Pyx_XDECREF(__pyx_v_prefix_string);
32162   __Pyx_XGIVEREF(__pyx_r);
32163   __Pyx_RefNannyFinishContext();
32164   return __pyx_r;
32165 }
32166
32167 /* "src/lxml/objectpath.pxi":300
32168  * 
32169  * 
32170  * cdef int _recursive_build_descendant_paths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
32171  *                                            list path, list path_list) except -1:
32172  *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
32173  */
32174
32175 static int __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_path, PyObject *__pyx_v_path_list) {
32176   xmlNode *__pyx_v_c_child;
32177   PyObject *__pyx_v_tags = NULL;
32178   const xmlChar *__pyx_v_c_href;
32179   PyObject *__pyx_v_tag = NULL;
32180   PyObject *__pyx_v_count = NULL;
32181   int __pyx_r;
32182   __Pyx_RefNannyDeclarations
32183   PyObject *__pyx_t_1 = NULL;
32184   int __pyx_t_2;
32185   xmlNode *__pyx_t_3;
32186   int __pyx_t_4;
32187   int __pyx_t_5;
32188   PyObject *__pyx_t_6 = NULL;
32189   Py_ssize_t __pyx_t_7;
32190   Py_UCS4 __pyx_t_8;
32191   int __pyx_t_9;
32192   int __pyx_lineno = 0;
32193   const char *__pyx_filename = NULL;
32194   int __pyx_clineno = 0;
32195   __Pyx_RefNannySetupContext("_recursive_build_descendant_paths", 0);
32196
32197   /* "src/lxml/objectpath.pxi":306
32198  *     """
32199  *     cdef tree.xmlNode* c_child
32200  *     tags = {}             # <<<<<<<<<<<<<<
32201  *     path_list.append(u'.'.join(path))
32202  *     c_href = tree._getNs(c_node)
32203  */
32204   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
32205   __Pyx_GOTREF(__pyx_t_1);
32206   __pyx_v_tags = ((PyObject*)__pyx_t_1);
32207   __pyx_t_1 = 0;
32208
32209   /* "src/lxml/objectpath.pxi":307
32210  *     cdef tree.xmlNode* c_child
32211  *     tags = {}
32212  *     path_list.append(u'.'.join(path))             # <<<<<<<<<<<<<<
32213  *     c_href = tree._getNs(c_node)
32214  *     c_child = c_node.children
32215  */
32216   if (unlikely(__pyx_v_path_list == Py_None)) {
32217     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
32218     __PYX_ERR(1, 307, __pyx_L1_error)
32219   }
32220   __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 307, __pyx_L1_error)
32221   __Pyx_GOTREF(__pyx_t_1);
32222   __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_path_list, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 307, __pyx_L1_error)
32223   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32224
32225   /* "src/lxml/objectpath.pxi":308
32226  *     tags = {}
32227  *     path_list.append(u'.'.join(path))
32228  *     c_href = tree._getNs(c_node)             # <<<<<<<<<<<<<<
32229  *     c_child = c_node.children
32230  *     while c_child is not NULL:
32231  */
32232   __pyx_v_c_href = _getNs(__pyx_v_c_node);
32233
32234   /* "src/lxml/objectpath.pxi":309
32235  *     path_list.append(u'.'.join(path))
32236  *     c_href = tree._getNs(c_node)
32237  *     c_child = c_node.children             # <<<<<<<<<<<<<<
32238  *     while c_child is not NULL:
32239  *         while c_child.type != tree.XML_ELEMENT_NODE:
32240  */
32241   __pyx_t_3 = __pyx_v_c_node->children;
32242   __pyx_v_c_child = __pyx_t_3;
32243
32244   /* "src/lxml/objectpath.pxi":310
32245  *     c_href = tree._getNs(c_node)
32246  *     c_child = c_node.children
32247  *     while c_child is not NULL:             # <<<<<<<<<<<<<<
32248  *         while c_child.type != tree.XML_ELEMENT_NODE:
32249  *             c_child = c_child.next
32250  */
32251   while (1) {
32252     __pyx_t_4 = ((__pyx_v_c_child != NULL) != 0);
32253     if (!__pyx_t_4) break;
32254
32255     /* "src/lxml/objectpath.pxi":311
32256  *     c_child = c_node.children
32257  *     while c_child is not NULL:
32258  *         while c_child.type != tree.XML_ELEMENT_NODE:             # <<<<<<<<<<<<<<
32259  *             c_child = c_child.next
32260  *             if c_child is NULL:
32261  */
32262     while (1) {
32263       __pyx_t_4 = ((__pyx_v_c_child->type != XML_ELEMENT_NODE) != 0);
32264       if (!__pyx_t_4) break;
32265
32266       /* "src/lxml/objectpath.pxi":312
32267  *     while c_child is not NULL:
32268  *         while c_child.type != tree.XML_ELEMENT_NODE:
32269  *             c_child = c_child.next             # <<<<<<<<<<<<<<
32270  *             if c_child is NULL:
32271  *                 return 0
32272  */
32273       __pyx_t_3 = __pyx_v_c_child->next;
32274       __pyx_v_c_child = __pyx_t_3;
32275
32276       /* "src/lxml/objectpath.pxi":313
32277  *         while c_child.type != tree.XML_ELEMENT_NODE:
32278  *             c_child = c_child.next
32279  *             if c_child is NULL:             # <<<<<<<<<<<<<<
32280  *                 return 0
32281  *         if c_href is tree._getNs(c_child):
32282  */
32283       __pyx_t_4 = ((__pyx_v_c_child == NULL) != 0);
32284       if (__pyx_t_4) {
32285
32286         /* "src/lxml/objectpath.pxi":314
32287  *             c_child = c_child.next
32288  *             if c_child is NULL:
32289  *                 return 0             # <<<<<<<<<<<<<<
32290  *         if c_href is tree._getNs(c_child):
32291  *             tag = pyunicode(c_child.name)
32292  */
32293         __pyx_r = 0;
32294         goto __pyx_L0;
32295
32296         /* "src/lxml/objectpath.pxi":313
32297  *         while c_child.type != tree.XML_ELEMENT_NODE:
32298  *             c_child = c_child.next
32299  *             if c_child is NULL:             # <<<<<<<<<<<<<<
32300  *                 return 0
32301  *         if c_href is tree._getNs(c_child):
32302  */
32303       }
32304     }
32305
32306     /* "src/lxml/objectpath.pxi":315
32307  *             if c_child is NULL:
32308  *                 return 0
32309  *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
32310  *             tag = pyunicode(c_child.name)
32311  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32312  */
32313     __pyx_t_4 = ((__pyx_v_c_href == _getNs(__pyx_v_c_child)) != 0);
32314     if (__pyx_t_4) {
32315
32316       /* "src/lxml/objectpath.pxi":316
32317  *                 return 0
32318  *         if c_href is tree._getNs(c_child):
32319  *             tag = pyunicode(c_child.name)             # <<<<<<<<<<<<<<
32320  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32321  *             # special case: parent has namespace, child does not
32322  */
32323       __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 316, __pyx_L1_error)
32324       __Pyx_GOTREF(__pyx_t_1);
32325       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_1);
32326       __pyx_t_1 = 0;
32327
32328       /* "src/lxml/objectpath.pxi":315
32329  *             if c_child is NULL:
32330  *                 return 0
32331  *         if c_href is tree._getNs(c_child):             # <<<<<<<<<<<<<<
32332  *             tag = pyunicode(c_child.name)
32333  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32334  */
32335       goto __pyx_L8;
32336     }
32337
32338     /* "src/lxml/objectpath.pxi":317
32339  *         if c_href is tree._getNs(c_child):
32340  *             tag = pyunicode(c_child.name)
32341  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
32342  *             # special case: parent has namespace, child does not
32343  *             tag = u'{}' + pyunicode(c_child.name)
32344  */
32345     __pyx_t_5 = ((__pyx_v_c_href != NULL) != 0);
32346     if (__pyx_t_5) {
32347     } else {
32348       __pyx_t_4 = __pyx_t_5;
32349       goto __pyx_L9_bool_binop_done;
32350     }
32351     __pyx_t_5 = ((_getNs(__pyx_v_c_child) == NULL) != 0);
32352     __pyx_t_4 = __pyx_t_5;
32353     __pyx_L9_bool_binop_done:;
32354     if (__pyx_t_4) {
32355
32356       /* "src/lxml/objectpath.pxi":319
32357  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:
32358  *             # special case: parent has namespace, child does not
32359  *             tag = u'{}' + pyunicode(c_child.name)             # <<<<<<<<<<<<<<
32360  *         else:
32361  *             tag = cetree.namespacedName(c_child)
32362  */
32363       __pyx_t_1 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 319, __pyx_L1_error)
32364       __Pyx_GOTREF(__pyx_t_1);
32365       __pyx_t_6 = PyNumber_Add(__pyx_kp_u__19, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 319, __pyx_L1_error)
32366       __Pyx_GOTREF(__pyx_t_6);
32367       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32368       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_6);
32369       __pyx_t_6 = 0;
32370
32371       /* "src/lxml/objectpath.pxi":317
32372  *         if c_href is tree._getNs(c_child):
32373  *             tag = pyunicode(c_child.name)
32374  *         elif c_href is not NULL and tree._getNs(c_child) is NULL:             # <<<<<<<<<<<<<<
32375  *             # special case: parent has namespace, child does not
32376  *             tag = u'{}' + pyunicode(c_child.name)
32377  */
32378       goto __pyx_L8;
32379     }
32380
32381     /* "src/lxml/objectpath.pxi":321
32382  *             tag = u'{}' + pyunicode(c_child.name)
32383  *         else:
32384  *             tag = cetree.namespacedName(c_child)             # <<<<<<<<<<<<<<
32385  *         count = tags.get(tag)
32386  *         if count is None:
32387  */
32388     /*else*/ {
32389       __pyx_t_6 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 321, __pyx_L1_error)
32390       __Pyx_GOTREF(__pyx_t_6);
32391       __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_6);
32392       __pyx_t_6 = 0;
32393     }
32394     __pyx_L8:;
32395
32396     /* "src/lxml/objectpath.pxi":322
32397  *         else:
32398  *             tag = cetree.namespacedName(c_child)
32399  *         count = tags.get(tag)             # <<<<<<<<<<<<<<
32400  *         if count is None:
32401  *             tags[tag] = 1
32402  */
32403     __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_tags, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 322, __pyx_L1_error)
32404     __Pyx_GOTREF(__pyx_t_6);
32405     __Pyx_XDECREF_SET(__pyx_v_count, __pyx_t_6);
32406     __pyx_t_6 = 0;
32407
32408     /* "src/lxml/objectpath.pxi":323
32409  *             tag = cetree.namespacedName(c_child)
32410  *         count = tags.get(tag)
32411  *         if count is None:             # <<<<<<<<<<<<<<
32412  *             tags[tag] = 1
32413  *         else:
32414  */
32415     __pyx_t_4 = (__pyx_v_count == Py_None);
32416     __pyx_t_5 = (__pyx_t_4 != 0);
32417     if (__pyx_t_5) {
32418
32419       /* "src/lxml/objectpath.pxi":324
32420  *         count = tags.get(tag)
32421  *         if count is None:
32422  *             tags[tag] = 1             # <<<<<<<<<<<<<<
32423  *         else:
32424  *             tags[tag] = count + 1
32425  */
32426       if (unlikely(PyDict_SetItem(__pyx_v_tags, __pyx_v_tag, __pyx_int_1) < 0)) __PYX_ERR(1, 324, __pyx_L1_error)
32427
32428       /* "src/lxml/objectpath.pxi":323
32429  *             tag = cetree.namespacedName(c_child)
32430  *         count = tags.get(tag)
32431  *         if count is None:             # <<<<<<<<<<<<<<
32432  *             tags[tag] = 1
32433  *         else:
32434  */
32435       goto __pyx_L11;
32436     }
32437
32438     /* "src/lxml/objectpath.pxi":326
32439  *             tags[tag] = 1
32440  *         else:
32441  *             tags[tag] = count + 1             # <<<<<<<<<<<<<<
32442  *             tag += f'[{count}]'
32443  *         path.append(tag)
32444  */
32445     /*else*/ {
32446       __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_count, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 326, __pyx_L1_error)
32447       __Pyx_GOTREF(__pyx_t_6);
32448       if (unlikely(PyDict_SetItem(__pyx_v_tags, __pyx_v_tag, __pyx_t_6) < 0)) __PYX_ERR(1, 326, __pyx_L1_error)
32449       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32450
32451       /* "src/lxml/objectpath.pxi":327
32452  *         else:
32453  *             tags[tag] = count + 1
32454  *             tag += f'[{count}]'             # <<<<<<<<<<<<<<
32455  *         path.append(tag)
32456  *         _recursive_build_descendant_paths(c_child, path, path_list)
32457  */
32458       __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 327, __pyx_L1_error)
32459       __Pyx_GOTREF(__pyx_t_6);
32460       __pyx_t_7 = 0;
32461       __pyx_t_8 = 127;
32462       __Pyx_INCREF(__pyx_kp_u__20);
32463       __pyx_t_7 += 1;
32464       __Pyx_GIVEREF(__pyx_kp_u__20);
32465       PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__20);
32466       __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_count, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 327, __pyx_L1_error)
32467       __Pyx_GOTREF(__pyx_t_1);
32468       __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
32469       __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
32470       __Pyx_GIVEREF(__pyx_t_1);
32471       PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
32472       __pyx_t_1 = 0;
32473       __Pyx_INCREF(__pyx_kp_u__21);
32474       __pyx_t_7 += 1;
32475       __Pyx_GIVEREF(__pyx_kp_u__21);
32476       PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__21);
32477       __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 327, __pyx_L1_error)
32478       __Pyx_GOTREF(__pyx_t_1);
32479       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
32480       __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 327, __pyx_L1_error)
32481       __Pyx_GOTREF(__pyx_t_6);
32482       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
32483       __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_6);
32484       __pyx_t_6 = 0;
32485     }
32486     __pyx_L11:;
32487
32488     /* "src/lxml/objectpath.pxi":328
32489  *             tags[tag] = count + 1
32490  *             tag += f'[{count}]'
32491  *         path.append(tag)             # <<<<<<<<<<<<<<
32492  *         _recursive_build_descendant_paths(c_child, path, path_list)
32493  *         del path[-1]
32494  */
32495     if (unlikely(__pyx_v_path == Py_None)) {
32496       PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
32497       __PYX_ERR(1, 328, __pyx_L1_error)
32498     }
32499     __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_path, __pyx_v_tag); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 328, __pyx_L1_error)
32500
32501     /* "src/lxml/objectpath.pxi":329
32502  *             tag += f'[{count}]'
32503  *         path.append(tag)
32504  *         _recursive_build_descendant_paths(c_child, path, path_list)             # <<<<<<<<<<<<<<
32505  *         del path[-1]
32506  *         c_child = c_child.next
32507  */
32508     __pyx_t_9 = __pyx_f_4lxml_9objectify__recursive_build_descendant_paths(__pyx_v_c_child, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 329, __pyx_L1_error)
32509
32510     /* "src/lxml/objectpath.pxi":330
32511  *         path.append(tag)
32512  *         _recursive_build_descendant_paths(c_child, path, path_list)
32513  *         del path[-1]             # <<<<<<<<<<<<<<
32514  *         c_child = c_child.next
32515  *     return 0
32516  */
32517     if (unlikely(__pyx_v_path == Py_None)) {
32518       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
32519       __PYX_ERR(1, 330, __pyx_L1_error)
32520     }
32521     if (unlikely(__Pyx_DelItemInt(__pyx_v_path, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(1, 330, __pyx_L1_error)
32522
32523     /* "src/lxml/objectpath.pxi":331
32524  *         _recursive_build_descendant_paths(c_child, path, path_list)
32525  *         del path[-1]
32526  *         c_child = c_child.next             # <<<<<<<<<<<<<<
32527  *     return 0
32528  */
32529     __pyx_t_3 = __pyx_v_c_child->next;
32530     __pyx_v_c_child = __pyx_t_3;
32531   }
32532
32533   /* "src/lxml/objectpath.pxi":332
32534  *         del path[-1]
32535  *         c_child = c_child.next
32536  *     return 0             # <<<<<<<<<<<<<<
32537  */
32538   __pyx_r = 0;
32539   goto __pyx_L0;
32540
32541   /* "src/lxml/objectpath.pxi":300
32542  * 
32543  * 
32544  * cdef int _recursive_build_descendant_paths(tree.xmlNode* c_node,             # <<<<<<<<<<<<<<
32545  *                                            list path, list path_list) except -1:
32546  *     u"""Fills the list 'path_list' with all descendant paths, initial prefix
32547  */
32548
32549   /* function exit code */
32550   __pyx_L1_error:;
32551   __Pyx_XDECREF(__pyx_t_1);
32552   __Pyx_XDECREF(__pyx_t_6);
32553   __Pyx_AddTraceback("lxml.objectify._recursive_build_descendant_paths", __pyx_clineno, __pyx_lineno, __pyx_filename);
32554   __pyx_r = -1;
32555   __pyx_L0:;
32556   __Pyx_XDECREF(__pyx_v_tags);
32557   __Pyx_XDECREF(__pyx_v_tag);
32558   __Pyx_XDECREF(__pyx_v_count);
32559   __Pyx_RefNannyFinishContext();
32560   return __pyx_r;
32561 }
32562
32563 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32564   PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_new(t, a, k);
32565   if (unlikely(!o)) return 0;
32566   return o;
32567 }
32568
32569 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
32570   #if CYTHON_USE_TP_FINALIZE
32571   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32572     if (PyObject_CallFinalizerFromDealloc(o)) return;
32573   }
32574   #endif
32575   PyObject_GC_UnTrack(o);
32576   PyObject_GC_Track(o);
32577   if (likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)) __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement);
32578 }
32579
32580 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
32581   int e;
32582   e = ((likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)) ? ((__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_traverse) ? __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement)); if (e) return e;
32583   return 0;
32584 }
32585
32586 static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
32587   if (likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase)) { if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_clear) __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement);
32588   return 0;
32589 }
32590 static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
32591   PyObject *r;
32592   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
32593   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
32594   Py_DECREF(x);
32595   return r;
32596 }
32597
32598 static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
32599   if (v) {
32600     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_23__setitem__(o, i, v);
32601   }
32602   else {
32603     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_25__delitem__(o, i);
32604   }
32605 }
32606
32607 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
32608   PyObject *v = PyObject_GenericGetAttr(o, n);
32609   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
32610     PyErr_Clear();
32611     v = __pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__(o, n);
32612   }
32613   return v;
32614 }
32615
32616 static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
32617   if (v) {
32618     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_15__setattr__(o, n, v);
32619   }
32620   else {
32621     return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_17__delattr__(o, n);
32622   }
32623 }
32624
32625 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, CYTHON_UNUSED void *x) {
32626   return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_4text_1__get__(o);
32627 }
32628
32629 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, CYTHON_UNUSED void *x) {
32630   return __pyx_pw_4lxml_9objectify_18ObjectifiedElement_8__dict___1__get__(o);
32631 }
32632
32633 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
32634   {"__reduce__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_5__reduce__, METH_NOARGS, 0},
32635   {"countchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_9countchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_8countchildren},
32636   {"getchildren", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_11getchildren, METH_NOARGS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_10getchildren},
32637   {"__getattr__", (PyCFunction)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_13__getattr__, METH_O|METH_COEXIST, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__},
32638   {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_19addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_18addattr},
32639   {"descendantpaths", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_18ObjectifiedElement_27descendantpaths, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_18ObjectifiedElement_26descendantpaths},
32640   {0, 0, 0, 0}
32641 };
32642
32643 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
32644   {(char *)"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, (char *)0, 0},
32645   {(char *)"__dict__", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__, 0, (char *)"A fake implementation for __dict__ to support dir() etc.\n\n        Note that this only considers the first child with a given name.\n        ", 0},
32646   {0, 0, 0, 0, 0}
32647 };
32648
32649 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
32650   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*sq_length*/
32651   0, /*sq_concat*/
32652   0, /*sq_repeat*/
32653   __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
32654   0, /*sq_slice*/
32655   0, /*sq_ass_item*/
32656   0, /*sq_ass_slice*/
32657   0, /*sq_contains*/
32658   0, /*sq_inplace_concat*/
32659   0, /*sq_inplace_repeat*/
32660 };
32661
32662 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
32663   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_7__len__, /*mp_length*/
32664   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_21__getitem__, /*mp_subscript*/
32665   __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
32666 };
32667
32668 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
32669   PyVarObject_HEAD_INIT(0, 0)
32670   "lxml.objectify.ObjectifiedElement", /*tp_name*/
32671   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
32672   0, /*tp_itemsize*/
32673   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
32674   #if PY_VERSION_HEX < 0x030800b4
32675   0, /*tp_print*/
32676   #endif
32677   #if PY_VERSION_HEX >= 0x030800b4
32678   0, /*tp_vectorcall_offset*/
32679   #endif
32680   0, /*tp_getattr*/
32681   0, /*tp_setattr*/
32682   #if PY_MAJOR_VERSION < 3
32683   0, /*tp_compare*/
32684   #endif
32685   #if PY_MAJOR_VERSION >= 3
32686   0, /*tp_as_async*/
32687   #endif
32688   0, /*tp_repr*/
32689   0, /*tp_as_number*/
32690   &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
32691   &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
32692   0, /*tp_hash*/
32693   0, /*tp_call*/
32694   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_3__str__, /*tp_str*/
32695   __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
32696   __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
32697   0, /*tp_as_buffer*/
32698   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32699   "Main XML Element class.\n\n    Element children are accessed as object attributes.  Multiple children\n    with the same name are available through a list index.  Example::\n\n       >>> root = XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n       >>> second_c2 = root.c1.c2[1]\n       >>> print(second_c2.text)\n       1\n\n    Note that you cannot (and must not) instantiate this class or its\n    subclasses.\n    ", /*tp_doc*/
32700   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
32701   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
32702   0, /*tp_richcompare*/
32703   0, /*tp_weaklistoffset*/
32704   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32705   0, /*tp_iternext*/
32706   __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
32707   0, /*tp_members*/
32708   __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*tp_getset*/
32709   0, /*tp_base*/
32710   0, /*tp_dict*/
32711   0, /*tp_descr_get*/
32712   0, /*tp_descr_set*/
32713   0, /*tp_dictoffset*/
32714   0, /*tp_init*/
32715   0, /*tp_alloc*/
32716   __pyx_tp_new_4lxml_9objectify_ObjectifiedElement, /*tp_new*/
32717   0, /*tp_free*/
32718   0, /*tp_is_gc*/
32719   0, /*tp_bases*/
32720   0, /*tp_mro*/
32721   0, /*tp_cache*/
32722   0, /*tp_subclasses*/
32723   0, /*tp_weaklist*/
32724   0, /*tp_del*/
32725   0, /*tp_version_tag*/
32726   #if PY_VERSION_HEX >= 0x030400a1
32727   0, /*tp_finalize*/
32728   #endif
32729   #if PY_VERSION_HEX >= 0x030800b1
32730   0, /*tp_vectorcall*/
32731   #endif
32732   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
32733   0, /*tp_print*/
32734   #endif
32735 };
32736
32737 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32738   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
32739   if (unlikely(!o)) return 0;
32740   return o;
32741 }
32742
32743 static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
32744   return __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5pyval_1__get__(o);
32745 }
32746
32747 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
32748   {"_setText", (PyCFunction)__pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_5_setText, METH_O, __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement_4_setText},
32749   {0, 0, 0, 0}
32750 };
32751
32752 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
32753   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, (char *)0, 0},
32754   {0, 0, 0, 0, 0}
32755 };
32756
32757 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
32758   PyVarObject_HEAD_INIT(0, 0)
32759   "lxml.objectify.ObjectifiedDataElement", /*tp_name*/
32760   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
32761   0, /*tp_itemsize*/
32762   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
32763   #if PY_VERSION_HEX < 0x030800b4
32764   0, /*tp_print*/
32765   #endif
32766   #if PY_VERSION_HEX >= 0x030800b4
32767   0, /*tp_vectorcall_offset*/
32768   #endif
32769   0, /*tp_getattr*/
32770   0, /*tp_setattr*/
32771   #if PY_MAJOR_VERSION < 3
32772   0, /*tp_compare*/
32773   #endif
32774   #if PY_MAJOR_VERSION >= 3
32775   0, /*tp_as_async*/
32776   #endif
32777   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_3__repr__, /*tp_repr*/
32778   0, /*tp_as_number*/
32779   0, /*tp_as_sequence*/
32780   0, /*tp_as_mapping*/
32781   0, /*tp_hash*/
32782   0, /*tp_call*/
32783   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
32784   0, /*tp_getattro*/
32785   0, /*tp_setattro*/
32786   0, /*tp_as_buffer*/
32787   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32788   "This is the base class for all data type Elements.  Subclasses should\n    override the 'pyval' property and possibly the __str__ method.\n    ", /*tp_doc*/
32789   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
32790   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
32791   0, /*tp_richcompare*/
32792   0, /*tp_weaklistoffset*/
32793   #if CYTHON_COMPILING_IN_PYPY
32794   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32795   #else
32796   0, /*tp_iter*/
32797   #endif
32798   0, /*tp_iternext*/
32799   __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
32800   0, /*tp_members*/
32801   __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*tp_getset*/
32802   0, /*tp_base*/
32803   0, /*tp_dict*/
32804   0, /*tp_descr_get*/
32805   0, /*tp_descr_set*/
32806   0, /*tp_dictoffset*/
32807   0, /*tp_init*/
32808   0, /*tp_alloc*/
32809   __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement, /*tp_new*/
32810   0, /*tp_free*/
32811   0, /*tp_is_gc*/
32812   0, /*tp_bases*/
32813   0, /*tp_mro*/
32814   0, /*tp_cache*/
32815   0, /*tp_subclasses*/
32816   0, /*tp_weaklist*/
32817   0, /*tp_del*/
32818   0, /*tp_version_tag*/
32819   #if PY_VERSION_HEX >= 0x030400a1
32820   0, /*tp_finalize*/
32821   #endif
32822   #if PY_VERSION_HEX >= 0x030800b1
32823   0, /*tp_vectorcall*/
32824   #endif
32825   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
32826   0, /*tp_print*/
32827   #endif
32828 };
32829
32830 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
32831   struct __pyx_obj_4lxml_9objectify_NumberElement *p;
32832   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
32833   if (unlikely(!o)) return 0;
32834   p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
32835   p->_parse_value = Py_None; Py_INCREF(Py_None);
32836   return o;
32837 }
32838
32839 static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
32840   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32841   #if CYTHON_USE_TP_FINALIZE
32842   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
32843     if (PyObject_CallFinalizerFromDealloc(o)) return;
32844   }
32845   #endif
32846   PyObject_GC_UnTrack(o);
32847   Py_CLEAR(p->_parse_value);
32848   PyObject_GC_Track(o);
32849   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(o);
32850 }
32851
32852 static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
32853   int e;
32854   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32855   e = __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(o, v, a); if (e) return e;
32856   if (p->_parse_value) {
32857     e = (*v)(p->_parse_value, a); if (e) return e;
32858   }
32859   return 0;
32860 }
32861
32862 static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
32863   struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
32864   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(o);
32865   Py_CLEAR(p->_parse_value);
32866   return 0;
32867 }
32868
32869 static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
32870   return __pyx_pw_4lxml_9objectify_13NumberElement_5pyval_1__get__(o);
32871 }
32872
32873 static PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
32874   {"_setValueParser", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_1_setValueParser, METH_O, __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser},
32875   {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13NumberElement_9__complex__, METH_NOARGS, 0},
32876   {0, 0, 0, 0}
32877 };
32878
32879 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
32880   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, (char *)0, 0},
32881   {0, 0, 0, 0, 0}
32882 };
32883
32884 static PyNumberMethods __pyx_tp_as_number_NumberElement = {
32885   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
32886   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
32887   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
32888   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32889   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
32890   #endif
32891   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
32892   0, /*nb_divmod*/
32893   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
32894   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
32895   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
32896   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
32897   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
32898   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
32899   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
32900   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
32901   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
32902   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
32903   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
32904   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32905   0, /*nb_coerce*/
32906   #endif
32907   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
32908   #if PY_MAJOR_VERSION < 3
32909   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
32910   #else
32911   0, /*reserved*/
32912   #endif
32913   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
32914   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32915   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
32916   #endif
32917   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32918   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
32919   #endif
32920   0, /*nb_inplace_add*/
32921   0, /*nb_inplace_subtract*/
32922   0, /*nb_inplace_multiply*/
32923   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
32924   0, /*nb_inplace_divide*/
32925   #endif
32926   0, /*nb_inplace_remainder*/
32927   0, /*nb_inplace_power*/
32928   0, /*nb_inplace_lshift*/
32929   0, /*nb_inplace_rshift*/
32930   0, /*nb_inplace_and*/
32931   0, /*nb_inplace_xor*/
32932   0, /*nb_inplace_or*/
32933   0, /*nb_floor_divide*/
32934   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
32935   0, /*nb_inplace_floor_divide*/
32936   0, /*nb_inplace_true_divide*/
32937   0, /*nb_index*/
32938   #if PY_VERSION_HEX >= 0x03050000
32939   0, /*nb_matrix_multiply*/
32940   #endif
32941   #if PY_VERSION_HEX >= 0x03050000
32942   0, /*nb_inplace_matrix_multiply*/
32943   #endif
32944 };
32945
32946 static PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
32947   PyVarObject_HEAD_INIT(0, 0)
32948   "lxml.objectify.NumberElement", /*tp_name*/
32949   sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
32950   0, /*tp_itemsize*/
32951   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
32952   #if PY_VERSION_HEX < 0x030800b4
32953   0, /*tp_print*/
32954   #endif
32955   #if PY_VERSION_HEX >= 0x030800b4
32956   0, /*tp_vectorcall_offset*/
32957   #endif
32958   0, /*tp_getattr*/
32959   0, /*tp_setattr*/
32960   #if PY_MAJOR_VERSION < 3
32961   0, /*tp_compare*/
32962   #endif
32963   #if PY_MAJOR_VERSION >= 3
32964   0, /*tp_as_async*/
32965   #endif
32966   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
32967   &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
32968   0, /*tp_as_sequence*/
32969   0, /*tp_as_mapping*/
32970   __pyx_pw_4lxml_9objectify_13NumberElement_21__hash__, /*tp_hash*/
32971   0, /*tp_call*/
32972   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
32973   0, /*tp_getattro*/
32974   0, /*tp_setattro*/
32975   0, /*tp_as_buffer*/
32976   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
32977   0, /*tp_doc*/
32978   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
32979   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
32980   __pyx_pw_4lxml_9objectify_13NumberElement_19__richcmp__, /*tp_richcompare*/
32981   0, /*tp_weaklistoffset*/
32982   #if CYTHON_COMPILING_IN_PYPY
32983   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
32984   #else
32985   0, /*tp_iter*/
32986   #endif
32987   0, /*tp_iternext*/
32988   __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
32989   0, /*tp_members*/
32990   __pyx_getsets_4lxml_9objectify_NumberElement, /*tp_getset*/
32991   0, /*tp_base*/
32992   0, /*tp_dict*/
32993   0, /*tp_descr_get*/
32994   0, /*tp_descr_set*/
32995   0, /*tp_dictoffset*/
32996   0, /*tp_init*/
32997   0, /*tp_alloc*/
32998   __pyx_tp_new_4lxml_9objectify_NumberElement, /*tp_new*/
32999   0, /*tp_free*/
33000   0, /*tp_is_gc*/
33001   0, /*tp_bases*/
33002   0, /*tp_mro*/
33003   0, /*tp_cache*/
33004   0, /*tp_subclasses*/
33005   0, /*tp_weaklist*/
33006   0, /*tp_del*/
33007   0, /*tp_version_tag*/
33008   #if PY_VERSION_HEX >= 0x030400a1
33009   0, /*tp_finalize*/
33010   #endif
33011   #if PY_VERSION_HEX >= 0x030800b1
33012   0, /*tp_vectorcall*/
33013   #endif
33014   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33015   0, /*tp_print*/
33016   #endif
33017 };
33018
33019 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33020   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33021   if (unlikely(!o)) return 0;
33022   return o;
33023 }
33024
33025 static PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
33026   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_10IntElement_1_init, METH_NOARGS, 0},
33027   {0, 0, 0, 0}
33028 };
33029
33030 static PyNumberMethods __pyx_tp_as_number_IntElement = {
33031   #if CYTHON_COMPILING_IN_PYPY
33032   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33033   #else
33034   0, /*nb_add*/
33035   #endif
33036   #if CYTHON_COMPILING_IN_PYPY
33037   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33038   #else
33039   0, /*nb_subtract*/
33040   #endif
33041   #if CYTHON_COMPILING_IN_PYPY
33042   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33043   #else
33044   0, /*nb_multiply*/
33045   #endif
33046   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33047   #if CYTHON_COMPILING_IN_PYPY
33048   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33049   #else
33050   0, /*nb_divide*/
33051   #endif
33052   #endif
33053   #if CYTHON_COMPILING_IN_PYPY
33054   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33055   #else
33056   0, /*nb_remainder*/
33057   #endif
33058   0, /*nb_divmod*/
33059   #if CYTHON_COMPILING_IN_PYPY
33060   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33061   #else
33062   0, /*nb_power*/
33063   #endif
33064   #if CYTHON_COMPILING_IN_PYPY
33065   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33066   #else
33067   0, /*nb_negative*/
33068   #endif
33069   #if CYTHON_COMPILING_IN_PYPY
33070   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33071   #else
33072   0, /*nb_positive*/
33073   #endif
33074   #if CYTHON_COMPILING_IN_PYPY
33075   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33076   #else
33077   0, /*nb_absolute*/
33078   #endif
33079   #if CYTHON_COMPILING_IN_PYPY
33080   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
33081   #else
33082   0, /*nb_nonzero*/
33083   #endif
33084   #if CYTHON_COMPILING_IN_PYPY
33085   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33086   #else
33087   0, /*nb_invert*/
33088   #endif
33089   #if CYTHON_COMPILING_IN_PYPY
33090   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33091   #else
33092   0, /*nb_lshift*/
33093   #endif
33094   #if CYTHON_COMPILING_IN_PYPY
33095   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
33096   #else
33097   0, /*nb_rshift*/
33098   #endif
33099   #if CYTHON_COMPILING_IN_PYPY
33100   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
33101   #else
33102   0, /*nb_and*/
33103   #endif
33104   #if CYTHON_COMPILING_IN_PYPY
33105   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
33106   #else
33107   0, /*nb_xor*/
33108   #endif
33109   #if CYTHON_COMPILING_IN_PYPY
33110   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
33111   #else
33112   0, /*nb_or*/
33113   #endif
33114   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33115   0, /*nb_coerce*/
33116   #endif
33117   #if CYTHON_COMPILING_IN_PYPY
33118   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
33119   #else
33120   0, /*nb_int*/
33121   #endif
33122   #if PY_MAJOR_VERSION < 3
33123   #if CYTHON_COMPILING_IN_PYPY
33124   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
33125   #else
33126   0, /*nb_long*/
33127   #endif
33128   #else
33129   0, /*reserved*/
33130   #endif
33131   #if CYTHON_COMPILING_IN_PYPY
33132   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
33133   #else
33134   0, /*nb_float*/
33135   #endif
33136   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33137   #if CYTHON_COMPILING_IN_PYPY
33138   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
33139   #else
33140   0, /*nb_oct*/
33141   #endif
33142   #endif
33143   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33144   #if CYTHON_COMPILING_IN_PYPY
33145   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
33146   #else
33147   0, /*nb_hex*/
33148   #endif
33149   #endif
33150   0, /*nb_inplace_add*/
33151   0, /*nb_inplace_subtract*/
33152   0, /*nb_inplace_multiply*/
33153   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33154   0, /*nb_inplace_divide*/
33155   #endif
33156   0, /*nb_inplace_remainder*/
33157   0, /*nb_inplace_power*/
33158   0, /*nb_inplace_lshift*/
33159   0, /*nb_inplace_rshift*/
33160   0, /*nb_inplace_and*/
33161   0, /*nb_inplace_xor*/
33162   0, /*nb_inplace_or*/
33163   0, /*nb_floor_divide*/
33164   #if CYTHON_COMPILING_IN_PYPY
33165   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
33166   #else
33167   0, /*nb_true_divide*/
33168   #endif
33169   0, /*nb_inplace_floor_divide*/
33170   0, /*nb_inplace_true_divide*/
33171   __pyx_pw_4lxml_9objectify_10IntElement_3__index__, /*nb_index*/
33172   #if PY_VERSION_HEX >= 0x03050000
33173   0, /*nb_matrix_multiply*/
33174   #endif
33175   #if PY_VERSION_HEX >= 0x03050000
33176   0, /*nb_inplace_matrix_multiply*/
33177   #endif
33178 };
33179
33180 static PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
33181   PyVarObject_HEAD_INIT(0, 0)
33182   "lxml.objectify.IntElement", /*tp_name*/
33183   sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
33184   0, /*tp_itemsize*/
33185   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33186   #if PY_VERSION_HEX < 0x030800b4
33187   0, /*tp_print*/
33188   #endif
33189   #if PY_VERSION_HEX >= 0x030800b4
33190   0, /*tp_vectorcall_offset*/
33191   #endif
33192   0, /*tp_getattr*/
33193   0, /*tp_setattr*/
33194   #if PY_MAJOR_VERSION < 3
33195   0, /*tp_compare*/
33196   #endif
33197   #if PY_MAJOR_VERSION >= 3
33198   0, /*tp_as_async*/
33199   #endif
33200   #if CYTHON_COMPILING_IN_PYPY
33201   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33202   #else
33203   0, /*tp_repr*/
33204   #endif
33205   &__pyx_tp_as_number_IntElement, /*tp_as_number*/
33206   0, /*tp_as_sequence*/
33207   0, /*tp_as_mapping*/
33208   0, /*tp_hash*/
33209   0, /*tp_call*/
33210   #if CYTHON_COMPILING_IN_PYPY
33211   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33212   #else
33213   0, /*tp_str*/
33214   #endif
33215   0, /*tp_getattro*/
33216   0, /*tp_setattro*/
33217   0, /*tp_as_buffer*/
33218   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33219   0, /*tp_doc*/
33220   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33221   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33222   0, /*tp_richcompare*/
33223   0, /*tp_weaklistoffset*/
33224   #if CYTHON_COMPILING_IN_PYPY
33225   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33226   #else
33227   0, /*tp_iter*/
33228   #endif
33229   0, /*tp_iternext*/
33230   __pyx_methods_4lxml_9objectify_IntElement, /*tp_methods*/
33231   0, /*tp_members*/
33232   0, /*tp_getset*/
33233   0, /*tp_base*/
33234   0, /*tp_dict*/
33235   0, /*tp_descr_get*/
33236   0, /*tp_descr_set*/
33237   0, /*tp_dictoffset*/
33238   0, /*tp_init*/
33239   0, /*tp_alloc*/
33240   __pyx_tp_new_4lxml_9objectify_IntElement, /*tp_new*/
33241   0, /*tp_free*/
33242   0, /*tp_is_gc*/
33243   0, /*tp_bases*/
33244   0, /*tp_mro*/
33245   0, /*tp_cache*/
33246   0, /*tp_subclasses*/
33247   0, /*tp_weaklist*/
33248   0, /*tp_del*/
33249   0, /*tp_version_tag*/
33250   #if PY_VERSION_HEX >= 0x030400a1
33251   0, /*tp_finalize*/
33252   #endif
33253   #if PY_VERSION_HEX >= 0x030800b1
33254   0, /*tp_vectorcall*/
33255   #endif
33256   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33257   0, /*tp_print*/
33258   #endif
33259 };
33260
33261 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33262   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33263   if (unlikely(!o)) return 0;
33264   return o;
33265 }
33266
33267 static PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
33268   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11LongElement_1_init, METH_NOARGS, 0},
33269   {0, 0, 0, 0}
33270 };
33271
33272 static PyNumberMethods __pyx_tp_as_number_LongElement = {
33273   #if CYTHON_COMPILING_IN_PYPY
33274   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33275   #else
33276   0, /*nb_add*/
33277   #endif
33278   #if CYTHON_COMPILING_IN_PYPY
33279   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33280   #else
33281   0, /*nb_subtract*/
33282   #endif
33283   #if CYTHON_COMPILING_IN_PYPY
33284   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33285   #else
33286   0, /*nb_multiply*/
33287   #endif
33288   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33289   #if CYTHON_COMPILING_IN_PYPY
33290   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33291   #else
33292   0, /*nb_divide*/
33293   #endif
33294   #endif
33295   #if CYTHON_COMPILING_IN_PYPY
33296   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33297   #else
33298   0, /*nb_remainder*/
33299   #endif
33300   0, /*nb_divmod*/
33301   #if CYTHON_COMPILING_IN_PYPY
33302   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33303   #else
33304   0, /*nb_power*/
33305   #endif
33306   #if CYTHON_COMPILING_IN_PYPY
33307   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33308   #else
33309   0, /*nb_negative*/
33310   #endif
33311   #if CYTHON_COMPILING_IN_PYPY
33312   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33313   #else
33314   0, /*nb_positive*/
33315   #endif
33316   #if CYTHON_COMPILING_IN_PYPY
33317   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33318   #else
33319   0, /*nb_absolute*/
33320   #endif
33321   #if CYTHON_COMPILING_IN_PYPY
33322   __pyx_pw_4lxml_9objectify_13NumberElement_43__nonzero__, /*nb_nonzero*/
33323   #else
33324   0, /*nb_nonzero*/
33325   #endif
33326   #if CYTHON_COMPILING_IN_PYPY
33327   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33328   #else
33329   0, /*nb_invert*/
33330   #endif
33331   #if CYTHON_COMPILING_IN_PYPY
33332   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33333   #else
33334   0, /*nb_lshift*/
33335   #endif
33336   #if CYTHON_COMPILING_IN_PYPY
33337   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
33338   #else
33339   0, /*nb_rshift*/
33340   #endif
33341   #if CYTHON_COMPILING_IN_PYPY
33342   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
33343   #else
33344   0, /*nb_and*/
33345   #endif
33346   #if CYTHON_COMPILING_IN_PYPY
33347   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
33348   #else
33349   0, /*nb_xor*/
33350   #endif
33351   #if CYTHON_COMPILING_IN_PYPY
33352   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
33353   #else
33354   0, /*nb_or*/
33355   #endif
33356   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33357   0, /*nb_coerce*/
33358   #endif
33359   #if CYTHON_COMPILING_IN_PYPY
33360   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
33361   #else
33362   0, /*nb_int*/
33363   #endif
33364   #if PY_MAJOR_VERSION < 3
33365   #if CYTHON_COMPILING_IN_PYPY
33366   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
33367   #else
33368   0, /*nb_long*/
33369   #endif
33370   #else
33371   0, /*reserved*/
33372   #endif
33373   #if CYTHON_COMPILING_IN_PYPY
33374   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
33375   #else
33376   0, /*nb_float*/
33377   #endif
33378   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33379   #if CYTHON_COMPILING_IN_PYPY
33380   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
33381   #else
33382   0, /*nb_oct*/
33383   #endif
33384   #endif
33385   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33386   #if CYTHON_COMPILING_IN_PYPY
33387   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
33388   #else
33389   0, /*nb_hex*/
33390   #endif
33391   #endif
33392   0, /*nb_inplace_add*/
33393   0, /*nb_inplace_subtract*/
33394   0, /*nb_inplace_multiply*/
33395   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33396   0, /*nb_inplace_divide*/
33397   #endif
33398   0, /*nb_inplace_remainder*/
33399   0, /*nb_inplace_power*/
33400   0, /*nb_inplace_lshift*/
33401   0, /*nb_inplace_rshift*/
33402   0, /*nb_inplace_and*/
33403   0, /*nb_inplace_xor*/
33404   0, /*nb_inplace_or*/
33405   0, /*nb_floor_divide*/
33406   #if CYTHON_COMPILING_IN_PYPY
33407   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
33408   #else
33409   0, /*nb_true_divide*/
33410   #endif
33411   0, /*nb_inplace_floor_divide*/
33412   0, /*nb_inplace_true_divide*/
33413   __pyx_pw_4lxml_9objectify_11LongElement_3__index__, /*nb_index*/
33414   #if PY_VERSION_HEX >= 0x03050000
33415   0, /*nb_matrix_multiply*/
33416   #endif
33417   #if PY_VERSION_HEX >= 0x03050000
33418   0, /*nb_inplace_matrix_multiply*/
33419   #endif
33420 };
33421
33422 static PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
33423   PyVarObject_HEAD_INIT(0, 0)
33424   "lxml.objectify.LongElement", /*tp_name*/
33425   sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
33426   0, /*tp_itemsize*/
33427   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33428   #if PY_VERSION_HEX < 0x030800b4
33429   0, /*tp_print*/
33430   #endif
33431   #if PY_VERSION_HEX >= 0x030800b4
33432   0, /*tp_vectorcall_offset*/
33433   #endif
33434   0, /*tp_getattr*/
33435   0, /*tp_setattr*/
33436   #if PY_MAJOR_VERSION < 3
33437   0, /*tp_compare*/
33438   #endif
33439   #if PY_MAJOR_VERSION >= 3
33440   0, /*tp_as_async*/
33441   #endif
33442   #if CYTHON_COMPILING_IN_PYPY
33443   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33444   #else
33445   0, /*tp_repr*/
33446   #endif
33447   &__pyx_tp_as_number_LongElement, /*tp_as_number*/
33448   0, /*tp_as_sequence*/
33449   0, /*tp_as_mapping*/
33450   0, /*tp_hash*/
33451   0, /*tp_call*/
33452   #if CYTHON_COMPILING_IN_PYPY
33453   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33454   #else
33455   0, /*tp_str*/
33456   #endif
33457   0, /*tp_getattro*/
33458   0, /*tp_setattro*/
33459   0, /*tp_as_buffer*/
33460   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33461   0, /*tp_doc*/
33462   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33463   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33464   0, /*tp_richcompare*/
33465   0, /*tp_weaklistoffset*/
33466   #if CYTHON_COMPILING_IN_PYPY
33467   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33468   #else
33469   0, /*tp_iter*/
33470   #endif
33471   0, /*tp_iternext*/
33472   __pyx_methods_4lxml_9objectify_LongElement, /*tp_methods*/
33473   0, /*tp_members*/
33474   0, /*tp_getset*/
33475   0, /*tp_base*/
33476   0, /*tp_dict*/
33477   0, /*tp_descr_get*/
33478   0, /*tp_descr_set*/
33479   0, /*tp_dictoffset*/
33480   0, /*tp_init*/
33481   0, /*tp_alloc*/
33482   __pyx_tp_new_4lxml_9objectify_LongElement, /*tp_new*/
33483   0, /*tp_free*/
33484   0, /*tp_is_gc*/
33485   0, /*tp_bases*/
33486   0, /*tp_mro*/
33487   0, /*tp_cache*/
33488   0, /*tp_subclasses*/
33489   0, /*tp_weaklist*/
33490   0, /*tp_del*/
33491   0, /*tp_version_tag*/
33492   #if PY_VERSION_HEX >= 0x030400a1
33493   0, /*tp_finalize*/
33494   #endif
33495   #if PY_VERSION_HEX >= 0x030800b1
33496   0, /*tp_vectorcall*/
33497   #endif
33498   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33499   0, /*tp_print*/
33500   #endif
33501 };
33502
33503 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33504   PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
33505   if (unlikely(!o)) return 0;
33506   return o;
33507 }
33508
33509 static PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
33510   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_12FloatElement_1_init, METH_NOARGS, 0},
33511   {0, 0, 0, 0}
33512 };
33513
33514 static PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
33515   PyVarObject_HEAD_INIT(0, 0)
33516   "lxml.objectify.FloatElement", /*tp_name*/
33517   sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
33518   0, /*tp_itemsize*/
33519   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
33520   #if PY_VERSION_HEX < 0x030800b4
33521   0, /*tp_print*/
33522   #endif
33523   #if PY_VERSION_HEX >= 0x030800b4
33524   0, /*tp_vectorcall_offset*/
33525   #endif
33526   0, /*tp_getattr*/
33527   0, /*tp_setattr*/
33528   #if PY_MAJOR_VERSION < 3
33529   0, /*tp_compare*/
33530   #endif
33531   #if PY_MAJOR_VERSION >= 3
33532   0, /*tp_as_async*/
33533   #endif
33534   #if CYTHON_COMPILING_IN_PYPY
33535   __pyx_pw_4lxml_9objectify_13NumberElement_13__repr__, /*tp_repr*/
33536   #else
33537   0, /*tp_repr*/
33538   #endif
33539   0, /*tp_as_number*/
33540   0, /*tp_as_sequence*/
33541   0, /*tp_as_mapping*/
33542   0, /*tp_hash*/
33543   0, /*tp_call*/
33544   #if CYTHON_COMPILING_IN_PYPY
33545   __pyx_pw_4lxml_9objectify_13NumberElement_11__str__, /*tp_str*/
33546   #else
33547   0, /*tp_str*/
33548   #endif
33549   0, /*tp_getattro*/
33550   0, /*tp_setattro*/
33551   0, /*tp_as_buffer*/
33552   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33553   0, /*tp_doc*/
33554   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
33555   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
33556   0, /*tp_richcompare*/
33557   0, /*tp_weaklistoffset*/
33558   #if CYTHON_COMPILING_IN_PYPY
33559   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33560   #else
33561   0, /*tp_iter*/
33562   #endif
33563   0, /*tp_iternext*/
33564   __pyx_methods_4lxml_9objectify_FloatElement, /*tp_methods*/
33565   0, /*tp_members*/
33566   0, /*tp_getset*/
33567   0, /*tp_base*/
33568   0, /*tp_dict*/
33569   0, /*tp_descr_get*/
33570   0, /*tp_descr_set*/
33571   0, /*tp_dictoffset*/
33572   0, /*tp_init*/
33573   0, /*tp_alloc*/
33574   __pyx_tp_new_4lxml_9objectify_FloatElement, /*tp_new*/
33575   0, /*tp_free*/
33576   0, /*tp_is_gc*/
33577   0, /*tp_bases*/
33578   0, /*tp_mro*/
33579   0, /*tp_cache*/
33580   0, /*tp_subclasses*/
33581   0, /*tp_weaklist*/
33582   0, /*tp_del*/
33583   0, /*tp_version_tag*/
33584   #if PY_VERSION_HEX >= 0x030400a1
33585   0, /*tp_finalize*/
33586   #endif
33587   #if PY_VERSION_HEX >= 0x030800b1
33588   0, /*tp_vectorcall*/
33589   #endif
33590   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33591   0, /*tp_print*/
33592   #endif
33593 };
33594
33595 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33596   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
33597   if (unlikely(!o)) return 0;
33598   return o;
33599 }
33600
33601 static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33602   return __pyx_pw_4lxml_9objectify_13StringElement_5pyval_1__get__(o);
33603 }
33604
33605 static PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
33606   {"strlen", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_3strlen, METH_NOARGS, 0},
33607   {"__complex__", (PyCFunction)__pyx_pw_4lxml_9objectify_13StringElement_23__complex__, METH_NOARGS, 0},
33608   {0, 0, 0, 0}
33609 };
33610
33611 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
33612   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, (char *)0, 0},
33613   {0, 0, 0, 0, 0}
33614 };
33615
33616 static PyNumberMethods __pyx_tp_as_number_StringElement = {
33617   __pyx_pw_4lxml_9objectify_13StringElement_11__add__, /*nb_add*/
33618   0, /*nb_subtract*/
33619   __pyx_pw_4lxml_9objectify_13StringElement_13__mul__, /*nb_multiply*/
33620   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33621   0, /*nb_divide*/
33622   #endif
33623   __pyx_pw_4lxml_9objectify_13StringElement_15__mod__, /*nb_remainder*/
33624   0, /*nb_divmod*/
33625   0, /*nb_power*/
33626   0, /*nb_negative*/
33627   0, /*nb_positive*/
33628   0, /*nb_absolute*/
33629   __pyx_pw_4lxml_9objectify_13StringElement_5__nonzero__, /*nb_nonzero*/
33630   0, /*nb_invert*/
33631   0, /*nb_lshift*/
33632   0, /*nb_rshift*/
33633   0, /*nb_and*/
33634   0, /*nb_xor*/
33635   0, /*nb_or*/
33636   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33637   0, /*nb_coerce*/
33638   #endif
33639   __pyx_pw_4lxml_9objectify_13StringElement_17__int__, /*nb_int*/
33640   #if PY_MAJOR_VERSION < 3
33641   __pyx_pw_4lxml_9objectify_13StringElement_19__long__, /*nb_long*/
33642   #else
33643   0, /*reserved*/
33644   #endif
33645   __pyx_pw_4lxml_9objectify_13StringElement_21__float__, /*nb_float*/
33646   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33647   0, /*nb_oct*/
33648   #endif
33649   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33650   0, /*nb_hex*/
33651   #endif
33652   0, /*nb_inplace_add*/
33653   0, /*nb_inplace_subtract*/
33654   0, /*nb_inplace_multiply*/
33655   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33656   0, /*nb_inplace_divide*/
33657   #endif
33658   0, /*nb_inplace_remainder*/
33659   0, /*nb_inplace_power*/
33660   0, /*nb_inplace_lshift*/
33661   0, /*nb_inplace_rshift*/
33662   0, /*nb_inplace_and*/
33663   0, /*nb_inplace_xor*/
33664   0, /*nb_inplace_or*/
33665   0, /*nb_floor_divide*/
33666   0, /*nb_true_divide*/
33667   0, /*nb_inplace_floor_divide*/
33668   0, /*nb_inplace_true_divide*/
33669   0, /*nb_index*/
33670   #if PY_VERSION_HEX >= 0x03050000
33671   0, /*nb_matrix_multiply*/
33672   #endif
33673   #if PY_VERSION_HEX >= 0x03050000
33674   0, /*nb_inplace_matrix_multiply*/
33675   #endif
33676 };
33677
33678 static PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
33679   PyVarObject_HEAD_INIT(0, 0)
33680   "lxml.objectify.StringElement", /*tp_name*/
33681   sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
33682   0, /*tp_itemsize*/
33683   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
33684   #if PY_VERSION_HEX < 0x030800b4
33685   0, /*tp_print*/
33686   #endif
33687   #if PY_VERSION_HEX >= 0x030800b4
33688   0, /*tp_vectorcall_offset*/
33689   #endif
33690   0, /*tp_getattr*/
33691   0, /*tp_setattr*/
33692   #if PY_MAJOR_VERSION < 3
33693   0, /*tp_compare*/
33694   #endif
33695   #if PY_MAJOR_VERSION >= 3
33696   0, /*tp_as_async*/
33697   #endif
33698   __pyx_pw_4lxml_9objectify_13StringElement_1__repr__, /*tp_repr*/
33699   &__pyx_tp_as_number_StringElement, /*tp_as_number*/
33700   0, /*tp_as_sequence*/
33701   0, /*tp_as_mapping*/
33702   __pyx_pw_4lxml_9objectify_13StringElement_9__hash__, /*tp_hash*/
33703   0, /*tp_call*/
33704   #if CYTHON_COMPILING_IN_PYPY
33705   __pyx_pw_4lxml_9objectify_22ObjectifiedDataElement_1__str__, /*tp_str*/
33706   #else
33707   0, /*tp_str*/
33708   #endif
33709   0, /*tp_getattro*/
33710   0, /*tp_setattro*/
33711   0, /*tp_as_buffer*/
33712   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33713   "String data class.\n\n    Note that this class does *not* support the sequence protocol of strings:\n    len(), iter(), str_attr[0], str_attr[0:1], etc. are *not* supported.\n    Instead, use the .text attribute to get a 'real' string.\n    ", /*tp_doc*/
33714   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
33715   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
33716   __pyx_pw_4lxml_9objectify_13StringElement_7__richcmp__, /*tp_richcompare*/
33717   0, /*tp_weaklistoffset*/
33718   #if CYTHON_COMPILING_IN_PYPY
33719   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33720   #else
33721   0, /*tp_iter*/
33722   #endif
33723   0, /*tp_iternext*/
33724   __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
33725   0, /*tp_members*/
33726   __pyx_getsets_4lxml_9objectify_StringElement, /*tp_getset*/
33727   0, /*tp_base*/
33728   0, /*tp_dict*/
33729   0, /*tp_descr_get*/
33730   0, /*tp_descr_set*/
33731   0, /*tp_dictoffset*/
33732   0, /*tp_init*/
33733   0, /*tp_alloc*/
33734   __pyx_tp_new_4lxml_9objectify_StringElement, /*tp_new*/
33735   0, /*tp_free*/
33736   0, /*tp_is_gc*/
33737   0, /*tp_bases*/
33738   0, /*tp_mro*/
33739   0, /*tp_cache*/
33740   0, /*tp_subclasses*/
33741   0, /*tp_weaklist*/
33742   0, /*tp_del*/
33743   0, /*tp_version_tag*/
33744   #if PY_VERSION_HEX >= 0x030400a1
33745   0, /*tp_finalize*/
33746   #endif
33747   #if PY_VERSION_HEX >= 0x030800b1
33748   0, /*tp_vectorcall*/
33749   #endif
33750   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33751   0, /*tp_print*/
33752   #endif
33753 };
33754
33755 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33756   PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(t, a, k);
33757   if (unlikely(!o)) return 0;
33758   return o;
33759 }
33760
33761 static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33762   return __pyx_pw_4lxml_9objectify_11NoneElement_5pyval_1__get__(o);
33763 }
33764
33765 static PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
33766   {0, 0, 0, 0}
33767 };
33768
33769 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
33770   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, (char *)0, 0},
33771   {0, 0, 0, 0, 0}
33772 };
33773
33774 static PyNumberMethods __pyx_tp_as_number_NoneElement = {
33775   0, /*nb_add*/
33776   0, /*nb_subtract*/
33777   0, /*nb_multiply*/
33778   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33779   0, /*nb_divide*/
33780   #endif
33781   0, /*nb_remainder*/
33782   0, /*nb_divmod*/
33783   0, /*nb_power*/
33784   0, /*nb_negative*/
33785   0, /*nb_positive*/
33786   0, /*nb_absolute*/
33787   __pyx_pw_4lxml_9objectify_11NoneElement_5__nonzero__, /*nb_nonzero*/
33788   0, /*nb_invert*/
33789   0, /*nb_lshift*/
33790   0, /*nb_rshift*/
33791   0, /*nb_and*/
33792   0, /*nb_xor*/
33793   0, /*nb_or*/
33794   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33795   0, /*nb_coerce*/
33796   #endif
33797   0, /*nb_int*/
33798   #if PY_MAJOR_VERSION < 3
33799   0, /*nb_long*/
33800   #else
33801   0, /*reserved*/
33802   #endif
33803   0, /*nb_float*/
33804   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33805   0, /*nb_oct*/
33806   #endif
33807   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33808   0, /*nb_hex*/
33809   #endif
33810   0, /*nb_inplace_add*/
33811   0, /*nb_inplace_subtract*/
33812   0, /*nb_inplace_multiply*/
33813   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33814   0, /*nb_inplace_divide*/
33815   #endif
33816   0, /*nb_inplace_remainder*/
33817   0, /*nb_inplace_power*/
33818   0, /*nb_inplace_lshift*/
33819   0, /*nb_inplace_rshift*/
33820   0, /*nb_inplace_and*/
33821   0, /*nb_inplace_xor*/
33822   0, /*nb_inplace_or*/
33823   0, /*nb_floor_divide*/
33824   0, /*nb_true_divide*/
33825   0, /*nb_inplace_floor_divide*/
33826   0, /*nb_inplace_true_divide*/
33827   0, /*nb_index*/
33828   #if PY_VERSION_HEX >= 0x03050000
33829   0, /*nb_matrix_multiply*/
33830   #endif
33831   #if PY_VERSION_HEX >= 0x03050000
33832   0, /*nb_inplace_matrix_multiply*/
33833   #endif
33834 };
33835
33836 static PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
33837   PyVarObject_HEAD_INIT(0, 0)
33838   "lxml.objectify.NoneElement", /*tp_name*/
33839   sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
33840   0, /*tp_itemsize*/
33841   __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
33842   #if PY_VERSION_HEX < 0x030800b4
33843   0, /*tp_print*/
33844   #endif
33845   #if PY_VERSION_HEX >= 0x030800b4
33846   0, /*tp_vectorcall_offset*/
33847   #endif
33848   0, /*tp_getattr*/
33849   0, /*tp_setattr*/
33850   #if PY_MAJOR_VERSION < 3
33851   0, /*tp_compare*/
33852   #endif
33853   #if PY_MAJOR_VERSION >= 3
33854   0, /*tp_as_async*/
33855   #endif
33856   __pyx_pw_4lxml_9objectify_11NoneElement_3__repr__, /*tp_repr*/
33857   &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
33858   0, /*tp_as_sequence*/
33859   0, /*tp_as_mapping*/
33860   __pyx_pw_4lxml_9objectify_11NoneElement_9__hash__, /*tp_hash*/
33861   0, /*tp_call*/
33862   __pyx_pw_4lxml_9objectify_11NoneElement_1__str__, /*tp_str*/
33863   0, /*tp_getattro*/
33864   0, /*tp_setattro*/
33865   0, /*tp_as_buffer*/
33866   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
33867   0, /*tp_doc*/
33868   __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
33869   __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
33870   __pyx_pw_4lxml_9objectify_11NoneElement_7__richcmp__, /*tp_richcompare*/
33871   0, /*tp_weaklistoffset*/
33872   #if CYTHON_COMPILING_IN_PYPY
33873   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
33874   #else
33875   0, /*tp_iter*/
33876   #endif
33877   0, /*tp_iternext*/
33878   __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
33879   0, /*tp_members*/
33880   __pyx_getsets_4lxml_9objectify_NoneElement, /*tp_getset*/
33881   0, /*tp_base*/
33882   0, /*tp_dict*/
33883   0, /*tp_descr_get*/
33884   0, /*tp_descr_set*/
33885   0, /*tp_dictoffset*/
33886   0, /*tp_init*/
33887   0, /*tp_alloc*/
33888   __pyx_tp_new_4lxml_9objectify_NoneElement, /*tp_new*/
33889   0, /*tp_free*/
33890   0, /*tp_is_gc*/
33891   0, /*tp_bases*/
33892   0, /*tp_mro*/
33893   0, /*tp_cache*/
33894   0, /*tp_subclasses*/
33895   0, /*tp_weaklist*/
33896   0, /*tp_del*/
33897   0, /*tp_version_tag*/
33898   #if PY_VERSION_HEX >= 0x030400a1
33899   0, /*tp_finalize*/
33900   #endif
33901   #if PY_VERSION_HEX >= 0x030800b1
33902   0, /*tp_vectorcall*/
33903   #endif
33904   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
33905   0, /*tp_print*/
33906   #endif
33907 };
33908
33909 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
33910   PyObject *o = __pyx_tp_new_4lxml_9objectify_IntElement(t, a, k);
33911   if (unlikely(!o)) return 0;
33912   return o;
33913 }
33914
33915 static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, CYTHON_UNUSED void *x) {
33916   return __pyx_pw_4lxml_9objectify_11BoolElement_5pyval_1__get__(o);
33917 }
33918
33919 static PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
33920   {"_init", (PyCFunction)__pyx_pw_4lxml_9objectify_11BoolElement_1_init, METH_NOARGS, 0},
33921   {0, 0, 0, 0}
33922 };
33923
33924 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
33925   {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, (char *)0, 0},
33926   {0, 0, 0, 0, 0}
33927 };
33928
33929 static PyNumberMethods __pyx_tp_as_number_BoolElement = {
33930   #if CYTHON_COMPILING_IN_PYPY
33931   __pyx_pw_4lxml_9objectify_13NumberElement_23__add__, /*nb_add*/
33932   #else
33933   0, /*nb_add*/
33934   #endif
33935   #if CYTHON_COMPILING_IN_PYPY
33936   __pyx_pw_4lxml_9objectify_13NumberElement_25__sub__, /*nb_subtract*/
33937   #else
33938   0, /*nb_subtract*/
33939   #endif
33940   #if CYTHON_COMPILING_IN_PYPY
33941   __pyx_pw_4lxml_9objectify_13NumberElement_27__mul__, /*nb_multiply*/
33942   #else
33943   0, /*nb_multiply*/
33944   #endif
33945   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
33946   #if CYTHON_COMPILING_IN_PYPY
33947   __pyx_pw_4lxml_9objectify_13NumberElement_29__div__, /*nb_divide*/
33948   #else
33949   0, /*nb_divide*/
33950   #endif
33951   #endif
33952   #if CYTHON_COMPILING_IN_PYPY
33953   __pyx_pw_4lxml_9objectify_13NumberElement_33__mod__, /*nb_remainder*/
33954   #else
33955   0, /*nb_remainder*/
33956   #endif
33957   0, /*nb_divmod*/
33958   #if CYTHON_COMPILING_IN_PYPY
33959   __pyx_pw_4lxml_9objectify_13NumberElement_35__pow__, /*nb_power*/
33960   #else
33961   0, /*nb_power*/
33962   #endif
33963   #if CYTHON_COMPILING_IN_PYPY
33964   __pyx_pw_4lxml_9objectify_13NumberElement_37__neg__, /*nb_negative*/
33965   #else
33966   0, /*nb_negative*/
33967   #endif
33968   #if CYTHON_COMPILING_IN_PYPY
33969   __pyx_pw_4lxml_9objectify_13NumberElement_39__pos__, /*nb_positive*/
33970   #else
33971   0, /*nb_positive*/
33972   #endif
33973   #if CYTHON_COMPILING_IN_PYPY
33974   __pyx_pw_4lxml_9objectify_13NumberElement_41__abs__, /*nb_absolute*/
33975   #else
33976   0, /*nb_absolute*/
33977   #endif
33978   __pyx_pw_4lxml_9objectify_11BoolElement_3__nonzero__, /*nb_nonzero*/
33979   #if CYTHON_COMPILING_IN_PYPY
33980   __pyx_pw_4lxml_9objectify_13NumberElement_45__invert__, /*nb_invert*/
33981   #else
33982   0, /*nb_invert*/
33983   #endif
33984   #if CYTHON_COMPILING_IN_PYPY
33985   __pyx_pw_4lxml_9objectify_13NumberElement_47__lshift__, /*nb_lshift*/
33986   #else
33987   0, /*nb_lshift*/
33988   #endif
33989   #if CYTHON_COMPILING_IN_PYPY
33990   __pyx_pw_4lxml_9objectify_13NumberElement_49__rshift__, /*nb_rshift*/
33991   #else
33992   0, /*nb_rshift*/
33993   #endif
33994   #if CYTHON_COMPILING_IN_PYPY
33995   __pyx_pw_4lxml_9objectify_13NumberElement_51__and__, /*nb_and*/
33996   #else
33997   0, /*nb_and*/
33998   #endif
33999   #if CYTHON_COMPILING_IN_PYPY
34000   __pyx_pw_4lxml_9objectify_13NumberElement_55__xor__, /*nb_xor*/
34001   #else
34002   0, /*nb_xor*/
34003   #endif
34004   #if CYTHON_COMPILING_IN_PYPY
34005   __pyx_pw_4lxml_9objectify_13NumberElement_53__or__, /*nb_or*/
34006   #else
34007   0, /*nb_or*/
34008   #endif
34009   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34010   0, /*nb_coerce*/
34011   #endif
34012   #if CYTHON_COMPILING_IN_PYPY
34013   __pyx_pw_4lxml_9objectify_13NumberElement_3__int__, /*nb_int*/
34014   #else
34015   0, /*nb_int*/
34016   #endif
34017   #if PY_MAJOR_VERSION < 3
34018   #if CYTHON_COMPILING_IN_PYPY
34019   __pyx_pw_4lxml_9objectify_13NumberElement_5__long__, /*nb_long*/
34020   #else
34021   0, /*nb_long*/
34022   #endif
34023   #else
34024   0, /*reserved*/
34025   #endif
34026   #if CYTHON_COMPILING_IN_PYPY
34027   __pyx_pw_4lxml_9objectify_13NumberElement_7__float__, /*nb_float*/
34028   #else
34029   0, /*nb_float*/
34030   #endif
34031   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34032   #if CYTHON_COMPILING_IN_PYPY
34033   __pyx_pw_4lxml_9objectify_13NumberElement_15__oct__, /*nb_oct*/
34034   #else
34035   0, /*nb_oct*/
34036   #endif
34037   #endif
34038   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34039   #if CYTHON_COMPILING_IN_PYPY
34040   __pyx_pw_4lxml_9objectify_13NumberElement_17__hex__, /*nb_hex*/
34041   #else
34042   0, /*nb_hex*/
34043   #endif
34044   #endif
34045   0, /*nb_inplace_add*/
34046   0, /*nb_inplace_subtract*/
34047   0, /*nb_inplace_multiply*/
34048   #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
34049   0, /*nb_inplace_divide*/
34050   #endif
34051   0, /*nb_inplace_remainder*/
34052   0, /*nb_inplace_power*/
34053   0, /*nb_inplace_lshift*/
34054   0, /*nb_inplace_rshift*/
34055   0, /*nb_inplace_and*/
34056   0, /*nb_inplace_xor*/
34057   0, /*nb_inplace_or*/
34058   0, /*nb_floor_divide*/
34059   #if CYTHON_COMPILING_IN_PYPY
34060   __pyx_pw_4lxml_9objectify_13NumberElement_31__truediv__, /*nb_true_divide*/
34061   #else
34062   0, /*nb_true_divide*/
34063   #endif
34064   0, /*nb_inplace_floor_divide*/
34065   0, /*nb_inplace_true_divide*/
34066   #if CYTHON_COMPILING_IN_PYPY
34067   __pyx_pw_4lxml_9objectify_10IntElement_3__index__, /*nb_index*/
34068   #else
34069   0, /*nb_index*/
34070   #endif
34071   #if PY_VERSION_HEX >= 0x03050000
34072   0, /*nb_matrix_multiply*/
34073   #endif
34074   #if PY_VERSION_HEX >= 0x03050000
34075   0, /*nb_inplace_matrix_multiply*/
34076   #endif
34077 };
34078
34079 static PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
34080   PyVarObject_HEAD_INIT(0, 0)
34081   "lxml.objectify.BoolElement", /*tp_name*/
34082   sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
34083   0, /*tp_itemsize*/
34084   __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
34085   #if PY_VERSION_HEX < 0x030800b4
34086   0, /*tp_print*/
34087   #endif
34088   #if PY_VERSION_HEX >= 0x030800b4
34089   0, /*tp_vectorcall_offset*/
34090   #endif
34091   0, /*tp_getattr*/
34092   0, /*tp_setattr*/
34093   #if PY_MAJOR_VERSION < 3
34094   0, /*tp_compare*/
34095   #endif
34096   #if PY_MAJOR_VERSION >= 3
34097   0, /*tp_as_async*/
34098   #endif
34099   __pyx_pw_4lxml_9objectify_11BoolElement_11__repr__, /*tp_repr*/
34100   &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
34101   0, /*tp_as_sequence*/
34102   0, /*tp_as_mapping*/
34103   __pyx_pw_4lxml_9objectify_11BoolElement_7__hash__, /*tp_hash*/
34104   0, /*tp_call*/
34105   __pyx_pw_4lxml_9objectify_11BoolElement_9__str__, /*tp_str*/
34106   0, /*tp_getattro*/
34107   0, /*tp_setattro*/
34108   0, /*tp_as_buffer*/
34109   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34110   "Boolean type base on string values: 'true' or 'false'.\n\n    Note that this inherits from IntElement to mimic the behaviour of\n    Python's bool type.\n    ", /*tp_doc*/
34111   __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
34112   __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
34113   __pyx_pw_4lxml_9objectify_11BoolElement_5__richcmp__, /*tp_richcompare*/
34114   0, /*tp_weaklistoffset*/
34115   #if CYTHON_COMPILING_IN_PYPY
34116   __pyx_pw_4lxml_9objectify_18ObjectifiedElement_1__iter__, /*tp_iter*/
34117   #else
34118   0, /*tp_iter*/
34119   #endif
34120   0, /*tp_iternext*/
34121   __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
34122   0, /*tp_members*/
34123   __pyx_getsets_4lxml_9objectify_BoolElement, /*tp_getset*/
34124   0, /*tp_base*/
34125   0, /*tp_dict*/
34126   0, /*tp_descr_get*/
34127   0, /*tp_descr_set*/
34128   0, /*tp_dictoffset*/
34129   0, /*tp_init*/
34130   0, /*tp_alloc*/
34131   __pyx_tp_new_4lxml_9objectify_BoolElement, /*tp_new*/
34132   0, /*tp_free*/
34133   0, /*tp_is_gc*/
34134   0, /*tp_bases*/
34135   0, /*tp_mro*/
34136   0, /*tp_cache*/
34137   0, /*tp_subclasses*/
34138   0, /*tp_weaklist*/
34139   0, /*tp_del*/
34140   0, /*tp_version_tag*/
34141   #if PY_VERSION_HEX >= 0x030400a1
34142   0, /*tp_finalize*/
34143   #endif
34144   #if PY_VERSION_HEX >= 0x030800b1
34145   0, /*tp_vectorcall*/
34146   #endif
34147   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34148   0, /*tp_print*/
34149   #endif
34150 };
34151
34152 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34153   struct __pyx_obj_4lxml_9objectify_PyType *p;
34154   PyObject *o;
34155   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34156     o = (*t->tp_alloc)(t, 0);
34157   } else {
34158     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34159   }
34160   if (unlikely(!o)) return 0;
34161   p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
34162   p->name = Py_None; Py_INCREF(Py_None);
34163   p->type_check = Py_None; Py_INCREF(Py_None);
34164   p->stringify = Py_None; Py_INCREF(Py_None);
34165   p->_type = Py_None; Py_INCREF(Py_None);
34166   p->_schema_types = ((PyObject*)Py_None); Py_INCREF(Py_None);
34167   return o;
34168 }
34169
34170 static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
34171   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34172   #if CYTHON_USE_TP_FINALIZE
34173   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34174     if (PyObject_CallFinalizerFromDealloc(o)) return;
34175   }
34176   #endif
34177   PyObject_GC_UnTrack(o);
34178   Py_CLEAR(p->name);
34179   Py_CLEAR(p->type_check);
34180   Py_CLEAR(p->stringify);
34181   Py_CLEAR(p->_type);
34182   Py_CLEAR(p->_schema_types);
34183   (*Py_TYPE(o)->tp_free)(o);
34184 }
34185
34186 static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
34187   int e;
34188   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34189   if (p->name) {
34190     e = (*v)(p->name, a); if (e) return e;
34191   }
34192   if (p->type_check) {
34193     e = (*v)(p->type_check, a); if (e) return e;
34194   }
34195   if (p->stringify) {
34196     e = (*v)(p->stringify, a); if (e) return e;
34197   }
34198   if (p->_type) {
34199     e = (*v)(p->_type, a); if (e) return e;
34200   }
34201   if (p->_schema_types) {
34202     e = (*v)(p->_schema_types, a); if (e) return e;
34203   }
34204   return 0;
34205 }
34206
34207 static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
34208   struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
34209   Py_CLEAR(p->name);
34210   Py_CLEAR(p->type_check);
34211   Py_CLEAR(p->stringify);
34212   Py_CLEAR(p->_type);
34213   Py_CLEAR(p->_schema_types);
34214   return 0;
34215 }
34216
34217 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, CYTHON_UNUSED void *x) {
34218   return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_1__get__(o);
34219 }
34220
34221 static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34222   if (v) {
34223     return __pyx_pw_4lxml_9objectify_6PyType_14xmlSchemaTypes_3__set__(o, v);
34224   }
34225   else {
34226     PyErr_SetString(PyExc_NotImplementedError, "__del__");
34227     return -1;
34228   }
34229 }
34230
34231 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_name(PyObject *o, CYTHON_UNUSED void *x) {
34232   return __pyx_pw_4lxml_9objectify_6PyType_4name_1__get__(o);
34233 }
34234
34235 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_type_check(PyObject *o, CYTHON_UNUSED void *x) {
34236   return __pyx_pw_4lxml_9objectify_6PyType_10type_check_1__get__(o);
34237 }
34238
34239 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_stringify(PyObject *o, CYTHON_UNUSED void *x) {
34240   return __pyx_pw_4lxml_9objectify_6PyType_9stringify_1__get__(o);
34241 }
34242
34243 static PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
34244   {"register", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_6PyType_5register, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_6PyType_4register},
34245   {"unregister", (PyCFunction)__pyx_pw_4lxml_9objectify_6PyType_7unregister, METH_NOARGS, __pyx_doc_4lxml_9objectify_6PyType_6unregister},
34246   {0, 0, 0, 0}
34247 };
34248
34249 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
34250   {(char *)"xmlSchemaTypes", __pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes, (char *)"The list of XML Schema datatypes this Python type maps to.\n\n        Note that this must be set before registering the type!\n        ", 0},
34251   {(char *)"name", __pyx_getprop_4lxml_9objectify_6PyType_name, 0, (char *)0, 0},
34252   {(char *)"type_check", __pyx_getprop_4lxml_9objectify_6PyType_type_check, 0, (char *)0, 0},
34253   {(char *)"stringify", __pyx_getprop_4lxml_9objectify_6PyType_stringify, 0, (char *)0, 0},
34254   {0, 0, 0, 0, 0}
34255 };
34256
34257 static PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
34258   PyVarObject_HEAD_INIT(0, 0)
34259   "lxml.objectify.PyType", /*tp_name*/
34260   sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
34261   0, /*tp_itemsize*/
34262   __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
34263   #if PY_VERSION_HEX < 0x030800b4
34264   0, /*tp_print*/
34265   #endif
34266   #if PY_VERSION_HEX >= 0x030800b4
34267   0, /*tp_vectorcall_offset*/
34268   #endif
34269   0, /*tp_getattr*/
34270   0, /*tp_setattr*/
34271   #if PY_MAJOR_VERSION < 3
34272   0, /*tp_compare*/
34273   #endif
34274   #if PY_MAJOR_VERSION >= 3
34275   0, /*tp_as_async*/
34276   #endif
34277   __pyx_pw_4lxml_9objectify_6PyType_3__repr__, /*tp_repr*/
34278   0, /*tp_as_number*/
34279   0, /*tp_as_sequence*/
34280   0, /*tp_as_mapping*/
34281   0, /*tp_hash*/
34282   0, /*tp_call*/
34283   0, /*tp_str*/
34284   0, /*tp_getattro*/
34285   0, /*tp_setattro*/
34286   0, /*tp_as_buffer*/
34287   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34288   "PyType(self, name, type_check, type_class, stringify=None)\n    User defined type.\n\n    Named type that contains a type check function, a type class that\n    inherits from ObjectifiedDataElement and an optional \"stringification\"\n    function.  The type check must take a string as argument and raise\n    ValueError or TypeError if it cannot handle the string value.  It may be\n    None in which case it is not considered for type guessing.  For registered\n    named types, the 'stringify' function (or unicode() if None) is used to\n    convert a Python object with type name 'name' to the string representation\n    stored in the XML tree.\n\n    Example::\n\n        PyType('int', int, MyIntClass).register()\n\n    Note that the order in which types are registered matters.  The first\n    matching type will be used.\n    ", /*tp_doc*/
34289   __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
34290   __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
34291   0, /*tp_richcompare*/
34292   0, /*tp_weaklistoffset*/
34293   0, /*tp_iter*/
34294   0, /*tp_iternext*/
34295   __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
34296   0, /*tp_members*/
34297   __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
34298   0, /*tp_base*/
34299   0, /*tp_dict*/
34300   0, /*tp_descr_get*/
34301   0, /*tp_descr_set*/
34302   0, /*tp_dictoffset*/
34303   __pyx_pw_4lxml_9objectify_6PyType_1__init__, /*tp_init*/
34304   0, /*tp_alloc*/
34305   __pyx_tp_new_4lxml_9objectify_PyType, /*tp_new*/
34306   0, /*tp_free*/
34307   0, /*tp_is_gc*/
34308   0, /*tp_bases*/
34309   0, /*tp_mro*/
34310   0, /*tp_cache*/
34311   0, /*tp_subclasses*/
34312   0, /*tp_weaklist*/
34313   0, /*tp_del*/
34314   0, /*tp_version_tag*/
34315   #if PY_VERSION_HEX >= 0x030400a1
34316   0, /*tp_finalize*/
34317   #endif
34318   #if PY_VERSION_HEX >= 0x030800b1
34319   0, /*tp_vectorcall*/
34320   #endif
34321   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34322   0, /*tp_print*/
34323   #endif
34324 };
34325
34326 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34327   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
34328   PyObject *o;
34329   o = (*t->tp_alloc)(t, 0);
34330   if (unlikely(!o)) return 0;
34331   p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
34332   p->_tag = Py_None; Py_INCREF(Py_None);
34333   p->_nsmap = Py_None; Py_INCREF(Py_None);
34334   p->_element_factory = Py_None; Py_INCREF(Py_None);
34335   return o;
34336 }
34337
34338 static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
34339   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34340   PyObject_GC_UnTrack(o);
34341   Py_CLEAR(p->_tag);
34342   Py_CLEAR(p->_nsmap);
34343   Py_CLEAR(p->_element_factory);
34344   (*Py_TYPE(o)->tp_free)(o);
34345 }
34346
34347 static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
34348   int e;
34349   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34350   if (p->_tag) {
34351     e = (*v)(p->_tag, a); if (e) return e;
34352   }
34353   if (p->_nsmap) {
34354     e = (*v)(p->_nsmap, a); if (e) return e;
34355   }
34356   if (p->_element_factory) {
34357     e = (*v)(p->_element_factory, a); if (e) return e;
34358   }
34359   return 0;
34360 }
34361
34362 static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
34363   struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
34364   Py_CLEAR(p->_tag);
34365   Py_CLEAR(p->_nsmap);
34366   Py_CLEAR(p->_element_factory);
34367   return 0;
34368 }
34369
34370 static PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
34371   {0, 0, 0, 0}
34372 };
34373
34374 static PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
34375   PyVarObject_HEAD_INIT(0, 0)
34376   "lxml.objectify._ObjectifyElementMakerCaller", /*tp_name*/
34377   sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
34378   0, /*tp_itemsize*/
34379   __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
34380   #if PY_VERSION_HEX < 0x030800b4
34381   0, /*tp_print*/
34382   #endif
34383   #if PY_VERSION_HEX >= 0x030800b4
34384   0, /*tp_vectorcall_offset*/
34385   #endif
34386   0, /*tp_getattr*/
34387   0, /*tp_setattr*/
34388   #if PY_MAJOR_VERSION < 3
34389   0, /*tp_compare*/
34390   #endif
34391   #if PY_MAJOR_VERSION >= 3
34392   0, /*tp_as_async*/
34393   #endif
34394   0, /*tp_repr*/
34395   0, /*tp_as_number*/
34396   0, /*tp_as_sequence*/
34397   0, /*tp_as_mapping*/
34398   0, /*tp_hash*/
34399   __pyx_pw_4lxml_9objectify_28_ObjectifyElementMakerCaller_1__call__, /*tp_call*/
34400   0, /*tp_str*/
34401   0, /*tp_getattro*/
34402   0, /*tp_setattro*/
34403   0, /*tp_as_buffer*/
34404   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34405   0, /*tp_doc*/
34406   __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
34407   __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
34408   0, /*tp_richcompare*/
34409   0, /*tp_weaklistoffset*/
34410   0, /*tp_iter*/
34411   0, /*tp_iternext*/
34412   __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_methods*/
34413   0, /*tp_members*/
34414   0, /*tp_getset*/
34415   0, /*tp_base*/
34416   0, /*tp_dict*/
34417   0, /*tp_descr_get*/
34418   0, /*tp_descr_set*/
34419   0, /*tp_dictoffset*/
34420   0, /*tp_init*/
34421   0, /*tp_alloc*/
34422   __pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_new*/
34423   0, /*tp_free*/
34424   0, /*tp_is_gc*/
34425   0, /*tp_bases*/
34426   0, /*tp_mro*/
34427   0, /*tp_cache*/
34428   0, /*tp_subclasses*/
34429   0, /*tp_weaklist*/
34430   0, /*tp_del*/
34431   0, /*tp_version_tag*/
34432   #if PY_VERSION_HEX >= 0x030400a1
34433   0, /*tp_finalize*/
34434   #endif
34435   #if PY_VERSION_HEX >= 0x030800b1
34436   0, /*tp_vectorcall*/
34437   #endif
34438   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34439   0, /*tp_print*/
34440   #endif
34441 };
34442 static struct __pyx_vtabstruct_4lxml_9objectify_ElementMaker __pyx_vtable_4lxml_9objectify_ElementMaker;
34443
34444 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34445   struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
34446   PyObject *o;
34447   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34448     o = (*t->tp_alloc)(t, 0);
34449   } else {
34450     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34451   }
34452   if (unlikely(!o)) return 0;
34453   p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
34454   p->__pyx_vtab = __pyx_vtabptr_4lxml_9objectify_ElementMaker;
34455   p->_makeelement = Py_None; Py_INCREF(Py_None);
34456   p->_namespace = Py_None; Py_INCREF(Py_None);
34457   p->_nsmap = Py_None; Py_INCREF(Py_None);
34458   p->_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
34459   return o;
34460 }
34461
34462 static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
34463   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34464   #if CYTHON_USE_TP_FINALIZE
34465   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34466     if (PyObject_CallFinalizerFromDealloc(o)) return;
34467   }
34468   #endif
34469   PyObject_GC_UnTrack(o);
34470   Py_CLEAR(p->_makeelement);
34471   Py_CLEAR(p->_namespace);
34472   Py_CLEAR(p->_nsmap);
34473   Py_CLEAR(p->_cache);
34474   (*Py_TYPE(o)->tp_free)(o);
34475 }
34476
34477 static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
34478   int e;
34479   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34480   if (p->_makeelement) {
34481     e = (*v)(p->_makeelement, a); if (e) return e;
34482   }
34483   if (p->_namespace) {
34484     e = (*v)(p->_namespace, a); if (e) return e;
34485   }
34486   if (p->_nsmap) {
34487     e = (*v)(p->_nsmap, a); if (e) return e;
34488   }
34489   if (p->_cache) {
34490     e = (*v)(p->_cache, a); if (e) return e;
34491   }
34492   return 0;
34493 }
34494
34495 static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
34496   struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
34497   Py_CLEAR(p->_makeelement);
34498   Py_CLEAR(p->_namespace);
34499   Py_CLEAR(p->_nsmap);
34500   Py_CLEAR(p->_cache);
34501   return 0;
34502 }
34503
34504 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
34505   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
34506   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
34507     PyErr_Clear();
34508     v = __pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__(o, n);
34509   }
34510   return v;
34511 }
34512
34513 static PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
34514   {"__getattr__", (PyCFunction)__pyx_pw_4lxml_9objectify_12ElementMaker_3__getattr__, METH_O|METH_COEXIST, 0},
34515   {0, 0, 0, 0}
34516 };
34517
34518 static PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
34519   PyVarObject_HEAD_INIT(0, 0)
34520   "lxml.objectify.ElementMaker", /*tp_name*/
34521   sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
34522   0, /*tp_itemsize*/
34523   __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
34524   #if PY_VERSION_HEX < 0x030800b4
34525   0, /*tp_print*/
34526   #endif
34527   #if PY_VERSION_HEX >= 0x030800b4
34528   0, /*tp_vectorcall_offset*/
34529   #endif
34530   0, /*tp_getattr*/
34531   0, /*tp_setattr*/
34532   #if PY_MAJOR_VERSION < 3
34533   0, /*tp_compare*/
34534   #endif
34535   #if PY_MAJOR_VERSION >= 3
34536   0, /*tp_as_async*/
34537   #endif
34538   0, /*tp_repr*/
34539   0, /*tp_as_number*/
34540   0, /*tp_as_sequence*/
34541   0, /*tp_as_mapping*/
34542   0, /*tp_hash*/
34543   __pyx_pw_4lxml_9objectify_12ElementMaker_5__call__, /*tp_call*/
34544   0, /*tp_str*/
34545   __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
34546   0, /*tp_setattro*/
34547   0, /*tp_as_buffer*/
34548   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34549   "ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)\n\n    An ElementMaker that can be used for constructing trees.\n\n    Example::\n\n      >>> M = ElementMaker(annotate=False)\n      >>> attributes = {'class': 'par'}\n      >>> html = M.html( M.body( M.p('hello', attributes, M.br, 'objectify', style=\"font-weight: bold\") ) )\n\n      >>> from lxml.etree import tostring\n      >>> print(tostring(html, method='html').decode('ascii'))\n      <html><body><p style=\"font-weight: bold\" class=\"par\">hello<br>objectify</p></body></html>\n\n    To create tags that are not valid Python identifiers, call the factory\n    directly and pass the tag name as first argument::\n\n      >>> root = M('tricky-tag', 'some text')\n      >>> print(root.tag)\n      tricky-tag\n      >>> print(root.text)\n      some text\n\n    Note that this module has a predefined ElementMaker instance called ``E``.\n    ", /*tp_doc*/
34550   __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
34551   __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
34552   0, /*tp_richcompare*/
34553   0, /*tp_weaklistoffset*/
34554   0, /*tp_iter*/
34555   0, /*tp_iternext*/
34556   __pyx_methods_4lxml_9objectify_ElementMaker, /*tp_methods*/
34557   0, /*tp_members*/
34558   0, /*tp_getset*/
34559   0, /*tp_base*/
34560   0, /*tp_dict*/
34561   0, /*tp_descr_get*/
34562   0, /*tp_descr_set*/
34563   0, /*tp_dictoffset*/
34564   __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__, /*tp_init*/
34565   0, /*tp_alloc*/
34566   __pyx_tp_new_4lxml_9objectify_ElementMaker, /*tp_new*/
34567   0, /*tp_free*/
34568   0, /*tp_is_gc*/
34569   0, /*tp_bases*/
34570   0, /*tp_mro*/
34571   0, /*tp_cache*/
34572   0, /*tp_subclasses*/
34573   0, /*tp_weaklist*/
34574   0, /*tp_del*/
34575   0, /*tp_version_tag*/
34576   #if PY_VERSION_HEX >= 0x030400a1
34577   0, /*tp_finalize*/
34578   #endif
34579   #if PY_VERSION_HEX >= 0x030800b1
34580   0, /*tp_vectorcall*/
34581   #endif
34582   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34583   0, /*tp_print*/
34584   #endif
34585 };
34586
34587 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
34588   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
34589   PyObject *o = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_new(t, a, k);
34590   if (unlikely(!o)) return 0;
34591   p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
34592   p->empty_data_class = Py_None; Py_INCREF(Py_None);
34593   p->tree_class = Py_None; Py_INCREF(Py_None);
34594   return o;
34595 }
34596
34597 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
34598   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34599   #if CYTHON_USE_TP_FINALIZE
34600   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34601     if (PyObject_CallFinalizerFromDealloc(o)) return;
34602   }
34603   #endif
34604   PyObject_GC_UnTrack(o);
34605   Py_CLEAR(p->empty_data_class);
34606   Py_CLEAR(p->tree_class);
34607   #if CYTHON_USE_TYPE_SLOTS
34608   if (PyType_IS_GC(Py_TYPE(o)->tp_base))
34609   #endif
34610   PyObject_GC_Track(o);
34611   if (likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup)) __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup);
34612 }
34613
34614 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
34615   int e;
34616   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34617   e = ((likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup)) ? ((__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_traverse) ? __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup)); if (e) return e;
34618   if (p->empty_data_class) {
34619     e = (*v)(p->empty_data_class, a); if (e) return e;
34620   }
34621   if (p->tree_class) {
34622     e = (*v)(p->tree_class, a); if (e) return e;
34623   }
34624   return 0;
34625 }
34626
34627 static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
34628   struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
34629   if (likely(__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup)) { if (__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_clear) __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup);
34630   Py_CLEAR(p->empty_data_class);
34631   Py_CLEAR(p->tree_class);
34632   return 0;
34633 }
34634
34635 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
34636   {0, 0, 0, 0}
34637 };
34638
34639 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
34640   PyVarObject_HEAD_INIT(0, 0)
34641   "lxml.objectify.ObjectifyElementClassLookup", /*tp_name*/
34642   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
34643   0, /*tp_itemsize*/
34644   __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
34645   #if PY_VERSION_HEX < 0x030800b4
34646   0, /*tp_print*/
34647   #endif
34648   #if PY_VERSION_HEX >= 0x030800b4
34649   0, /*tp_vectorcall_offset*/
34650   #endif
34651   0, /*tp_getattr*/
34652   0, /*tp_setattr*/
34653   #if PY_MAJOR_VERSION < 3
34654   0, /*tp_compare*/
34655   #endif
34656   #if PY_MAJOR_VERSION >= 3
34657   0, /*tp_as_async*/
34658   #endif
34659   0, /*tp_repr*/
34660   0, /*tp_as_number*/
34661   0, /*tp_as_sequence*/
34662   0, /*tp_as_mapping*/
34663   0, /*tp_hash*/
34664   0, /*tp_call*/
34665   0, /*tp_str*/
34666   0, /*tp_getattro*/
34667   0, /*tp_setattro*/
34668   0, /*tp_as_buffer*/
34669   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34670   "ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)\n    Element class lookup method that uses the objectify classes.\n    ", /*tp_doc*/
34671   __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
34672   __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
34673   0, /*tp_richcompare*/
34674   0, /*tp_weaklistoffset*/
34675   0, /*tp_iter*/
34676   0, /*tp_iternext*/
34677   __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_methods*/
34678   0, /*tp_members*/
34679   0, /*tp_getset*/
34680   0, /*tp_base*/
34681   0, /*tp_dict*/
34682   0, /*tp_descr_get*/
34683   0, /*tp_descr_set*/
34684   0, /*tp_dictoffset*/
34685   __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__, /*tp_init*/
34686   0, /*tp_alloc*/
34687   __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_new*/
34688   0, /*tp_free*/
34689   0, /*tp_is_gc*/
34690   0, /*tp_bases*/
34691   0, /*tp_mro*/
34692   0, /*tp_cache*/
34693   0, /*tp_subclasses*/
34694   0, /*tp_weaklist*/
34695   0, /*tp_del*/
34696   0, /*tp_version_tag*/
34697   #if PY_VERSION_HEX >= 0x030400a1
34698   0, /*tp_finalize*/
34699   #endif
34700   #if PY_VERSION_HEX >= 0x030800b1
34701   0, /*tp_vectorcall*/
34702   #endif
34703   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34704   0, /*tp_print*/
34705   #endif
34706 };
34707
34708 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34709   struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
34710   PyObject *o;
34711   if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34712     o = (*t->tp_alloc)(t, 0);
34713   } else {
34714     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34715   }
34716   if (unlikely(!o)) return 0;
34717   p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
34718   p->find = Py_None; Py_INCREF(Py_None);
34719   p->_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
34720   p->_path_str = Py_None; Py_INCREF(Py_None);
34721   return o;
34722 }
34723
34724 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
34725   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34726   #if CYTHON_USE_TP_FINALIZE
34727   if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34728     if (PyObject_CallFinalizerFromDealloc(o)) return;
34729   }
34730   #endif
34731   PyObject_GC_UnTrack(o);
34732   {
34733     PyObject *etype, *eval, *etb;
34734     PyErr_Fetch(&etype, &eval, &etb);
34735     ++Py_REFCNT(o);
34736     __pyx_pw_4lxml_9objectify_10ObjectPath_3__dealloc__(o);
34737     --Py_REFCNT(o);
34738     PyErr_Restore(etype, eval, etb);
34739   }
34740   Py_CLEAR(p->find);
34741   Py_CLEAR(p->_path);
34742   Py_CLEAR(p->_path_str);
34743   (*Py_TYPE(o)->tp_free)(o);
34744 }
34745
34746 static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
34747   int e;
34748   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34749   if (p->find) {
34750     e = (*v)(p->find, a); if (e) return e;
34751   }
34752   if (p->_path) {
34753     e = (*v)(p->_path, a); if (e) return e;
34754   }
34755   if (p->_path_str) {
34756     e = (*v)(p->_path_str, a); if (e) return e;
34757   }
34758   return 0;
34759 }
34760
34761 static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
34762   struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
34763   Py_CLEAR(p->find);
34764   Py_CLEAR(p->_path);
34765   Py_CLEAR(p->_path_str);
34766   return 0;
34767 }
34768
34769 static PyObject *__pyx_getprop_4lxml_9objectify_10ObjectPath_find(PyObject *o, CYTHON_UNUSED void *x) {
34770   return __pyx_pw_4lxml_9objectify_10ObjectPath_4find_1__get__(o);
34771 }
34772
34773 static PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
34774   {"hasattr", (PyCFunction)__pyx_pw_4lxml_9objectify_10ObjectPath_9hasattr, METH_O, __pyx_doc_4lxml_9objectify_10ObjectPath_8hasattr},
34775   {"setattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_11setattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_10setattr},
34776   {"addattr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4lxml_9objectify_10ObjectPath_13addattr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4lxml_9objectify_10ObjectPath_12addattr},
34777   {0, 0, 0, 0}
34778 };
34779
34780 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectPath[] = {
34781   {(char *)"find", __pyx_getprop_4lxml_9objectify_10ObjectPath_find, 0, (char *)0, 0},
34782   {0, 0, 0, 0, 0}
34783 };
34784
34785 static PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
34786   PyVarObject_HEAD_INIT(0, 0)
34787   "lxml.objectify.ObjectPath", /*tp_name*/
34788   sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
34789   0, /*tp_itemsize*/
34790   __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
34791   #if PY_VERSION_HEX < 0x030800b4
34792   0, /*tp_print*/
34793   #endif
34794   #if PY_VERSION_HEX >= 0x030800b4
34795   0, /*tp_vectorcall_offset*/
34796   #endif
34797   0, /*tp_getattr*/
34798   0, /*tp_setattr*/
34799   #if PY_MAJOR_VERSION < 3
34800   0, /*tp_compare*/
34801   #endif
34802   #if PY_MAJOR_VERSION >= 3
34803   0, /*tp_as_async*/
34804   #endif
34805   0, /*tp_repr*/
34806   0, /*tp_as_number*/
34807   0, /*tp_as_sequence*/
34808   0, /*tp_as_mapping*/
34809   0, /*tp_hash*/
34810   __pyx_pw_4lxml_9objectify_10ObjectPath_7__call__, /*tp_call*/
34811   __pyx_pw_4lxml_9objectify_10ObjectPath_5__str__, /*tp_str*/
34812   0, /*tp_getattro*/
34813   0, /*tp_setattro*/
34814   0, /*tp_as_buffer*/
34815   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34816   "ObjectPath(path)\n    Immutable object that represents a compiled object path.\n\n    Example for a path: 'root.child[1].{other}child[25]'\n    ", /*tp_doc*/
34817   __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
34818   __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
34819   0, /*tp_richcompare*/
34820   0, /*tp_weaklistoffset*/
34821   0, /*tp_iter*/
34822   0, /*tp_iternext*/
34823   __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
34824   0, /*tp_members*/
34825   __pyx_getsets_4lxml_9objectify_ObjectPath, /*tp_getset*/
34826   0, /*tp_base*/
34827   0, /*tp_dict*/
34828   0, /*tp_descr_get*/
34829   0, /*tp_descr_set*/
34830   0, /*tp_dictoffset*/
34831   __pyx_pw_4lxml_9objectify_10ObjectPath_1__init__, /*tp_init*/
34832   0, /*tp_alloc*/
34833   __pyx_tp_new_4lxml_9objectify_ObjectPath, /*tp_new*/
34834   0, /*tp_free*/
34835   0, /*tp_is_gc*/
34836   0, /*tp_bases*/
34837   0, /*tp_mro*/
34838   0, /*tp_cache*/
34839   0, /*tp_subclasses*/
34840   0, /*tp_weaklist*/
34841   0, /*tp_del*/
34842   0, /*tp_version_tag*/
34843   #if PY_VERSION_HEX >= 0x030400a1
34844   0, /*tp_finalize*/
34845   #endif
34846   #if PY_VERSION_HEX >= 0x030800b1
34847   0, /*tp_vectorcall*/
34848   #endif
34849   #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
34850   0, /*tp_print*/
34851   #endif
34852 };
34853
34854 static PyMethodDef __pyx_methods[] = {
34855   {0, 0, 0, 0}
34856 };
34857
34858 #if PY_MAJOR_VERSION >= 3
34859 #if CYTHON_PEP489_MULTI_PHASE_INIT
34860 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
34861 static int __pyx_pymod_exec_objectify(PyObject* module); /*proto*/
34862 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
34863   {Py_mod_create, (void*)__pyx_pymod_create},
34864   {Py_mod_exec, (void*)__pyx_pymod_exec_objectify},
34865   {0, NULL}
34866 };
34867 #endif
34868
34869 static struct PyModuleDef __pyx_moduledef = {
34870     PyModuleDef_HEAD_INIT,
34871     "objectify",
34872     __pyx_k_The_lxml_objectify_module_imple, /* m_doc */
34873   #if CYTHON_PEP489_MULTI_PHASE_INIT
34874     0, /* m_size */
34875   #else
34876     -1, /* m_size */
34877   #endif
34878     __pyx_methods /* m_methods */,
34879   #if CYTHON_PEP489_MULTI_PHASE_INIT
34880     __pyx_moduledef_slots, /* m_slots */
34881   #else
34882     NULL, /* m_reload */
34883   #endif
34884     NULL, /* m_traverse */
34885     NULL, /* m_clear */
34886     (freefunc)__pyx_module_cleanup /* m_free */
34887 };
34888 #endif
34889 #ifndef CYTHON_SMALL_CODE
34890 #if defined(__clang__)
34891     #define CYTHON_SMALL_CODE
34892 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
34893     #define CYTHON_SMALL_CODE __attribute__((cold))
34894 #else
34895     #define CYTHON_SMALL_CODE
34896 #endif
34897 #endif
34898
34899 static __Pyx_StringTabEntry __pyx_string_tab[] = {
34900   {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
34901   {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
34902   {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
34903   {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
34904   {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
34905   {&__pyx_n_s_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 0, 0, 1, 1},
34906   {&__pyx_n_u_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 0, 1, 0, 1},
34907   {&__pyx_n_s_BoolElement__init, __pyx_k_BoolElement__init, sizeof(__pyx_k_BoolElement__init), 0, 0, 1, 1},
34908   {&__pyx_kp_u_Cannot_register_tree_type, __pyx_k_Cannot_register_tree_type, sizeof(__pyx_k_Cannot_register_tree_type), 0, 1, 0, 0},
34909   {&__pyx_n_s_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 0, 0, 1, 1},
34910   {&__pyx_n_u_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 0, 1, 0, 1},
34911   {&__pyx_kp_u_Data_classes_must_inherit_from_O, __pyx_k_Data_classes_must_inherit_from_O, sizeof(__pyx_k_Data_classes_must_inherit_from_O), 0, 1, 0, 0},
34912   {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
34913   {&__pyx_n_u_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 1, 0, 1},
34914   {&__pyx_n_u_ENTITY, __pyx_k_ENTITY, sizeof(__pyx_k_ENTITY), 0, 1, 0, 1},
34915   {&__pyx_n_s_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 0, 1, 1},
34916   {&__pyx_n_u_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 1, 0, 1},
34917   {&__pyx_n_s_ElementChildIterator, __pyx_k_ElementChildIterator, sizeof(__pyx_k_ElementChildIterator), 0, 0, 1, 1},
34918   {&__pyx_n_s_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 0, 0, 1, 1},
34919   {&__pyx_n_u_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 0, 1, 0, 1},
34920   {&__pyx_n_s_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 0, 0, 1, 1},
34921   {&__pyx_n_s_ElementTree_2, __pyx_k_ElementTree_2, sizeof(__pyx_k_ElementTree_2), 0, 0, 1, 1},
34922   {&__pyx_n_s_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 0, 0, 1, 1},
34923   {&__pyx_n_u_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 0, 1, 0, 1},
34924   {&__pyx_n_s_FloatElement__init, __pyx_k_FloatElement__init, sizeof(__pyx_k_FloatElement__init), 0, 0, 1, 1},
34925   {&__pyx_n_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 0, 1, 0, 1},
34926   {&__pyx_n_u_IDREF, __pyx_k_IDREF, sizeof(__pyx_k_IDREF), 0, 1, 0, 1},
34927   {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
34928   {&__pyx_n_s_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 0, 0, 1, 1},
34929   {&__pyx_n_u_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 0, 1, 0, 1},
34930   {&__pyx_n_s_IntElement__init, __pyx_k_IntElement__init, sizeof(__pyx_k_IntElement__init), 0, 0, 1, 1},
34931   {&__pyx_kp_u_Invalid_boolean_value, __pyx_k_Invalid_boolean_value, sizeof(__pyx_k_Invalid_boolean_value), 0, 1, 0, 0},
34932   {&__pyx_kp_u_Invalid_slice, __pyx_k_Invalid_slice, sizeof(__pyx_k_Invalid_slice), 0, 1, 0, 0},
34933   {&__pyx_n_s_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 0, 0, 1, 1},
34934   {&__pyx_n_u_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 0, 1, 0, 1},
34935   {&__pyx_n_s_LongElement__init, __pyx_k_LongElement__init, sizeof(__pyx_k_LongElement__init), 0, 0, 1, 1},
34936   {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
34937   {&__pyx_n_u_NCName, __pyx_k_NCName, sizeof(__pyx_k_NCName), 0, 1, 0, 1},
34938   {&__pyx_n_u_NMTOKEN, __pyx_k_NMTOKEN, sizeof(__pyx_k_NMTOKEN), 0, 1, 0, 1},
34939   {&__pyx_n_u_Name, __pyx_k_Name, sizeof(__pyx_k_Name), 0, 1, 0, 1},
34940   {&__pyx_n_s_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 0, 1, 1},
34941   {&__pyx_n_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 1},
34942   {&__pyx_n_s_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 0, 0, 1, 1},
34943   {&__pyx_n_u_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 0, 1, 0, 1},
34944   {&__pyx_n_s_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 0, 1, 1},
34945   {&__pyx_n_u_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 0, 1, 0, 1},
34946   {&__pyx_n_s_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 0, 0, 1, 1},
34947   {&__pyx_n_u_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 0, 1, 0, 1},
34948   {&__pyx_n_s_NumberElement___complex, __pyx_k_NumberElement___complex, sizeof(__pyx_k_NumberElement___complex), 0, 0, 1, 1},
34949   {&__pyx_n_s_NumberElement__setValueParser, __pyx_k_NumberElement__setValueParser, sizeof(__pyx_k_NumberElement__setValueParser), 0, 0, 1, 1},
34950   {&__pyx_n_s_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 0, 0, 1, 1},
34951   {&__pyx_n_u_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 0, 1, 0, 1},
34952   {&__pyx_n_s_ObjectPath_addattr, __pyx_k_ObjectPath_addattr, sizeof(__pyx_k_ObjectPath_addattr), 0, 0, 1, 1},
34953   {&__pyx_n_s_ObjectPath_hasattr, __pyx_k_ObjectPath_hasattr, sizeof(__pyx_k_ObjectPath_hasattr), 0, 0, 1, 1},
34954   {&__pyx_n_s_ObjectPath_setattr, __pyx_k_ObjectPath_setattr, sizeof(__pyx_k_ObjectPath_setattr), 0, 0, 1, 1},
34955   {&__pyx_n_s_ObjectifiedDataElement, __pyx_k_ObjectifiedDataElement, sizeof(__pyx_k_ObjectifiedDataElement), 0, 0, 1, 1},
34956   {&__pyx_n_u_ObjectifiedDataElement, __pyx_k_ObjectifiedDataElement, sizeof(__pyx_k_ObjectifiedDataElement), 0, 1, 0, 1},
34957   {&__pyx_n_s_ObjectifiedDataElement__setText, __pyx_k_ObjectifiedDataElement__setText, sizeof(__pyx_k_ObjectifiedDataElement__setText), 0, 0, 1, 1},
34958   {&__pyx_n_s_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 0, 0, 1, 1},
34959   {&__pyx_n_u_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 0, 1, 0, 1},
34960   {&__pyx_n_s_ObjectifiedElement___reduce, __pyx_k_ObjectifiedElement___reduce, sizeof(__pyx_k_ObjectifiedElement___reduce), 0, 0, 1, 1},
34961   {&__pyx_n_s_ObjectifiedElement_addattr, __pyx_k_ObjectifiedElement_addattr, sizeof(__pyx_k_ObjectifiedElement_addattr), 0, 0, 1, 1},
34962   {&__pyx_n_s_ObjectifiedElement_countchildren, __pyx_k_ObjectifiedElement_countchildren, sizeof(__pyx_k_ObjectifiedElement_countchildren), 0, 0, 1, 1},
34963   {&__pyx_n_s_ObjectifiedElement_descendantpat, __pyx_k_ObjectifiedElement_descendantpat, sizeof(__pyx_k_ObjectifiedElement_descendantpat), 0, 0, 1, 1},
34964   {&__pyx_n_s_ObjectifiedElement_getchildren, __pyx_k_ObjectifiedElement_getchildren, sizeof(__pyx_k_ObjectifiedElement_getchildren), 0, 0, 1, 1},
34965   {&__pyx_n_s_ObjectifyElementClassLookup, __pyx_k_ObjectifyElementClassLookup, sizeof(__pyx_k_ObjectifyElementClassLookup), 0, 0, 1, 1},
34966   {&__pyx_n_u_ObjectifyElementClassLookup, __pyx_k_ObjectifyElementClassLookup, sizeof(__pyx_k_ObjectifyElementClassLookup), 0, 1, 0, 1},
34967   {&__pyx_n_s_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 0, 0, 1, 1},
34968   {&__pyx_n_u_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 0, 1, 0, 1},
34969   {&__pyx_n_s_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 0, 0, 1, 1},
34970   {&__pyx_n_u_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 0, 1, 0, 1},
34971   {&__pyx_n_s_PyType_register, __pyx_k_PyType_register, sizeof(__pyx_k_PyType_register), 0, 0, 1, 1},
34972   {&__pyx_kp_s_PyType_s_s, __pyx_k_PyType_s_s, sizeof(__pyx_k_PyType_s_s), 0, 0, 1, 0},
34973   {&__pyx_n_s_PyType_unregister, __pyx_k_PyType_unregister, sizeof(__pyx_k_PyType_unregister), 0, 0, 1, 1},
34974   {&__pyx_n_s_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 0, 0, 1, 1},
34975   {&__pyx_n_u_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 0, 1, 0, 1},
34976   {&__pyx_n_s_StringElement___complex, __pyx_k_StringElement___complex, sizeof(__pyx_k_StringElement___complex), 0, 0, 1, 1},
34977   {&__pyx_n_s_StringElement_strlen, __pyx_k_StringElement_strlen, sizeof(__pyx_k_StringElement_strlen), 0, 0, 1, 1},
34978   {&__pyx_n_s_SubElement, __pyx_k_SubElement, sizeof(__pyx_k_SubElement), 0, 0, 1, 1},
34979   {&__pyx_n_u_SubElement, __pyx_k_SubElement, sizeof(__pyx_k_SubElement), 0, 1, 0, 1},
34980   {&__pyx_n_u_TREE, __pyx_k_TREE, sizeof(__pyx_k_TREE), 0, 1, 0, 1},
34981   {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
34982   {&__pyx_kp_u_Type_check_function_must_be_call, __pyx_k_Type_check_function_must_be_call, sizeof(__pyx_k_Type_check_function_must_be_call), 0, 1, 0, 0},
34983   {&__pyx_kp_u_Type_name_must_be_a_string, __pyx_k_Type_name_must_be_a_string, sizeof(__pyx_k_Type_name_must_be_a_string), 0, 1, 0, 0},
34984   {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
34985   {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
34986   {&__pyx_n_s_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 0, 0, 1, 1},
34987   {&__pyx_n_u_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 0, 1, 0, 1},
34988   {&__pyx_n_s_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 0, 0, 1, 1},
34989   {&__pyx_kp_u_XSD_types_require_the_XSD_namesp, __pyx_k_XSD_types_require_the_XSD_namesp, sizeof(__pyx_k_XSD_types_require_the_XSD_namesp), 0, 1, 0, 0},
34990   {&__pyx_kp_u__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 1, 0, 0},
34991   {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
34992   {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
34993   {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
34994   {&__pyx_kp_u__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 1, 0, 0},
34995   {&__pyx_kp_u__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 1, 0, 0},
34996   {&__pyx_kp_b__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 0, 0},
34997   {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
34998   {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
34999   {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
35000   {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
35001   {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
35002   {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0},
35003   {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
35004   {&__pyx_kp_u__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 1, 0, 0},
35005   {&__pyx_n_s_addattr, __pyx_k_addattr, sizeof(__pyx_k_addattr), 0, 0, 1, 1},
35006   {&__pyx_n_s_addnext, __pyx_k_addnext, sizeof(__pyx_k_addnext), 0, 0, 1, 1},
35007   {&__pyx_n_s_after, __pyx_k_after, sizeof(__pyx_k_after), 0, 0, 1, 1},
35008   {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
35009   {&__pyx_n_s_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 0, 0, 1, 1},
35010   {&__pyx_n_u_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 0, 1, 0, 1},
35011   {&__pyx_n_s_annotate_pytype, __pyx_k_annotate_pytype, sizeof(__pyx_k_annotate_pytype), 0, 0, 1, 1},
35012   {&__pyx_n_s_annotate_xsi, __pyx_k_annotate_xsi, sizeof(__pyx_k_annotate_xsi), 0, 0, 1, 1},
35013   {&__pyx_kp_u_argument_of_makeelement_paramete, __pyx_k_argument_of_makeelement_paramete, sizeof(__pyx_k_argument_of_makeelement_paramete), 0, 1, 0, 0},
35014   {&__pyx_kp_u_assignment_to_root_element_is_in, __pyx_k_assignment_to_root_element_is_in, sizeof(__pyx_k_assignment_to_root_element_is_in), 0, 1, 0, 0},
35015   {&__pyx_kp_u_attempt_to_assign_sequence_of_si, __pyx_k_attempt_to_assign_sequence_of_si, sizeof(__pyx_k_attempt_to_assign_sequence_of_si), 0, 1, 0, 0},
35016   {&__pyx_n_s_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 0, 0, 1, 1},
35017   {&__pyx_kp_u_attribute, __pyx_k_attribute, sizeof(__pyx_k_attribute), 0, 1, 0, 0},
35018   {&__pyx_n_s_attribute_names, __pyx_k_attribute_names, sizeof(__pyx_k_attribute_names), 0, 0, 1, 1},
35019   {&__pyx_n_s_attribute_tag, __pyx_k_attribute_tag, sizeof(__pyx_k_attribute_tag), 0, 0, 1, 1},
35020   {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1},
35021   {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
35022   {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
35023   {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 1, 0, 1},
35024   {&__pyx_n_s_base_url, __pyx_k_base_url, sizeof(__pyx_k_base_url), 0, 0, 1, 1},
35025   {&__pyx_n_s_before, __pyx_k_before, sizeof(__pyx_k_before), 0, 0, 1, 1},
35026   {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 1, 0, 1},
35027   {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 0, 1, 0, 1},
35028   {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 1, 0, 1},
35029   {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
35030   {&__pyx_n_s_c_node, __pyx_k_c_node, sizeof(__pyx_k_c_node), 0, 0, 1, 1},
35031   {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
35032   {&__pyx_kp_u_cannot_update_root_node, __pyx_k_cannot_update_root_node, sizeof(__pyx_k_cannot_update_root_node), 0, 1, 0, 0},
35033   {&__pyx_n_s_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 0, 1, 1},
35034   {&__pyx_n_s_checkBool, __pyx_k_checkBool, sizeof(__pyx_k_checkBool), 0, 0, 1, 1},
35035   {&__pyx_n_s_cleanup_namespaces, __pyx_k_cleanup_namespaces, sizeof(__pyx_k_cleanup_namespaces), 0, 0, 1, 1},
35036   {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
35037   {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
35038   {&__pyx_n_s_complex, __pyx_k_complex, sizeof(__pyx_k_complex), 0, 0, 1, 1},
35039   {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
35040   {&__pyx_n_s_copy_reg, __pyx_k_copy_reg, sizeof(__pyx_k_copy_reg), 0, 0, 1, 1},
35041   {&__pyx_n_s_copyreg, __pyx_k_copyreg, sizeof(__pyx_k_copyreg), 0, 0, 1, 1},
35042   {&__pyx_n_s_countchildren, __pyx_k_countchildren, sizeof(__pyx_k_countchildren), 0, 0, 1, 1},
35043   {&__pyx_kp_u_creating_indexed_path_attributes, __pyx_k_creating_indexed_path_attributes, sizeof(__pyx_k_creating_indexed_path_attributes), 0, 1, 0, 0},
35044   {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
35045   {&__pyx_n_s_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 0, 0, 1, 1},
35046   {&__pyx_n_u_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 0, 1, 0, 1},
35047   {&__pyx_kp_u_deleting_items_not_supported_by, __pyx_k_deleting_items_not_supported_by, sizeof(__pyx_k_deleting_items_not_supported_by), 0, 1, 0, 0},
35048   {&__pyx_n_s_descendantpaths, __pyx_k_descendantpaths, sizeof(__pyx_k_descendantpaths), 0, 0, 1, 1},
35049   {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 1, 0, 1},
35050   {&__pyx_n_s_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 0, 1, 1},
35051   {&__pyx_n_u_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 0, 1, 0, 1},
35052   {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
35053   {&__pyx_n_s_element_or_tree, __pyx_k_element_or_tree, sizeof(__pyx_k_element_or_tree), 0, 0, 1, 1},
35054   {&__pyx_n_s_empty_data_class, __pyx_k_empty_data_class, sizeof(__pyx_k_empty_data_class), 0, 0, 1, 1},
35055   {&__pyx_n_s_empty_pytype, __pyx_k_empty_pytype, sizeof(__pyx_k_empty_pytype), 0, 0, 1, 1},
35056   {&__pyx_n_s_empty_type, __pyx_k_empty_type, sizeof(__pyx_k_empty_type), 0, 0, 1, 1},
35057   {&__pyx_n_s_enable_recursive_str, __pyx_k_enable_recursive_str, sizeof(__pyx_k_enable_recursive_str), 0, 0, 1, 1},
35058   {&__pyx_n_u_enable_recursive_str, __pyx_k_enable_recursive_str, sizeof(__pyx_k_enable_recursive_str), 0, 1, 0, 1},
35059   {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
35060   {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
35061   {&__pyx_n_s_entry, __pyx_k_entry, sizeof(__pyx_k_entry), 0, 0, 1, 1},
35062   {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
35063   {&__pyx_n_s_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 0, 0, 1, 1},
35064   {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
35065   {&__pyx_n_s_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 0, 1, 1},
35066   {&__pyx_n_u_false, __pyx_k_false, sizeof(__pyx_k_false), 0, 1, 0, 1},
35067   {&__pyx_n_s_first_pos, __pyx_k_first_pos, sizeof(__pyx_k_first_pos), 0, 0, 1, 1},
35068   {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 1, 0, 1},
35069   {&__pyx_n_s_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 0, 1, 1},
35070   {&__pyx_n_u_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 0, 1, 0, 1},
35071   {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
35072   {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
35073   {&__pyx_n_s_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 0, 0, 1, 1},
35074   {&__pyx_n_u_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 0, 1, 0, 1},
35075   {&__pyx_n_s_getattr, __pyx_k_getattr, sizeof(__pyx_k_getattr), 0, 0, 1, 1},
35076   {&__pyx_n_s_getchildren, __pyx_k_getchildren, sizeof(__pyx_k_getchildren), 0, 0, 1, 1},
35077   {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
35078   {&__pyx_n_s_getparent, __pyx_k_getparent, sizeof(__pyx_k_getparent), 0, 0, 1, 1},
35079   {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
35080   {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
35081   {&__pyx_n_s_hasattr, __pyx_k_hasattr, sizeof(__pyx_k_hasattr), 0, 0, 1, 1},
35082   {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
35083   {&__pyx_kp_u_http_codespeak_net_lxml_objectif, __pyx_k_http_codespeak_net_lxml_objectif, sizeof(__pyx_k_http_codespeak_net_lxml_objectif), 0, 1, 0, 0},
35084   {&__pyx_kp_u_http_www_w3_org_2001_XMLSchema, __pyx_k_http_www_w3_org_2001_XMLSchema, sizeof(__pyx_k_http_www_w3_org_2001_XMLSchema), 0, 1, 0, 0},
35085   {&__pyx_kp_u_http_www_w3_org_2001_XMLSchema_i, __pyx_k_http_www_w3_org_2001_XMLSchema_i, sizeof(__pyx_k_http_www_w3_org_2001_XMLSchema_i), 0, 1, 0, 0},
35086   {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
35087   {&__pyx_n_s_ignore_old, __pyx_k_ignore_old, sizeof(__pyx_k_ignore_old), 0, 0, 1, 1},
35088   {&__pyx_n_s_ignore_pytype, __pyx_k_ignore_pytype, sizeof(__pyx_k_ignore_pytype), 0, 0, 1, 1},
35089   {&__pyx_n_s_ignore_xsi, __pyx_k_ignore_xsi, sizeof(__pyx_k_ignore_xsi), 0, 0, 1, 1},
35090   {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
35091   {&__pyx_kp_u_inconsistent_before_after_depend, __pyx_k_inconsistent_before_after_depend, sizeof(__pyx_k_inconsistent_before_after_depend), 0, 1, 0, 0},
35092   {&__pyx_kp_u_index_must_be_enclosed_in, __pyx_k_index_must_be_enclosed_in, sizeof(__pyx_k_index_must_be_enclosed_in), 0, 1, 0, 0},
35093   {&__pyx_kp_u_index_not_allowed_on_root_node, __pyx_k_index_not_allowed_on_root_node, sizeof(__pyx_k_index_not_allowed_on_root_node), 0, 1, 0, 0},
35094   {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
35095   {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 1, 0, 1},
35096   {&__pyx_n_u_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 1, 0, 1},
35097   {&__pyx_kp_u_invalid_number_of_arguments_need, __pyx_k_invalid_number_of_arguments_need, sizeof(__pyx_k_invalid_number_of_arguments_need), 0, 1, 0, 0},
35098   {&__pyx_kp_u_invalid_path, __pyx_k_invalid_path, sizeof(__pyx_k_invalid_path), 0, 1, 0, 0},
35099   {&__pyx_kp_u_invalid_types_for_operator, __pyx_k_invalid_types_for_operator, sizeof(__pyx_k_invalid_types_for_operator), 0, 1, 0, 0},
35100   {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
35101   {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
35102   {&__pyx_n_s_iterchildren, __pyx_k_iterchildren, sizeof(__pyx_k_iterchildren), 0, 0, 1, 1},
35103   {&__pyx_n_s_known, __pyx_k_known, sizeof(__pyx_k_known), 0, 0, 1, 1},
35104   {&__pyx_n_s_kw, __pyx_k_kw, sizeof(__pyx_k_kw), 0, 0, 1, 1},
35105   {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 1, 0, 1},
35106   {&__pyx_n_s_last_pos, __pyx_k_last_pos, sizeof(__pyx_k_last_pos), 0, 0, 1, 1},
35107   {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 0, 1, 0, 1},
35108   {&__pyx_n_s_lower_bool, __pyx_k_lower_bool, sizeof(__pyx_k_lower_bool), 0, 0, 1, 1},
35109   {&__pyx_n_s_lxml, __pyx_k_lxml, sizeof(__pyx_k_lxml), 0, 0, 1, 1},
35110   {&__pyx_n_s_lxml_objectify, __pyx_k_lxml_objectify, sizeof(__pyx_k_lxml_objectify), 0, 0, 1, 1},
35111   {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
35112   {&__pyx_n_s_makeelement, __pyx_k_makeelement, sizeof(__pyx_k_makeelement), 0, 0, 1, 1},
35113   {&__pyx_n_s_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 0, 0, 1, 1},
35114   {&__pyx_n_u_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 0, 1, 0, 1},
35115   {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
35116   {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
35117   {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
35118   {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
35119   {&__pyx_n_s_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 0, 0, 1, 1},
35120   {&__pyx_n_u_negativeInteger, __pyx_k_negativeInteger, sizeof(__pyx_k_negativeInteger), 0, 1, 0, 1},
35121   {&__pyx_n_s_new_parser, __pyx_k_new_parser, sizeof(__pyx_k_new_parser), 0, 0, 1, 1},
35122   {&__pyx_kp_u_no_such_child, __pyx_k_no_such_child, sizeof(__pyx_k_no_such_child), 0, 1, 0, 0},
35123   {&__pyx_n_u_nonNegativeInteger, __pyx_k_nonNegativeInteger, sizeof(__pyx_k_nonNegativeInteger), 0, 1, 0, 1},
35124   {&__pyx_n_u_nonPositiveInteger, __pyx_k_nonPositiveInteger, sizeof(__pyx_k_nonPositiveInteger), 0, 1, 0, 1},
35125   {&__pyx_n_s_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 0, 1, 1},
35126   {&__pyx_n_u_none, __pyx_k_none, sizeof(__pyx_k_none), 0, 1, 0, 1},
35127   {&__pyx_n_u_normalizedString, __pyx_k_normalizedString, sizeof(__pyx_k_normalizedString), 0, 1, 0, 1},
35128   {&__pyx_n_s_ns, __pyx_k_ns, sizeof(__pyx_k_ns), 0, 0, 1, 1},
35129   {&__pyx_n_s_nsmap, __pyx_k_nsmap, sizeof(__pyx_k_nsmap), 0, 0, 1, 1},
35130   {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
35131   {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
35132   {&__pyx_kp_u_objects_is_not_writable, __pyx_k_objects_is_not_writable, sizeof(__pyx_k_objects_is_not_writable), 0, 1, 0, 0},
35133   {&__pyx_n_s_oct, __pyx_k_oct, sizeof(__pyx_k_oct), 0, 0, 1, 1},
35134   {&__pyx_kp_u_of, __pyx_k_of, sizeof(__pyx_k_of), 0, 1, 0, 0},
35135   {&__pyx_n_s_on, __pyx_k_on, sizeof(__pyx_k_on), 0, 0, 1, 1},
35136   {&__pyx_n_s_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 0, 1, 1},
35137   {&__pyx_n_u_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 0, 1, 0, 1},
35138   {&__pyx_n_s_parseBool, __pyx_k_parseBool, sizeof(__pyx_k_parseBool), 0, 0, 1, 1},
35139   {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
35140   {&__pyx_kp_u_parser_must_inherit_from_lxml_et, __pyx_k_parser_must_inherit_from_lxml_et, sizeof(__pyx_k_parser_must_inherit_from_lxml_et), 0, 1, 0, 0},
35141   {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
35142   {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
35143   {&__pyx_n_s_pickleReduceElementTree, __pyx_k_pickleReduceElementTree, sizeof(__pyx_k_pickleReduceElementTree), 0, 0, 1, 1},
35144   {&__pyx_n_u_positiveInteger, __pyx_k_positiveInteger, sizeof(__pyx_k_positiveInteger), 0, 1, 0, 1},
35145   {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
35146   {&__pyx_kp_u_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 1, 0, 0},
35147   {&__pyx_n_s_py_2, __pyx_k_py_2, sizeof(__pyx_k_py_2), 0, 0, 1, 1},
35148   {&__pyx_n_s_py_type, __pyx_k_py_type, sizeof(__pyx_k_py_type), 0, 0, 1, 1},
35149   {&__pyx_n_s_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 0, 0, 1, 1},
35150   {&__pyx_n_u_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 0, 1, 0, 1},
35151   {&__pyx_n_s_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 0, 0, 1, 1},
35152   {&__pyx_n_u_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 0, 1, 0, 1},
35153   {&__pyx_n_s_pytype_2, __pyx_k_pytype_2, sizeof(__pyx_k_pytype_2), 0, 0, 1, 1},
35154   {&__pyx_n_s_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 0, 0, 1, 1},
35155   {&__pyx_n_u_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 0, 1, 0, 1},
35156   {&__pyx_n_s_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 0, 1, 1},
35157   {&__pyx_n_u_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 0, 1, 0, 1},
35158   {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
35159   {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
35160   {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
35161   {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
35162   {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
35163   {&__pyx_n_s_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 0, 0, 1, 1},
35164   {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
35165   {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
35166   {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
35167   {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
35168   {&__pyx_kp_u_root_element_does_not_match_need, __pyx_k_root_element_does_not_match_need, sizeof(__pyx_k_root_element_does_not_match_need), 0, 1, 0, 0},
35169   {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
35170   {&__pyx_kp_u_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 1, 0, 0},
35171   {&__pyx_n_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 1},
35172   {&__pyx_kp_u_s_nil, __pyx_k_s_nil, sizeof(__pyx_k_s_nil), 0, 1, 0, 0},
35173   {&__pyx_kp_u_s_s_s_s_s_0_9_s, __pyx_k_s_s_s_s_s_0_9_s, sizeof(__pyx_k_s_s_s_s_s_0_9_s), 0, 1, 0, 0},
35174   {&__pyx_kp_u_s_type, __pyx_k_s_type, sizeof(__pyx_k_s_type), 0, 1, 0, 0},
35175   {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
35176   {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
35177   {&__pyx_n_s_setText, __pyx_k_setText, sizeof(__pyx_k_setText), 0, 0, 1, 1},
35178   {&__pyx_n_s_setValueParser, __pyx_k_setValueParser, sizeof(__pyx_k_setValueParser), 0, 0, 1, 1},
35179   {&__pyx_n_s_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 0, 0, 1, 1},
35180   {&__pyx_n_u_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 0, 1, 0, 1},
35181   {&__pyx_n_s_set_element_class_lookup, __pyx_k_set_element_class_lookup, sizeof(__pyx_k_set_element_class_lookup), 0, 0, 1, 1},
35182   {&__pyx_n_s_set_pytype_attribute_tag, __pyx_k_set_pytype_attribute_tag, sizeof(__pyx_k_set_pytype_attribute_tag), 0, 0, 1, 1},
35183   {&__pyx_n_u_set_pytype_attribute_tag, __pyx_k_set_pytype_attribute_tag, sizeof(__pyx_k_set_pytype_attribute_tag), 0, 1, 0, 1},
35184   {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
35185   {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 0, 1, 0, 1},
35186   {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
35187   {&__pyx_kp_s_src_lxml_objectify_pyx, __pyx_k_src_lxml_objectify_pyx, sizeof(__pyx_k_src_lxml_objectify_pyx), 0, 0, 1, 0},
35188   {&__pyx_kp_s_src_lxml_objectpath_pxi, __pyx_k_src_lxml_objectpath_pxi, sizeof(__pyx_k_src_lxml_objectpath_pxi), 0, 0, 1, 0},
35189   {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 1, 0, 1},
35190   {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 1},
35191   {&__pyx_n_s_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 0, 0, 1, 1},
35192   {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
35193   {&__pyx_n_s_strip_attributes, __pyx_k_strip_attributes, sizeof(__pyx_k_strip_attributes), 0, 0, 1, 1},
35194   {&__pyx_n_s_strlen, __pyx_k_strlen, sizeof(__pyx_k_strlen), 0, 0, 1, 1},
35195   {&__pyx_n_s_strval, __pyx_k_strval, sizeof(__pyx_k_strval), 0, 0, 1, 1},
35196   {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1},
35197   {&__pyx_n_u_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 1, 0, 1},
35198   {&__pyx_n_s_tag_2, __pyx_k_tag_2, sizeof(__pyx_k_tag_2), 0, 0, 1, 1},
35199   {&__pyx_n_u_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 1, 0, 1},
35200   {&__pyx_n_s_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 0, 1, 1},
35201   {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
35202   {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
35203   {&__pyx_n_u_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 1, 0, 1},
35204   {&__pyx_kp_u_to_extended_slice_of_size, __pyx_k_to_extended_slice_of_size, sizeof(__pyx_k_to_extended_slice_of_size), 0, 1, 0, 0},
35205   {&__pyx_n_u_token, __pyx_k_token, sizeof(__pyx_k_token), 0, 1, 0, 1},
35206   {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1},
35207   {&__pyx_n_s_tree_class, __pyx_k_tree_class, sizeof(__pyx_k_tree_class), 0, 0, 1, 1},
35208   {&__pyx_n_s_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 0, 1, 1},
35209   {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 0, 1, 0, 1},
35210   {&__pyx_n_s_type_check, __pyx_k_type_check, sizeof(__pyx_k_type_check), 0, 0, 1, 1},
35211   {&__pyx_n_s_type_class, __pyx_k_type_class, sizeof(__pyx_k_type_class), 0, 0, 1, 1},
35212   {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
35213   {&__pyx_kp_s_unicode_escape, __pyx_k_unicode_escape, sizeof(__pyx_k_unicode_escape), 0, 0, 1, 0},
35214   {&__pyx_n_s_unpickleElementTree, __pyx_k_unpickleElementTree, sizeof(__pyx_k_unpickleElementTree), 0, 0, 1, 1},
35215   {&__pyx_n_s_unregister, __pyx_k_unregister, sizeof(__pyx_k_unregister), 0, 0, 1, 1},
35216   {&__pyx_n_u_unsignedByte, __pyx_k_unsignedByte, sizeof(__pyx_k_unsignedByte), 0, 1, 0, 1},
35217   {&__pyx_n_u_unsignedInt, __pyx_k_unsignedInt, sizeof(__pyx_k_unsignedInt), 0, 1, 0, 1},
35218   {&__pyx_n_u_unsignedLong, __pyx_k_unsignedLong, sizeof(__pyx_k_unsignedLong), 0, 1, 0, 1},
35219   {&__pyx_n_u_unsignedShort, __pyx_k_unsignedShort, sizeof(__pyx_k_unsignedShort), 0, 1, 0, 1},
35220   {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
35221   {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
35222   {&__pyx_n_u_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 1, 0, 1},
35223   {&__pyx_n_s_value_2, __pyx_k_value_2, sizeof(__pyx_k_value_2), 0, 0, 1, 1},
35224   {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
35225   {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
35226   {&__pyx_n_s_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 0, 0, 1, 1},
35227   {&__pyx_n_s_xmlSchemaTypes, __pyx_k_xmlSchemaTypes, sizeof(__pyx_k_xmlSchemaTypes), 0, 0, 1, 1},
35228   {&__pyx_n_s_xs_type, __pyx_k_xs_type, sizeof(__pyx_k_xs_type), 0, 0, 1, 1},
35229   {&__pyx_kp_u_xsd, __pyx_k_xsd, sizeof(__pyx_k_xsd), 0, 1, 0, 0},
35230   {&__pyx_n_s_xsd_2, __pyx_k_xsd_2, sizeof(__pyx_k_xsd_2), 0, 0, 1, 1},
35231   {&__pyx_kp_u_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 0, 1, 0, 0},
35232   {&__pyx_n_s_xsi_2, __pyx_k_xsi_2, sizeof(__pyx_k_xsi_2), 0, 0, 1, 1},
35233   {&__pyx_n_s_xsi_3, __pyx_k_xsi_3, sizeof(__pyx_k_xsi_3), 0, 0, 1, 1},
35234   {&__pyx_n_s_xsi_nil, __pyx_k_xsi_nil, sizeof(__pyx_k_xsi_nil), 0, 0, 1, 1},
35235   {&__pyx_n_s_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 0, 0, 1, 1},
35236   {&__pyx_n_u_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 0, 1, 0, 1},
35237   {0, 0, 0, 0, 0, 0, 0}
35238 };
35239 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
35240   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 44, __pyx_L1_error)
35241   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 44, __pyx_L1_error)
35242   __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 10, __pyx_L1_error)
35243   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 299, __pyx_L1_error)
35244   __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 450, __pyx_L1_error)
35245   __pyx_builtin_oct = __Pyx_GetBuiltinName(__pyx_n_s_oct); if (!__pyx_builtin_oct) __PYX_ERR(0, 644, __pyx_L1_error)
35246   __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 647, __pyx_L1_error)
35247   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 973, __pyx_L1_error)
35248   __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1011, __pyx_L1_error)
35249   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 169, __pyx_L1_error)
35250   return 0;
35251   __pyx_L1_error:;
35252   return -1;
35253 }
35254
35255 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
35256   __Pyx_RefNannyDeclarations
35257   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
35258
35259   /* "lxml/objectify.pyx":467
35260  *         new_element.tag = element.tag
35261  *     elif isinstance(value, (list, tuple)):
35262  *         element[:] = value             # <<<<<<<<<<<<<<
35263  *         return
35264  *     else:
35265  */
35266   __pyx_slice__3 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 467, __pyx_L1_error)
35267   __Pyx_GOTREF(__pyx_slice__3);
35268   __Pyx_GIVEREF(__pyx_slice__3);
35269
35270   /* "lxml/objectify.pyx":1033
35271  * cdef _registerPyTypes():
35272  *     pytype = PyType(u'int', int, IntElement)
35273  *     pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",             # <<<<<<<<<<<<<<
35274  *                              u"unsignedByte", u"nonPositiveInteger",
35275  *                              u"negativeInteger", u"long", u"nonNegativeInteger",
35276  */
35277   __pyx_tuple__5 = PyTuple_Pack(13, __pyx_n_u_integer, __pyx_n_u_int, __pyx_n_u_short, __pyx_n_u_byte, __pyx_n_u_unsignedShort, __pyx_n_u_unsignedByte, __pyx_n_u_nonPositiveInteger, __pyx_n_u_negativeInteger, __pyx_n_u_long, __pyx_n_u_nonNegativeInteger, __pyx_n_u_unsignedLong, __pyx_n_u_unsignedInt, __pyx_n_u_positiveInteger); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1033, __pyx_L1_error)
35278   __Pyx_GOTREF(__pyx_tuple__5);
35279   __Pyx_GIVEREF(__pyx_tuple__5);
35280
35281   /* "lxml/objectify.pyx":1044
35282  * 
35283  *     pytype = PyType(u'float', float, FloatElement, repr)
35284  *     pytype.xmlSchemaTypes = (u"double", u"float")             # <<<<<<<<<<<<<<
35285  *     pytype.register()
35286  * 
35287  */
35288   __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_u_double, __pyx_n_u_float); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1044, __pyx_L1_error)
35289   __Pyx_GOTREF(__pyx_tuple__6);
35290   __Pyx_GIVEREF(__pyx_tuple__6);
35291
35292   /* "lxml/objectify.pyx":1048
35293  * 
35294  *     pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
35295  *     pytype.xmlSchemaTypes = (u"boolean",)             # <<<<<<<<<<<<<<
35296  *     pytype.register()
35297  * 
35298  */
35299   __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u_boolean); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1048, __pyx_L1_error)
35300   __Pyx_GOTREF(__pyx_tuple__7);
35301   __Pyx_GIVEREF(__pyx_tuple__7);
35302
35303   /* "lxml/objectify.pyx":1052
35304  * 
35305  *     pytype = PyType(u'str', None, StringElement)
35306  *     pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",             # <<<<<<<<<<<<<<
35307  *                              u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
35308  *                              u"NMTOKEN", )
35309  */
35310   __pyx_tuple__8 = PyTuple_Pack(10, __pyx_n_u_string, __pyx_n_u_normalizedString, __pyx_n_u_token, __pyx_n_u_language, __pyx_n_u_Name, __pyx_n_u_NCName, __pyx_n_u_ID, __pyx_n_u_IDREF, __pyx_n_u_ENTITY, __pyx_n_u_NMTOKEN); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1052, __pyx_L1_error)
35311   __Pyx_GOTREF(__pyx_tuple__8);
35312   __Pyx_GIVEREF(__pyx_tuple__8);
35313
35314   /* "lxml/objectify.pyx":1349
35315  *         result += _dump(child, indent)
35316  *     if indent == 1:
35317  *         return result[:-1] # strip last '\n'             # <<<<<<<<<<<<<<
35318  *     else:
35319  *         return result
35320  */
35321   __pyx_slice__16 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 1349, __pyx_L1_error)
35322   __Pyx_GOTREF(__pyx_slice__16);
35323   __Pyx_GIVEREF(__pyx_slice__16);
35324
35325   /* "lxml/objectify.pyx":1430
35326  *         schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
35327  *         if schema_type is None and u':' in value:
35328  *             prefix, value = value.split(u':', 1)             # <<<<<<<<<<<<<<
35329  *             schema_type = <PyType>_SCHEMA_TYPE_DICT.get(value)
35330  *         if schema_type is not None:
35331  */
35332   __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_u__17, __pyx_int_1); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1430, __pyx_L1_error)
35333   __Pyx_GOTREF(__pyx_tuple__18);
35334   __Pyx_GIVEREF(__pyx_tuple__18);
35335
35336   /* "lxml/objectify.pyx":44
35337  * import re
35338  * 
35339  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
35340  * cdef object is_special_method = re.compile(u'__.*__$').match
35341  * 
35342  */
35343   __pyx_tuple__22 = PyTuple_Pack(2, __pyx_builtin_ValueError, __pyx_builtin_TypeError); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 44, __pyx_L1_error)
35344   __Pyx_GOTREF(__pyx_tuple__22);
35345   __Pyx_GIVEREF(__pyx_tuple__22);
35346
35347   /* "lxml/objectify.pyx":45
35348  * 
35349  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
35350  * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
35351  * 
35352  * 
35353  */
35354   __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u__23); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 45, __pyx_L1_error)
35355   __Pyx_GOTREF(__pyx_tuple__24);
35356   __Pyx_GIVEREF(__pyx_tuple__24);
35357
35358   /* "lxml/objectify.pyx":82
35359  *     return s, python.PyUnicode_AsUTF8String(s)
35360  * 
35361  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
35362  *     u"""set_pytype_attribute_tag(attribute_tag=None)
35363  *     Change name and namespace of the XML attribute that holds Python type
35364  */
35365   __pyx_tuple__25 = PyTuple_Pack(1, __pyx_n_s_attribute_tag); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 82, __pyx_L1_error)
35366   __Pyx_GOTREF(__pyx_tuple__25);
35367   __Pyx_GIVEREF(__pyx_tuple__25);
35368   __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_set_pytype_attribute_tag, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 82, __pyx_L1_error)
35369   __pyx_tuple__27 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 82, __pyx_L1_error)
35370   __Pyx_GOTREF(__pyx_tuple__27);
35371   __Pyx_GIVEREF(__pyx_tuple__27);
35372
35373   /* "lxml/objectify.pyx":162
35374  * 
35375  *     # pickle support for objectified Element
35376  *     def __reduce__(self):             # <<<<<<<<<<<<<<
35377  *         return fromstring, (etree.tostring(self),)
35378  * 
35379  */
35380   __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 162, __pyx_L1_error)
35381   __Pyx_GOTREF(__pyx_tuple__28);
35382   __Pyx_GIVEREF(__pyx_tuple__28);
35383   __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_reduce, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 162, __pyx_L1_error)
35384
35385   /* "lxml/objectify.pyx":193
35386  *         return _countSiblings(self._c_node)
35387  * 
35388  *     def countchildren(self):             # <<<<<<<<<<<<<<
35389  *         u"""countchildren(self)
35390  * 
35391  */
35392   __pyx_tuple__30 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 193, __pyx_L1_error)
35393   __Pyx_GOTREF(__pyx_tuple__30);
35394   __Pyx_GIVEREF(__pyx_tuple__30);
35395   __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_countchildren, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 193, __pyx_L1_error)
35396
35397   /* "lxml/objectify.pyx":210
35398  *         return c
35399  * 
35400  *     def getchildren(self):             # <<<<<<<<<<<<<<
35401  *         u"""getchildren(self)
35402  * 
35403  */
35404   __pyx_tuple__32 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_node, __pyx_n_s_result); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 210, __pyx_L1_error)
35405   __Pyx_GOTREF(__pyx_tuple__32);
35406   __Pyx_GIVEREF(__pyx_tuple__32);
35407   __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_getchildren, 210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 210, __pyx_L1_error)
35408
35409   /* "lxml/objectify.pyx":263
35410  *         self.remove(child)
35411  * 
35412  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
35413  *         u"""addattr(self, tag, value)
35414  * 
35415  */
35416   __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_value); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 263, __pyx_L1_error)
35417   __Pyx_GOTREF(__pyx_tuple__34);
35418   __Pyx_GIVEREF(__pyx_tuple__34);
35419   __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_addattr, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 263, __pyx_L1_error)
35420
35421   /* "lxml/objectify.pyx":369
35422  *             parent.remove(sibling)
35423  * 
35424  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
35425  *         u"""descendantpaths(self, prefix=None)
35426  * 
35427  */
35428   __pyx_tuple__36 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_prefix); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 369, __pyx_L1_error)
35429   __Pyx_GOTREF(__pyx_tuple__36);
35430   __Pyx_GIVEREF(__pyx_tuple__36);
35431   __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_descendantpaths, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 369, __pyx_L1_error)
35432
35433   /* "lxml/objectify.pyx":606
35434  *         return strrepr(textOf(self._c_node) or '')
35435  * 
35436  *     def _setText(self, s):             # <<<<<<<<<<<<<<
35437  *         u"""For use in subclasses only. Don't use unless you know what you are
35438  *         doing.
35439  */
35440   __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s_3); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 606, __pyx_L1_error)
35441   __Pyx_GOTREF(__pyx_tuple__38);
35442   __Pyx_GIVEREF(__pyx_tuple__38);
35443   __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_setText, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 606, __pyx_L1_error)
35444
35445   /* "lxml/objectify.pyx":614
35446  * cdef class NumberElement(ObjectifiedDataElement):
35447  *     cdef object _parse_value
35448  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
35449  *         u"""Set the function that parses the Python value from a string.
35450  * 
35451  */
35452   __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_function); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 614, __pyx_L1_error)
35453   __Pyx_GOTREF(__pyx_tuple__40);
35454   __Pyx_GIVEREF(__pyx_tuple__40);
35455   __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_setValueParser, 614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 614, __pyx_L1_error)
35456
35457   /* "lxml/objectify.pyx":634
35458  *         return float(_parseNumber(self))
35459  * 
35460  *     def __complex__(self):             # <<<<<<<<<<<<<<
35461  *         return complex(_parseNumber(self))
35462  * 
35463  */
35464   __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 634, __pyx_L1_error)
35465   __Pyx_GOTREF(__pyx_tuple__42);
35466   __Pyx_GIVEREF(__pyx_tuple__42);
35467   __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_complex, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 634, __pyx_L1_error)
35468
35469   /* "lxml/objectify.pyx":710
35470  * 
35471  * cdef class IntElement(NumberElement):
35472  *     def _init(self):             # <<<<<<<<<<<<<<
35473  *         self._parse_value = int
35474  * 
35475  */
35476   __pyx_tuple__44 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 710, __pyx_L1_error)
35477   __Pyx_GOTREF(__pyx_tuple__44);
35478   __Pyx_GIVEREF(__pyx_tuple__44);
35479   __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 710, __pyx_L1_error)
35480
35481   /* "lxml/objectify.pyx":717
35482  * 
35483  * cdef class LongElement(NumberElement):
35484  *     def _init(self):             # <<<<<<<<<<<<<<
35485  *         self._parse_value = long
35486  * 
35487  */
35488   __pyx_tuple__46 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 717, __pyx_L1_error)
35489   __Pyx_GOTREF(__pyx_tuple__46);
35490   __Pyx_GIVEREF(__pyx_tuple__46);
35491   __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 717, __pyx_L1_error)
35492
35493   /* "lxml/objectify.pyx":724
35494  * 
35495  * cdef class FloatElement(NumberElement):
35496  *     def _init(self):             # <<<<<<<<<<<<<<
35497  *         self._parse_value = float
35498  * 
35499  */
35500   __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 724, __pyx_L1_error)
35501   __Pyx_GOTREF(__pyx_tuple__48);
35502   __Pyx_GIVEREF(__pyx_tuple__48);
35503   __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 724, __pyx_L1_error)
35504
35505   /* "lxml/objectify.pyx":741
35506  *         return repr(textOf(self._c_node) or u'')
35507  * 
35508  *     def strlen(self):             # <<<<<<<<<<<<<<
35509  *         text = textOf(self._c_node)
35510  *         if text is None:
35511  */
35512   __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_text); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 741, __pyx_L1_error)
35513   __Pyx_GOTREF(__pyx_tuple__50);
35514   __Pyx_GIVEREF(__pyx_tuple__50);
35515   __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_strlen, 741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 741, __pyx_L1_error)
35516
35517   /* "lxml/objectify.pyx":786
35518  *         return float(textOf(self._c_node))
35519  * 
35520  *     def __complex__(self):             # <<<<<<<<<<<<<<
35521  *         return complex(textOf(self._c_node))
35522  * 
35523  */
35524   __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 786, __pyx_L1_error)
35525   __Pyx_GOTREF(__pyx_tuple__52);
35526   __Pyx_GIVEREF(__pyx_tuple__52);
35527   __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_complex, 786, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 786, __pyx_L1_error)
35528
35529   /* "lxml/objectify.pyx":821
35530  *     Python's bool type.
35531  *     """
35532  *     def _init(self):             # <<<<<<<<<<<<<<
35533  *         self._parse_value = __parseBool
35534  * 
35535  */
35536   __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 821, __pyx_L1_error)
35537   __Pyx_GOTREF(__pyx_tuple__54);
35538   __Pyx_GIVEREF(__pyx_tuple__54);
35539   __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 821, __pyx_L1_error)
35540
35541   /* "lxml/objectify.pyx":843
35542  *         return __parseBool(textOf(self._c_node))
35543  * 
35544  * def __checkBool(s):             # <<<<<<<<<<<<<<
35545  *     cdef int value = -1
35546  *     if s is not None:
35547  */
35548   __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_s_3, __pyx_n_s_value); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 843, __pyx_L1_error)
35549   __Pyx_GOTREF(__pyx_tuple__56);
35550   __Pyx_GIVEREF(__pyx_tuple__56);
35551   __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_checkBool, 843, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 843, __pyx_L1_error)
35552
35553   /* "lxml/objectify.pyx":850
35554  *         raise ValueError
35555  * 
35556  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
35557  *     cdef int value
35558  *     if s is None:
35559  */
35560   __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_s_3); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 850, __pyx_L1_error)
35561   __Pyx_GOTREF(__pyx_tuple__58);
35562   __Pyx_GIVEREF(__pyx_tuple__58);
35563   __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parseBool, 850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 850, __pyx_L1_error)
35564
35565   /* "lxml/objectify.pyx":948
35566  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
35567  * 
35568  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
35569  *         u"""register(self, before=None, after=None)
35570  * 
35571  */
35572   __pyx_tuple__60 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_before, __pyx_n_s_after, __pyx_n_s_item, __pyx_n_s_entry, __pyx_n_s_first_pos, __pyx_n_s_last_pos, __pyx_n_s_i, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_xs_type); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 948, __pyx_L1_error)
35573   __Pyx_GOTREF(__pyx_tuple__60);
35574   __Pyx_GIVEREF(__pyx_tuple__60);
35575   __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_register, 948, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 948, __pyx_L1_error)
35576
35577   /* "lxml/objectify.pyx":989
35578  *             _SCHEMA_TYPE_DICT[xs_type] = self
35579  * 
35580  *     def unregister(self):             # <<<<<<<<<<<<<<
35581  *         u"unregister(self)"
35582  *         if _PYTYPE_DICT.get(self.name) is self:
35583  */
35584   __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xs_type, __pyx_n_s_pytype); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 989, __pyx_L1_error)
35585   __Pyx_GOTREF(__pyx_tuple__62);
35586   __Pyx_GIVEREF(__pyx_tuple__62);
35587   __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unregister, 989, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 989, __pyx_L1_error)
35588
35589   /* "lxml/objectify.pyx":1018
35590  * cdef list _TYPE_CHECKS = []
35591  * 
35592  * def __lower_bool(b):             # <<<<<<<<<<<<<<
35593  *     return u"true" if b else u"false"
35594  * 
35595  */
35596   __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_b); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1018, __pyx_L1_error)
35597   __Pyx_GOTREF(__pyx_tuple__64);
35598   __Pyx_GIVEREF(__pyx_tuple__64);
35599   __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_lower_bool, 1018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1018, __pyx_L1_error)
35600
35601   /* "lxml/objectify.pyx":1024
35602  *     return u"str" if python._isString(obj) else _typename(obj)
35603  * 
35604  * def pytypename(obj):             # <<<<<<<<<<<<<<
35605  *     u"""pytypename(obj)
35606  * 
35607  */
35608   __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1024, __pyx_L1_error)
35609   __Pyx_GOTREF(__pyx_tuple__66);
35610   __Pyx_GIVEREF(__pyx_tuple__66);
35611   __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pytypename, 1024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1024, __pyx_L1_error)
35612
35613   /* "lxml/objectify.pyx":1070
35614  * _registerPyTypes()
35615  * 
35616  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
35617  *     u"""getRegisteredTypes()
35618  * 
35619  */
35620   __pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_types, __pyx_n_s_known, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_name); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1070, __pyx_L1_error)
35621   __Pyx_GOTREF(__pyx_tuple__68);
35622   __Pyx_GIVEREF(__pyx_tuple__68);
35623   __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_getRegisteredTypes, 1070, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1070, __pyx_L1_error)
35624
35625   /* "lxml/objectify.pyx":1305
35626  * cdef bint __RECURSIVE_STR = 0 # default: off
35627  * 
35628  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
35629  *     u"""enable_recursive_str(on=True)
35630  * 
35631  */
35632   __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_on); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1305, __pyx_L1_error)
35633   __Pyx_GOTREF(__pyx_tuple__70);
35634   __Pyx_GIVEREF(__pyx_tuple__70);
35635   __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_enable_recursive_str, 1305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 1305, __pyx_L1_error)
35636   __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1305, __pyx_L1_error)
35637   __Pyx_GOTREF(__pyx_tuple__72);
35638   __Pyx_GIVEREF(__pyx_tuple__72);
35639
35640   /* "lxml/objectify.pyx":1314
35641  *     __RECURSIVE_STR = on
35642  * 
35643  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
35644  *     u"""dump(_Element element not None)
35645  * 
35646  */
35647   __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1314, __pyx_L1_error)
35648   __Pyx_GOTREF(__pyx_tuple__73);
35649   __Pyx_GIVEREF(__pyx_tuple__73);
35650   __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_dump, 1314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1314, __pyx_L1_error)
35651
35652   /* "lxml/objectify.pyx":1357
35653  * # Pickle support for objectified ElementTree
35654  * 
35655  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
35656  *     return etree.ElementTree(fromstring(data))
35657  * 
35658  */
35659   __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1357, __pyx_L1_error)
35660   __Pyx_GOTREF(__pyx_tuple__75);
35661   __Pyx_GIVEREF(__pyx_tuple__75);
35662   __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unpickleElementTree, 1357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1357, __pyx_L1_error)
35663
35664   /* "lxml/objectify.pyx":1368
35665  *                    elementTreeReduceFunction, __unpickleElementTree)
35666  * 
35667  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
35668  *     return __unpickleElementTree, (etree.tostring(obj),)
35669  * 
35670  */
35671   __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1368, __pyx_L1_error)
35672   __Pyx_GOTREF(__pyx_tuple__77);
35673   __Pyx_GIVEREF(__pyx_tuple__77);
35674   __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pickleReduceElementTree, 1368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1368, __pyx_L1_error)
35675
35676   /* "lxml/objectify.pyx":1462
35677  *     return None
35678  * 
35679  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
35680  *              empty_pytype=None):
35681  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
35682  */
35683   __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1462, __pyx_L1_error)
35684   __Pyx_GOTREF(__pyx_tuple__79);
35685   __Pyx_GIVEREF(__pyx_tuple__79);
35686   __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pyannotate, 1462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1462, __pyx_L1_error)
35687
35688   /* "lxml/objectify.pyx":1485
35689  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
35690  * 
35691  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
35692  *                 empty_type=None):
35693  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
35694  */
35695   __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_pytype, __pyx_n_s_empty_type, __pyx_n_s_element); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1485, __pyx_L1_error)
35696   __Pyx_GOTREF(__pyx_tuple__81);
35697   __Pyx_GIVEREF(__pyx_tuple__81);
35698   __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_xsiannotate, 1485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1485, __pyx_L1_error)
35699
35700   /* "lxml/objectify.pyx":1513
35701  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
35702  * 
35703  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
35704  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
35705  *              annotate_pytype=1):
35706  */
35707   __pyx_tuple__83 = PyTuple_Pack(8, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_empty_type, __pyx_n_s_annotate_xsi, __pyx_n_s_annotate_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1513, __pyx_L1_error)
35708   __Pyx_GOTREF(__pyx_tuple__83);
35709   __Pyx_GIVEREF(__pyx_tuple__83);
35710   __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 6, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_annotate, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1513, __pyx_L1_error)
35711
35712   /* "lxml/objectify.pyx":1709
35713  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
35714  * 
35715  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
35716  *                bint xsi_nil=False, bint cleanup_namespaces=False):
35717  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
35718  */
35719   __pyx_tuple__85 = PyTuple_Pack(6, __pyx_n_s_element_or_tree, __pyx_n_s_pytype, __pyx_n_s_xsi_2, __pyx_n_s_xsi_nil, __pyx_n_s_cleanup_namespaces, __pyx_n_s_attribute_names); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1709, __pyx_L1_error)
35720   __Pyx_GOTREF(__pyx_tuple__85);
35721   __Pyx_GIVEREF(__pyx_tuple__85);
35722   __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_deannotate, 1709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1709, __pyx_L1_error)
35723
35724   /* "lxml/objectify.pyx":1749
35725  * objectify_parser = __DEFAULT_PARSER
35726  * 
35727  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
35728  *     u"""set_default_parser(new_parser = None)
35729  * 
35730  */
35731   __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_new_parser); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1749, __pyx_L1_error)
35732   __Pyx_GOTREF(__pyx_tuple__87);
35733   __Pyx_GIVEREF(__pyx_tuple__87);
35734   __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_set_default_parser, 1749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1749, __pyx_L1_error)
35735   __pyx_tuple__89 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1749, __pyx_L1_error)
35736   __Pyx_GOTREF(__pyx_tuple__89);
35737   __Pyx_GIVEREF(__pyx_tuple__89);
35738
35739   /* "lxml/objectify.pyx":1767
35740  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
35741  * 
35742  * def makeparser(**kw):             # <<<<<<<<<<<<<<
35743  *     u"""makeparser(remove_blank_text=True, **kw)
35744  * 
35745  */
35746   __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_kw, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1767, __pyx_L1_error)
35747   __Pyx_GOTREF(__pyx_tuple__90);
35748   __Pyx_GIVEREF(__pyx_tuple__90);
35749   __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_makeparser, 1767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1767, __pyx_L1_error)
35750
35751   /* "lxml/objectify.pyx":1794
35752  * SubElement = etree.SubElement
35753  * 
35754  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35755  *     u"""fromstring(xml, parser=None, base_url=None)
35756  * 
35757  */
35758   __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1794, __pyx_L1_error)
35759   __Pyx_GOTREF(__pyx_tuple__92);
35760   __Pyx_GIVEREF(__pyx_tuple__92);
35761   __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_fromstring, 1794, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1794, __pyx_L1_error)
35762   __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1794, __pyx_L1_error)
35763   __Pyx_GOTREF(__pyx_tuple__94);
35764   __Pyx_GIVEREF(__pyx_tuple__94);
35765
35766   /* "lxml/objectify.pyx":1810
35767  *     return _fromstring(xml, parser, base_url=base_url)
35768  * 
35769  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35770  *     u"""XML(xml, parser=None, base_url=None)
35771  * 
35772  */
35773   __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1810, __pyx_L1_error)
35774   __Pyx_GOTREF(__pyx_tuple__95);
35775   __Pyx_GIVEREF(__pyx_tuple__95);
35776   __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_XML, 1810, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1810, __pyx_L1_error)
35777   __pyx_tuple__97 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1810, __pyx_L1_error)
35778   __Pyx_GOTREF(__pyx_tuple__97);
35779   __Pyx_GIVEREF(__pyx_tuple__97);
35780
35781   /* "lxml/objectify.pyx":1829
35782  * _parse = etree.parse
35783  * 
35784  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
35785  *     u"""parse(f, parser=None, base_url=None)
35786  * 
35787  */
35788   __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_f, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1829, __pyx_L1_error)
35789   __Pyx_GOTREF(__pyx_tuple__98);
35790   __Pyx_GIVEREF(__pyx_tuple__98);
35791   __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parse, 1829, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1829, __pyx_L1_error)
35792   __pyx_tuple__100 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1829, __pyx_L1_error)
35793   __Pyx_GOTREF(__pyx_tuple__100);
35794   __Pyx_GIVEREF(__pyx_tuple__100);
35795
35796   /* "lxml/objectify.pyx":1852
35797  * E = ElementMaker()
35798  * 
35799  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
35800  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
35801  * 
35802  */
35803   __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_attributes); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1852, __pyx_L1_error)
35804   __Pyx_GOTREF(__pyx_tuple__101);
35805   __Pyx_GIVEREF(__pyx_tuple__101);
35806   __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_Element, 1852, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1852, __pyx_L1_error)
35807   __pyx_tuple__103 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1852, __pyx_L1_error)
35808   __Pyx_GOTREF(__pyx_tuple__103);
35809   __Pyx_GIVEREF(__pyx_tuple__103);
35810
35811   /* "lxml/objectify.pyx":1872
35812  *     return _makeElement(_tag, None, _attributes, nsmap)
35813  * 
35814  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
35815  *                 **_attributes):
35816  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
35817  */
35818   __pyx_tuple__104 = PyTuple_Pack(13, __pyx_n_s_value_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_xsi_3, __pyx_n_s_attributes, __pyx_n_s_temp, __pyx_n_s_prefix, __pyx_n_s_name, __pyx_n_s_ns, __pyx_n_s_py_type, __pyx_n_s_strval, __pyx_n_s_stringify); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1872, __pyx_L1_error)
35819   __Pyx_GOTREF(__pyx_tuple__104);
35820   __Pyx_GIVEREF(__pyx_tuple__104);
35821   __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 2, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_DataElement, 1872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1872, __pyx_L1_error)
35822   __pyx_tuple__106 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 1872, __pyx_L1_error)
35823   __Pyx_GOTREF(__pyx_tuple__106);
35824   __Pyx_GIVEREF(__pyx_tuple__106);
35825
35826   /* "src/lxml/objectpath.pxi":57
35827  *         return _find_object_path(root, self._c_path, self._path_len, default)
35828  * 
35829  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
35830  *         u"hasattr(self, root)"
35831  *         try:
35832  */
35833   __pyx_tuple__107 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_root); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 57, __pyx_L1_error)
35834   __Pyx_GOTREF(__pyx_tuple__107);
35835   __Pyx_GIVEREF(__pyx_tuple__107);
35836   __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectpath_pxi, __pyx_n_s_hasattr, 57, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(1, 57, __pyx_L1_error)
35837
35838   /* "src/lxml/objectpath.pxi":65
35839  *         return True
35840  * 
35841  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
35842  *         u"""setattr(self, root, value)
35843  * 
35844  */
35845   __pyx_tuple__109 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_root, __pyx_n_s_value); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 65, __pyx_L1_error)
35846   __Pyx_GOTREF(__pyx_tuple__109);
35847   __Pyx_GIVEREF(__pyx_tuple__109);
35848   __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectpath_pxi, __pyx_n_s_setattr, 65, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(1, 65, __pyx_L1_error)
35849
35850   /* "src/lxml/objectpath.pxi":74
35851  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
35852  * 
35853  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
35854  *         u"""addattr(self, root, value)
35855  * 
35856  */
35857   __pyx_tuple__111 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_root, __pyx_n_s_value); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(1, 74, __pyx_L1_error)
35858   __Pyx_GOTREF(__pyx_tuple__111);
35859   __Pyx_GIVEREF(__pyx_tuple__111);
35860   __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectpath_pxi, __pyx_n_s_addattr, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(1, 74, __pyx_L1_error)
35861
35862   /* "src/lxml/objectpath.pxi":88
35863  *     re.U).match
35864  * 
35865  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
35866  * 
35867  * 
35868  */
35869   __pyx_tuple__113 = PyTuple_Pack(3, Py_None, Py_None, __pyx_int_0); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(1, 88, __pyx_L1_error)
35870   __Pyx_GOTREF(__pyx_tuple__113);
35871   __Pyx_GIVEREF(__pyx_tuple__113);
35872   __Pyx_RefNannyFinishContext();
35873   return 0;
35874   __pyx_L1_error:;
35875   __Pyx_RefNannyFinishContext();
35876   return -1;
35877 }
35878
35879 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
35880   __pyx_umethod_PyBytes_Type_split.type = (PyObject*)&PyBytes_Type;
35881   __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
35882   __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
35883   __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
35884   __pyx_umethod_PyList_Type_remove.type = (PyObject*)&PyList_Type;
35885   __pyx_umethod_PyUnicode_Type_strip.type = (PyObject*)&PyUnicode_Type;
35886   if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
35887   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
35888   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35889   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35890   return 0;
35891   __pyx_L1_error:;
35892   return -1;
35893 }
35894
35895 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
35896 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
35897 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
35898 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
35899 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
35900 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
35901 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
35902
35903 static int __Pyx_modinit_global_init_code(void) {
35904   __Pyx_RefNannyDeclarations
35905   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
35906   /*--- Global init code ---*/
35907   __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
35908   __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
35909   __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = ((PyObject*)Py_None); Py_INCREF(Py_None);
35910   __pyx_v_4lxml_9objectify_is_special_method = Py_None; Py_INCREF(Py_None);
35911   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
35912   __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = ((PyObject*)Py_None); Py_INCREF(Py_None);
35913   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
35914   __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = ((PyObject*)Py_None); Py_INCREF(Py_None);
35915   __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject*)Py_None); Py_INCREF(Py_None);
35916   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
35917   __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = Py_None; Py_INCREF(Py_None);
35918   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
35919   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = Py_None; Py_INCREF(Py_None);
35920   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
35921   __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
35922   __pyx_v_4lxml_9objectify__PYTYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35923   __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35924   __pyx_v_4lxml_9objectify__TYPE_CHECKS = ((PyObject*)Py_None); Py_INCREF(Py_None);
35925   __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
35926   __pyx_v_4lxml_9objectify__strip_attributes = Py_None; Py_INCREF(Py_None);
35927   __pyx_v_4lxml_9objectify__cleanup_namespaces = Py_None; Py_INCREF(Py_None);
35928   __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
35929   __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
35930   __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
35931   __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
35932   __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = ((PyObject*)Py_None); Py_INCREF(Py_None);
35933   __pyx_v_4lxml_9objectify__NO_DEFAULT = Py_None; Py_INCREF(Py_None);
35934   __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
35935   __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject*)Py_None); Py_INCREF(Py_None);
35936   __Pyx_RefNannyFinishContext();
35937   return 0;
35938 }
35939
35940 static int __Pyx_modinit_variable_export_code(void) {
35941   __Pyx_RefNannyDeclarations
35942   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
35943   /*--- Variable export code ---*/
35944   __Pyx_RefNannyFinishContext();
35945   return 0;
35946 }
35947
35948 static int __Pyx_modinit_function_export_code(void) {
35949   __Pyx_RefNannyDeclarations
35950   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
35951   /*--- Function export code ---*/
35952   __Pyx_RefNannyFinishContext();
35953   return 0;
35954 }
35955
35956 static int __Pyx_modinit_type_init_code(void) {
35957   __Pyx_RefNannyDeclarations
35958   PyObject *__pyx_t_1 = NULL;
35959   int __pyx_lineno = 0;
35960   const char *__pyx_filename = NULL;
35961   int __pyx_clineno = 0;
35962   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
35963   /*--- Type init code ---*/
35964   __pyx_t_1 = PyImport_ImportModule("lxml.etree"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
35965   __Pyx_GOTREF(__pyx_t_1);
35966   __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "ElementBase", sizeof(struct LxmlElementBase), __Pyx_ImportType_CheckSize_Warn);
35967    if (!__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase) __PYX_ERR(0, 1, __pyx_L1_error)
35968   __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementBase;
35969   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
35970   #if PY_VERSION_HEX < 0x030800B1
35971   __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_print = 0;
35972   #endif
35973   #if CYTHON_COMPILING_IN_CPYTHON
35974   {
35975     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
35976     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
35977       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
35978       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__;
35979       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement___iter__;
35980     }
35981   }
35982   #endif
35983   #if CYTHON_COMPILING_IN_CPYTHON
35984   {
35985     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
35986     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
35987       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
35988       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_6__len__;
35989       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_6__len__;
35990     }
35991   }
35992   #endif
35993   #if CYTHON_COMPILING_IN_CPYTHON
35994   {
35995     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
35996     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
35997       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
35998       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
35999       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_12__getattr__;
36000     }
36001   }
36002   #endif
36003   #if CYTHON_COMPILING_IN_CPYTHON
36004   {
36005     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setattr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36006     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36007       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36008       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
36009       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_14__setattr__;
36010     }
36011   }
36012   #endif
36013   #if CYTHON_COMPILING_IN_CPYTHON
36014   {
36015     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36016     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36017       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36018       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
36019       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_20__getitem__;
36020     }
36021   }
36022   #endif
36023   #if CYTHON_COMPILING_IN_CPYTHON
36024   {
36025     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 133, __pyx_L1_error)
36026     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36027       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36028       __pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__.doc = __pyx_doc_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
36029       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_18ObjectifiedElement_22__setitem__;
36030     }
36031   }
36032   #endif
36033   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifiedElement, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
36034   __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
36035   __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
36036   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
36037   #if PY_VERSION_HEX < 0x030800B1
36038   __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_print = 0;
36039   #endif
36040   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_dictoffset && __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_getattro == PyObject_GenericGetAttr)) {
36041     __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36042   }
36043   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifiedDataElement, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) __PYX_ERR(0, 592, __pyx_L1_error)
36044   __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
36045   __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36046   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
36047   #if PY_VERSION_HEX < 0x030800B1
36048   __pyx_type_4lxml_9objectify_NumberElement.tp_print = 0;
36049   #endif
36050   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_NumberElement.tp_dictoffset && __pyx_type_4lxml_9objectify_NumberElement.tp_getattro == PyObject_GenericGetAttr)) {
36051     __pyx_type_4lxml_9objectify_NumberElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36052   }
36053   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NumberElement, (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
36054   __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
36055   __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36056   if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
36057   #if PY_VERSION_HEX < 0x030800B1
36058   __pyx_type_4lxml_9objectify_IntElement.tp_print = 0;
36059   #endif
36060   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_IntElement.tp_dictoffset && __pyx_type_4lxml_9objectify_IntElement.tp_getattro == PyObject_GenericGetAttr)) {
36061     __pyx_type_4lxml_9objectify_IntElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36062   }
36063   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_IntElement, (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
36064   __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
36065   __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36066   if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
36067   #if PY_VERSION_HEX < 0x030800B1
36068   __pyx_type_4lxml_9objectify_LongElement.tp_print = 0;
36069   #endif
36070   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_LongElement.tp_dictoffset && __pyx_type_4lxml_9objectify_LongElement.tp_getattro == PyObject_GenericGetAttr)) {
36071     __pyx_type_4lxml_9objectify_LongElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36072   }
36073   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LongElement, (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) __PYX_ERR(0, 716, __pyx_L1_error)
36074   __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
36075   __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
36076   if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
36077   #if PY_VERSION_HEX < 0x030800B1
36078   __pyx_type_4lxml_9objectify_FloatElement.tp_print = 0;
36079   #endif
36080   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_FloatElement.tp_dictoffset && __pyx_type_4lxml_9objectify_FloatElement.tp_getattro == PyObject_GenericGetAttr)) {
36081     __pyx_type_4lxml_9objectify_FloatElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36082   }
36083   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FloatElement, (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
36084   __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
36085   __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36086   if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
36087   #if PY_VERSION_HEX < 0x030800B1
36088   __pyx_type_4lxml_9objectify_StringElement.tp_print = 0;
36089   #endif
36090   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_StringElement.tp_dictoffset && __pyx_type_4lxml_9objectify_StringElement.tp_getattro == PyObject_GenericGetAttr)) {
36091     __pyx_type_4lxml_9objectify_StringElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36092   }
36093   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_StringElement, (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
36094   __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
36095   __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
36096   if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
36097   #if PY_VERSION_HEX < 0x030800B1
36098   __pyx_type_4lxml_9objectify_NoneElement.tp_print = 0;
36099   #endif
36100   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_NoneElement.tp_dictoffset && __pyx_type_4lxml_9objectify_NoneElement.tp_getattro == PyObject_GenericGetAttr)) {
36101     __pyx_type_4lxml_9objectify_NoneElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36102   }
36103   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NoneElement, (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) __PYX_ERR(0, 789, __pyx_L1_error)
36104   __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
36105   __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement;
36106   if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
36107   #if PY_VERSION_HEX < 0x030800B1
36108   __pyx_type_4lxml_9objectify_BoolElement.tp_print = 0;
36109   #endif
36110   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_BoolElement.tp_dictoffset && __pyx_type_4lxml_9objectify_BoolElement.tp_getattro == PyObject_GenericGetAttr)) {
36111     __pyx_type_4lxml_9objectify_BoolElement.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36112   }
36113   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolElement, (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
36114   __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
36115   if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
36116   #if PY_VERSION_HEX < 0x030800B1
36117   __pyx_type_4lxml_9objectify_PyType.tp_print = 0;
36118   #endif
36119   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_PyType.tp_dictoffset && __pyx_type_4lxml_9objectify_PyType.tp_getattro == PyObject_GenericGetAttr)) {
36120     __pyx_type_4lxml_9objectify_PyType.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36121   }
36122   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyType, (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
36123   __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
36124   if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) __PYX_ERR(0, 1131, __pyx_L1_error)
36125   #if PY_VERSION_HEX < 0x030800B1
36126   __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_print = 0;
36127   #endif
36128   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_dictoffset && __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_getattro == PyObject_GenericGetAttr)) {
36129     __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
36130   }
36131   #if CYTHON_COMPILING_IN_CPYTHON
36132   {
36133     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1131, __pyx_L1_error)
36134     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36135       __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36136       __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__.doc = __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
36137       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__;
36138     }
36139   }
36140   #endif
36141   __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
36142   __pyx_vtabptr_4lxml_9objectify_ElementMaker = &__pyx_vtable_4lxml_9objectify_ElementMaker;
36143   __pyx_vtable_4lxml_9objectify_ElementMaker._build_element_maker = (PyObject *(*)(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int))__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker;
36144   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36145   #if PY_VERSION_HEX < 0x030800B1
36146   __pyx_type_4lxml_9objectify_ElementMaker.tp_print = 0;
36147   #endif
36148   if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_ElementMaker.tp_dict, __pyx_vtabptr_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36149   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMaker, (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1221, __pyx_L1_error)
36150   __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
36151   __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup), __Pyx_ImportType_CheckSize_Warn);
36152    if (!__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup) __PYX_ERR(0, 1, __pyx_L1_error)
36153   __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup;
36154   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1377, __pyx_L1_error)
36155   #if PY_VERSION_HEX < 0x030800B1
36156   __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_print = 0;
36157   #endif
36158   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_dictoffset && __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_getattro == PyObject_GenericGetAttr)) {
36159     __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36160   }
36161   #if CYTHON_COMPILING_IN_CPYTHON
36162   {
36163     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1377, __pyx_L1_error)
36164     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36165       __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36166       __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__.doc = __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
36167       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__;
36168     }
36169   }
36170   #endif
36171   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifyElementClassLookup, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1377, __pyx_L1_error)
36172   __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
36173   if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) __PYX_ERR(1, 13, __pyx_L1_error)
36174   #if PY_VERSION_HEX < 0x030800B1
36175   __pyx_type_4lxml_9objectify_ObjectPath.tp_print = 0;
36176   #endif
36177   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_ObjectPath.tp_dictoffset && __pyx_type_4lxml_9objectify_ObjectPath.tp_getattro == PyObject_GenericGetAttr)) {
36178     __pyx_type_4lxml_9objectify_ObjectPath.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36179   }
36180   #if CYTHON_COMPILING_IN_CPYTHON
36181   {
36182     PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(1, 13, __pyx_L1_error)
36183     if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
36184       __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
36185       __pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__.doc = __pyx_doc_4lxml_9objectify_10ObjectPath_6__call__;
36186       ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_9objectify_10ObjectPath_6__call__;
36187     }
36188   }
36189   #endif
36190   if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectPath, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) __PYX_ERR(1, 13, __pyx_L1_error)
36191   __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
36192   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36193   __Pyx_RefNannyFinishContext();
36194   return 0;
36195   __pyx_L1_error:;
36196   __Pyx_XDECREF(__pyx_t_1);
36197   __Pyx_RefNannyFinishContext();
36198   return -1;
36199 }
36200
36201 static int __Pyx_modinit_type_import_code(void) {
36202   __Pyx_RefNannyDeclarations
36203   PyObject *__pyx_t_1 = NULL;
36204   int __pyx_lineno = 0;
36205   const char *__pyx_filename = NULL;
36206   int __pyx_clineno = 0;
36207   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
36208   /*--- Type import code ---*/
36209   __pyx_t_1 = PyImport_ImportModule("lxml.etree"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
36210   __Pyx_GOTREF(__pyx_t_1);
36211   __pyx_ptype_4lxml_8includes_11etreepublic__Document = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_Document", sizeof(struct LxmlDocument), __Pyx_ImportType_CheckSize_Warn);
36212    if (!__pyx_ptype_4lxml_8includes_11etreepublic__Document) __PYX_ERR(2, 30, __pyx_L1_error)
36213   __pyx_ptype_4lxml_8includes_11etreepublic__Element = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_Element", sizeof(struct LxmlElement), __Pyx_ImportType_CheckSize_Warn);
36214    if (!__pyx_ptype_4lxml_8includes_11etreepublic__Element) __PYX_ERR(2, 33, __pyx_L1_error)
36215   __pyx_ptype_4lxml_8includes_11etreepublic__ElementTree = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree), __Pyx_ImportType_CheckSize_Warn);
36216    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree) __PYX_ERR(2, 40, __pyx_L1_error)
36217   __pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup), __Pyx_ImportType_CheckSize_Warn);
36218    if (!__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup) __PYX_ERR(2, 47, __pyx_L1_error)
36219   __pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher), __Pyx_ImportType_CheckSize_Warn);
36220    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher) __PYX_ERR(2, 159, __pyx_L1_error)
36221   __pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator), __Pyx_ImportType_CheckSize_Warn);
36222    if (!__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator) __PYX_ERR(2, 168, __pyx_L1_error)
36223   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36224   __Pyx_RefNannyFinishContext();
36225   return 0;
36226   __pyx_L1_error:;
36227   __Pyx_XDECREF(__pyx_t_1);
36228   __Pyx_RefNannyFinishContext();
36229   return -1;
36230 }
36231
36232 static int __Pyx_modinit_variable_import_code(void) {
36233   __Pyx_RefNannyDeclarations
36234   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
36235   /*--- Variable import code ---*/
36236   __Pyx_RefNannyFinishContext();
36237   return 0;
36238 }
36239
36240 static int __Pyx_modinit_function_import_code(void) {
36241   __Pyx_RefNannyDeclarations
36242   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
36243   /*--- Function import code ---*/
36244   __Pyx_RefNannyFinishContext();
36245   return 0;
36246 }
36247
36248
36249 #ifndef CYTHON_NO_PYINIT_EXPORT
36250 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36251 #elif PY_MAJOR_VERSION < 3
36252 #ifdef __cplusplus
36253 #define __Pyx_PyMODINIT_FUNC extern "C" void
36254 #else
36255 #define __Pyx_PyMODINIT_FUNC void
36256 #endif
36257 #else
36258 #ifdef __cplusplus
36259 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
36260 #else
36261 #define __Pyx_PyMODINIT_FUNC PyObject *
36262 #endif
36263 #endif
36264
36265
36266 #if PY_MAJOR_VERSION < 3
36267 __Pyx_PyMODINIT_FUNC initobjectify(void) CYTHON_SMALL_CODE; /*proto*/
36268 __Pyx_PyMODINIT_FUNC initobjectify(void)
36269 #else
36270 __Pyx_PyMODINIT_FUNC PyInit_objectify(void) CYTHON_SMALL_CODE; /*proto*/
36271 __Pyx_PyMODINIT_FUNC PyInit_objectify(void)
36272 #if CYTHON_PEP489_MULTI_PHASE_INIT
36273 {
36274   return PyModuleDef_Init(&__pyx_moduledef);
36275 }
36276 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
36277     #if PY_VERSION_HEX >= 0x030700A1
36278     static PY_INT64_T main_interpreter_id = -1;
36279     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
36280     if (main_interpreter_id == -1) {
36281         main_interpreter_id = current_id;
36282         return (unlikely(current_id == -1)) ? -1 : 0;
36283     } else if (unlikely(main_interpreter_id != current_id))
36284     #else
36285     static PyInterpreterState *main_interpreter = NULL;
36286     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
36287     if (!main_interpreter) {
36288         main_interpreter = current_interpreter;
36289     } else if (unlikely(main_interpreter != current_interpreter))
36290     #endif
36291     {
36292         PyErr_SetString(
36293             PyExc_ImportError,
36294             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
36295         return -1;
36296     }
36297     return 0;
36298 }
36299 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
36300     PyObject *value = PyObject_GetAttrString(spec, from_name);
36301     int result = 0;
36302     if (likely(value)) {
36303         if (allow_none || value != Py_None) {
36304             result = PyDict_SetItemString(moddict, to_name, value);
36305         }
36306         Py_DECREF(value);
36307     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
36308         PyErr_Clear();
36309     } else {
36310         result = -1;
36311     }
36312     return result;
36313 }
36314 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
36315     PyObject *module = NULL, *moddict, *modname;
36316     if (__Pyx_check_single_interpreter())
36317         return NULL;
36318     if (__pyx_m)
36319         return __Pyx_NewRef(__pyx_m);
36320     modname = PyObject_GetAttrString(spec, "name");
36321     if (unlikely(!modname)) goto bad;
36322     module = PyModule_NewObject(modname);
36323     Py_DECREF(modname);
36324     if (unlikely(!module)) goto bad;
36325     moddict = PyModule_GetDict(module);
36326     if (unlikely(!moddict)) goto bad;
36327     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
36328     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
36329     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
36330     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
36331     return module;
36332 bad:
36333     Py_XDECREF(module);
36334     return NULL;
36335 }
36336
36337
36338 static CYTHON_SMALL_CODE int __pyx_pymod_exec_objectify(PyObject *__pyx_pyinit_module)
36339 #endif
36340 #endif
36341 {
36342   PyObject *__pyx_t_1 = NULL;
36343   PyObject *__pyx_t_2 = NULL;
36344   int __pyx_t_3;
36345   PyObject *__pyx_t_4 = NULL;
36346   int __pyx_lineno = 0;
36347   const char *__pyx_filename = NULL;
36348   int __pyx_clineno = 0;
36349   __Pyx_RefNannyDeclarations
36350   #if CYTHON_PEP489_MULTI_PHASE_INIT
36351   if (__pyx_m) {
36352     if (__pyx_m == __pyx_pyinit_module) return 0;
36353     PyErr_SetString(PyExc_RuntimeError, "Module 'objectify' has already been imported. Re-initialisation is not supported.");
36354     return -1;
36355   }
36356   #elif PY_MAJOR_VERSION >= 3
36357   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
36358   #endif
36359   #if CYTHON_REFNANNY
36360 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
36361 if (!__Pyx_RefNanny) {
36362   PyErr_Clear();
36363   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
36364   if (!__Pyx_RefNanny)
36365       Py_FatalError("failed to import 'refnanny' module");
36366 }
36367 #endif
36368   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_objectify(void)", 0);
36369   if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36370   #ifdef __Pxy_PyFrame_Initialize_Offsets
36371   __Pxy_PyFrame_Initialize_Offsets();
36372   #endif
36373   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
36374   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
36375   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
36376   #ifdef __Pyx_CyFunction_USED
36377   if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36378   #endif
36379   #ifdef __Pyx_FusedFunction_USED
36380   if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36381   #endif
36382   #ifdef __Pyx_Coroutine_USED
36383   if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36384   #endif
36385   #ifdef __Pyx_Generator_USED
36386   if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36387   #endif
36388   #ifdef __Pyx_AsyncGen_USED
36389   if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36390   #endif
36391   #ifdef __Pyx_StopAsyncIteration_USED
36392   if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36393   #endif
36394   /*--- Library function declarations ---*/
36395   /*--- Threads initialization code ---*/
36396   #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
36397   #ifdef WITH_THREAD /* Python build with threading support? */
36398   PyEval_InitThreads();
36399   #endif
36400   #endif
36401   /*--- Module creation code ---*/
36402   #if CYTHON_PEP489_MULTI_PHASE_INIT
36403   __pyx_m = __pyx_pyinit_module;
36404   Py_INCREF(__pyx_m);
36405   #else
36406   #if PY_MAJOR_VERSION < 3
36407   __pyx_m = Py_InitModule4("objectify", __pyx_methods, __pyx_k_The_lxml_objectify_module_imple, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
36408   #else
36409   __pyx_m = PyModule_Create(&__pyx_moduledef);
36410   #endif
36411   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
36412   #endif
36413   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
36414   Py_INCREF(__pyx_d);
36415   __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
36416   Py_INCREF(__pyx_b);
36417   __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
36418   Py_INCREF(__pyx_cython_runtime);
36419   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
36420   /*--- Initialize various global constants etc. ---*/
36421   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36422   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
36423   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36424   #endif
36425   if (__pyx_module_is_main_lxml__objectify) {
36426     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36427   }
36428   #if PY_MAJOR_VERSION >= 3
36429   {
36430     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
36431     if (!PyDict_GetItemString(modules, "lxml.objectify")) {
36432       if (unlikely(PyDict_SetItemString(modules, "lxml.objectify", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36433     }
36434   }
36435   #endif
36436   /*--- Builtin init code ---*/
36437   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36438   /*--- Constants init code ---*/
36439   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36440   /*--- Global type/function init code ---*/
36441   (void)__Pyx_modinit_global_init_code();
36442   (void)__Pyx_modinit_variable_export_code();
36443   (void)__Pyx_modinit_function_export_code();
36444   if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36445   if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
36446   (void)__Pyx_modinit_variable_import_code();
36447   (void)__Pyx_modinit_function_import_code();
36448   /*--- Execution code ---*/
36449   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
36450   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
36451   #endif
36452
36453   /* "lxml/objectify.pyx":24
36454  * from libc.string cimport const_char
36455  * 
36456  * __all__ = [u'BoolElement', u'DataElement', u'E', u'Element', u'ElementMaker',             # <<<<<<<<<<<<<<
36457  *            u'FloatElement', u'IntElement', u'LongElement', u'NoneElement',
36458  *            u'NumberElement', u'ObjectPath', u'ObjectifiedDataElement',
36459  */
36460   __pyx_t_1 = PyList_New(32); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
36461   __Pyx_GOTREF(__pyx_t_1);
36462   __Pyx_INCREF(__pyx_n_u_BoolElement);
36463   __Pyx_GIVEREF(__pyx_n_u_BoolElement);
36464   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_BoolElement);
36465   __Pyx_INCREF(__pyx_n_u_DataElement);
36466   __Pyx_GIVEREF(__pyx_n_u_DataElement);
36467   PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_DataElement);
36468   __Pyx_INCREF(__pyx_n_u_E);
36469   __Pyx_GIVEREF(__pyx_n_u_E);
36470   PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_E);
36471   __Pyx_INCREF(__pyx_n_u_Element);
36472   __Pyx_GIVEREF(__pyx_n_u_Element);
36473   PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_Element);
36474   __Pyx_INCREF(__pyx_n_u_ElementMaker);
36475   __Pyx_GIVEREF(__pyx_n_u_ElementMaker);
36476   PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_u_ElementMaker);
36477   __Pyx_INCREF(__pyx_n_u_FloatElement);
36478   __Pyx_GIVEREF(__pyx_n_u_FloatElement);
36479   PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_u_FloatElement);
36480   __Pyx_INCREF(__pyx_n_u_IntElement);
36481   __Pyx_GIVEREF(__pyx_n_u_IntElement);
36482   PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_IntElement);
36483   __Pyx_INCREF(__pyx_n_u_LongElement);
36484   __Pyx_GIVEREF(__pyx_n_u_LongElement);
36485   PyList_SET_ITEM(__pyx_t_1, 7, __pyx_n_u_LongElement);
36486   __Pyx_INCREF(__pyx_n_u_NoneElement);
36487   __Pyx_GIVEREF(__pyx_n_u_NoneElement);
36488   PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_u_NoneElement);
36489   __Pyx_INCREF(__pyx_n_u_NumberElement);
36490   __Pyx_GIVEREF(__pyx_n_u_NumberElement);
36491   PyList_SET_ITEM(__pyx_t_1, 9, __pyx_n_u_NumberElement);
36492   __Pyx_INCREF(__pyx_n_u_ObjectPath);
36493   __Pyx_GIVEREF(__pyx_n_u_ObjectPath);
36494   PyList_SET_ITEM(__pyx_t_1, 10, __pyx_n_u_ObjectPath);
36495   __Pyx_INCREF(__pyx_n_u_ObjectifiedDataElement);
36496   __Pyx_GIVEREF(__pyx_n_u_ObjectifiedDataElement);
36497   PyList_SET_ITEM(__pyx_t_1, 11, __pyx_n_u_ObjectifiedDataElement);
36498   __Pyx_INCREF(__pyx_n_u_ObjectifiedElement);
36499   __Pyx_GIVEREF(__pyx_n_u_ObjectifiedElement);
36500   PyList_SET_ITEM(__pyx_t_1, 12, __pyx_n_u_ObjectifiedElement);
36501   __Pyx_INCREF(__pyx_n_u_ObjectifyElementClassLookup);
36502   __Pyx_GIVEREF(__pyx_n_u_ObjectifyElementClassLookup);
36503   PyList_SET_ITEM(__pyx_t_1, 13, __pyx_n_u_ObjectifyElementClassLookup);
36504   __Pyx_INCREF(__pyx_n_u_PYTYPE_ATTRIBUTE);
36505   __Pyx_GIVEREF(__pyx_n_u_PYTYPE_ATTRIBUTE);
36506   PyList_SET_ITEM(__pyx_t_1, 14, __pyx_n_u_PYTYPE_ATTRIBUTE);
36507   __Pyx_INCREF(__pyx_n_u_PyType);
36508   __Pyx_GIVEREF(__pyx_n_u_PyType);
36509   PyList_SET_ITEM(__pyx_t_1, 15, __pyx_n_u_PyType);
36510   __Pyx_INCREF(__pyx_n_u_StringElement);
36511   __Pyx_GIVEREF(__pyx_n_u_StringElement);
36512   PyList_SET_ITEM(__pyx_t_1, 16, __pyx_n_u_StringElement);
36513   __Pyx_INCREF(__pyx_n_u_SubElement);
36514   __Pyx_GIVEREF(__pyx_n_u_SubElement);
36515   PyList_SET_ITEM(__pyx_t_1, 17, __pyx_n_u_SubElement);
36516   __Pyx_INCREF(__pyx_n_u_XML);
36517   __Pyx_GIVEREF(__pyx_n_u_XML);
36518   PyList_SET_ITEM(__pyx_t_1, 18, __pyx_n_u_XML);
36519   __Pyx_INCREF(__pyx_n_u_annotate);
36520   __Pyx_GIVEREF(__pyx_n_u_annotate);
36521   PyList_SET_ITEM(__pyx_t_1, 19, __pyx_n_u_annotate);
36522   __Pyx_INCREF(__pyx_n_u_deannotate);
36523   __Pyx_GIVEREF(__pyx_n_u_deannotate);
36524   PyList_SET_ITEM(__pyx_t_1, 20, __pyx_n_u_deannotate);
36525   __Pyx_INCREF(__pyx_n_u_dump);
36526   __Pyx_GIVEREF(__pyx_n_u_dump);
36527   PyList_SET_ITEM(__pyx_t_1, 21, __pyx_n_u_dump);
36528   __Pyx_INCREF(__pyx_n_u_enable_recursive_str);
36529   __Pyx_GIVEREF(__pyx_n_u_enable_recursive_str);
36530   PyList_SET_ITEM(__pyx_t_1, 22, __pyx_n_u_enable_recursive_str);
36531   __Pyx_INCREF(__pyx_n_u_fromstring);
36532   __Pyx_GIVEREF(__pyx_n_u_fromstring);
36533   PyList_SET_ITEM(__pyx_t_1, 23, __pyx_n_u_fromstring);
36534   __Pyx_INCREF(__pyx_n_u_getRegisteredTypes);
36535   __Pyx_GIVEREF(__pyx_n_u_getRegisteredTypes);
36536   PyList_SET_ITEM(__pyx_t_1, 24, __pyx_n_u_getRegisteredTypes);
36537   __Pyx_INCREF(__pyx_n_u_makeparser);
36538   __Pyx_GIVEREF(__pyx_n_u_makeparser);
36539   PyList_SET_ITEM(__pyx_t_1, 25, __pyx_n_u_makeparser);
36540   __Pyx_INCREF(__pyx_n_u_parse);
36541   __Pyx_GIVEREF(__pyx_n_u_parse);
36542   PyList_SET_ITEM(__pyx_t_1, 26, __pyx_n_u_parse);
36543   __Pyx_INCREF(__pyx_n_u_pyannotate);
36544   __Pyx_GIVEREF(__pyx_n_u_pyannotate);
36545   PyList_SET_ITEM(__pyx_t_1, 27, __pyx_n_u_pyannotate);
36546   __Pyx_INCREF(__pyx_n_u_pytypename);
36547   __Pyx_GIVEREF(__pyx_n_u_pytypename);
36548   PyList_SET_ITEM(__pyx_t_1, 28, __pyx_n_u_pytypename);
36549   __Pyx_INCREF(__pyx_n_u_set_default_parser);
36550   __Pyx_GIVEREF(__pyx_n_u_set_default_parser);
36551   PyList_SET_ITEM(__pyx_t_1, 29, __pyx_n_u_set_default_parser);
36552   __Pyx_INCREF(__pyx_n_u_set_pytype_attribute_tag);
36553   __Pyx_GIVEREF(__pyx_n_u_set_pytype_attribute_tag);
36554   PyList_SET_ITEM(__pyx_t_1, 30, __pyx_n_u_set_pytype_attribute_tag);
36555   __Pyx_INCREF(__pyx_n_u_xsiannotate);
36556   __Pyx_GIVEREF(__pyx_n_u_xsiannotate);
36557   PyList_SET_ITEM(__pyx_t_1, 31, __pyx_n_u_xsiannotate);
36558   if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
36559   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36560
36561   /* "lxml/objectify.pyx":35
36562  * 
36563  * cdef object etree
36564  * from lxml import etree             # <<<<<<<<<<<<<<
36565  * # initialize C-API of lxml.etree
36566  * import_lxml__etree()
36567  */
36568   __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
36569   __Pyx_GOTREF(__pyx_t_1);
36570   __Pyx_INCREF(__pyx_n_s_etree);
36571   __Pyx_GIVEREF(__pyx_n_s_etree);
36572   PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_etree);
36573   __pyx_t_2 = __Pyx_Import(__pyx_n_s_lxml, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
36574   __Pyx_GOTREF(__pyx_t_2);
36575   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36576   __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_etree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
36577   __Pyx_GOTREF(__pyx_t_1);
36578   __Pyx_INCREF(__pyx_t_1);
36579   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_etree);
36580   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_etree, __pyx_t_1);
36581   __Pyx_GIVEREF(__pyx_t_1);
36582   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36583   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36584
36585   /* "lxml/objectify.pyx":37
36586  * from lxml import etree
36587  * # initialize C-API of lxml.etree
36588  * import_lxml__etree()             # <<<<<<<<<<<<<<
36589  * 
36590  * __version__ = etree.__version__
36591  */
36592   __pyx_t_3 = import_lxml__etree(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 37, __pyx_L1_error)
36593
36594   /* "lxml/objectify.pyx":39
36595  * import_lxml__etree()
36596  * 
36597  * __version__ = etree.__version__             # <<<<<<<<<<<<<<
36598  * 
36599  * cdef object re
36600  */
36601   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
36602   __Pyx_GOTREF(__pyx_t_2);
36603   if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
36604   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36605
36606   /* "lxml/objectify.pyx":42
36607  * 
36608  * cdef object re
36609  * import re             # <<<<<<<<<<<<<<
36610  * 
36611  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
36612  */
36613   __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
36614   __Pyx_GOTREF(__pyx_t_2);
36615   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_re);
36616   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_re, __pyx_t_2);
36617   __Pyx_GIVEREF(__pyx_t_2);
36618   __pyx_t_2 = 0;
36619
36620   /* "lxml/objectify.pyx":44
36621  * import re
36622  * 
36623  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)             # <<<<<<<<<<<<<<
36624  * cdef object is_special_method = re.compile(u'__.*__$').match
36625  * 
36626  */
36627   __Pyx_INCREF(__pyx_tuple__22);
36628   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
36629   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS, __pyx_tuple__22);
36630   __Pyx_GIVEREF(__pyx_tuple__22);
36631
36632   /* "lxml/objectify.pyx":45
36633  * 
36634  * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
36635  * cdef object is_special_method = re.compile(u'__.*__$').match             # <<<<<<<<<<<<<<
36636  * 
36637  * 
36638  */
36639   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
36640   __Pyx_GOTREF(__pyx_t_2);
36641   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
36642   __Pyx_GOTREF(__pyx_t_1);
36643   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36644   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
36645   __Pyx_GOTREF(__pyx_t_2);
36646   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36647   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_is_special_method);
36648   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_is_special_method, __pyx_t_2);
36649   __Pyx_GIVEREF(__pyx_t_2);
36650   __pyx_t_2 = 0;
36651
36652   /* "lxml/objectify.pyx":75
36653  * cdef const_xmlChar* _PYTYPE_ATTRIBUTE_NAME
36654  * 
36655  * PYTYPE_ATTRIBUTE = None             # <<<<<<<<<<<<<<
36656  * 
36657  * cdef unicode TREE_PYTYPE_NAME = u"TREE"
36658  */
36659   if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTYPE_ATTRIBUTE, Py_None) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
36660
36661   /* "lxml/objectify.pyx":77
36662  * PYTYPE_ATTRIBUTE = None
36663  * 
36664  * cdef unicode TREE_PYTYPE_NAME = u"TREE"             # <<<<<<<<<<<<<<
36665  * 
36666  * cdef tuple _unicodeAndUtf8(s):
36667  */
36668   __Pyx_INCREF(__pyx_n_u_TREE);
36669   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
36670   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, __pyx_n_u_TREE);
36671   __Pyx_GIVEREF(__pyx_n_u_TREE);
36672
36673   /* "lxml/objectify.pyx":82
36674  *     return s, python.PyUnicode_AsUTF8String(s)
36675  * 
36676  * def set_pytype_attribute_tag(attribute_tag=None):             # <<<<<<<<<<<<<<
36677  *     u"""set_pytype_attribute_tag(attribute_tag=None)
36678  *     Change name and namespace of the XML attribute that holds Python type
36679  */
36680   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_1set_pytype_attribute_tag, 0, __pyx_n_s_set_pytype_attribute_tag, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
36681   __Pyx_GOTREF(__pyx_t_2);
36682   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__27);
36683   if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_pytype_attribute_tag, __pyx_t_2) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
36684   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36685
36686   /* "lxml/objectify.pyx":112
36687  *         _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
36688  * 
36689  * set_pytype_attribute_tag()             # <<<<<<<<<<<<<<
36690  * 
36691  * 
36692  */
36693   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_set_pytype_attribute_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
36694   __Pyx_GOTREF(__pyx_t_2);
36695   __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
36696   __Pyx_GOTREF(__pyx_t_1);
36697   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36698   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36699
36700   /* "lxml/objectify.pyx":118
36701  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
36702  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
36703  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")             # <<<<<<<<<<<<<<
36704  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
36705  * 
36706  */
36707   __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_kp_u_http_www_w3_org_2001_XMLSchema); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
36708   __Pyx_GOTREF(__pyx_t_1);
36709   if (likely(__pyx_t_1 != Py_None)) {
36710     PyObject* sequence = __pyx_t_1;
36711     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
36712     if (unlikely(size != 2)) {
36713       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
36714       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
36715       __PYX_ERR(0, 117, __pyx_L1_error)
36716     }
36717     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36718     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
36719     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
36720     __Pyx_INCREF(__pyx_t_2);
36721     __Pyx_INCREF(__pyx_t_4);
36722     #else
36723     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
36724     __Pyx_GOTREF(__pyx_t_2);
36725     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 117, __pyx_L1_error)
36726     __Pyx_GOTREF(__pyx_t_4);
36727     #endif
36728     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36729   } else {
36730     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 117, __pyx_L1_error)
36731   }
36732
36733   /* "lxml/objectify.pyx":117
36734  * # namespaces for XML Schema
36735  * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
36736  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \             # <<<<<<<<<<<<<<
36737  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
36738  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)
36739  */
36740   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
36741   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS, __pyx_t_2);
36742   __Pyx_GIVEREF(__pyx_t_2);
36743   __pyx_t_2 = 0;
36744   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
36745   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8, __pyx_t_4);
36746   __Pyx_GIVEREF(__pyx_t_4);
36747   __pyx_t_4 = 0;
36748
36749   /* "lxml/objectify.pyx":119
36750  * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
36751  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
36752  * cdef const_xmlChar* _XML_SCHEMA_NS = _xcstr(XML_SCHEMA_NS_UTF8)             # <<<<<<<<<<<<<<
36753  * 
36754  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36755  */
36756   __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8;
36757   __Pyx_INCREF(__pyx_t_1);
36758   __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_1);
36759   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36760
36761   /* "lxml/objectify.pyx":123
36762  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36763  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
36764  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")             # <<<<<<<<<<<<<<
36765  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36766  * 
36767  */
36768   __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(__pyx_kp_u_http_www_w3_org_2001_XMLSchema_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
36769   __Pyx_GOTREF(__pyx_t_1);
36770   if (likely(__pyx_t_1 != Py_None)) {
36771     PyObject* sequence = __pyx_t_1;
36772     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
36773     if (unlikely(size != 2)) {
36774       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
36775       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
36776       __PYX_ERR(0, 122, __pyx_L1_error)
36777     }
36778     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
36779     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
36780     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
36781     __Pyx_INCREF(__pyx_t_4);
36782     __Pyx_INCREF(__pyx_t_2);
36783     #else
36784     __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
36785     __Pyx_GOTREF(__pyx_t_4);
36786     __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
36787     __Pyx_GOTREF(__pyx_t_2);
36788     #endif
36789     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36790   } else {
36791     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 122, __pyx_L1_error)
36792   }
36793
36794   /* "lxml/objectify.pyx":122
36795  * 
36796  * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
36797  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \             # <<<<<<<<<<<<<<
36798  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
36799  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36800  */
36801   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
36802   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS, __pyx_t_4);
36803   __Pyx_GIVEREF(__pyx_t_4);
36804   __pyx_t_4 = 0;
36805   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
36806   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8, __pyx_t_2);
36807   __Pyx_GIVEREF(__pyx_t_2);
36808   __pyx_t_2 = 0;
36809
36810   /* "lxml/objectify.pyx":124
36811  * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
36812  *     _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
36813  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)             # <<<<<<<<<<<<<<
36814  * 
36815  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
36816  */
36817   __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8;
36818   __Pyx_INCREF(__pyx_t_1);
36819   __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = (const xmlChar*)PyBytes_AS_STRING(__pyx_t_1);
36820   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36821
36822   /* "lxml/objectify.pyx":126
36823  * cdef const_xmlChar* _XML_SCHEMA_INSTANCE_NS = _xcstr(XML_SCHEMA_INSTANCE_NS_UTF8)
36824  * 
36825  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
36826  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
36827  * 
36828  */
36829   __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_nil, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
36830   __Pyx_GOTREF(__pyx_t_1);
36831   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
36832   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, __pyx_t_1);
36833   __Pyx_GIVEREF(__pyx_t_1);
36834   __pyx_t_1 = 0;
36835
36836   /* "lxml/objectify.pyx":127
36837  * 
36838  * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
36839  * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS             # <<<<<<<<<<<<<<
36840  * 
36841  * 
36842  */
36843   __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_type, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
36844   __Pyx_GOTREF(__pyx_t_1);
36845   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
36846   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_t_1);
36847   __Pyx_GIVEREF(__pyx_t_1);
36848   __pyx_t_1 = 0;
36849
36850   /* "lxml/objectify.pyx":162
36851  * 
36852  *     # pickle support for objectified Element
36853  *     def __reduce__(self):             # <<<<<<<<<<<<<<
36854  *         return fromstring, (etree.tostring(self),)
36855  * 
36856  */
36857   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_18ObjectifiedElement_5__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedElement___reduce, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error)
36858   __Pyx_GOTREF(__pyx_t_1);
36859   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dict, __pyx_n_s_reduce, __pyx_t_1) < 0) __PYX_ERR(0, 162, __pyx_L1_error)
36860   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36861   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36862
36863   /* "lxml/objectify.pyx":193
36864  *         return _countSiblings(self._c_node)
36865  * 
36866  *     def countchildren(self):             # <<<<<<<<<<<<<<
36867  *         u"""countchildren(self)
36868  * 
36869  */
36870   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_18ObjectifiedElement_9countchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedElement_countchildren, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
36871   __Pyx_GOTREF(__pyx_t_1);
36872   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dict, __pyx_n_s_countchildren, __pyx_t_1) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
36873   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36874   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36875
36876   /* "lxml/objectify.pyx":210
36877  *         return c
36878  * 
36879  *     def getchildren(self):             # <<<<<<<<<<<<<<
36880  *         u"""getchildren(self)
36881  * 
36882  */
36883   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_18ObjectifiedElement_11getchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedElement_getchildren, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
36884   __Pyx_GOTREF(__pyx_t_1);
36885   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dict, __pyx_n_s_getchildren, __pyx_t_1) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
36886   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36887   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36888
36889   /* "lxml/objectify.pyx":263
36890  *         self.remove(child)
36891  * 
36892  *     def addattr(self, tag, value):             # <<<<<<<<<<<<<<
36893  *         u"""addattr(self, tag, value)
36894  * 
36895  */
36896   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_18ObjectifiedElement_19addattr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedElement_addattr, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
36897   __Pyx_GOTREF(__pyx_t_1);
36898   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dict, __pyx_n_s_addattr, __pyx_t_1) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
36899   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36900   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36901
36902   /* "lxml/objectify.pyx":369
36903  *             parent.remove(sibling)
36904  * 
36905  *     def descendantpaths(self, prefix=None):             # <<<<<<<<<<<<<<
36906  *         u"""descendantpaths(self, prefix=None)
36907  * 
36908  */
36909   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_18ObjectifiedElement_27descendantpaths, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedElement_descendantpat, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
36910   __Pyx_GOTREF(__pyx_t_1);
36911   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement->tp_dict, __pyx_n_s_descendantpaths, __pyx_t_1) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
36912   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36913   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedElement);
36914
36915   /* "lxml/objectify.pyx":606
36916  *         return strrepr(textOf(self._c_node) or '')
36917  * 
36918  *     def _setText(self, s):             # <<<<<<<<<<<<<<
36919  *         u"""For use in subclasses only. Don't use unless you know what you are
36920  *         doing.
36921  */
36922   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_22ObjectifiedDataElement_5_setText, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectifiedDataElement__setText, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
36923   __Pyx_GOTREF(__pyx_t_1);
36924   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement->tp_dict, __pyx_n_s_setText, __pyx_t_1) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
36925   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36926   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement);
36927
36928   /* "lxml/objectify.pyx":614
36929  * cdef class NumberElement(ObjectifiedDataElement):
36930  *     cdef object _parse_value
36931  *     def _setValueParser(self, function):             # <<<<<<<<<<<<<<
36932  *         u"""Set the function that parses the Python value from a string.
36933  * 
36934  */
36935   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_13NumberElement_1_setValueParser, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumberElement__setValueParser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error)
36936   __Pyx_GOTREF(__pyx_t_1);
36937   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_NumberElement->tp_dict, __pyx_n_s_setValueParser, __pyx_t_1) < 0) __PYX_ERR(0, 614, __pyx_L1_error)
36938   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36939   PyType_Modified(__pyx_ptype_4lxml_9objectify_NumberElement);
36940
36941   /* "lxml/objectify.pyx":634
36942  *         return float(_parseNumber(self))
36943  * 
36944  *     def __complex__(self):             # <<<<<<<<<<<<<<
36945  *         return complex(_parseNumber(self))
36946  * 
36947  */
36948   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_13NumberElement_9__complex__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_NumberElement___complex, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
36949   __Pyx_GOTREF(__pyx_t_1);
36950   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_NumberElement->tp_dict, __pyx_n_s_complex, __pyx_t_1) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
36951   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36952   PyType_Modified(__pyx_ptype_4lxml_9objectify_NumberElement);
36953
36954   /* "lxml/objectify.pyx":710
36955  * 
36956  * cdef class IntElement(NumberElement):
36957  *     def _init(self):             # <<<<<<<<<<<<<<
36958  *         self._parse_value = int
36959  * 
36960  */
36961   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_10IntElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_IntElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
36962   __Pyx_GOTREF(__pyx_t_1);
36963   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
36964   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36965   PyType_Modified(__pyx_ptype_4lxml_9objectify_IntElement);
36966
36967   /* "lxml/objectify.pyx":717
36968  * 
36969  * cdef class LongElement(NumberElement):
36970  *     def _init(self):             # <<<<<<<<<<<<<<
36971  *         self._parse_value = long
36972  * 
36973  */
36974   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_11LongElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LongElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
36975   __Pyx_GOTREF(__pyx_t_1);
36976   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_LongElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 717, __pyx_L1_error)
36977   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36978   PyType_Modified(__pyx_ptype_4lxml_9objectify_LongElement);
36979
36980   /* "lxml/objectify.pyx":724
36981  * 
36982  * cdef class FloatElement(NumberElement):
36983  *     def _init(self):             # <<<<<<<<<<<<<<
36984  *         self._parse_value = float
36985  * 
36986  */
36987   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_12FloatElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FloatElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
36988   __Pyx_GOTREF(__pyx_t_1);
36989   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_FloatElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 724, __pyx_L1_error)
36990   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36991   PyType_Modified(__pyx_ptype_4lxml_9objectify_FloatElement);
36992
36993   /* "lxml/objectify.pyx":741
36994  *         return repr(textOf(self._c_node) or u'')
36995  * 
36996  *     def strlen(self):             # <<<<<<<<<<<<<<
36997  *         text = textOf(self._c_node)
36998  *         if text is None:
36999  */
37000   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_13StringElement_3strlen, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringElement_strlen, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
37001   __Pyx_GOTREF(__pyx_t_1);
37002   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement->tp_dict, __pyx_n_s_strlen, __pyx_t_1) < 0) __PYX_ERR(0, 741, __pyx_L1_error)
37003   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37004   PyType_Modified(__pyx_ptype_4lxml_9objectify_StringElement);
37005
37006   /* "lxml/objectify.pyx":786
37007  *         return float(textOf(self._c_node))
37008  * 
37009  *     def __complex__(self):             # <<<<<<<<<<<<<<
37010  *         return complex(textOf(self._c_node))
37011  * 
37012  */
37013   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_13StringElement_23__complex__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_StringElement___complex, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error)
37014   __Pyx_GOTREF(__pyx_t_1);
37015   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement->tp_dict, __pyx_n_s_complex, __pyx_t_1) < 0) __PYX_ERR(0, 786, __pyx_L1_error)
37016   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37017   PyType_Modified(__pyx_ptype_4lxml_9objectify_StringElement);
37018
37019   /* "lxml/objectify.pyx":821
37020  *     Python's bool type.
37021  *     """
37022  *     def _init(self):             # <<<<<<<<<<<<<<
37023  *         self._parse_value = __parseBool
37024  * 
37025  */
37026   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_11BoolElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
37027   __Pyx_GOTREF(__pyx_t_1);
37028   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 821, __pyx_L1_error)
37029   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37030   PyType_Modified(__pyx_ptype_4lxml_9objectify_BoolElement);
37031
37032   /* "lxml/objectify.pyx":843
37033  *         return __parseBool(textOf(self._c_node))
37034  * 
37035  * def __checkBool(s):             # <<<<<<<<<<<<<<
37036  *     cdef int value = -1
37037  *     if s is not None:
37038  */
37039   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_3__checkBool, 0, __pyx_n_s_checkBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
37040   __Pyx_GOTREF(__pyx_t_1);
37041   if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkBool, __pyx_t_1) < 0) __PYX_ERR(0, 843, __pyx_L1_error)
37042   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37043
37044   /* "lxml/objectify.pyx":850
37045  *         raise ValueError
37046  * 
37047  * cpdef bint __parseBool(s) except -1:             # <<<<<<<<<<<<<<
37048  *     cdef int value
37049  *     if s is None:
37050  */
37051   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_5__parseBool, 0, __pyx_n_s_parseBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
37052   __Pyx_GOTREF(__pyx_t_1);
37053   if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseBool, __pyx_t_1) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
37054   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37055
37056   /* "lxml/objectify.pyx":948
37057  *         return "PyType(%s, %s)" % (self.name, self._type.__name__)
37058  * 
37059  *     def register(self, before=None, after=None):             # <<<<<<<<<<<<<<
37060  *         u"""register(self, before=None, after=None)
37061  * 
37062  */
37063   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_6PyType_5register, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_register, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
37064   __Pyx_GOTREF(__pyx_t_1);
37065   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_register, __pyx_t_1) < 0) __PYX_ERR(0, 948, __pyx_L1_error)
37066   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37067   PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType);
37068
37069   /* "lxml/objectify.pyx":989
37070  *             _SCHEMA_TYPE_DICT[xs_type] = self
37071  * 
37072  *     def unregister(self):             # <<<<<<<<<<<<<<
37073  *         u"unregister(self)"
37074  *         if _PYTYPE_DICT.get(self.name) is self:
37075  */
37076   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_6PyType_7unregister, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_unregister, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error)
37077   __Pyx_GOTREF(__pyx_t_1);
37078   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_unregister, __pyx_t_1) < 0) __PYX_ERR(0, 989, __pyx_L1_error)
37079   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37080   PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType);
37081
37082   /* "lxml/objectify.pyx":1014
37083  * 
37084  * 
37085  * cdef dict _PYTYPE_DICT = {}             # <<<<<<<<<<<<<<
37086  * cdef dict _SCHEMA_TYPE_DICT = {}
37087  * cdef list _TYPE_CHECKS = []
37088  */
37089   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error)
37090   __Pyx_GOTREF(__pyx_t_1);
37091   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT);
37092   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__PYTYPE_DICT, ((PyObject*)__pyx_t_1));
37093   __Pyx_GIVEREF(__pyx_t_1);
37094   __pyx_t_1 = 0;
37095
37096   /* "lxml/objectify.pyx":1015
37097  * 
37098  * cdef dict _PYTYPE_DICT = {}
37099  * cdef dict _SCHEMA_TYPE_DICT = {}             # <<<<<<<<<<<<<<
37100  * cdef list _TYPE_CHECKS = []
37101  * 
37102  */
37103   __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)
37104   __Pyx_GOTREF(__pyx_t_1);
37105   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
37106   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, ((PyObject*)__pyx_t_1));
37107   __Pyx_GIVEREF(__pyx_t_1);
37108   __pyx_t_1 = 0;
37109
37110   /* "lxml/objectify.pyx":1016
37111  * cdef dict _PYTYPE_DICT = {}
37112  * cdef dict _SCHEMA_TYPE_DICT = {}
37113  * cdef list _TYPE_CHECKS = []             # <<<<<<<<<<<<<<
37114  * 
37115  * def __lower_bool(b):
37116  */
37117   __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
37118   __Pyx_GOTREF(__pyx_t_1);
37119   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
37120   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__TYPE_CHECKS, ((PyObject*)__pyx_t_1));
37121   __Pyx_GIVEREF(__pyx_t_1);
37122   __pyx_t_1 = 0;
37123
37124   /* "lxml/objectify.pyx":1018
37125  * cdef list _TYPE_CHECKS = []
37126  * 
37127  * def __lower_bool(b):             # <<<<<<<<<<<<<<
37128  *     return u"true" if b else u"false"
37129  * 
37130  */
37131   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_7__lower_bool, 0, __pyx_n_s_lower_bool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error)
37132   __Pyx_GOTREF(__pyx_t_1);
37133   if (PyDict_SetItem(__pyx_d, __pyx_n_s_lower_bool, __pyx_t_1) < 0) __PYX_ERR(0, 1018, __pyx_L1_error)
37134   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37135
37136   /* "lxml/objectify.pyx":1024
37137  *     return u"str" if python._isString(obj) else _typename(obj)
37138  * 
37139  * def pytypename(obj):             # <<<<<<<<<<<<<<
37140  *     u"""pytypename(obj)
37141  * 
37142  */
37143   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_9pytypename, 0, __pyx_n_s_pytypename, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
37144   __Pyx_GOTREF(__pyx_t_1);
37145   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytypename, __pyx_t_1) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
37146   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37147
37148   /* "lxml/objectify.pyx":1066
37149  * 
37150  * # non-registered PyType for inner tree elements
37151  * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)             # <<<<<<<<<<<<<<
37152  * 
37153  * _registerPyTypes()
37154  */
37155   __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error)
37156   __Pyx_GOTREF(__pyx_t_1);
37157   __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37158   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37159   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37160   __Pyx_INCREF(Py_None);
37161   __Pyx_GIVEREF(Py_None);
37162   PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
37163   __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37164   __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37165   PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
37166   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error)
37167   __Pyx_GOTREF(__pyx_t_2);
37168   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37169   __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
37170   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_TREE_PYTYPE, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2));
37171   __Pyx_GIVEREF(__pyx_t_2);
37172   __pyx_t_2 = 0;
37173
37174   /* "lxml/objectify.pyx":1068
37175  * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
37176  * 
37177  * _registerPyTypes()             # <<<<<<<<<<<<<<
37178  * 
37179  * def getRegisteredTypes():
37180  */
37181   __pyx_t_2 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
37182   __Pyx_GOTREF(__pyx_t_2);
37183   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37184
37185   /* "lxml/objectify.pyx":1070
37186  * _registerPyTypes()
37187  * 
37188  * def getRegisteredTypes():             # <<<<<<<<<<<<<<
37189  *     u"""getRegisteredTypes()
37190  * 
37191  */
37192   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_11getRegisteredTypes, 0, __pyx_n_s_getRegisteredTypes, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error)
37193   __Pyx_GOTREF(__pyx_t_2);
37194   if (PyDict_SetItem(__pyx_d, __pyx_n_s_getRegisteredTypes, __pyx_t_2) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
37195   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37196
37197   /* "lxml/objectify.pyx":1303
37198  * # Recursive element dumping
37199  * 
37200  * cdef bint __RECURSIVE_STR = 0 # default: off             # <<<<<<<<<<<<<<
37201  * 
37202  * def enable_recursive_str(on=True):
37203  */
37204   __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;
37205
37206   /* "lxml/objectify.pyx":1305
37207  * cdef bint __RECURSIVE_STR = 0 # default: off
37208  * 
37209  * def enable_recursive_str(on=True):             # <<<<<<<<<<<<<<
37210  *     u"""enable_recursive_str(on=True)
37211  * 
37212  */
37213   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_13enable_recursive_str, 0, __pyx_n_s_enable_recursive_str, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error)
37214   __Pyx_GOTREF(__pyx_t_2);
37215   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__72);
37216   if (PyDict_SetItem(__pyx_d, __pyx_n_s_enable_recursive_str, __pyx_t_2) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
37217   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37218
37219   /* "lxml/objectify.pyx":1314
37220  *     __RECURSIVE_STR = on
37221  * 
37222  * def dump(_Element element not None):             # <<<<<<<<<<<<<<
37223  *     u"""dump(_Element element not None)
37224  * 
37225  */
37226   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_15dump, 0, __pyx_n_s_dump, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error)
37227   __Pyx_GOTREF(__pyx_t_2);
37228   if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
37229   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37230
37231   /* "lxml/objectify.pyx":1357
37232  * # Pickle support for objectified ElementTree
37233  * 
37234  * def __unpickleElementTree(data):             # <<<<<<<<<<<<<<
37235  *     return etree.ElementTree(fromstring(data))
37236  * 
37237  */
37238   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_17__unpickleElementTree, 0, __pyx_n_s_unpickleElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
37239   __Pyx_GOTREF(__pyx_t_2);
37240   if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickleElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
37241   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37242
37243   /* "lxml/objectify.pyx":1368
37244  *                    elementTreeReduceFunction, __unpickleElementTree)
37245  * 
37246  * def pickleReduceElementTree(obj):             # <<<<<<<<<<<<<<
37247  *     return __unpickleElementTree, (etree.tostring(obj),)
37248  * 
37249  */
37250   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_19pickleReduceElementTree, 0, __pyx_n_s_pickleReduceElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
37251   __Pyx_GOTREF(__pyx_t_2);
37252   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickleReduceElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1368, __pyx_L1_error)
37253   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37254
37255   /* "lxml/objectify.pyx":1371
37256  *     return __unpickleElementTree, (etree.tostring(obj),)
37257  * 
37258  * _setupPickle(pickleReduceElementTree)             # <<<<<<<<<<<<<<
37259  * del pickleReduceElementTree
37260  * 
37261  */
37262   __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickleReduceElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
37263   __Pyx_GOTREF(__pyx_t_2);
37264   __pyx_t_1 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error)
37265   __Pyx_GOTREF(__pyx_t_1);
37266   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37267   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37268
37269   /* "lxml/objectify.pyx":1372
37270  * 
37271  * _setupPickle(pickleReduceElementTree)
37272  * del pickleReduceElementTree             # <<<<<<<<<<<<<<
37273  * 
37274  * ################################################################################
37275  */
37276   if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_pickleReduceElementTree) < 0) __PYX_ERR(0, 1372, __pyx_L1_error)
37277
37278   /* "lxml/objectify.pyx":1462
37279  *     return None
37280  * 
37281  * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,             # <<<<<<<<<<<<<<
37282  *              empty_pytype=None):
37283  *     u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
37284  */
37285   __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
37286   __Pyx_GOTREF(__pyx_t_1);
37287   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37288   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37289   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37290   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_21pyannotate, 0, __pyx_n_s_pyannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
37291   __Pyx_GOTREF(__pyx_t_2);
37292   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37293   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37294   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyannotate, __pyx_t_2) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
37295   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37296
37297   /* "lxml/objectify.pyx":1485
37298  *     _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
37299  * 
37300  * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,             # <<<<<<<<<<<<<<
37301  *                 empty_type=None):
37302  *     u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
37303  */
37304   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L1_error)
37305   __Pyx_GOTREF(__pyx_t_2);
37306   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37307   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_pytype, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37308   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37309   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_23xsiannotate, 0, __pyx_n_s_xsiannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error)
37310   __Pyx_GOTREF(__pyx_t_1);
37311   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37312   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37313   if (PyDict_SetItem(__pyx_d, __pyx_n_s_xsiannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1485, __pyx_L1_error)
37314   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37315
37316   /* "lxml/objectify.pyx":1513
37317  *     _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
37318  * 
37319  * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,             # <<<<<<<<<<<<<<
37320  *              empty_pytype=None, empty_type=None, annotate_xsi=0,
37321  *              annotate_pytype=1):
37322  */
37323   __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
37324   __Pyx_GOTREF(__pyx_t_1);
37325   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37326   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37327   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37328   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37329   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_xsi, ((PyObject *)__pyx_int_0)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37330   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_pytype, ((PyObject *)__pyx_int_1)) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37331   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_25annotate, 0, __pyx_n_s_annotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
37332   __Pyx_GOTREF(__pyx_t_2);
37333   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37334   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37335   if (PyDict_SetItem(__pyx_d, __pyx_n_s_annotate, __pyx_t_2) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
37336   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37337
37338   /* "lxml/objectify.pyx":1706
37339  *     return 0
37340  * 
37341  * cdef object _strip_attributes = etree.strip_attributes             # <<<<<<<<<<<<<<
37342  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37343  * 
37344  */
37345   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_strip_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error)
37346   __Pyx_GOTREF(__pyx_t_2);
37347   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
37348   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_2);
37349   __Pyx_GIVEREF(__pyx_t_2);
37350   __pyx_t_2 = 0;
37351
37352   /* "lxml/objectify.pyx":1707
37353  * 
37354  * cdef object _strip_attributes = etree.strip_attributes
37355  * cdef object _cleanup_namespaces = etree.cleanup_namespaces             # <<<<<<<<<<<<<<
37356  * 
37357  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
37358  */
37359   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_cleanup_namespaces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error)
37360   __Pyx_GOTREF(__pyx_t_2);
37361   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__cleanup_namespaces);
37362   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__cleanup_namespaces, __pyx_t_2);
37363   __Pyx_GIVEREF(__pyx_t_2);
37364   __pyx_t_2 = 0;
37365
37366   /* "lxml/objectify.pyx":1709
37367  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37368  * 
37369  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
37370  *                bint xsi_nil=False, bint cleanup_namespaces=False):
37371  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37372  */
37373   __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
37374   __Pyx_GOTREF(__pyx_t_2);
37375   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
37376   __Pyx_GOTREF(__pyx_t_1);
37377   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37378   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37379   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
37380   __Pyx_GOTREF(__pyx_t_1);
37381   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37382   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37383
37384   /* "lxml/objectify.pyx":1710
37385  * 
37386  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,
37387  *                bint xsi_nil=False, bint cleanup_namespaces=False):             # <<<<<<<<<<<<<<
37388  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37389  * 
37390  */
37391   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
37392   __Pyx_GOTREF(__pyx_t_1);
37393   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_nil, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37394   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37395   __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1710, __pyx_L1_error)
37396   __Pyx_GOTREF(__pyx_t_1);
37397   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cleanup_namespaces, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37398   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37399
37400   /* "lxml/objectify.pyx":1709
37401  * cdef object _cleanup_namespaces = etree.cleanup_namespaces
37402  * 
37403  * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True,             # <<<<<<<<<<<<<<
37404  *                bint xsi_nil=False, bint cleanup_namespaces=False):
37405  *     u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False)
37406  */
37407   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_27deannotate, 0, __pyx_n_s_deannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
37408   __Pyx_GOTREF(__pyx_t_1);
37409   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37410   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37411   if (PyDict_SetItem(__pyx_d, __pyx_n_s_deannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1709, __pyx_L1_error)
37412   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37413
37414   /* "lxml/objectify.pyx":1743
37415  * 
37416  * cdef object __DEFAULT_PARSER
37417  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)             # <<<<<<<<<<<<<<
37418  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
37419  * 
37420  */
37421   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
37422   __Pyx_GOTREF(__pyx_t_1);
37423   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1743, __pyx_L1_error)
37424   __Pyx_GOTREF(__pyx_t_2);
37425   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_remove_blank_text, Py_True) < 0) __PYX_ERR(0, 1743, __pyx_L1_error)
37426   __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error)
37427   __Pyx_GOTREF(__pyx_t_4);
37428   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37429   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37430   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37431   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_t_4);
37432   __Pyx_GIVEREF(__pyx_t_4);
37433   __pyx_t_4 = 0;
37434
37435   /* "lxml/objectify.pyx":1744
37436  * cdef object __DEFAULT_PARSER
37437  * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
37438  * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )             # <<<<<<<<<<<<<<
37439  * 
37440  * cdef object objectify_parser
37441  */
37442   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1744, __pyx_L1_error)
37443   __Pyx_GOTREF(__pyx_t_4);
37444   __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1744, __pyx_L1_error)
37445   __Pyx_GOTREF(__pyx_t_2);
37446   __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error)
37447   __Pyx_GOTREF(__pyx_t_1);
37448   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37449   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37450   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37451
37452   /* "lxml/objectify.pyx":1747
37453  * 
37454  * cdef object objectify_parser
37455  * objectify_parser = __DEFAULT_PARSER             # <<<<<<<<<<<<<<
37456  * 
37457  * def set_default_parser(new_parser = None):
37458  */
37459   __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37460   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
37461   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37462   __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37463
37464   /* "lxml/objectify.pyx":1749
37465  * objectify_parser = __DEFAULT_PARSER
37466  * 
37467  * def set_default_parser(new_parser = None):             # <<<<<<<<<<<<<<
37468  *     u"""set_default_parser(new_parser = None)
37469  * 
37470  */
37471   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_29set_default_parser, 0, __pyx_n_s_set_default_parser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
37472   __Pyx_GOTREF(__pyx_t_1);
37473   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__89);
37474   if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) __PYX_ERR(0, 1749, __pyx_L1_error)
37475   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37476
37477   /* "lxml/objectify.pyx":1767
37478  *         raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
37479  * 
37480  * def makeparser(**kw):             # <<<<<<<<<<<<<<
37481  *     u"""makeparser(remove_blank_text=True, **kw)
37482  * 
37483  */
37484   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_31makeparser, 0, __pyx_n_s_makeparser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error)
37485   __Pyx_GOTREF(__pyx_t_1);
37486   if (PyDict_SetItem(__pyx_d, __pyx_n_s_makeparser, __pyx_t_1) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)
37487   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37488
37489   /* "lxml/objectify.pyx":1790
37490  * 
37491  * cdef object _fromstring
37492  * _fromstring = etree.fromstring             # <<<<<<<<<<<<<<
37493  * 
37494  * SubElement = etree.SubElement
37495  */
37496   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error)
37497   __Pyx_GOTREF(__pyx_t_1);
37498   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__fromstring);
37499   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_1);
37500   __Pyx_GIVEREF(__pyx_t_1);
37501   __pyx_t_1 = 0;
37502
37503   /* "lxml/objectify.pyx":1792
37504  * _fromstring = etree.fromstring
37505  * 
37506  * SubElement = etree.SubElement             # <<<<<<<<<<<<<<
37507  * 
37508  * def fromstring(xml, parser=None, *, base_url=None):
37509  */
37510   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1792, __pyx_L1_error)
37511   __Pyx_GOTREF(__pyx_t_1);
37512   if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)
37513   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37514
37515   /* "lxml/objectify.pyx":1794
37516  * SubElement = etree.SubElement
37517  * 
37518  * def fromstring(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37519  *     u"""fromstring(xml, parser=None, base_url=None)
37520  * 
37521  */
37522   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
37523   __Pyx_GOTREF(__pyx_t_1);
37524   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
37525   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_33fromstring, 0, __pyx_n_s_fromstring, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
37526   __Pyx_GOTREF(__pyx_t_2);
37527   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__94);
37528   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37529   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37530   if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
37531   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37532
37533   /* "lxml/objectify.pyx":1810
37534  *     return _fromstring(xml, parser, base_url=base_url)
37535  * 
37536  * def XML(xml, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37537  *     u"""XML(xml, parser=None, base_url=None)
37538  * 
37539  */
37540   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1810, __pyx_L1_error)
37541   __Pyx_GOTREF(__pyx_t_2);
37542   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
37543   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_35XML, 0, __pyx_n_s_XML, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error)
37544   __Pyx_GOTREF(__pyx_t_1);
37545   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__97);
37546   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37547   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37548   if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_1) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)
37549   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37550
37551   /* "lxml/objectify.pyx":1827
37552  * 
37553  * cdef object _parse
37554  * _parse = etree.parse             # <<<<<<<<<<<<<<
37555  * 
37556  * def parse(f, parser=None, *, base_url=None):
37557  */
37558   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
37559   __Pyx_GOTREF(__pyx_t_1);
37560   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__parse);
37561   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__parse, __pyx_t_1);
37562   __Pyx_GIVEREF(__pyx_t_1);
37563   __pyx_t_1 = 0;
37564
37565   /* "lxml/objectify.pyx":1829
37566  * _parse = etree.parse
37567  * 
37568  * def parse(f, parser=None, *, base_url=None):             # <<<<<<<<<<<<<<
37569  *     u"""parse(f, parser=None, base_url=None)
37570  * 
37571  */
37572   __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1829, __pyx_L1_error)
37573   __Pyx_GOTREF(__pyx_t_1);
37574   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1829, __pyx_L1_error)
37575   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_37parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
37576   __Pyx_GOTREF(__pyx_t_2);
37577   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__100);
37578   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37579   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37580   if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_2) < 0) __PYX_ERR(0, 1829, __pyx_L1_error)
37581   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37582
37583   /* "lxml/objectify.pyx":1845
37584  * 
37585  * cdef dict _DEFAULT_NSMAP = {
37586  *     "py"  : PYTYPE_NAMESPACE,             # <<<<<<<<<<<<<<
37587  *     "xsi" : XML_SCHEMA_INSTANCE_NS,
37588  *     "xsd" : XML_SCHEMA_NS
37589  */
37590   __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error)
37591   __Pyx_GOTREF(__pyx_t_2);
37592   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_py_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
37593
37594   /* "lxml/objectify.pyx":1846
37595  * cdef dict _DEFAULT_NSMAP = {
37596  *     "py"  : PYTYPE_NAMESPACE,
37597  *     "xsi" : XML_SCHEMA_INSTANCE_NS,             # <<<<<<<<<<<<<<
37598  *     "xsd" : XML_SCHEMA_NS
37599  * }
37600  */
37601   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
37602
37603   /* "lxml/objectify.pyx":1847
37604  *     "py"  : PYTYPE_NAMESPACE,
37605  *     "xsi" : XML_SCHEMA_INSTANCE_NS,
37606  *     "xsd" : XML_SCHEMA_NS             # <<<<<<<<<<<<<<
37607  * }
37608  * 
37609  */
37610   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsd_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
37611   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
37612   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP, ((PyObject*)__pyx_t_2));
37613   __Pyx_GIVEREF(__pyx_t_2);
37614   __pyx_t_2 = 0;
37615
37616   /* "lxml/objectify.pyx":1850
37617  * }
37618  * 
37619  * E = ElementMaker()             # <<<<<<<<<<<<<<
37620  * 
37621  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
37622  */
37623   __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ElementMaker)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
37624   __Pyx_GOTREF(__pyx_t_2);
37625   if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_2) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
37626   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37627
37628   /* "lxml/objectify.pyx":1852
37629  * E = ElementMaker()
37630  * 
37631  * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):             # <<<<<<<<<<<<<<
37632  *     u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
37633  * 
37634  */
37635   __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
37636   __Pyx_GOTREF(__pyx_t_2);
37637   if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
37638   __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_39Element, 0, __pyx_n_s_Element, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
37639   __Pyx_GOTREF(__pyx_t_1);
37640   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__103);
37641   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2);
37642   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37643   if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)
37644   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37645
37646   /* "lxml/objectify.pyx":1872
37647  *     return _makeElement(_tag, None, _attributes, nsmap)
37648  * 
37649  * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,             # <<<<<<<<<<<<<<
37650  *                 **_attributes):
37651  *     u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
37652  */
37653   __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1872, __pyx_L1_error)
37654   __Pyx_GOTREF(__pyx_t_1);
37655   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37656   if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xsi_3, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37657   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_41DataElement, 0, __pyx_n_s_DataElement, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1872, __pyx_L1_error)
37658   __Pyx_GOTREF(__pyx_t_2);
37659   __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__106);
37660   __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1);
37661   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37662   if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataElement, __pyx_t_2) < 0) __PYX_ERR(0, 1872, __pyx_L1_error)
37663   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37664
37665   /* "src/lxml/objectpath.pxi":10
37666  * 
37667  * 
37668  * cdef object _NO_DEFAULT = object()             # <<<<<<<<<<<<<<
37669  * 
37670  * 
37671  */
37672   __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error)
37673   __Pyx_GOTREF(__pyx_t_2);
37674   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__NO_DEFAULT);
37675   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__NO_DEFAULT, __pyx_t_2);
37676   __Pyx_GIVEREF(__pyx_t_2);
37677   __pyx_t_2 = 0;
37678
37679   /* "src/lxml/objectpath.pxi":57
37680  *         return _find_object_path(root, self._c_path, self._path_len, default)
37681  * 
37682  *     def hasattr(self, _Element root not None):             # <<<<<<<<<<<<<<
37683  *         u"hasattr(self, root)"
37684  *         try:
37685  */
37686   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_10ObjectPath_9hasattr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectPath_hasattr, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 57, __pyx_L1_error)
37687   __Pyx_GOTREF(__pyx_t_2);
37688   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectPath->tp_dict, __pyx_n_s_hasattr, __pyx_t_2) < 0) __PYX_ERR(1, 57, __pyx_L1_error)
37689   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37690   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37691
37692   /* "src/lxml/objectpath.pxi":65
37693  *         return True
37694  * 
37695  *     def setattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
37696  *         u"""setattr(self, root, value)
37697  * 
37698  */
37699   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_10ObjectPath_11setattr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectPath_setattr, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error)
37700   __Pyx_GOTREF(__pyx_t_2);
37701   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectPath->tp_dict, __pyx_n_s_setattr, __pyx_t_2) < 0) __PYX_ERR(1, 65, __pyx_L1_error)
37702   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37703   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37704
37705   /* "src/lxml/objectpath.pxi":74
37706  *         _create_object_path(root, self._c_path, self._path_len, 1, value)
37707  * 
37708  *     def addattr(self, _Element root not None, value):             # <<<<<<<<<<<<<<
37709  *         u"""addattr(self, root, value)
37710  * 
37711  */
37712   __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4lxml_9objectify_10ObjectPath_13addattr, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ObjectPath_addattr, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 74, __pyx_L1_error)
37713   __Pyx_GOTREF(__pyx_t_2);
37714   if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectPath->tp_dict, __pyx_n_s_addattr, __pyx_t_2) < 0) __PYX_ERR(1, 74, __pyx_L1_error)
37715   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37716   PyType_Modified(__pyx_ptype_4lxml_9objectify_ObjectPath);
37717
37718   /* "src/lxml/objectpath.pxi":84
37719  * 
37720  * 
37721  * cdef object __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
37722  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37723  *     re.U).match
37724  */
37725   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error)
37726   __Pyx_GOTREF(__pyx_t_2);
37727
37728   /* "src/lxml/objectpath.pxi":86
37729  * cdef object __MATCH_PATH_SEGMENT = re.compile(
37730  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37731  *     re.U).match             # <<<<<<<<<<<<<<
37732  * 
37733  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)
37734  */
37735   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_re, __pyx_n_s_U); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 86, __pyx_L1_error)
37736   __Pyx_GOTREF(__pyx_t_1);
37737
37738   /* "src/lxml/objectpath.pxi":84
37739  * 
37740  * 
37741  * cdef object __MATCH_PATH_SEGMENT = re.compile(             # <<<<<<<<<<<<<<
37742  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37743  *     re.U).match
37744  */
37745   __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error)
37746   __Pyx_GOTREF(__pyx_t_4);
37747   __Pyx_INCREF(__pyx_kp_u_s_s_s_s_s_0_9_s);
37748   __Pyx_GIVEREF(__pyx_kp_u_s_s_s_s_s_0_9_s);
37749   PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_s_s_s_s_s_0_9_s);
37750   __Pyx_GIVEREF(__pyx_t_1);
37751   PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
37752   __pyx_t_1 = 0;
37753   __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 84, __pyx_L1_error)
37754   __Pyx_GOTREF(__pyx_t_1);
37755   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37756   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37757
37758   /* "src/lxml/objectpath.pxi":86
37759  * cdef object __MATCH_PATH_SEGMENT = re.compile(
37760  *     ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
37761  *     re.U).match             # <<<<<<<<<<<<<<
37762  * 
37763  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)
37764  */
37765   __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 86, __pyx_L1_error)
37766   __Pyx_GOTREF(__pyx_t_4);
37767   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37768   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
37769   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, __pyx_t_4);
37770   __Pyx_GIVEREF(__pyx_t_4);
37771   __pyx_t_4 = 0;
37772
37773   /* "src/lxml/objectpath.pxi":88
37774  *     re.U).match
37775  * 
37776  * cdef tuple _RELATIVE_PATH_SEGMENT = (None, None, 0)             # <<<<<<<<<<<<<<
37777  * 
37778  * 
37779  */
37780   __Pyx_INCREF(__pyx_tuple__113);
37781   __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
37782   __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT, __pyx_tuple__113);
37783   __Pyx_GIVEREF(__pyx_tuple__113);
37784
37785   /* "lxml/objectify.pyx":1
37786  * # cython: binding=True             # <<<<<<<<<<<<<<
37787  * # cython: auto_pickle=False
37788  * # cython: language_level=2
37789  */
37790   __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1, __pyx_L1_error)
37791   __Pyx_GOTREF(__pyx_t_4);
37792   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_4) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
37793   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
37794
37795   /*--- Wrapped vars code ---*/
37796
37797   if (__Pyx_RegisterCleanup()) __PYX_ERR(0, 1, __pyx_L1_error);
37798   goto __pyx_L0;
37799   __pyx_L1_error:;
37800   __Pyx_XDECREF(__pyx_t_1);
37801   __Pyx_XDECREF(__pyx_t_2);
37802   __Pyx_XDECREF(__pyx_t_4);
37803   if (__pyx_m) {
37804     if (__pyx_d) {
37805       __Pyx_AddTraceback("init lxml.objectify", __pyx_clineno, __pyx_lineno, __pyx_filename);
37806     }
37807     Py_CLEAR(__pyx_m);
37808   } else if (!PyErr_Occurred()) {
37809     PyErr_SetString(PyExc_ImportError, "init lxml.objectify");
37810   }
37811   __pyx_L0:;
37812   __Pyx_RefNannyFinishContext();
37813   #if CYTHON_PEP489_MULTI_PHASE_INIT
37814   return (__pyx_m != NULL) ? 0 : -1;
37815   #elif PY_MAJOR_VERSION >= 3
37816   return __pyx_m;
37817   #else
37818   return;
37819   #endif
37820 }
37821
37822 static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) {
37823   Py_CLEAR(__pyx_slice__3);
37824   Py_CLEAR(__pyx_tuple__5);
37825   Py_CLEAR(__pyx_tuple__6);
37826   Py_CLEAR(__pyx_tuple__7);
37827   Py_CLEAR(__pyx_tuple__8);
37828   Py_CLEAR(__pyx_slice__16);
37829   Py_CLEAR(__pyx_tuple__18);
37830   Py_CLEAR(__pyx_tuple__22);
37831   Py_CLEAR(__pyx_tuple__24);
37832   Py_CLEAR(__pyx_tuple__25);
37833   Py_CLEAR(__pyx_codeobj__26);
37834   Py_CLEAR(__pyx_tuple__27);
37835   Py_CLEAR(__pyx_tuple__28);
37836   Py_CLEAR(__pyx_codeobj__29);
37837   Py_CLEAR(__pyx_tuple__30);
37838   Py_CLEAR(__pyx_codeobj__31);
37839   Py_CLEAR(__pyx_tuple__32);
37840   Py_CLEAR(__pyx_codeobj__33);
37841   Py_CLEAR(__pyx_tuple__34);
37842   Py_CLEAR(__pyx_codeobj__35);
37843   Py_CLEAR(__pyx_tuple__36);
37844   Py_CLEAR(__pyx_codeobj__37);
37845   Py_CLEAR(__pyx_tuple__38);
37846   Py_CLEAR(__pyx_codeobj__39);
37847   Py_CLEAR(__pyx_tuple__40);
37848   Py_CLEAR(__pyx_codeobj__41);
37849   Py_CLEAR(__pyx_tuple__42);
37850   Py_CLEAR(__pyx_codeobj__43);
37851   Py_CLEAR(__pyx_tuple__44);
37852   Py_CLEAR(__pyx_codeobj__45);
37853   Py_CLEAR(__pyx_tuple__46);
37854   Py_CLEAR(__pyx_codeobj__47);
37855   Py_CLEAR(__pyx_tuple__48);
37856   Py_CLEAR(__pyx_codeobj__49);
37857   Py_CLEAR(__pyx_tuple__50);
37858   Py_CLEAR(__pyx_codeobj__51);
37859   Py_CLEAR(__pyx_tuple__52);
37860   Py_CLEAR(__pyx_codeobj__53);
37861   Py_CLEAR(__pyx_tuple__54);
37862   Py_CLEAR(__pyx_codeobj__55);
37863   Py_CLEAR(__pyx_tuple__56);
37864   Py_CLEAR(__pyx_codeobj__57);
37865   Py_CLEAR(__pyx_tuple__58);
37866   Py_CLEAR(__pyx_codeobj__59);
37867   Py_CLEAR(__pyx_tuple__60);
37868   Py_CLEAR(__pyx_codeobj__61);
37869   Py_CLEAR(__pyx_tuple__62);
37870   Py_CLEAR(__pyx_codeobj__63);
37871   Py_CLEAR(__pyx_tuple__64);
37872   Py_CLEAR(__pyx_codeobj__65);
37873   Py_CLEAR(__pyx_tuple__66);
37874   Py_CLEAR(__pyx_codeobj__67);
37875   Py_CLEAR(__pyx_tuple__68);
37876   Py_CLEAR(__pyx_codeobj__69);
37877   Py_CLEAR(__pyx_tuple__70);
37878   Py_CLEAR(__pyx_codeobj__71);
37879   Py_CLEAR(__pyx_tuple__72);
37880   Py_CLEAR(__pyx_tuple__73);
37881   Py_CLEAR(__pyx_codeobj__74);
37882   Py_CLEAR(__pyx_tuple__75);
37883   Py_CLEAR(__pyx_codeobj__76);
37884   Py_CLEAR(__pyx_tuple__77);
37885   Py_CLEAR(__pyx_codeobj__78);
37886   Py_CLEAR(__pyx_tuple__79);
37887   Py_CLEAR(__pyx_codeobj__80);
37888   Py_CLEAR(__pyx_tuple__81);
37889   Py_CLEAR(__pyx_codeobj__82);
37890   Py_CLEAR(__pyx_tuple__83);
37891   Py_CLEAR(__pyx_codeobj__84);
37892   Py_CLEAR(__pyx_tuple__85);
37893   Py_CLEAR(__pyx_codeobj__86);
37894   Py_CLEAR(__pyx_tuple__87);
37895   Py_CLEAR(__pyx_codeobj__88);
37896   Py_CLEAR(__pyx_tuple__89);
37897   Py_CLEAR(__pyx_tuple__90);
37898   Py_CLEAR(__pyx_codeobj__91);
37899   Py_CLEAR(__pyx_tuple__92);
37900   Py_CLEAR(__pyx_codeobj__93);
37901   Py_CLEAR(__pyx_tuple__94);
37902   Py_CLEAR(__pyx_tuple__95);
37903   Py_CLEAR(__pyx_codeobj__96);
37904   Py_CLEAR(__pyx_tuple__97);
37905   Py_CLEAR(__pyx_tuple__98);
37906   Py_CLEAR(__pyx_codeobj__99);
37907   Py_CLEAR(__pyx_tuple__100);
37908   Py_CLEAR(__pyx_tuple__101);
37909   Py_CLEAR(__pyx_codeobj__102);
37910   Py_CLEAR(__pyx_tuple__103);
37911   Py_CLEAR(__pyx_tuple__104);
37912   Py_CLEAR(__pyx_codeobj__105);
37913   Py_CLEAR(__pyx_tuple__106);
37914   Py_CLEAR(__pyx_tuple__107);
37915   Py_CLEAR(__pyx_codeobj__108);
37916   Py_CLEAR(__pyx_tuple__109);
37917   Py_CLEAR(__pyx_codeobj__110);
37918   Py_CLEAR(__pyx_tuple__111);
37919   Py_CLEAR(__pyx_codeobj__112);
37920   Py_CLEAR(__pyx_tuple__113);
37921   /* CodeObjectCache.cleanup */
37922   if (__pyx_code_cache.entries) {
37923       __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
37924       int i, count = __pyx_code_cache.count;
37925       __pyx_code_cache.count = 0;
37926       __pyx_code_cache.max_count = 0;
37927       __pyx_code_cache.entries = NULL;
37928       for (i=0; i<count; i++) {
37929           Py_DECREF(entries[i].code_object);
37930       }
37931       PyMem_Free(entries);
37932   }
37933
37934 Py_CLEAR(__pyx_umethod_PyBytes_Type_split.method);
37935   Py_CLEAR(__pyx_umethod_PyDict_Type_get.method);
37936   Py_CLEAR(__pyx_umethod_PyDict_Type_items.method);
37937   Py_CLEAR(__pyx_umethod_PyDict_Type_values.method);
37938   Py_CLEAR(__pyx_umethod_PyList_Type_remove.method);
37939   Py_CLEAR(__pyx_umethod_PyUnicode_Type_strip.method);
37940 }
37941 static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) {
37942   /*--- Global cleanup code ---*/
37943   Py_CLEAR(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
37944   Py_CLEAR(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
37945   Py_CLEAR(__pyx_v_4lxml_9objectify__NO_DEFAULT);
37946   Py_CLEAR(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
37947   Py_CLEAR(__pyx_v_4lxml_9objectify__parse);
37948   Py_CLEAR(__pyx_v_4lxml_9objectify__fromstring);
37949   Py_CLEAR(__pyx_v_4lxml_9objectify_objectify_parser);
37950   Py_CLEAR(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
37951   Py_CLEAR(__pyx_v_4lxml_9objectify__cleanup_namespaces);
37952   Py_CLEAR(__pyx_v_4lxml_9objectify__strip_attributes);
37953   Py_CLEAR(__pyx_v_4lxml_9objectify_TREE_PYTYPE);
37954   Py_CLEAR(__pyx_v_4lxml_9objectify__TYPE_CHECKS);
37955   Py_CLEAR(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT);
37956   Py_CLEAR(__pyx_v_4lxml_9objectify__PYTYPE_DICT);
37957   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
37958   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
37959   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
37960   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
37961   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
37962   Py_CLEAR(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
37963   Py_CLEAR(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
37964   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
37965   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
37966   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
37967   Py_CLEAR(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
37968   Py_CLEAR(__pyx_v_4lxml_9objectify_is_special_method);
37969   Py_CLEAR(__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS);
37970   Py_CLEAR(__pyx_v_4lxml_9objectify_re);
37971   Py_CLEAR(__pyx_v_4lxml_9objectify_etree);
37972   __Pyx_CleanupGlobals();
37973   /*--- Type import cleanup code ---*/
37974   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_ElementBase);
37975   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup);
37976   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic_FallbackElementClassLookup);
37977   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__Document);
37978   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__Element);
37979   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementIterator);
37980   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementTagMatcher);
37981   Py_CLEAR(__pyx_ptype_4lxml_8includes_11etreepublic__ElementTree);
37982   /*--- Builtin cleanup code ---*/
37983   Py_CLEAR(__pyx_builtin_ValueError);
37984   Py_CLEAR(__pyx_builtin_TypeError);
37985   Py_CLEAR(__pyx_builtin_object);
37986   Py_CLEAR(__pyx_builtin_IndexError);
37987   Py_CLEAR(__pyx_builtin_AttributeError);
37988   Py_CLEAR(__pyx_builtin_oct);
37989   Py_CLEAR(__pyx_builtin_hex);
37990   Py_CLEAR(__pyx_builtin_enumerate);
37991   Py_CLEAR(__pyx_builtin_map);
37992   Py_CLEAR(__pyx_builtin_MemoryError);
37993   /*--- Intern cleanup code ---*/
37994   Py_CLEAR(__pyx_empty_tuple);
37995   Py_CLEAR(__pyx_d);
37996   Py_CLEAR(__pyx_cython_runtime);
37997   Py_CLEAR(__pyx_b);
37998 }
37999
38000 /* --- Runtime support code --- */
38001 /* Refnanny */
38002 #if CYTHON_REFNANNY
38003 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
38004     PyObject *m = NULL, *p = NULL;
38005     void *r = NULL;
38006     m = PyImport_ImportModule(modname);
38007     if (!m) goto end;
38008     p = PyObject_GetAttrString(m, "RefNannyAPI");
38009     if (!p) goto end;
38010     r = PyLong_AsVoidPtr(p);
38011 end:
38012     Py_XDECREF(p);
38013     Py_XDECREF(m);
38014     return (__Pyx_RefNannyAPIStruct *)r;
38015 }
38016 #endif
38017
38018 /* PyObjectGetAttrStr */
38019 #if CYTHON_USE_TYPE_SLOTS
38020 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
38021     PyTypeObject* tp = Py_TYPE(obj);
38022     if (likely(tp->tp_getattro))
38023         return tp->tp_getattro(obj, attr_name);
38024 #if PY_MAJOR_VERSION < 3
38025     if (likely(tp->tp_getattr))
38026         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
38027 #endif
38028     return PyObject_GetAttr(obj, attr_name);
38029 }
38030 #endif
38031
38032 /* GetBuiltinName */
38033 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
38034     PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
38035     if (unlikely(!result)) {
38036         PyErr_Format(PyExc_NameError,
38037 #if PY_MAJOR_VERSION >= 3
38038             "name '%U' is not defined", name);
38039 #else
38040             "name '%.200s' is not defined", PyString_AS_STRING(name));
38041 #endif
38042     }
38043     return result;
38044 }
38045
38046 /* PyCFunctionFastCall */
38047 #if CYTHON_FAST_PYCCALL
38048 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
38049     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
38050     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
38051     PyObject *self = PyCFunction_GET_SELF(func);
38052     int flags = PyCFunction_GET_FLAGS(func);
38053     assert(PyCFunction_Check(func));
38054     assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
38055     assert(nargs >= 0);
38056     assert(nargs == 0 || args != NULL);
38057     /* _PyCFunction_FastCallDict() must not be called with an exception set,
38058        because it may clear it (directly or indirectly) and so the
38059        caller loses its exception */
38060     assert(!PyErr_Occurred());
38061     if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
38062         return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
38063     } else {
38064         return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
38065     }
38066 }
38067 #endif
38068
38069 /* PyFunctionFastCall */
38070 #if CYTHON_FAST_PYCALL
38071 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
38072                                                PyObject *globals) {
38073     PyFrameObject *f;
38074     PyThreadState *tstate = __Pyx_PyThreadState_Current;
38075     PyObject **fastlocals;
38076     Py_ssize_t i;
38077     PyObject *result;
38078     assert(globals != NULL);
38079     /* XXX Perhaps we should create a specialized
38080        PyFrame_New() that doesn't take locals, but does
38081        take builtins without sanity checking them.
38082        */
38083     assert(tstate != NULL);
38084     f = PyFrame_New(tstate, co, globals, NULL);
38085     if (f == NULL) {
38086         return NULL;
38087     }
38088     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
38089     for (i = 0; i < na; i++) {
38090         Py_INCREF(*args);
38091         fastlocals[i] = *args++;
38092     }
38093     result = PyEval_EvalFrameEx(f,0);
38094     ++tstate->recursion_depth;
38095     Py_DECREF(f);
38096     --tstate->recursion_depth;
38097     return result;
38098 }
38099 #if 1 || PY_VERSION_HEX < 0x030600B1
38100 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
38101     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
38102     PyObject *globals = PyFunction_GET_GLOBALS(func);
38103     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
38104     PyObject *closure;
38105 #if PY_MAJOR_VERSION >= 3
38106     PyObject *kwdefs;
38107 #endif
38108     PyObject *kwtuple, **k;
38109     PyObject **d;
38110     Py_ssize_t nd;
38111     Py_ssize_t nk;
38112     PyObject *result;
38113     assert(kwargs == NULL || PyDict_Check(kwargs));
38114     nk = kwargs ? PyDict_Size(kwargs) : 0;
38115     if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
38116         return NULL;
38117     }
38118     if (
38119 #if PY_MAJOR_VERSION >= 3
38120             co->co_kwonlyargcount == 0 &&
38121 #endif
38122             likely(kwargs == NULL || nk == 0) &&
38123             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
38124         if (argdefs == NULL && co->co_argcount == nargs) {
38125             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
38126             goto done;
38127         }
38128         else if (nargs == 0 && argdefs != NULL
38129                  && co->co_argcount == Py_SIZE(argdefs)) {
38130             /* function called with no arguments, but all parameters have
38131                a default value: use default values as arguments .*/
38132             args = &PyTuple_GET_ITEM(argdefs, 0);
38133             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
38134             goto done;
38135         }
38136     }
38137     if (kwargs != NULL) {
38138         Py_ssize_t pos, i;
38139         kwtuple = PyTuple_New(2 * nk);
38140         if (kwtuple == NULL) {
38141             result = NULL;
38142             goto done;
38143         }
38144         k = &PyTuple_GET_ITEM(kwtuple, 0);
38145         pos = i = 0;
38146         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
38147             Py_INCREF(k[i]);
38148             Py_INCREF(k[i+1]);
38149             i += 2;
38150         }
38151         nk = i / 2;
38152     }
38153     else {
38154         kwtuple = NULL;
38155         k = NULL;
38156     }
38157     closure = PyFunction_GET_CLOSURE(func);
38158 #if PY_MAJOR_VERSION >= 3
38159     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
38160 #endif
38161     if (argdefs != NULL) {
38162         d = &PyTuple_GET_ITEM(argdefs, 0);
38163         nd = Py_SIZE(argdefs);
38164     }
38165     else {
38166         d = NULL;
38167         nd = 0;
38168     }
38169 #if PY_MAJOR_VERSION >= 3
38170     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
38171                                args, (int)nargs,
38172                                k, (int)nk,
38173                                d, (int)nd, kwdefs, closure);
38174 #else
38175     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
38176                                args, (int)nargs,
38177                                k, (int)nk,
38178                                d, (int)nd, closure);
38179 #endif
38180     Py_XDECREF(kwtuple);
38181 done:
38182     Py_LeaveRecursiveCall();
38183     return result;
38184 }
38185 #endif
38186 #endif
38187
38188 /* PyObjectCall */
38189 #if CYTHON_COMPILING_IN_CPYTHON
38190 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
38191     PyObject *result;
38192     ternaryfunc call = func->ob_type->tp_call;
38193     if (unlikely(!call))
38194         return PyObject_Call(func, arg, kw);
38195     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
38196         return NULL;
38197     result = (*call)(func, arg, kw);
38198     Py_LeaveRecursiveCall();
38199     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
38200         PyErr_SetString(
38201             PyExc_SystemError,
38202             "NULL result without error in PyObject_Call");
38203     }
38204     return result;
38205 }
38206 #endif
38207
38208 /* PyObjectCall2Args */
38209 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
38210     PyObject *args, *result = NULL;
38211     #if CYTHON_FAST_PYCALL
38212     if (PyFunction_Check(function)) {
38213         PyObject *args[2] = {arg1, arg2};
38214         return __Pyx_PyFunction_FastCall(function, args, 2);
38215     }
38216     #endif
38217     #if CYTHON_FAST_PYCCALL
38218     if (__Pyx_PyFastCFunction_Check(function)) {
38219         PyObject *args[2] = {arg1, arg2};
38220         return __Pyx_PyCFunction_FastCall(function, args, 2);
38221     }
38222     #endif
38223     args = PyTuple_New(2);
38224     if (unlikely(!args)) goto done;
38225     Py_INCREF(arg1);
38226     PyTuple_SET_ITEM(args, 0, arg1);
38227     Py_INCREF(arg2);
38228     PyTuple_SET_ITEM(args, 1, arg2);
38229     Py_INCREF(function);
38230     result = __Pyx_PyObject_Call(function, args, NULL);
38231     Py_DECREF(args);
38232     Py_DECREF(function);
38233 done:
38234     return result;
38235 }
38236
38237 /* PyObjectCallMethO */
38238 #if CYTHON_COMPILING_IN_CPYTHON
38239 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
38240     PyObject *self, *result;
38241     PyCFunction cfunc;
38242     cfunc = PyCFunction_GET_FUNCTION(func);
38243     self = PyCFunction_GET_SELF(func);
38244     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
38245         return NULL;
38246     result = cfunc(self, arg);
38247     Py_LeaveRecursiveCall();
38248     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
38249         PyErr_SetString(
38250             PyExc_SystemError,
38251             "NULL result without error in PyObject_Call");
38252     }
38253     return result;
38254 }
38255 #endif
38256
38257 /* PyObjectCallOneArg */
38258 #if CYTHON_COMPILING_IN_CPYTHON
38259 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38260     PyObject *result;
38261     PyObject *args = PyTuple_New(1);
38262     if (unlikely(!args)) return NULL;
38263     Py_INCREF(arg);
38264     PyTuple_SET_ITEM(args, 0, arg);
38265     result = __Pyx_PyObject_Call(func, args, NULL);
38266     Py_DECREF(args);
38267     return result;
38268 }
38269 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38270 #if CYTHON_FAST_PYCALL
38271     if (PyFunction_Check(func)) {
38272         return __Pyx_PyFunction_FastCall(func, &arg, 1);
38273     }
38274 #endif
38275     if (likely(PyCFunction_Check(func))) {
38276         if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
38277             return __Pyx_PyObject_CallMethO(func, arg);
38278 #if CYTHON_FAST_PYCCALL
38279         } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
38280             return __Pyx_PyCFunction_FastCall(func, &arg, 1);
38281 #endif
38282         }
38283     }
38284     return __Pyx__PyObject_CallOneArg(func, arg);
38285 }
38286 #else
38287 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
38288     PyObject *result;
38289     PyObject *args = PyTuple_Pack(1, arg);
38290     if (unlikely(!args)) return NULL;
38291     result = __Pyx_PyObject_Call(func, args, NULL);
38292     Py_DECREF(args);
38293     return result;
38294 }
38295 #endif
38296
38297 /* RaiseDoubleKeywords */
38298 static void __Pyx_RaiseDoubleKeywordsError(
38299     const char* func_name,
38300     PyObject* kw_name)
38301 {
38302     PyErr_Format(PyExc_TypeError,
38303         #if PY_MAJOR_VERSION >= 3
38304         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
38305         #else
38306         "%s() got multiple values for keyword argument '%s'", func_name,
38307         PyString_AsString(kw_name));
38308         #endif
38309 }
38310
38311 /* ParseKeywords */
38312 static int __Pyx_ParseOptionalKeywords(
38313     PyObject *kwds,
38314     PyObject **argnames[],
38315     PyObject *kwds2,
38316     PyObject *values[],
38317     Py_ssize_t num_pos_args,
38318     const char* function_name)
38319 {
38320     PyObject *key = 0, *value = 0;
38321     Py_ssize_t pos = 0;
38322     PyObject*** name;
38323     PyObject*** first_kw_arg = argnames + num_pos_args;
38324     while (PyDict_Next(kwds, &pos, &key, &value)) {
38325         name = first_kw_arg;
38326         while (*name && (**name != key)) name++;
38327         if (*name) {
38328             values[name-argnames] = value;
38329             continue;
38330         }
38331         name = first_kw_arg;
38332         #if PY_MAJOR_VERSION < 3
38333         if (likely(PyString_Check(key))) {
38334             while (*name) {
38335                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
38336                         && _PyString_Eq(**name, key)) {
38337                     values[name-argnames] = value;
38338                     break;
38339                 }
38340                 name++;
38341             }
38342             if (*name) continue;
38343             else {
38344                 PyObject*** argname = argnames;
38345                 while (argname != first_kw_arg) {
38346                     if ((**argname == key) || (
38347                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
38348                              && _PyString_Eq(**argname, key))) {
38349                         goto arg_passed_twice;
38350                     }
38351                     argname++;
38352                 }
38353             }
38354         } else
38355         #endif
38356         if (likely(PyUnicode_Check(key))) {
38357             while (*name) {
38358                 int cmp = (**name == key) ? 0 :
38359                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38360                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
38361                 #endif
38362                     PyUnicode_Compare(**name, key);
38363                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38364                 if (cmp == 0) {
38365                     values[name-argnames] = value;
38366                     break;
38367                 }
38368                 name++;
38369             }
38370             if (*name) continue;
38371             else {
38372                 PyObject*** argname = argnames;
38373                 while (argname != first_kw_arg) {
38374                     int cmp = (**argname == key) ? 0 :
38375                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
38376                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
38377                     #endif
38378                         PyUnicode_Compare(**argname, key);
38379                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
38380                     if (cmp == 0) goto arg_passed_twice;
38381                     argname++;
38382                 }
38383             }
38384         } else
38385             goto invalid_keyword_type;
38386         if (kwds2) {
38387             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
38388         } else {
38389             goto invalid_keyword;
38390         }
38391     }
38392     return 0;
38393 arg_passed_twice:
38394     __Pyx_RaiseDoubleKeywordsError(function_name, key);
38395     goto bad;
38396 invalid_keyword_type:
38397     PyErr_Format(PyExc_TypeError,
38398         "%.200s() keywords must be strings", function_name);
38399     goto bad;
38400 invalid_keyword:
38401     PyErr_Format(PyExc_TypeError,
38402     #if PY_MAJOR_VERSION < 3
38403         "%.200s() got an unexpected keyword argument '%.200s'",
38404         function_name, PyString_AsString(key));
38405     #else
38406         "%s() got an unexpected keyword argument '%U'",
38407         function_name, key);
38408     #endif
38409 bad:
38410     return -1;
38411 }
38412
38413 /* RaiseArgTupleInvalid */
38414 static void __Pyx_RaiseArgtupleInvalid(
38415     const char* func_name,
38416     int exact,
38417     Py_ssize_t num_min,
38418     Py_ssize_t num_max,
38419     Py_ssize_t num_found)
38420 {
38421     Py_ssize_t num_expected;
38422     const char *more_or_less;
38423     if (num_found < num_min) {
38424         num_expected = num_min;
38425         more_or_less = "at least";
38426     } else {
38427         num_expected = num_max;
38428         more_or_less = "at most";
38429     }
38430     if (exact) {
38431         more_or_less = "exactly";
38432     }
38433     PyErr_Format(PyExc_TypeError,
38434                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
38435                  func_name, more_or_less, num_expected,
38436                  (num_expected == 1) ? "" : "s", num_found);
38437 }
38438
38439 /* RaiseTooManyValuesToUnpack */
38440 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
38441     PyErr_Format(PyExc_ValueError,
38442                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
38443 }
38444
38445 /* RaiseNeedMoreValuesToUnpack */
38446 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
38447     PyErr_Format(PyExc_ValueError,
38448                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
38449                  index, (index == 1) ? "" : "s");
38450 }
38451
38452 /* RaiseNoneIterError */
38453 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
38454     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
38455 }
38456
38457 /* decode_c_bytes */
38458 static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
38459          const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
38460          const char* encoding, const char* errors,
38461          PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
38462     if (unlikely((start < 0) | (stop < 0))) {
38463         if (start < 0) {
38464             start += length;
38465             if (start < 0)
38466                 start = 0;
38467         }
38468         if (stop < 0)
38469             stop += length;
38470     }
38471     if (stop > length)
38472         stop = length;
38473     if (unlikely(stop <= start))
38474         return PyUnicode_FromUnicode(NULL, 0);
38475     length = stop - start;
38476     cstring += start;
38477     if (decode_func) {
38478         return decode_func(cstring, length, errors);
38479     } else {
38480         return PyUnicode_Decode(cstring, length, encoding, errors);
38481     }
38482 }
38483
38484 /* PyObjectCallNoArg */
38485 #if CYTHON_COMPILING_IN_CPYTHON
38486 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
38487 #if CYTHON_FAST_PYCALL
38488     if (PyFunction_Check(func)) {
38489         return __Pyx_PyFunction_FastCall(func, NULL, 0);
38490     }
38491 #endif
38492 #ifdef __Pyx_CyFunction_USED
38493     if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
38494 #else
38495     if (likely(PyCFunction_Check(func)))
38496 #endif
38497     {
38498         if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
38499             return __Pyx_PyObject_CallMethO(func, NULL);
38500         }
38501     }
38502     return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
38503 }
38504 #endif
38505
38506 /* PyDictVersioning */
38507 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
38508 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
38509     PyObject *dict = Py_TYPE(obj)->tp_dict;
38510     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
38511 }
38512 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
38513     PyObject **dictptr = NULL;
38514     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
38515     if (offset) {
38516 #if CYTHON_COMPILING_IN_CPYTHON
38517         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
38518 #else
38519         dictptr = _PyObject_GetDictPtr(obj);
38520 #endif
38521     }
38522     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
38523 }
38524 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
38525     PyObject *dict = Py_TYPE(obj)->tp_dict;
38526     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
38527         return 0;
38528     return obj_dict_version == __Pyx_get_object_dict_version(obj);
38529 }
38530 #endif
38531
38532 /* GetModuleGlobalName */
38533 #if CYTHON_USE_DICT_VERSIONS
38534 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
38535 #else
38536 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
38537 #endif
38538 {
38539     PyObject *result;
38540 #if !CYTHON_AVOID_BORROWED_REFS
38541 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
38542     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
38543     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38544     if (likely(result)) {
38545         return __Pyx_NewRef(result);
38546     } else if (unlikely(PyErr_Occurred())) {
38547         return NULL;
38548     }
38549 #else
38550     result = PyDict_GetItem(__pyx_d, name);
38551     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38552     if (likely(result)) {
38553         return __Pyx_NewRef(result);
38554     }
38555 #endif
38556 #else
38557     result = PyObject_GetItem(__pyx_d, name);
38558     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
38559     if (likely(result)) {
38560         return __Pyx_NewRef(result);
38561     }
38562     PyErr_Clear();
38563 #endif
38564     return __Pyx_GetBuiltinName(name);
38565 }
38566
38567 /* ExtTypeTest */
38568 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
38569     if (unlikely(!type)) {
38570         PyErr_SetString(PyExc_SystemError, "Missing type object");
38571         return 0;
38572     }
38573     if (likely(__Pyx_TypeCheck(obj, type)))
38574         return 1;
38575     PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
38576                  Py_TYPE(obj)->tp_name, type->tp_name);
38577     return 0;
38578 }
38579
38580 /* BytesEquals */
38581 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
38582 #if CYTHON_COMPILING_IN_PYPY
38583     return PyObject_RichCompareBool(s1, s2, equals);
38584 #else
38585     if (s1 == s2) {
38586         return (equals == Py_EQ);
38587     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
38588         const char *ps1, *ps2;
38589         Py_ssize_t length = PyBytes_GET_SIZE(s1);
38590         if (length != PyBytes_GET_SIZE(s2))
38591             return (equals == Py_NE);
38592         ps1 = PyBytes_AS_STRING(s1);
38593         ps2 = PyBytes_AS_STRING(s2);
38594         if (ps1[0] != ps2[0]) {
38595             return (equals == Py_NE);
38596         } else if (length == 1) {
38597             return (equals == Py_EQ);
38598         } else {
38599             int result;
38600 #if CYTHON_USE_UNICODE_INTERNALS
38601             Py_hash_t hash1, hash2;
38602             hash1 = ((PyBytesObject*)s1)->ob_shash;
38603             hash2 = ((PyBytesObject*)s2)->ob_shash;
38604             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38605                 return (equals == Py_NE);
38606             }
38607 #endif
38608             result = memcmp(ps1, ps2, (size_t)length);
38609             return (equals == Py_EQ) ? (result == 0) : (result != 0);
38610         }
38611     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
38612         return (equals == Py_NE);
38613     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
38614         return (equals == Py_NE);
38615     } else {
38616         int result;
38617         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38618         if (!py_result)
38619             return -1;
38620         result = __Pyx_PyObject_IsTrue(py_result);
38621         Py_DECREF(py_result);
38622         return result;
38623     }
38624 #endif
38625 }
38626
38627 /* UnicodeEquals */
38628 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
38629 #if CYTHON_COMPILING_IN_PYPY
38630     return PyObject_RichCompareBool(s1, s2, equals);
38631 #else
38632 #if PY_MAJOR_VERSION < 3
38633     PyObject* owned_ref = NULL;
38634 #endif
38635     int s1_is_unicode, s2_is_unicode;
38636     if (s1 == s2) {
38637         goto return_eq;
38638     }
38639     s1_is_unicode = PyUnicode_CheckExact(s1);
38640     s2_is_unicode = PyUnicode_CheckExact(s2);
38641 #if PY_MAJOR_VERSION < 3
38642     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
38643         owned_ref = PyUnicode_FromObject(s2);
38644         if (unlikely(!owned_ref))
38645             return -1;
38646         s2 = owned_ref;
38647         s2_is_unicode = 1;
38648     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
38649         owned_ref = PyUnicode_FromObject(s1);
38650         if (unlikely(!owned_ref))
38651             return -1;
38652         s1 = owned_ref;
38653         s1_is_unicode = 1;
38654     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
38655         return __Pyx_PyBytes_Equals(s1, s2, equals);
38656     }
38657 #endif
38658     if (s1_is_unicode & s2_is_unicode) {
38659         Py_ssize_t length;
38660         int kind;
38661         void *data1, *data2;
38662         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
38663             return -1;
38664         length = __Pyx_PyUnicode_GET_LENGTH(s1);
38665         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
38666             goto return_ne;
38667         }
38668 #if CYTHON_USE_UNICODE_INTERNALS
38669         {
38670             Py_hash_t hash1, hash2;
38671         #if CYTHON_PEP393_ENABLED
38672             hash1 = ((PyASCIIObject*)s1)->hash;
38673             hash2 = ((PyASCIIObject*)s2)->hash;
38674         #else
38675             hash1 = ((PyUnicodeObject*)s1)->hash;
38676             hash2 = ((PyUnicodeObject*)s2)->hash;
38677         #endif
38678             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38679                 goto return_ne;
38680             }
38681         }
38682 #endif
38683         kind = __Pyx_PyUnicode_KIND(s1);
38684         if (kind != __Pyx_PyUnicode_KIND(s2)) {
38685             goto return_ne;
38686         }
38687         data1 = __Pyx_PyUnicode_DATA(s1);
38688         data2 = __Pyx_PyUnicode_DATA(s2);
38689         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
38690             goto return_ne;
38691         } else if (length == 1) {
38692             goto return_eq;
38693         } else {
38694             int result = memcmp(data1, data2, (size_t)(length * kind));
38695             #if PY_MAJOR_VERSION < 3
38696             Py_XDECREF(owned_ref);
38697             #endif
38698             return (equals == Py_EQ) ? (result == 0) : (result != 0);
38699         }
38700     } else if ((s1 == Py_None) & s2_is_unicode) {
38701         goto return_ne;
38702     } else if ((s2 == Py_None) & s1_is_unicode) {
38703         goto return_ne;
38704     } else {
38705         int result;
38706         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38707         #if PY_MAJOR_VERSION < 3
38708         Py_XDECREF(owned_ref);
38709         #endif
38710         if (!py_result)
38711             return -1;
38712         result = __Pyx_PyObject_IsTrue(py_result);
38713         Py_DECREF(py_result);
38714         return result;
38715     }
38716 return_eq:
38717     #if PY_MAJOR_VERSION < 3
38718     Py_XDECREF(owned_ref);
38719     #endif
38720     return (equals == Py_EQ);
38721 return_ne:
38722     #if PY_MAJOR_VERSION < 3
38723     Py_XDECREF(owned_ref);
38724     #endif
38725     return (equals == Py_NE);
38726 #endif
38727 }
38728
38729 /* JoinPyUnicode */
38730 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
38731                                       CYTHON_UNUSED Py_UCS4 max_char) {
38732 #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38733     PyObject *result_uval;
38734     int result_ukind;
38735     Py_ssize_t i, char_pos;
38736     void *result_udata;
38737 #if CYTHON_PEP393_ENABLED
38738     result_uval = PyUnicode_New(result_ulength, max_char);
38739     if (unlikely(!result_uval)) return NULL;
38740     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
38741     result_udata = PyUnicode_DATA(result_uval);
38742 #else
38743     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
38744     if (unlikely(!result_uval)) return NULL;
38745     result_ukind = sizeof(Py_UNICODE);
38746     result_udata = PyUnicode_AS_UNICODE(result_uval);
38747 #endif
38748     char_pos = 0;
38749     for (i=0; i < value_count; i++) {
38750         int ukind;
38751         Py_ssize_t ulength;
38752         void *udata;
38753         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
38754         if (unlikely(__Pyx_PyUnicode_READY(uval)))
38755             goto bad;
38756         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
38757         if (unlikely(!ulength))
38758             continue;
38759         if (unlikely(char_pos + ulength < 0))
38760             goto overflow;
38761         ukind = __Pyx_PyUnicode_KIND(uval);
38762         udata = __Pyx_PyUnicode_DATA(uval);
38763         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
38764             memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
38765         } else {
38766             #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
38767             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
38768             #else
38769             Py_ssize_t j;
38770             for (j=0; j < ulength; j++) {
38771                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
38772                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
38773             }
38774             #endif
38775         }
38776         char_pos += ulength;
38777     }
38778     return result_uval;
38779 overflow:
38780     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
38781 bad:
38782     Py_DECREF(result_uval);
38783     return NULL;
38784 #else
38785     result_ulength++;
38786     value_count++;
38787     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
38788 #endif
38789 }
38790
38791 /* PyErrFetchRestore */
38792 #if CYTHON_FAST_THREAD_STATE
38793 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
38794     PyObject *tmp_type, *tmp_value, *tmp_tb;
38795     tmp_type = tstate->curexc_type;
38796     tmp_value = tstate->curexc_value;
38797     tmp_tb = tstate->curexc_traceback;
38798     tstate->curexc_type = type;
38799     tstate->curexc_value = value;
38800     tstate->curexc_traceback = tb;
38801     Py_XDECREF(tmp_type);
38802     Py_XDECREF(tmp_value);
38803     Py_XDECREF(tmp_tb);
38804 }
38805 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38806     *type = tstate->curexc_type;
38807     *value = tstate->curexc_value;
38808     *tb = tstate->curexc_traceback;
38809     tstate->curexc_type = 0;
38810     tstate->curexc_value = 0;
38811     tstate->curexc_traceback = 0;
38812 }
38813 #endif
38814
38815 /* RaiseException */
38816 #if PY_MAJOR_VERSION < 3
38817 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
38818                         CYTHON_UNUSED PyObject *cause) {
38819     __Pyx_PyThreadState_declare
38820     Py_XINCREF(type);
38821     if (!value || value == Py_None)
38822         value = NULL;
38823     else
38824         Py_INCREF(value);
38825     if (!tb || tb == Py_None)
38826         tb = NULL;
38827     else {
38828         Py_INCREF(tb);
38829         if (!PyTraceBack_Check(tb)) {
38830             PyErr_SetString(PyExc_TypeError,
38831                 "raise: arg 3 must be a traceback or None");
38832             goto raise_error;
38833         }
38834     }
38835     if (PyType_Check(type)) {
38836 #if CYTHON_COMPILING_IN_PYPY
38837         if (!value) {
38838             Py_INCREF(Py_None);
38839             value = Py_None;
38840         }
38841 #endif
38842         PyErr_NormalizeException(&type, &value, &tb);
38843     } else {
38844         if (value) {
38845             PyErr_SetString(PyExc_TypeError,
38846                 "instance exception may not have a separate value");
38847             goto raise_error;
38848         }
38849         value = type;
38850         type = (PyObject*) Py_TYPE(type);
38851         Py_INCREF(type);
38852         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
38853             PyErr_SetString(PyExc_TypeError,
38854                 "raise: exception class must be a subclass of BaseException");
38855             goto raise_error;
38856         }
38857     }
38858     __Pyx_PyThreadState_assign
38859     __Pyx_ErrRestore(type, value, tb);
38860     return;
38861 raise_error:
38862     Py_XDECREF(value);
38863     Py_XDECREF(type);
38864     Py_XDECREF(tb);
38865     return;
38866 }
38867 #else
38868 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
38869     PyObject* owned_instance = NULL;
38870     if (tb == Py_None) {
38871         tb = 0;
38872     } else if (tb && !PyTraceBack_Check(tb)) {
38873         PyErr_SetString(PyExc_TypeError,
38874             "raise: arg 3 must be a traceback or None");
38875         goto bad;
38876     }
38877     if (value == Py_None)
38878         value = 0;
38879     if (PyExceptionInstance_Check(type)) {
38880         if (value) {
38881             PyErr_SetString(PyExc_TypeError,
38882                 "instance exception may not have a separate value");
38883             goto bad;
38884         }
38885         value = type;
38886         type = (PyObject*) Py_TYPE(value);
38887     } else if (PyExceptionClass_Check(type)) {
38888         PyObject *instance_class = NULL;
38889         if (value && PyExceptionInstance_Check(value)) {
38890             instance_class = (PyObject*) Py_TYPE(value);
38891             if (instance_class != type) {
38892                 int is_subclass = PyObject_IsSubclass(instance_class, type);
38893                 if (!is_subclass) {
38894                     instance_class = NULL;
38895                 } else if (unlikely(is_subclass == -1)) {
38896                     goto bad;
38897                 } else {
38898                     type = instance_class;
38899                 }
38900             }
38901         }
38902         if (!instance_class) {
38903             PyObject *args;
38904             if (!value)
38905                 args = PyTuple_New(0);
38906             else if (PyTuple_Check(value)) {
38907                 Py_INCREF(value);
38908                 args = value;
38909             } else
38910                 args = PyTuple_Pack(1, value);
38911             if (!args)
38912                 goto bad;
38913             owned_instance = PyObject_Call(type, args, NULL);
38914             Py_DECREF(args);
38915             if (!owned_instance)
38916                 goto bad;
38917             value = owned_instance;
38918             if (!PyExceptionInstance_Check(value)) {
38919                 PyErr_Format(PyExc_TypeError,
38920                              "calling %R should have returned an instance of "
38921                              "BaseException, not %R",
38922                              type, Py_TYPE(value));
38923                 goto bad;
38924             }
38925         }
38926     } else {
38927         PyErr_SetString(PyExc_TypeError,
38928             "raise: exception class must be a subclass of BaseException");
38929         goto bad;
38930     }
38931     if (cause) {
38932         PyObject *fixed_cause;
38933         if (cause == Py_None) {
38934             fixed_cause = NULL;
38935         } else if (PyExceptionClass_Check(cause)) {
38936             fixed_cause = PyObject_CallObject(cause, NULL);
38937             if (fixed_cause == NULL)
38938                 goto bad;
38939         } else if (PyExceptionInstance_Check(cause)) {
38940             fixed_cause = cause;
38941             Py_INCREF(fixed_cause);
38942         } else {
38943             PyErr_SetString(PyExc_TypeError,
38944                             "exception causes must derive from "
38945                             "BaseException");
38946             goto bad;
38947         }
38948         PyException_SetCause(value, fixed_cause);
38949     }
38950     PyErr_SetObject(type, value);
38951     if (tb) {
38952 #if CYTHON_COMPILING_IN_PYPY
38953         PyObject *tmp_type, *tmp_value, *tmp_tb;
38954         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
38955         Py_INCREF(tb);
38956         PyErr_Restore(tmp_type, tmp_value, tb);
38957         Py_XDECREF(tmp_tb);
38958 #else
38959         PyThreadState *tstate = __Pyx_PyThreadState_Current;
38960         PyObject* tmp_tb = tstate->curexc_traceback;
38961         if (tb != tmp_tb) {
38962             Py_INCREF(tb);
38963             tstate->curexc_traceback = tb;
38964             Py_XDECREF(tmp_tb);
38965         }
38966 #endif
38967     }
38968 bad:
38969     Py_XDECREF(owned_instance);
38970     return;
38971 }
38972 #endif
38973
38974 /* GetItemInt */
38975 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
38976     PyObject *r;
38977     if (!j) return NULL;
38978     r = PyObject_GetItem(o, j);
38979     Py_DECREF(j);
38980     return r;
38981 }
38982 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
38983                                                               CYTHON_NCP_UNUSED int wraparound,
38984                                                               CYTHON_NCP_UNUSED int boundscheck) {
38985 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38986     Py_ssize_t wrapped_i = i;
38987     if (wraparound & unlikely(i < 0)) {
38988         wrapped_i += PyList_GET_SIZE(o);
38989     }
38990     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
38991         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
38992         Py_INCREF(r);
38993         return r;
38994     }
38995     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38996 #else
38997     return PySequence_GetItem(o, i);
38998 #endif
38999 }
39000 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
39001                                                               CYTHON_NCP_UNUSED int wraparound,
39002                                                               CYTHON_NCP_UNUSED int boundscheck) {
39003 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39004     Py_ssize_t wrapped_i = i;
39005     if (wraparound & unlikely(i < 0)) {
39006         wrapped_i += PyTuple_GET_SIZE(o);
39007     }
39008     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
39009         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
39010         Py_INCREF(r);
39011         return r;
39012     }
39013     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
39014 #else
39015     return PySequence_GetItem(o, i);
39016 #endif
39017 }
39018 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
39019                                                      CYTHON_NCP_UNUSED int wraparound,
39020                                                      CYTHON_NCP_UNUSED int boundscheck) {
39021 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
39022     if (is_list || PyList_CheckExact(o)) {
39023         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
39024         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
39025             PyObject *r = PyList_GET_ITEM(o, n);
39026             Py_INCREF(r);
39027             return r;
39028         }
39029     }
39030     else if (PyTuple_CheckExact(o)) {
39031         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
39032         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
39033             PyObject *r = PyTuple_GET_ITEM(o, n);
39034             Py_INCREF(r);
39035             return r;
39036         }
39037     } else {
39038         PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
39039         if (likely(m && m->sq_item)) {
39040             if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
39041                 Py_ssize_t l = m->sq_length(o);
39042                 if (likely(l >= 0)) {
39043                     i += l;
39044                 } else {
39045                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
39046                         return NULL;
39047                     PyErr_Clear();
39048                 }
39049             }
39050             return m->sq_item(o, i);
39051         }
39052     }
39053 #else
39054     if (is_list || PySequence_Check(o)) {
39055         return PySequence_GetItem(o, i);
39056     }
39057 #endif
39058     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
39059 }
39060
39061 /* ObjectGetItem */
39062 #if CYTHON_USE_TYPE_SLOTS
39063 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
39064     PyObject *runerr;
39065     Py_ssize_t key_value;
39066     PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
39067     if (unlikely(!(m && m->sq_item))) {
39068         PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
39069         return NULL;
39070     }
39071     key_value = __Pyx_PyIndex_AsSsize_t(index);
39072     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
39073         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
39074     }
39075     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
39076         PyErr_Clear();
39077         PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
39078     }
39079     return NULL;
39080 }
39081 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
39082     PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
39083     if (likely(m && m->mp_subscript)) {
39084         return m->mp_subscript(obj, key);
39085     }
39086     return __Pyx_PyObject_GetIndex(obj, key);
39087 }
39088 #endif
39089
39090 /* PyObjectSetAttrStr */
39091 #if CYTHON_USE_TYPE_SLOTS
39092 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
39093     PyTypeObject* tp = Py_TYPE(obj);
39094     if (likely(tp->tp_setattro))
39095         return tp->tp_setattro(obj, attr_name, value);
39096 #if PY_MAJOR_VERSION < 3
39097     if (likely(tp->tp_setattr))
39098         return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
39099 #endif
39100     return PyObject_SetAttr(obj, attr_name, value);
39101 }
39102 #endif
39103
39104 /* SliceObject */
39105 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
39106         Py_ssize_t cstart, Py_ssize_t cstop,
39107         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
39108         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
39109 #if CYTHON_USE_TYPE_SLOTS
39110     PyMappingMethods* mp;
39111 #if PY_MAJOR_VERSION < 3
39112     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
39113     if (likely(ms && ms->sq_ass_slice)) {
39114         if (!has_cstart) {
39115             if (_py_start && (*_py_start != Py_None)) {
39116                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
39117                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
39118             } else
39119                 cstart = 0;
39120         }
39121         if (!has_cstop) {
39122             if (_py_stop && (*_py_stop != Py_None)) {
39123                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
39124                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
39125             } else
39126                 cstop = PY_SSIZE_T_MAX;
39127         }
39128         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
39129             Py_ssize_t l = ms->sq_length(obj);
39130             if (likely(l >= 0)) {
39131                 if (cstop < 0) {
39132                     cstop += l;
39133                     if (cstop < 0) cstop = 0;
39134                 }
39135                 if (cstart < 0) {
39136                     cstart += l;
39137                     if (cstart < 0) cstart = 0;
39138                 }
39139             } else {
39140                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
39141                     goto bad;
39142                 PyErr_Clear();
39143             }
39144         }
39145         return ms->sq_ass_slice(obj, cstart, cstop, value);
39146     }
39147 #endif
39148     mp = Py_TYPE(obj)->tp_as_mapping;
39149     if (likely(mp && mp->mp_ass_subscript))
39150 #endif
39151     {
39152         int result;
39153         PyObject *py_slice, *py_start, *py_stop;
39154         if (_py_slice) {
39155             py_slice = *_py_slice;
39156         } else {
39157             PyObject* owned_start = NULL;
39158             PyObject* owned_stop = NULL;
39159             if (_py_start) {
39160                 py_start = *_py_start;
39161             } else {
39162                 if (has_cstart) {
39163                     owned_start = py_start = PyInt_FromSsize_t(cstart);
39164                     if (unlikely(!py_start)) goto bad;
39165                 } else
39166                     py_start = Py_None;
39167             }
39168             if (_py_stop) {
39169                 py_stop = *_py_stop;
39170             } else {
39171                 if (has_cstop) {
39172                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
39173                     if (unlikely(!py_stop)) {
39174                         Py_XDECREF(owned_start);
39175                         goto bad;
39176                     }
39177                 } else
39178                     py_stop = Py_None;
39179             }
39180             py_slice = PySlice_New(py_start, py_stop, Py_None);
39181             Py_XDECREF(owned_start);
39182             Py_XDECREF(owned_stop);
39183             if (unlikely(!py_slice)) goto bad;
39184         }
39185 #if CYTHON_USE_TYPE_SLOTS
39186         result = mp->mp_ass_subscript(obj, py_slice, value);
39187 #else
39188         result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
39189 #endif
39190         if (!_py_slice) {
39191             Py_DECREF(py_slice);
39192         }
39193         return result;
39194     }
39195     PyErr_Format(PyExc_TypeError,
39196         "'%.200s' object does not support slice %.10s",
39197         Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
39198 bad:
39199     return -1;
39200 }
39201
39202 /* UnpackUnboundCMethod */
39203 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
39204     PyObject *method;
39205     method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
39206     if (unlikely(!method))
39207         return -1;
39208     target->method = method;
39209 #if CYTHON_COMPILING_IN_CPYTHON
39210     #if PY_MAJOR_VERSION >= 3
39211     if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
39212     #endif
39213     {
39214         PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
39215         target->func = descr->d_method->ml_meth;
39216         target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
39217     }
39218 #endif
39219     return 0;
39220 }
39221
39222 /* CallUnboundCMethod1 */
39223 #if CYTHON_COMPILING_IN_CPYTHON
39224 static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
39225     if (likely(cfunc->func)) {
39226         int flag = cfunc->flag;
39227         if (flag == METH_O) {
39228             return (*(cfunc->func))(self, arg);
39229         } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
39230             if (PY_VERSION_HEX >= 0x030700A0) {
39231                 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
39232             } else {
39233                 return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
39234             }
39235         } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
39236             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
39237         }
39238     }
39239     return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
39240 }
39241 #endif
39242 static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
39243     PyObject *args, *result = NULL;
39244     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
39245 #if CYTHON_COMPILING_IN_CPYTHON
39246     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
39247         args = PyTuple_New(1);
39248         if (unlikely(!args)) goto bad;
39249         Py_INCREF(arg);
39250         PyTuple_SET_ITEM(args, 0, arg);
39251         if (cfunc->flag & METH_KEYWORDS)
39252             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
39253         else
39254             result = (*cfunc->func)(self, args);
39255     } else {
39256         args = PyTuple_New(2);
39257         if (unlikely(!args)) goto bad;
39258         Py_INCREF(self);
39259         PyTuple_SET_ITEM(args, 0, self);
39260         Py_INCREF(arg);
39261         PyTuple_SET_ITEM(args, 1, arg);
39262         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39263     }
39264 #else
39265     args = PyTuple_Pack(2, self, arg);
39266     if (unlikely(!args)) goto bad;
39267     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39268 #endif
39269 bad:
39270     Py_XDECREF(args);
39271     return result;
39272 }
39273
39274 /* CallUnboundCMethod2 */
39275 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1
39276 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
39277     if (likely(cfunc->func)) {
39278         PyObject *args[2] = {arg1, arg2};
39279         if (cfunc->flag == METH_FASTCALL) {
39280             #if PY_VERSION_HEX >= 0x030700A0
39281             return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2);
39282             #else
39283             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
39284             #endif
39285         }
39286         #if PY_VERSION_HEX >= 0x030700A0
39287         if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
39288             return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL);
39289         #endif
39290     }
39291     return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
39292 }
39293 #endif
39294 static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
39295     PyObject *args, *result = NULL;
39296     if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
39297 #if CYTHON_COMPILING_IN_CPYTHON
39298     if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
39299         args = PyTuple_New(2);
39300         if (unlikely(!args)) goto bad;
39301         Py_INCREF(arg1);
39302         PyTuple_SET_ITEM(args, 0, arg1);
39303         Py_INCREF(arg2);
39304         PyTuple_SET_ITEM(args, 1, arg2);
39305         if (cfunc->flag & METH_KEYWORDS)
39306             result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
39307         else
39308             result = (*cfunc->func)(self, args);
39309     } else {
39310         args = PyTuple_New(3);
39311         if (unlikely(!args)) goto bad;
39312         Py_INCREF(self);
39313         PyTuple_SET_ITEM(args, 0, self);
39314         Py_INCREF(arg1);
39315         PyTuple_SET_ITEM(args, 1, arg1);
39316         Py_INCREF(arg2);
39317         PyTuple_SET_ITEM(args, 2, arg2);
39318         result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39319     }
39320 #else
39321     args = PyTuple_Pack(3, self, arg1, arg2);
39322     if (unlikely(!args)) goto bad;
39323     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
39324 #endif
39325 bad:
39326     Py_XDECREF(args);
39327     return result;
39328 }
39329
39330 /* dict_getitem_default */
39331 static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
39332     PyObject* value;
39333 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
39334     value = PyDict_GetItemWithError(d, key);
39335     if (unlikely(!value)) {
39336         if (unlikely(PyErr_Occurred()))
39337             return NULL;
39338         value = default_value;
39339     }
39340     Py_INCREF(value);
39341     if ((1));
39342 #else
39343     if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
39344         value = PyDict_GetItem(d, key);
39345         if (unlikely(!value)) {
39346             value = default_value;
39347         }
39348         Py_INCREF(value);
39349     }
39350 #endif
39351     else {
39352         if (default_value == Py_None)
39353             value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key);
39354         else
39355             value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value);
39356     }
39357     return value;
39358 }
39359
39360 /* CIntToDigits */
39361 static const char DIGIT_PAIRS_10[2*10*10+1] = {
39362     "00010203040506070809"
39363     "10111213141516171819"
39364     "20212223242526272829"
39365     "30313233343536373839"
39366     "40414243444546474849"
39367     "50515253545556575859"
39368     "60616263646566676869"
39369     "70717273747576777879"
39370     "80818283848586878889"
39371     "90919293949596979899"
39372 };
39373 static const char DIGIT_PAIRS_8[2*8*8+1] = {
39374     "0001020304050607"
39375     "1011121314151617"
39376     "2021222324252627"
39377     "3031323334353637"
39378     "4041424344454647"
39379     "5051525354555657"
39380     "6061626364656667"
39381     "7071727374757677"
39382 };
39383 static const char DIGITS_HEX[2*16+1] = {
39384     "0123456789abcdef"
39385     "0123456789ABCDEF"
39386 };
39387
39388 /* BuildPyUnicode */
39389 static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
39390                                                 int prepend_sign, char padding_char) {
39391     PyObject *uval;
39392     Py_ssize_t uoffset = ulength - clength;
39393 #if CYTHON_USE_UNICODE_INTERNALS
39394     Py_ssize_t i;
39395 #if CYTHON_PEP393_ENABLED
39396     void *udata;
39397     uval = PyUnicode_New(ulength, 127);
39398     if (unlikely(!uval)) return NULL;
39399     udata = PyUnicode_DATA(uval);
39400 #else
39401     Py_UNICODE *udata;
39402     uval = PyUnicode_FromUnicode(NULL, ulength);
39403     if (unlikely(!uval)) return NULL;
39404     udata = PyUnicode_AS_UNICODE(uval);
39405 #endif
39406     if (uoffset > 0) {
39407         i = 0;
39408         if (prepend_sign) {
39409             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
39410             i++;
39411         }
39412         for (; i < uoffset; i++) {
39413             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
39414         }
39415     }
39416     for (i=0; i < clength; i++) {
39417         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
39418     }
39419 #else
39420     {
39421         PyObject *sign = NULL, *padding = NULL;
39422         uval = NULL;
39423         if (uoffset > 0) {
39424             prepend_sign = !!prepend_sign;
39425             if (uoffset > prepend_sign) {
39426                 padding = PyUnicode_FromOrdinal(padding_char);
39427                 if (likely(padding) && uoffset > prepend_sign + 1) {
39428                     PyObject *tmp;
39429                     PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign);
39430                     if (unlikely(!repeat)) goto done_or_error;
39431                     tmp = PyNumber_Multiply(padding, repeat);
39432                     Py_DECREF(repeat);
39433                     Py_DECREF(padding);
39434                     padding = tmp;
39435                 }
39436                 if (unlikely(!padding)) goto done_or_error;
39437             }
39438             if (prepend_sign) {
39439                 sign = PyUnicode_FromOrdinal('-');
39440                 if (unlikely(!sign)) goto done_or_error;
39441             }
39442         }
39443         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
39444         if (likely(uval) && padding) {
39445             PyObject *tmp = PyNumber_Add(padding, uval);
39446             Py_DECREF(uval);
39447             uval = tmp;
39448         }
39449         if (likely(uval) && sign) {
39450             PyObject *tmp = PyNumber_Add(sign, uval);
39451             Py_DECREF(uval);
39452             uval = tmp;
39453         }
39454 done_or_error:
39455         Py_XDECREF(padding);
39456         Py_XDECREF(sign);
39457     }
39458 #endif
39459     return uval;
39460 }
39461
39462 /* CIntToPyUnicode */
39463 #ifdef _MSC_VER
39464     #ifndef _MSC_STDINT_H_
39465         #if _MSC_VER < 1300
39466            typedef unsigned short    uint16_t;
39467         #else
39468            typedef unsigned __int16  uint16_t;
39469         #endif
39470     #endif
39471 #else
39472    #include <stdint.h>
39473 #endif
39474 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
39475 #define GCC_DIAGNOSTIC
39476 #endif
39477 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
39478     char digits[sizeof(Py_ssize_t)*3+2];
39479     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
39480     const char *hex_digits = DIGITS_HEX;
39481     Py_ssize_t length, ulength;
39482     int prepend_sign, last_one_off;
39483     Py_ssize_t remaining;
39484 #ifdef GCC_DIAGNOSTIC
39485 #pragma GCC diagnostic push
39486 #pragma GCC diagnostic ignored "-Wconversion"
39487 #endif
39488     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
39489 #ifdef GCC_DIAGNOSTIC
39490 #pragma GCC diagnostic pop
39491 #endif
39492     const int is_unsigned = neg_one > const_zero;
39493     if (format_char == 'X') {
39494         hex_digits += 16;
39495         format_char = 'x';
39496     }
39497     remaining = value;
39498     last_one_off = 0;
39499     dpos = end;
39500     do {
39501         int digit_pos;
39502         switch (format_char) {
39503         case 'o':
39504             digit_pos = abs((int)(remaining % (8*8)));
39505             remaining = (Py_ssize_t) (remaining / (8*8));
39506             dpos -= 2;
39507             *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos];
39508             last_one_off = (digit_pos < 8);
39509             break;
39510         case 'd':
39511             digit_pos = abs((int)(remaining % (10*10)));
39512             remaining = (Py_ssize_t) (remaining / (10*10));
39513             dpos -= 2;
39514             *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos];
39515             last_one_off = (digit_pos < 10);
39516             break;
39517         case 'x':
39518             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
39519             remaining = (Py_ssize_t) (remaining / 16);
39520             break;
39521         default:
39522             assert(0);
39523             break;
39524         }
39525     } while (unlikely(remaining != 0));
39526     if (last_one_off) {
39527         assert(*dpos == '0');
39528         dpos++;
39529     }
39530     length = end - dpos;
39531     ulength = length;
39532     prepend_sign = 0;
39533     if (!is_unsigned && value <= neg_one) {
39534         if (padding_char == ' ' || width <= length + 1) {
39535             *(--dpos) = '-';
39536             ++length;
39537         } else {
39538             prepend_sign = 1;
39539         }
39540         ++ulength;
39541     }
39542     if (width > ulength) {
39543         ulength = width;
39544     }
39545     if (ulength == 1) {
39546         return PyUnicode_FromOrdinal(*dpos);
39547     }
39548     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
39549 }
39550
39551 /* PyIntBinop */
39552 #if !CYTHON_COMPILING_IN_PYPY
39553 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
39554     (void)inplace;
39555     (void)zerodivision_check;
39556     #if PY_MAJOR_VERSION < 3
39557     if (likely(PyInt_CheckExact(op1))) {
39558         const long b = intval;
39559         long x;
39560         long a = PyInt_AS_LONG(op1);
39561             x = (long)((unsigned long)a - b);
39562             if (likely((x^a) >= 0 || (x^~b) >= 0))
39563                 return PyInt_FromLong(x);
39564             return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
39565     }
39566     #endif
39567     #if CYTHON_USE_PYLONG_INTERNALS
39568     if (likely(PyLong_CheckExact(op1))) {
39569         const long b = intval;
39570         long a, x;
39571 #ifdef HAVE_LONG_LONG
39572         const PY_LONG_LONG llb = intval;
39573         PY_LONG_LONG lla, llx;
39574 #endif
39575         const digit* digits = ((PyLongObject*)op1)->ob_digit;
39576         const Py_ssize_t size = Py_SIZE(op1);
39577         if (likely(__Pyx_sst_abs(size) <= 1)) {
39578             a = likely(size) ? digits[0] : 0;
39579             if (size == -1) a = -a;
39580         } else {
39581             switch (size) {
39582                 case -2:
39583                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39584                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39585                         break;
39586 #ifdef HAVE_LONG_LONG
39587                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39588                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39589                         goto long_long;
39590 #endif
39591                     }
39592                     CYTHON_FALLTHROUGH;
39593                 case 2:
39594                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39595                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39596                         break;
39597 #ifdef HAVE_LONG_LONG
39598                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39599                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39600                         goto long_long;
39601 #endif
39602                     }
39603                     CYTHON_FALLTHROUGH;
39604                 case -3:
39605                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39606                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39607                         break;
39608 #ifdef HAVE_LONG_LONG
39609                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39610                         lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39611                         goto long_long;
39612 #endif
39613                     }
39614                     CYTHON_FALLTHROUGH;
39615                 case 3:
39616                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39617                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39618                         break;
39619 #ifdef HAVE_LONG_LONG
39620                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39621                         lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39622                         goto long_long;
39623 #endif
39624                     }
39625                     CYTHON_FALLTHROUGH;
39626                 case -4:
39627                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39628                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39629                         break;
39630 #ifdef HAVE_LONG_LONG
39631                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39632                         lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39633                         goto long_long;
39634 #endif
39635                     }
39636                     CYTHON_FALLTHROUGH;
39637                 case 4:
39638                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39639                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39640                         break;
39641 #ifdef HAVE_LONG_LONG
39642                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39643                         lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39644                         goto long_long;
39645 #endif
39646                     }
39647                     CYTHON_FALLTHROUGH;
39648                 default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
39649             }
39650         }
39651                 x = a - b;
39652             return PyLong_FromLong(x);
39653 #ifdef HAVE_LONG_LONG
39654         long_long:
39655                 llx = lla - llb;
39656             return PyLong_FromLongLong(llx);
39657 #endif
39658         
39659         
39660     }
39661     #endif
39662     if (PyFloat_CheckExact(op1)) {
39663         const long b = intval;
39664         double a = PyFloat_AS_DOUBLE(op1);
39665             double result;
39666             PyFPE_START_PROTECT("subtract", return NULL)
39667             result = ((double)a) - (double)b;
39668             PyFPE_END_PROTECT(result)
39669             return PyFloat_FromDouble(result);
39670     }
39671     return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
39672 }
39673 #endif
39674
39675 /* py_abs */
39676 #if CYTHON_USE_PYLONG_INTERNALS
39677 static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
39678     if (likely(Py_SIZE(n) == -1)) {
39679         return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]);
39680     }
39681 #if CYTHON_COMPILING_IN_CPYTHON
39682     {
39683         PyObject *copy = _PyLong_Copy((PyLongObject*)n);
39684         if (likely(copy)) {
39685             Py_SIZE(copy) = -(Py_SIZE(copy));
39686         }
39687         return copy;
39688     }
39689 #else
39690     return PyNumber_Negative(n);
39691 #endif
39692 }
39693 #endif
39694
39695 /* GetTopmostException */
39696 #if CYTHON_USE_EXC_INFO_STACK
39697 static _PyErr_StackItem *
39698 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
39699 {
39700     _PyErr_StackItem *exc_info = tstate->exc_info;
39701     while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
39702            exc_info->previous_item != NULL)
39703     {
39704         exc_info = exc_info->previous_item;
39705     }
39706     return exc_info;
39707 }
39708 #endif
39709
39710 /* SaveResetException */
39711 #if CYTHON_FAST_THREAD_STATE
39712 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
39713     #if CYTHON_USE_EXC_INFO_STACK
39714     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
39715     *type = exc_info->exc_type;
39716     *value = exc_info->exc_value;
39717     *tb = exc_info->exc_traceback;
39718     #else
39719     *type = tstate->exc_type;
39720     *value = tstate->exc_value;
39721     *tb = tstate->exc_traceback;
39722     #endif
39723     Py_XINCREF(*type);
39724     Py_XINCREF(*value);
39725     Py_XINCREF(*tb);
39726 }
39727 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
39728     PyObject *tmp_type, *tmp_value, *tmp_tb;
39729     #if CYTHON_USE_EXC_INFO_STACK
39730     _PyErr_StackItem *exc_info = tstate->exc_info;
39731     tmp_type = exc_info->exc_type;
39732     tmp_value = exc_info->exc_value;
39733     tmp_tb = exc_info->exc_traceback;
39734     exc_info->exc_type = type;
39735     exc_info->exc_value = value;
39736     exc_info->exc_traceback = tb;
39737     #else
39738     tmp_type = tstate->exc_type;
39739     tmp_value = tstate->exc_value;
39740     tmp_tb = tstate->exc_traceback;
39741     tstate->exc_type = type;
39742     tstate->exc_value = value;
39743     tstate->exc_traceback = tb;
39744     #endif
39745     Py_XDECREF(tmp_type);
39746     Py_XDECREF(tmp_value);
39747     Py_XDECREF(tmp_tb);
39748 }
39749 #endif
39750
39751 /* PyErrExceptionMatches */
39752 #if CYTHON_FAST_THREAD_STATE
39753 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
39754     Py_ssize_t i, n;
39755     n = PyTuple_GET_SIZE(tuple);
39756 #if PY_MAJOR_VERSION >= 3
39757     for (i=0; i<n; i++) {
39758         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
39759     }
39760 #endif
39761     for (i=0; i<n; i++) {
39762         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
39763     }
39764     return 0;
39765 }
39766 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
39767     PyObject *exc_type = tstate->curexc_type;
39768     if (exc_type == err) return 1;
39769     if (unlikely(!exc_type)) return 0;
39770     if (unlikely(PyTuple_Check(err)))
39771         return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
39772     return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
39773 }
39774 #endif
39775
39776 /* GetAttr */
39777 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
39778 #if CYTHON_USE_TYPE_SLOTS
39779 #if PY_MAJOR_VERSION >= 3
39780     if (likely(PyUnicode_Check(n)))
39781 #else
39782     if (likely(PyString_Check(n)))
39783 #endif
39784         return __Pyx_PyObject_GetAttrStr(o, n);
39785 #endif
39786     return PyObject_GetAttr(o, n);
39787 }
39788
39789 /* GetAttr3 */
39790 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
39791     __Pyx_PyThreadState_declare
39792     __Pyx_PyThreadState_assign
39793     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
39794         return NULL;
39795     __Pyx_PyErr_Clear();
39796     Py_INCREF(d);
39797     return d;
39798 }
39799 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
39800     PyObject *r = __Pyx_GetAttr(o, n);
39801     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
39802 }
39803
39804 /* IterFinish */
39805 static CYTHON_INLINE int __Pyx_IterFinish(void) {
39806 #if CYTHON_FAST_THREAD_STATE
39807     PyThreadState *tstate = __Pyx_PyThreadState_Current;
39808     PyObject* exc_type = tstate->curexc_type;
39809     if (unlikely(exc_type)) {
39810         if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
39811             PyObject *exc_value, *exc_tb;
39812             exc_value = tstate->curexc_value;
39813             exc_tb = tstate->curexc_traceback;
39814             tstate->curexc_type = 0;
39815             tstate->curexc_value = 0;
39816             tstate->curexc_traceback = 0;
39817             Py_DECREF(exc_type);
39818             Py_XDECREF(exc_value);
39819             Py_XDECREF(exc_tb);
39820             return 0;
39821         } else {
39822             return -1;
39823         }
39824     }
39825     return 0;
39826 #else
39827     if (unlikely(PyErr_Occurred())) {
39828         if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
39829             PyErr_Clear();
39830             return 0;
39831         } else {
39832             return -1;
39833         }
39834     }
39835     return 0;
39836 #endif
39837 }
39838
39839 /* UnpackItemEndCheck */
39840 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
39841     if (unlikely(retval)) {
39842         Py_DECREF(retval);
39843         __Pyx_RaiseTooManyValuesError(expected);
39844         return -1;
39845     } else {
39846         return __Pyx_IterFinish();
39847     }
39848     return 0;
39849 }
39850
39851 /* PyIntBinop */
39852 #if !CYTHON_COMPILING_IN_PYPY
39853 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
39854     (void)inplace;
39855     (void)zerodivision_check;
39856     #if PY_MAJOR_VERSION < 3
39857     if (likely(PyInt_CheckExact(op1))) {
39858         const long b = intval;
39859         long x;
39860         long a = PyInt_AS_LONG(op1);
39861             x = (long)((unsigned long)a + b);
39862             if (likely((x^a) >= 0 || (x^b) >= 0))
39863                 return PyInt_FromLong(x);
39864             return PyLong_Type.tp_as_number->nb_add(op1, op2);
39865     }
39866     #endif
39867     #if CYTHON_USE_PYLONG_INTERNALS
39868     if (likely(PyLong_CheckExact(op1))) {
39869         const long b = intval;
39870         long a, x;
39871 #ifdef HAVE_LONG_LONG
39872         const PY_LONG_LONG llb = intval;
39873         PY_LONG_LONG lla, llx;
39874 #endif
39875         const digit* digits = ((PyLongObject*)op1)->ob_digit;
39876         const Py_ssize_t size = Py_SIZE(op1);
39877         if (likely(__Pyx_sst_abs(size) <= 1)) {
39878             a = likely(size) ? digits[0] : 0;
39879             if (size == -1) a = -a;
39880         } else {
39881             switch (size) {
39882                 case -2:
39883                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39884                         a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39885                         break;
39886 #ifdef HAVE_LONG_LONG
39887                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39888                         lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39889                         goto long_long;
39890 #endif
39891                     }
39892                     CYTHON_FALLTHROUGH;
39893                 case 2:
39894                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
39895                         a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39896                         break;
39897 #ifdef HAVE_LONG_LONG
39898                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
39899                         lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39900                         goto long_long;
39901 #endif
39902                     }
39903                     CYTHON_FALLTHROUGH;
39904                 case -3:
39905                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39906                         a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39907                         break;
39908 #ifdef HAVE_LONG_LONG
39909                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39910                         lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39911                         goto long_long;
39912 #endif
39913                     }
39914                     CYTHON_FALLTHROUGH;
39915                 case 3:
39916                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
39917                         a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39918                         break;
39919 #ifdef HAVE_LONG_LONG
39920                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
39921                         lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39922                         goto long_long;
39923 #endif
39924                     }
39925                     CYTHON_FALLTHROUGH;
39926                 case -4:
39927                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39928                         a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39929                         break;
39930 #ifdef HAVE_LONG_LONG
39931                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39932                         lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39933                         goto long_long;
39934 #endif
39935                     }
39936                     CYTHON_FALLTHROUGH;
39937                 case 4:
39938                     if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39939                         a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39940                         break;
39941 #ifdef HAVE_LONG_LONG
39942                     } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39943                         lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39944                         goto long_long;
39945 #endif
39946                     }
39947                     CYTHON_FALLTHROUGH;
39948                 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
39949             }
39950         }
39951                 x = a + b;
39952             return PyLong_FromLong(x);
39953 #ifdef HAVE_LONG_LONG
39954         long_long:
39955                 llx = lla + llb;
39956             return PyLong_FromLongLong(llx);
39957 #endif
39958         
39959         
39960     }
39961     #endif
39962     if (PyFloat_CheckExact(op1)) {
39963         const long b = intval;
39964         double a = PyFloat_AS_DOUBLE(op1);
39965             double result;
39966             PyFPE_START_PROTECT("add", return NULL)
39967             result = ((double)a) + (double)b;
39968             PyFPE_END_PROTECT(result)
39969             return PyFloat_FromDouble(result);
39970     }
39971     return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
39972 }
39973 #endif
39974
39975 /* PyIntCompare */
39976 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
39977     if (op1 == op2) {
39978         Py_RETURN_TRUE;
39979     }
39980     #if PY_MAJOR_VERSION < 3
39981     if (likely(PyInt_CheckExact(op1))) {
39982         const long b = intval;
39983         long a = PyInt_AS_LONG(op1);
39984         if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
39985     }
39986     #endif
39987     #if CYTHON_USE_PYLONG_INTERNALS
39988     if (likely(PyLong_CheckExact(op1))) {
39989         int unequal;
39990         unsigned long uintval;
39991         Py_ssize_t size = Py_SIZE(op1);
39992         const digit* digits = ((PyLongObject*)op1)->ob_digit;
39993         if (intval == 0) {
39994             if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
39995         } else if (intval < 0) {
39996             if (size >= 0)
39997                 Py_RETURN_FALSE;
39998             intval = -intval;
39999             size = -size;
40000         } else {
40001             if (size <= 0)
40002                 Py_RETURN_FALSE;
40003         }
40004         uintval = (unsigned long) intval;
40005 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
40006         if (uintval >> (PyLong_SHIFT * 4)) {
40007             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40008                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40009         } else
40010 #endif
40011 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
40012         if (uintval >> (PyLong_SHIFT * 3)) {
40013             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40014                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40015         } else
40016 #endif
40017 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
40018         if (uintval >> (PyLong_SHIFT * 2)) {
40019             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40020                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40021         } else
40022 #endif
40023 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
40024         if (uintval >> (PyLong_SHIFT * 1)) {
40025             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40026                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40027         } else
40028 #endif
40029             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
40030         if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40031     }
40032     #endif
40033     if (PyFloat_CheckExact(op1)) {
40034         const long b = intval;
40035         double a = PyFloat_AS_DOUBLE(op1);
40036         if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40037     }
40038     return (
40039         PyObject_RichCompare(op1, op2, Py_EQ));
40040 }
40041
40042 /* CallUnboundCMethod0 */
40043 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
40044     PyObject *args, *result = NULL;
40045     if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
40046 #if CYTHON_ASSUME_SAFE_MACROS
40047     args = PyTuple_New(1);
40048     if (unlikely(!args)) goto bad;
40049     Py_INCREF(self);
40050     PyTuple_SET_ITEM(args, 0, self);
40051 #else
40052     args = PyTuple_Pack(1, self);
40053     if (unlikely(!args)) goto bad;
40054 #endif
40055     result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
40056     Py_DECREF(args);
40057 bad:
40058     return result;
40059 }
40060
40061 /* py_dict_items */
40062 static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
40063     if (PY_MAJOR_VERSION >= 3)
40064         return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d);
40065     else
40066         return PyDict_Items(d);
40067 }
40068
40069 /* pyfrozenset_new */
40070 static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
40071     if (it) {
40072         PyObject* result;
40073 #if CYTHON_COMPILING_IN_PYPY
40074         PyObject* args;
40075         args = PyTuple_Pack(1, it);
40076         if (unlikely(!args))
40077             return NULL;
40078         result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
40079         Py_DECREF(args);
40080         return result;
40081 #else
40082         if (PyFrozenSet_CheckExact(it)) {
40083             Py_INCREF(it);
40084             return it;
40085         }
40086         result = PyFrozenSet_New(it);
40087         if (unlikely(!result))
40088             return NULL;
40089         if (likely(PySet_GET_SIZE(result)))
40090             return result;
40091         Py_DECREF(result);
40092 #endif
40093     }
40094 #if CYTHON_USE_TYPE_SLOTS
40095     return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
40096 #else
40097     return PyObject_Call((PyObject*)&PyFrozenSet_Type, __pyx_empty_tuple, NULL);
40098 #endif
40099 }
40100
40101 /* PySetContains */
40102 static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
40103     int result = -1;
40104     if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
40105         PyObject *tmpkey;
40106         PyErr_Clear();
40107         tmpkey = __Pyx_PyFrozenSet_New(key);
40108         if (tmpkey != NULL) {
40109             result = PySet_Contains(set, tmpkey);
40110             Py_DECREF(tmpkey);
40111         }
40112     }
40113     return result;
40114 }
40115 static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
40116     int result = PySet_Contains(set, key);
40117     if (unlikely(result < 0)) {
40118         result = __Pyx_PySet_ContainsUnhashable(set, key);
40119     }
40120     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
40121 }
40122
40123 /* py_dict_values */
40124 static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
40125     if (PY_MAJOR_VERSION >= 3)
40126         return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
40127     else
40128         return PyDict_Values(d);
40129 }
40130
40131 /* KeywordStringCheck */
40132 static int __Pyx_CheckKeywordStrings(
40133     PyObject *kwdict,
40134     const char* function_name,
40135     int kw_allowed)
40136 {
40137     PyObject* key = 0;
40138     Py_ssize_t pos = 0;
40139 #if CYTHON_COMPILING_IN_PYPY
40140     if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
40141         goto invalid_keyword;
40142     return 1;
40143 #else
40144     while (PyDict_Next(kwdict, &pos, &key, 0)) {
40145         #if PY_MAJOR_VERSION < 3
40146         if (unlikely(!PyString_Check(key)))
40147         #endif
40148             if (unlikely(!PyUnicode_Check(key)))
40149                 goto invalid_keyword_type;
40150     }
40151     if ((!kw_allowed) && unlikely(key))
40152         goto invalid_keyword;
40153     return 1;
40154 invalid_keyword_type:
40155     PyErr_Format(PyExc_TypeError,
40156         "%.200s() keywords must be strings", function_name);
40157     return 0;
40158 #endif
40159 invalid_keyword:
40160     PyErr_Format(PyExc_TypeError,
40161     #if PY_MAJOR_VERSION < 3
40162         "%.200s() got an unexpected keyword argument '%.200s'",
40163         function_name, PyString_AsString(key));
40164     #else
40165         "%s() got an unexpected keyword argument '%U'",
40166         function_name, key);
40167     #endif
40168     return 0;
40169 }
40170
40171 /* ArgTypeTest */
40172 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
40173 {
40174     if (unlikely(!type)) {
40175         PyErr_SetString(PyExc_SystemError, "Missing type object");
40176         return 0;
40177     }
40178     else if (exact) {
40179         #if PY_MAJOR_VERSION == 2
40180         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
40181         #endif
40182     }
40183     else {
40184         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
40185     }
40186     PyErr_Format(PyExc_TypeError,
40187         "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
40188         name, type->tp_name, Py_TYPE(obj)->tp_name);
40189     return 0;
40190 }
40191
40192 /* PyUnicode_Unicode */
40193 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
40194     if (unlikely(obj == Py_None))
40195         obj = __pyx_n_u_None;
40196     return __Pyx_NewRef(obj);
40197 }
40198
40199 /* PyObjectFormatAndDecref */
40200 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
40201     if (unlikely(!s)) return NULL;
40202     if (likely(PyUnicode_CheckExact(s))) return s;
40203     #if PY_MAJOR_VERSION < 3
40204     if (likely(PyString_CheckExact(s))) {
40205         PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
40206         Py_DECREF(s);
40207         return result;
40208     }
40209     #endif
40210     return __Pyx_PyObject_FormatAndDecref(s, f);
40211 }
40212 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
40213     PyObject *result = PyObject_Format(s, f);
40214     Py_DECREF(s);
40215     return result;
40216 }
40217
40218 /* SliceObject */
40219 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
40220         Py_ssize_t cstart, Py_ssize_t cstop,
40221         PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
40222         int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
40223 #if CYTHON_USE_TYPE_SLOTS
40224     PyMappingMethods* mp;
40225 #if PY_MAJOR_VERSION < 3
40226     PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
40227     if (likely(ms && ms->sq_slice)) {
40228         if (!has_cstart) {
40229             if (_py_start && (*_py_start != Py_None)) {
40230                 cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
40231                 if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
40232             } else
40233                 cstart = 0;
40234         }
40235         if (!has_cstop) {
40236             if (_py_stop && (*_py_stop != Py_None)) {
40237                 cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
40238                 if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
40239             } else
40240                 cstop = PY_SSIZE_T_MAX;
40241         }
40242         if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
40243             Py_ssize_t l = ms->sq_length(obj);
40244             if (likely(l >= 0)) {
40245                 if (cstop < 0) {
40246                     cstop += l;
40247                     if (cstop < 0) cstop = 0;
40248                 }
40249                 if (cstart < 0) {
40250                     cstart += l;
40251                     if (cstart < 0) cstart = 0;
40252                 }
40253             } else {
40254                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
40255                     goto bad;
40256                 PyErr_Clear();
40257             }
40258         }
40259         return ms->sq_slice(obj, cstart, cstop);
40260     }
40261 #endif
40262     mp = Py_TYPE(obj)->tp_as_mapping;
40263     if (likely(mp && mp->mp_subscript))
40264 #endif
40265     {
40266         PyObject* result;
40267         PyObject *py_slice, *py_start, *py_stop;
40268         if (_py_slice) {
40269             py_slice = *_py_slice;
40270         } else {
40271             PyObject* owned_start = NULL;
40272             PyObject* owned_stop = NULL;
40273             if (_py_start) {
40274                 py_start = *_py_start;
40275             } else {
40276                 if (has_cstart) {
40277                     owned_start = py_start = PyInt_FromSsize_t(cstart);
40278                     if (unlikely(!py_start)) goto bad;
40279                 } else
40280                     py_start = Py_None;
40281             }
40282             if (_py_stop) {
40283                 py_stop = *_py_stop;
40284             } else {
40285                 if (has_cstop) {
40286                     owned_stop = py_stop = PyInt_FromSsize_t(cstop);
40287                     if (unlikely(!py_stop)) {
40288                         Py_XDECREF(owned_start);
40289                         goto bad;
40290                     }
40291                 } else
40292                     py_stop = Py_None;
40293             }
40294             py_slice = PySlice_New(py_start, py_stop, Py_None);
40295             Py_XDECREF(owned_start);
40296             Py_XDECREF(owned_stop);
40297             if (unlikely(!py_slice)) goto bad;
40298         }
40299 #if CYTHON_USE_TYPE_SLOTS
40300         result = mp->mp_subscript(obj, py_slice);
40301 #else
40302         result = PyObject_GetItem(obj, py_slice);
40303 #endif
40304         if (!_py_slice) {
40305             Py_DECREF(py_slice);
40306         }
40307         return result;
40308     }
40309     PyErr_Format(PyExc_TypeError,
40310         "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
40311 bad:
40312     return NULL;
40313 }
40314
40315 /* Import */
40316 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
40317     PyObject *empty_list = 0;
40318     PyObject *module = 0;
40319     PyObject *global_dict = 0;
40320     PyObject *empty_dict = 0;
40321     PyObject *list;
40322     #if PY_MAJOR_VERSION < 3
40323     PyObject *py_import;
40324     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
40325     if (!py_import)
40326         goto bad;
40327     #endif
40328     if (from_list)
40329         list = from_list;
40330     else {
40331         empty_list = PyList_New(0);
40332         if (!empty_list)
40333             goto bad;
40334         list = empty_list;
40335     }
40336     global_dict = PyModule_GetDict(__pyx_m);
40337     if (!global_dict)
40338         goto bad;
40339     empty_dict = PyDict_New();
40340     if (!empty_dict)
40341         goto bad;
40342     {
40343         #if PY_MAJOR_VERSION >= 3
40344         if (level == -1) {
40345             if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
40346                 module = PyImport_ImportModuleLevelObject(
40347                     name, global_dict, empty_dict, list, 1);
40348                 if (!module) {
40349                     if (!PyErr_ExceptionMatches(PyExc_ImportError))
40350                         goto bad;
40351                     PyErr_Clear();
40352                 }
40353             }
40354             level = 0;
40355         }
40356         #endif
40357         if (!module) {
40358             #if PY_MAJOR_VERSION < 3
40359             PyObject *py_level = PyInt_FromLong(level);
40360             if (!py_level)
40361                 goto bad;
40362             module = PyObject_CallFunctionObjArgs(py_import,
40363                 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
40364             Py_DECREF(py_level);
40365             #else
40366             module = PyImport_ImportModuleLevelObject(
40367                 name, global_dict, empty_dict, list, level);
40368             #endif
40369         }
40370     }
40371 bad:
40372     #if PY_MAJOR_VERSION < 3
40373     Py_XDECREF(py_import);
40374     #endif
40375     Py_XDECREF(empty_list);
40376     Py_XDECREF(empty_dict);
40377     return module;
40378 }
40379
40380 /* GetException */
40381 #if CYTHON_FAST_THREAD_STATE
40382 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
40383 #else
40384 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
40385 #endif
40386 {
40387     PyObject *local_type, *local_value, *local_tb;
40388 #if CYTHON_FAST_THREAD_STATE
40389     PyObject *tmp_type, *tmp_value, *tmp_tb;
40390     local_type = tstate->curexc_type;
40391     local_value = tstate->curexc_value;
40392     local_tb = tstate->curexc_traceback;
40393     tstate->curexc_type = 0;
40394     tstate->curexc_value = 0;
40395     tstate->curexc_traceback = 0;
40396 #else
40397     PyErr_Fetch(&local_type, &local_value, &local_tb);
40398 #endif
40399     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
40400 #if CYTHON_FAST_THREAD_STATE
40401     if (unlikely(tstate->curexc_type))
40402 #else
40403     if (unlikely(PyErr_Occurred()))
40404 #endif
40405         goto bad;
40406     #if PY_MAJOR_VERSION >= 3
40407     if (local_tb) {
40408         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
40409             goto bad;
40410     }
40411     #endif
40412     Py_XINCREF(local_tb);
40413     Py_XINCREF(local_type);
40414     Py_XINCREF(local_value);
40415     *type = local_type;
40416     *value = local_value;
40417     *tb = local_tb;
40418 #if CYTHON_FAST_THREAD_STATE
40419     #if CYTHON_USE_EXC_INFO_STACK
40420     {
40421         _PyErr_StackItem *exc_info = tstate->exc_info;
40422         tmp_type = exc_info->exc_type;
40423         tmp_value = exc_info->exc_value;
40424         tmp_tb = exc_info->exc_traceback;
40425         exc_info->exc_type = local_type;
40426         exc_info->exc_value = local_value;
40427         exc_info->exc_traceback = local_tb;
40428     }
40429     #else
40430     tmp_type = tstate->exc_type;
40431     tmp_value = tstate->exc_value;
40432     tmp_tb = tstate->exc_traceback;
40433     tstate->exc_type = local_type;
40434     tstate->exc_value = local_value;
40435     tstate->exc_traceback = local_tb;
40436     #endif
40437     Py_XDECREF(tmp_type);
40438     Py_XDECREF(tmp_value);
40439     Py_XDECREF(tmp_tb);
40440 #else
40441     PyErr_SetExcInfo(local_type, local_value, local_tb);
40442 #endif
40443     return 0;
40444 bad:
40445     *type = 0;
40446     *value = 0;
40447     *tb = 0;
40448     Py_XDECREF(local_type);
40449     Py_XDECREF(local_value);
40450     Py_XDECREF(local_tb);
40451     return -1;
40452 }
40453
40454 /* PyIntCompare */
40455 static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
40456     if (op1 == op2) {
40457         Py_RETURN_FALSE;
40458     }
40459     #if PY_MAJOR_VERSION < 3
40460     if (likely(PyInt_CheckExact(op1))) {
40461         const long b = intval;
40462         long a = PyInt_AS_LONG(op1);
40463         if (a != b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40464     }
40465     #endif
40466     #if CYTHON_USE_PYLONG_INTERNALS
40467     if (likely(PyLong_CheckExact(op1))) {
40468         int unequal;
40469         unsigned long uintval;
40470         Py_ssize_t size = Py_SIZE(op1);
40471         const digit* digits = ((PyLongObject*)op1)->ob_digit;
40472         if (intval == 0) {
40473             if (size != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40474         } else if (intval < 0) {
40475             if (size >= 0)
40476                 Py_RETURN_TRUE;
40477             intval = -intval;
40478             size = -size;
40479         } else {
40480             if (size <= 0)
40481                 Py_RETURN_TRUE;
40482         }
40483         uintval = (unsigned long) intval;
40484 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
40485         if (uintval >> (PyLong_SHIFT * 4)) {
40486             unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40487                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40488         } else
40489 #endif
40490 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
40491         if (uintval >> (PyLong_SHIFT * 3)) {
40492             unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40493                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40494         } else
40495 #endif
40496 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
40497         if (uintval >> (PyLong_SHIFT * 2)) {
40498             unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40499                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40500         } else
40501 #endif
40502 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
40503         if (uintval >> (PyLong_SHIFT * 1)) {
40504             unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
40505                  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
40506         } else
40507 #endif
40508             unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
40509         if (unequal != 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40510     }
40511     #endif
40512     if (PyFloat_CheckExact(op1)) {
40513         const long b = intval;
40514         double a = PyFloat_AS_DOUBLE(op1);
40515         if ((double)a != (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
40516     }
40517     return (
40518         PyObject_RichCompare(op1, op2, Py_NE));
40519 }
40520
40521 /* DelItemInt */
40522 static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
40523     int r;
40524     if (!j) return -1;
40525     r = PyObject_DelItem(o, j);
40526     Py_DECREF(j);
40527     return r;
40528 }
40529 static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i,
40530                                                CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) {
40531 #if !CYTHON_USE_TYPE_SLOTS
40532     if (is_list || PySequence_Check(o)) {
40533         return PySequence_DelItem(o, i);
40534     }
40535 #else
40536     PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
40537     if (likely(m && m->sq_ass_item)) {
40538         if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
40539             Py_ssize_t l = m->sq_length(o);
40540             if (likely(l >= 0)) {
40541                 i += l;
40542             } else {
40543                 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
40544                     return -1;
40545                 PyErr_Clear();
40546             }
40547         }
40548         return m->sq_ass_item(o, i, (PyObject *)NULL);
40549     }
40550 #endif
40551     return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i));
40552 }
40553
40554 /* CallNextTpDealloc */
40555 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
40556     PyTypeObject* type = Py_TYPE(obj);
40557     while (type && type->tp_dealloc != current_tp_dealloc)
40558         type = type->tp_base;
40559     while (type && type->tp_dealloc == current_tp_dealloc)
40560         type = type->tp_base;
40561     if (type)
40562         type->tp_dealloc(obj);
40563 }
40564
40565 /* CallNextTpTraverse */
40566 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
40567     PyTypeObject* type = Py_TYPE(obj);
40568     while (type && type->tp_traverse != current_tp_traverse)
40569         type = type->tp_base;
40570     while (type && type->tp_traverse == current_tp_traverse)
40571         type = type->tp_base;
40572     if (type && type->tp_traverse)
40573         return type->tp_traverse(obj, v, a);
40574     return 0;
40575 }
40576
40577 /* CallNextTpClear */
40578 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
40579     PyTypeObject* type = Py_TYPE(obj);
40580     while (type && type->tp_clear != current_tp_clear)
40581         type = type->tp_base;
40582     while (type && type->tp_clear == current_tp_clear)
40583         type = type->tp_base;
40584     if (type && type->tp_clear)
40585         type->tp_clear(obj);
40586 }
40587
40588 /* PyObject_GenericGetAttrNoDict */
40589 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
40590 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
40591     PyErr_Format(PyExc_AttributeError,
40592 #if PY_MAJOR_VERSION >= 3
40593                  "'%.50s' object has no attribute '%U'",
40594                  tp->tp_name, attr_name);
40595 #else
40596                  "'%.50s' object has no attribute '%.400s'",
40597                  tp->tp_name, PyString_AS_STRING(attr_name));
40598 #endif
40599     return NULL;
40600 }
40601 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
40602     PyObject *descr;
40603     PyTypeObject *tp = Py_TYPE(obj);
40604     if (unlikely(!PyString_Check(attr_name))) {
40605         return PyObject_GenericGetAttr(obj, attr_name);
40606     }
40607     assert(!tp->tp_dictoffset);
40608     descr = _PyType_Lookup(tp, attr_name);
40609     if (unlikely(!descr)) {
40610         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
40611     }
40612     Py_INCREF(descr);
40613     #if PY_MAJOR_VERSION < 3
40614     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
40615     #endif
40616     {
40617         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
40618         if (unlikely(f)) {
40619             PyObject *res = f(descr, obj, (PyObject *)tp);
40620             Py_DECREF(descr);
40621             return res;
40622         }
40623     }
40624     return descr;
40625 }
40626 #endif
40627
40628 /* PyObject_GenericGetAttr */
40629 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
40630 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
40631     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
40632         return PyObject_GenericGetAttr(obj, attr_name);
40633     }
40634     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
40635 }
40636 #endif
40637
40638 /* TypeImport */
40639 #ifndef __PYX_HAVE_RT_ImportType
40640 #define __PYX_HAVE_RT_ImportType
40641 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
40642     size_t size, enum __Pyx_ImportType_CheckSize check_size)
40643 {
40644     PyObject *result = 0;
40645     char warning[200];
40646     Py_ssize_t basicsize;
40647 #ifdef Py_LIMITED_API
40648     PyObject *py_basicsize;
40649 #endif
40650     result = PyObject_GetAttrString(module, class_name);
40651     if (!result)
40652         goto bad;
40653     if (!PyType_Check(result)) {
40654         PyErr_Format(PyExc_TypeError,
40655             "%.200s.%.200s is not a type object",
40656             module_name, class_name);
40657         goto bad;
40658     }
40659 #ifndef Py_LIMITED_API
40660     basicsize = ((PyTypeObject *)result)->tp_basicsize;
40661 #else
40662     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
40663     if (!py_basicsize)
40664         goto bad;
40665     basicsize = PyLong_AsSsize_t(py_basicsize);
40666     Py_DECREF(py_basicsize);
40667     py_basicsize = 0;
40668     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
40669         goto bad;
40670 #endif
40671     if ((size_t)basicsize < size) {
40672         PyErr_Format(PyExc_ValueError,
40673             "%.200s.%.200s size changed, may indicate binary incompatibility. "
40674             "Expected %zd from C header, got %zd from PyObject",
40675             module_name, class_name, size, basicsize);
40676         goto bad;
40677     }
40678     if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
40679         PyErr_Format(PyExc_ValueError,
40680             "%.200s.%.200s size changed, may indicate binary incompatibility. "
40681             "Expected %zd from C header, got %zd from PyObject",
40682             module_name, class_name, size, basicsize);
40683         goto bad;
40684     }
40685     else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
40686         PyOS_snprintf(warning, sizeof(warning),
40687             "%s.%s size changed, may indicate binary incompatibility. "
40688             "Expected %zd from C header, got %zd from PyObject",
40689             module_name, class_name, size, basicsize);
40690         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
40691     }
40692     return (PyTypeObject *)result;
40693 bad:
40694     Py_XDECREF(result);
40695     return NULL;
40696 }
40697 #endif
40698
40699 /* SetVTable */
40700 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
40701 #if PY_VERSION_HEX >= 0x02070000
40702     PyObject *ob = PyCapsule_New(vtable, 0, 0);
40703 #else
40704     PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
40705 #endif
40706     if (!ob)
40707         goto bad;
40708     if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
40709         goto bad;
40710     Py_DECREF(ob);
40711     return 0;
40712 bad:
40713     Py_XDECREF(ob);
40714     return -1;
40715 }
40716
40717 /* ImportFrom */
40718 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
40719     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
40720     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
40721         PyErr_Format(PyExc_ImportError,
40722         #if PY_MAJOR_VERSION < 3
40723             "cannot import name %.230s", PyString_AS_STRING(name));
40724         #else
40725             "cannot import name %S", name);
40726         #endif
40727     }
40728     return value;
40729 }
40730
40731 /* FetchCommonType */
40732 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
40733     PyObject* fake_module;
40734     PyTypeObject* cached_type = NULL;
40735     fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
40736     if (!fake_module) return NULL;
40737     Py_INCREF(fake_module);
40738     cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
40739     if (cached_type) {
40740         if (!PyType_Check((PyObject*)cached_type)) {
40741             PyErr_Format(PyExc_TypeError,
40742                 "Shared Cython type %.200s is not a type object",
40743                 type->tp_name);
40744             goto bad;
40745         }
40746         if (cached_type->tp_basicsize != type->tp_basicsize) {
40747             PyErr_Format(PyExc_TypeError,
40748                 "Shared Cython type %.200s has the wrong size, try recompiling",
40749                 type->tp_name);
40750             goto bad;
40751         }
40752     } else {
40753         if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
40754         PyErr_Clear();
40755         if (PyType_Ready(type) < 0) goto bad;
40756         if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
40757             goto bad;
40758         Py_INCREF(type);
40759         cached_type = type;
40760     }
40761 done:
40762     Py_DECREF(fake_module);
40763     return cached_type;
40764 bad:
40765     Py_XDECREF(cached_type);
40766     cached_type = NULL;
40767     goto done;
40768 }
40769
40770 /* CythonFunctionShared */
40771 #include <structmember.h>
40772 static PyObject *
40773 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
40774 {
40775     if (unlikely(op->func_doc == NULL)) {
40776         if (op->func.m_ml->ml_doc) {
40777 #if PY_MAJOR_VERSION >= 3
40778             op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
40779 #else
40780             op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
40781 #endif
40782             if (unlikely(op->func_doc == NULL))
40783                 return NULL;
40784         } else {
40785             Py_INCREF(Py_None);
40786             return Py_None;
40787         }
40788     }
40789     Py_INCREF(op->func_doc);
40790     return op->func_doc;
40791 }
40792 static int
40793 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40794 {
40795     PyObject *tmp = op->func_doc;
40796     if (value == NULL) {
40797         value = Py_None;
40798     }
40799     Py_INCREF(value);
40800     op->func_doc = value;
40801     Py_XDECREF(tmp);
40802     return 0;
40803 }
40804 static PyObject *
40805 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40806 {
40807     if (unlikely(op->func_name == NULL)) {
40808 #if PY_MAJOR_VERSION >= 3
40809         op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
40810 #else
40811         op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
40812 #endif
40813         if (unlikely(op->func_name == NULL))
40814             return NULL;
40815     }
40816     Py_INCREF(op->func_name);
40817     return op->func_name;
40818 }
40819 static int
40820 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40821 {
40822     PyObject *tmp;
40823 #if PY_MAJOR_VERSION >= 3
40824     if (unlikely(value == NULL || !PyUnicode_Check(value)))
40825 #else
40826     if (unlikely(value == NULL || !PyString_Check(value)))
40827 #endif
40828     {
40829         PyErr_SetString(PyExc_TypeError,
40830                         "__name__ must be set to a string object");
40831         return -1;
40832     }
40833     tmp = op->func_name;
40834     Py_INCREF(value);
40835     op->func_name = value;
40836     Py_XDECREF(tmp);
40837     return 0;
40838 }
40839 static PyObject *
40840 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40841 {
40842     Py_INCREF(op->func_qualname);
40843     return op->func_qualname;
40844 }
40845 static int
40846 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40847 {
40848     PyObject *tmp;
40849 #if PY_MAJOR_VERSION >= 3
40850     if (unlikely(value == NULL || !PyUnicode_Check(value)))
40851 #else
40852     if (unlikely(value == NULL || !PyString_Check(value)))
40853 #endif
40854     {
40855         PyErr_SetString(PyExc_TypeError,
40856                         "__qualname__ must be set to a string object");
40857         return -1;
40858     }
40859     tmp = op->func_qualname;
40860     Py_INCREF(value);
40861     op->func_qualname = value;
40862     Py_XDECREF(tmp);
40863     return 0;
40864 }
40865 static PyObject *
40866 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
40867 {
40868     PyObject *self;
40869     self = m->func_closure;
40870     if (self == NULL)
40871         self = Py_None;
40872     Py_INCREF(self);
40873     return self;
40874 }
40875 static PyObject *
40876 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40877 {
40878     if (unlikely(op->func_dict == NULL)) {
40879         op->func_dict = PyDict_New();
40880         if (unlikely(op->func_dict == NULL))
40881             return NULL;
40882     }
40883     Py_INCREF(op->func_dict);
40884     return op->func_dict;
40885 }
40886 static int
40887 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
40888 {
40889     PyObject *tmp;
40890     if (unlikely(value == NULL)) {
40891         PyErr_SetString(PyExc_TypeError,
40892                "function's dictionary may not be deleted");
40893         return -1;
40894     }
40895     if (unlikely(!PyDict_Check(value))) {
40896         PyErr_SetString(PyExc_TypeError,
40897                "setting function's dictionary to a non-dict");
40898         return -1;
40899     }
40900     tmp = op->func_dict;
40901     Py_INCREF(value);
40902     op->func_dict = value;
40903     Py_XDECREF(tmp);
40904     return 0;
40905 }
40906 static PyObject *
40907 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40908 {
40909     Py_INCREF(op->func_globals);
40910     return op->func_globals;
40911 }
40912 static PyObject *
40913 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40914 {
40915     Py_INCREF(Py_None);
40916     return Py_None;
40917 }
40918 static PyObject *
40919 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
40920 {
40921     PyObject* result = (op->func_code) ? op->func_code : Py_None;
40922     Py_INCREF(result);
40923     return result;
40924 }
40925 static int
40926 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
40927     int result = 0;
40928     PyObject *res = op->defaults_getter((PyObject *) op);
40929     if (unlikely(!res))
40930         return -1;
40931     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40932     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
40933     Py_INCREF(op->defaults_tuple);
40934     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
40935     Py_INCREF(op->defaults_kwdict);
40936     #else
40937     op->defaults_tuple = PySequence_ITEM(res, 0);
40938     if (unlikely(!op->defaults_tuple)) result = -1;
40939     else {
40940         op->defaults_kwdict = PySequence_ITEM(res, 1);
40941         if (unlikely(!op->defaults_kwdict)) result = -1;
40942     }
40943     #endif
40944     Py_DECREF(res);
40945     return result;
40946 }
40947 static int
40948 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
40949     PyObject* tmp;
40950     if (!value) {
40951         value = Py_None;
40952     } else if (value != Py_None && !PyTuple_Check(value)) {
40953         PyErr_SetString(PyExc_TypeError,
40954                         "__defaults__ must be set to a tuple object");
40955         return -1;
40956     }
40957     Py_INCREF(value);
40958     tmp = op->defaults_tuple;
40959     op->defaults_tuple = value;
40960     Py_XDECREF(tmp);
40961     return 0;
40962 }
40963 static PyObject *
40964 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
40965     PyObject* result = op->defaults_tuple;
40966     if (unlikely(!result)) {
40967         if (op->defaults_getter) {
40968             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
40969             result = op->defaults_tuple;
40970         } else {
40971             result = Py_None;
40972         }
40973     }
40974     Py_INCREF(result);
40975     return result;
40976 }
40977 static int
40978 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
40979     PyObject* tmp;
40980     if (!value) {
40981         value = Py_None;
40982     } else if (value != Py_None && !PyDict_Check(value)) {
40983         PyErr_SetString(PyExc_TypeError,
40984                         "__kwdefaults__ must be set to a dict object");
40985         return -1;
40986     }
40987     Py_INCREF(value);
40988     tmp = op->defaults_kwdict;
40989     op->defaults_kwdict = value;
40990     Py_XDECREF(tmp);
40991     return 0;
40992 }
40993 static PyObject *
40994 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
40995     PyObject* result = op->defaults_kwdict;
40996     if (unlikely(!result)) {
40997         if (op->defaults_getter) {
40998             if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
40999             result = op->defaults_kwdict;
41000         } else {
41001             result = Py_None;
41002         }
41003     }
41004     Py_INCREF(result);
41005     return result;
41006 }
41007 static int
41008 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
41009     PyObject* tmp;
41010     if (!value || value == Py_None) {
41011         value = NULL;
41012     } else if (!PyDict_Check(value)) {
41013         PyErr_SetString(PyExc_TypeError,
41014                         "__annotations__ must be set to a dict object");
41015         return -1;
41016     }
41017     Py_XINCREF(value);
41018     tmp = op->func_annotations;
41019     op->func_annotations = value;
41020     Py_XDECREF(tmp);
41021     return 0;
41022 }
41023 static PyObject *
41024 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
41025     PyObject* result = op->func_annotations;
41026     if (unlikely(!result)) {
41027         result = PyDict_New();
41028         if (unlikely(!result)) return NULL;
41029         op->func_annotations = result;
41030     }
41031     Py_INCREF(result);
41032     return result;
41033 }
41034 static PyGetSetDef __pyx_CyFunction_getsets[] = {
41035     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
41036     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
41037     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
41038     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
41039     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
41040     {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
41041     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
41042     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
41043     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
41044     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
41045     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
41046     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
41047     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
41048     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
41049     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
41050     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
41051     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
41052     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
41053     {0, 0, 0, 0, 0}
41054 };
41055 static PyMemberDef __pyx_CyFunction_members[] = {
41056     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
41057     {0, 0, 0,  0, 0}
41058 };
41059 static PyObject *
41060 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
41061 {
41062 #if PY_MAJOR_VERSION >= 3
41063     return PyUnicode_FromString(m->func.m_ml->ml_name);
41064 #else
41065     return PyString_FromString(m->func.m_ml->ml_name);
41066 #endif
41067 }
41068 static PyMethodDef __pyx_CyFunction_methods[] = {
41069     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
41070     {0, 0, 0, 0}
41071 };
41072 #if PY_VERSION_HEX < 0x030500A0
41073 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
41074 #else
41075 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
41076 #endif
41077 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
41078                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
41079     if (unlikely(op == NULL))
41080         return NULL;
41081     op->flags = flags;
41082     __Pyx_CyFunction_weakreflist(op) = NULL;
41083     op->func.m_ml = ml;
41084     op->func.m_self = (PyObject *) op;
41085     Py_XINCREF(closure);
41086     op->func_closure = closure;
41087     Py_XINCREF(module);
41088     op->func.m_module = module;
41089     op->func_dict = NULL;
41090     op->func_name = NULL;
41091     Py_INCREF(qualname);
41092     op->func_qualname = qualname;
41093     op->func_doc = NULL;
41094     op->func_classobj = NULL;
41095     op->func_globals = globals;
41096     Py_INCREF(op->func_globals);
41097     Py_XINCREF(code);
41098     op->func_code = code;
41099     op->defaults_pyobjects = 0;
41100     op->defaults_size = 0;
41101     op->defaults = NULL;
41102     op->defaults_tuple = NULL;
41103     op->defaults_kwdict = NULL;
41104     op->defaults_getter = NULL;
41105     op->func_annotations = NULL;
41106     return (PyObject *) op;
41107 }
41108 static int
41109 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
41110 {
41111     Py_CLEAR(m->func_closure);
41112     Py_CLEAR(m->func.m_module);
41113     Py_CLEAR(m->func_dict);
41114     Py_CLEAR(m->func_name);
41115     Py_CLEAR(m->func_qualname);
41116     Py_CLEAR(m->func_doc);
41117     Py_CLEAR(m->func_globals);
41118     Py_CLEAR(m->func_code);
41119     Py_CLEAR(m->func_classobj);
41120     Py_CLEAR(m->defaults_tuple);
41121     Py_CLEAR(m->defaults_kwdict);
41122     Py_CLEAR(m->func_annotations);
41123     if (m->defaults) {
41124         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
41125         int i;
41126         for (i = 0; i < m->defaults_pyobjects; i++)
41127             Py_XDECREF(pydefaults[i]);
41128         PyObject_Free(m->defaults);
41129         m->defaults = NULL;
41130     }
41131     return 0;
41132 }
41133 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
41134 {
41135     if (__Pyx_CyFunction_weakreflist(m) != NULL)
41136         PyObject_ClearWeakRefs((PyObject *) m);
41137     __Pyx_CyFunction_clear(m);
41138     PyObject_GC_Del(m);
41139 }
41140 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
41141 {
41142     PyObject_GC_UnTrack(m);
41143     __Pyx__CyFunction_dealloc(m);
41144 }
41145 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
41146 {
41147     Py_VISIT(m->func_closure);
41148     Py_VISIT(m->func.m_module);
41149     Py_VISIT(m->func_dict);
41150     Py_VISIT(m->func_name);
41151     Py_VISIT(m->func_qualname);
41152     Py_VISIT(m->func_doc);
41153     Py_VISIT(m->func_globals);
41154     Py_VISIT(m->func_code);
41155     Py_VISIT(m->func_classobj);
41156     Py_VISIT(m->defaults_tuple);
41157     Py_VISIT(m->defaults_kwdict);
41158     if (m->defaults) {
41159         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
41160         int i;
41161         for (i = 0; i < m->defaults_pyobjects; i++)
41162             Py_VISIT(pydefaults[i]);
41163     }
41164     return 0;
41165 }
41166 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
41167 {
41168     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41169     if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
41170         Py_INCREF(func);
41171         return func;
41172     }
41173     if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
41174         if (type == NULL)
41175             type = (PyObject *)(Py_TYPE(obj));
41176         return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
41177     }
41178     if (obj == Py_None)
41179         obj = NULL;
41180     return __Pyx_PyMethod_New(func, obj, type);
41181 }
41182 static PyObject*
41183 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
41184 {
41185 #if PY_MAJOR_VERSION >= 3
41186     return PyUnicode_FromFormat("<cyfunction %U at %p>",
41187                                 op->func_qualname, (void *)op);
41188 #else
41189     return PyString_FromFormat("<cyfunction %s at %p>",
41190                                PyString_AsString(op->func_qualname), (void *)op);
41191 #endif
41192 }
41193 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
41194     PyCFunctionObject* f = (PyCFunctionObject*)func;
41195     PyCFunction meth = f->m_ml->ml_meth;
41196     Py_ssize_t size;
41197     switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
41198     case METH_VARARGS:
41199         if (likely(kw == NULL || PyDict_Size(kw) == 0))
41200             return (*meth)(self, arg);
41201         break;
41202     case METH_VARARGS | METH_KEYWORDS:
41203         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
41204     case METH_NOARGS:
41205         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
41206             size = PyTuple_GET_SIZE(arg);
41207             if (likely(size == 0))
41208                 return (*meth)(self, NULL);
41209             PyErr_Format(PyExc_TypeError,
41210                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
41211                 f->m_ml->ml_name, size);
41212             return NULL;
41213         }
41214         break;
41215     case METH_O:
41216         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
41217             size = PyTuple_GET_SIZE(arg);
41218             if (likely(size == 1)) {
41219                 PyObject *result, *arg0;
41220                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41221                 arg0 = PyTuple_GET_ITEM(arg, 0);
41222                 #else
41223                 arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
41224                 #endif
41225                 result = (*meth)(self, arg0);
41226                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
41227                 Py_DECREF(arg0);
41228                 #endif
41229                 return result;
41230             }
41231             PyErr_Format(PyExc_TypeError,
41232                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
41233                 f->m_ml->ml_name, size);
41234             return NULL;
41235         }
41236         break;
41237     default:
41238         PyErr_SetString(PyExc_SystemError, "Bad call flags in "
41239                         "__Pyx_CyFunction_Call. METH_OLDARGS is no "
41240                         "longer supported!");
41241         return NULL;
41242     }
41243     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
41244                  f->m_ml->ml_name);
41245     return NULL;
41246 }
41247 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
41248     return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
41249 }
41250 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
41251     PyObject *result;
41252     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
41253     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
41254         Py_ssize_t argc;
41255         PyObject *new_args;
41256         PyObject *self;
41257         argc = PyTuple_GET_SIZE(args);
41258         new_args = PyTuple_GetSlice(args, 1, argc);
41259         if (unlikely(!new_args))
41260             return NULL;
41261         self = PyTuple_GetItem(args, 0);
41262         if (unlikely(!self)) {
41263             Py_DECREF(new_args);
41264             return NULL;
41265         }
41266         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
41267         Py_DECREF(new_args);
41268     } else {
41269         result = __Pyx_CyFunction_Call(func, args, kw);
41270     }
41271     return result;
41272 }
41273 static PyTypeObject __pyx_CyFunctionType_type = {
41274     PyVarObject_HEAD_INIT(0, 0)
41275     "cython_function_or_method",
41276     sizeof(__pyx_CyFunctionObject),
41277     0,
41278     (destructor) __Pyx_CyFunction_dealloc,
41279     0,
41280     0,
41281     0,
41282 #if PY_MAJOR_VERSION < 3
41283     0,
41284 #else
41285     0,
41286 #endif
41287     (reprfunc) __Pyx_CyFunction_repr,
41288     0,
41289     0,
41290     0,
41291     0,
41292     __Pyx_CyFunction_CallAsMethod,
41293     0,
41294     0,
41295     0,
41296     0,
41297     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
41298     0,
41299     (traverseproc) __Pyx_CyFunction_traverse,
41300     (inquiry) __Pyx_CyFunction_clear,
41301     0,
41302 #if PY_VERSION_HEX < 0x030500A0
41303     offsetof(__pyx_CyFunctionObject, func_weakreflist),
41304 #else
41305     offsetof(PyCFunctionObject, m_weakreflist),
41306 #endif
41307     0,
41308     0,
41309     __pyx_CyFunction_methods,
41310     __pyx_CyFunction_members,
41311     __pyx_CyFunction_getsets,
41312     0,
41313     0,
41314     __Pyx_CyFunction_descr_get,
41315     0,
41316     offsetof(__pyx_CyFunctionObject, func_dict),
41317     0,
41318     0,
41319     0,
41320     0,
41321     0,
41322     0,
41323     0,
41324     0,
41325     0,
41326     0,
41327     0,
41328     0,
41329 #if PY_VERSION_HEX >= 0x030400a1
41330     0,
41331 #endif
41332 #if PY_VERSION_HEX >= 0x030800b1
41333     0,
41334 #endif
41335 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
41336     0,
41337 #endif
41338 };
41339 static int __pyx_CyFunction_init(void) {
41340     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
41341     if (unlikely(__pyx_CyFunctionType == NULL)) {
41342         return -1;
41343     }
41344     return 0;
41345 }
41346 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
41347     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41348     m->defaults = PyObject_Malloc(size);
41349     if (unlikely(!m->defaults))
41350         return PyErr_NoMemory();
41351     memset(m->defaults, 0, size);
41352     m->defaults_pyobjects = pyobjects;
41353     m->defaults_size = size;
41354     return m->defaults;
41355 }
41356 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
41357     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41358     m->defaults_tuple = tuple;
41359     Py_INCREF(tuple);
41360 }
41361 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
41362     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41363     m->defaults_kwdict = dict;
41364     Py_INCREF(dict);
41365 }
41366 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
41367     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
41368     m->func_annotations = dict;
41369     Py_INCREF(dict);
41370 }
41371
41372 /* CythonFunction */
41373 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
41374                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
41375     PyObject *op = __Pyx_CyFunction_Init(
41376         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
41377         ml, flags, qualname, closure, module, globals, code
41378     );
41379     if (likely(op)) {
41380         PyObject_GC_Track(op);
41381     }
41382     return op;
41383 }
41384
41385 /* RegisterModuleCleanup */
41386 #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
41387 static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) {
41388     __pyx_module_cleanup(module);
41389     Py_INCREF(Py_None); return Py_None;
41390 }
41391 static int __Pyx_RegisterCleanup(void) {
41392     static PyMethodDef cleanup_def = {
41393         "__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0};
41394     PyObject *cleanup_func = 0;
41395     PyObject *atexit = 0;
41396     PyObject *reg = 0;
41397     PyObject *args = 0;
41398     PyObject *res = 0;
41399     int ret = -1;
41400     cleanup_func = PyCFunction_New(&cleanup_def, 0);
41401     if (!cleanup_func)
41402         goto bad;
41403     atexit = PyImport_ImportModule("atexit");
41404     if (!atexit)
41405         goto bad;
41406     reg = PyObject_GetAttrString(atexit, "_exithandlers");
41407     if (reg && PyList_Check(reg)) {
41408         PyObject *a, *kw;
41409         a = PyTuple_New(0);
41410         kw = PyDict_New();
41411         if (!a || !kw) {
41412             Py_XDECREF(a);
41413             Py_XDECREF(kw);
41414             goto bad;
41415         }
41416         args = PyTuple_Pack(3, cleanup_func, a, kw);
41417         Py_DECREF(a);
41418         Py_DECREF(kw);
41419         if (!args)
41420             goto bad;
41421         ret = PyList_Insert(reg, 0, args);
41422     } else {
41423         if (!reg)
41424             PyErr_Clear();
41425         Py_XDECREF(reg);
41426         reg = PyObject_GetAttrString(atexit, "register");
41427         if (!reg)
41428             goto bad;
41429         args = PyTuple_Pack(1, cleanup_func);
41430         if (!args)
41431             goto bad;
41432         res = PyObject_CallObject(reg, args);
41433         if (!res)
41434             goto bad;
41435         ret = 0;
41436     }
41437 bad:
41438     Py_XDECREF(cleanup_func);
41439     Py_XDECREF(atexit);
41440     Py_XDECREF(reg);
41441     Py_XDECREF(args);
41442     Py_XDECREF(res);
41443     return ret;
41444 }
41445 #endif
41446
41447 /* CLineInTraceback */
41448 #ifndef CYTHON_CLINE_IN_TRACEBACK
41449 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
41450     PyObject *use_cline;
41451     PyObject *ptype, *pvalue, *ptraceback;
41452 #if CYTHON_COMPILING_IN_CPYTHON
41453     PyObject **cython_runtime_dict;
41454 #endif
41455     if (unlikely(!__pyx_cython_runtime)) {
41456         return c_line;
41457     }
41458     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
41459 #if CYTHON_COMPILING_IN_CPYTHON
41460     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
41461     if (likely(cython_runtime_dict)) {
41462         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
41463             use_cline, *cython_runtime_dict,
41464             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
41465     } else
41466 #endif
41467     {
41468       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
41469       if (use_cline_obj) {
41470         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
41471         Py_DECREF(use_cline_obj);
41472       } else {
41473         PyErr_Clear();
41474         use_cline = NULL;
41475       }
41476     }
41477     if (!use_cline) {
41478         c_line = 0;
41479         PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
41480     }
41481     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
41482         c_line = 0;
41483     }
41484     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
41485     return c_line;
41486 }
41487 #endif
41488
41489 /* CodeObjectCache */
41490 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
41491     int start = 0, mid = 0, end = count - 1;
41492     if (end >= 0 && code_line > entries[end].code_line) {
41493         return count;
41494     }
41495     while (start < end) {
41496         mid = start + (end - start) / 2;
41497         if (code_line < entries[mid].code_line) {
41498             end = mid;
41499         } else if (code_line > entries[mid].code_line) {
41500              start = mid + 1;
41501         } else {
41502             return mid;
41503         }
41504     }
41505     if (code_line <= entries[mid].code_line) {
41506         return mid;
41507     } else {
41508         return mid + 1;
41509     }
41510 }
41511 static PyCodeObject *__pyx_find_code_object(int code_line) {
41512     PyCodeObject* code_object;
41513     int pos;
41514     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
41515         return NULL;
41516     }
41517     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
41518     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
41519         return NULL;
41520     }
41521     code_object = __pyx_code_cache.entries[pos].code_object;
41522     Py_INCREF(code_object);
41523     return code_object;
41524 }
41525 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
41526     int pos, i;
41527     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
41528     if (unlikely(!code_line)) {
41529         return;
41530     }
41531     if (unlikely(!entries)) {
41532         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
41533         if (likely(entries)) {
41534             __pyx_code_cache.entries = entries;
41535             __pyx_code_cache.max_count = 64;
41536             __pyx_code_cache.count = 1;
41537             entries[0].code_line = code_line;
41538             entries[0].code_object = code_object;
41539             Py_INCREF(code_object);
41540         }
41541         return;
41542     }
41543     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
41544     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
41545         PyCodeObject* tmp = entries[pos].code_object;
41546         entries[pos].code_object = code_object;
41547         Py_DECREF(tmp);
41548         return;
41549     }
41550     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
41551         int new_max = __pyx_code_cache.max_count + 64;
41552         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
41553             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
41554         if (unlikely(!entries)) {
41555             return;
41556         }
41557         __pyx_code_cache.entries = entries;
41558         __pyx_code_cache.max_count = new_max;
41559     }
41560     for (i=__pyx_code_cache.count; i>pos; i--) {
41561         entries[i] = entries[i-1];
41562     }
41563     entries[pos].code_line = code_line;
41564     entries[pos].code_object = code_object;
41565     __pyx_code_cache.count++;
41566     Py_INCREF(code_object);
41567 }
41568
41569 /* AddTraceback */
41570 #include "compile.h"
41571 #include "frameobject.h"
41572 #include "traceback.h"
41573 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
41574             const char *funcname, int c_line,
41575             int py_line, const char *filename) {
41576     PyCodeObject *py_code = 0;
41577     PyObject *py_srcfile = 0;
41578     PyObject *py_funcname = 0;
41579     #if PY_MAJOR_VERSION < 3
41580     py_srcfile = PyString_FromString(filename);
41581     #else
41582     py_srcfile = PyUnicode_FromString(filename);
41583     #endif
41584     if (!py_srcfile) goto bad;
41585     if (c_line) {
41586         #if PY_MAJOR_VERSION < 3
41587         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
41588         #else
41589         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
41590         #endif
41591     }
41592     else {
41593         #if PY_MAJOR_VERSION < 3
41594         py_funcname = PyString_FromString(funcname);
41595         #else
41596         py_funcname = PyUnicode_FromString(funcname);
41597         #endif
41598     }
41599     if (!py_funcname) goto bad;
41600     py_code = __Pyx_PyCode_New(
41601         0,
41602         0,
41603         0,
41604         0,
41605         0,
41606         __pyx_empty_bytes, /*PyObject *code,*/
41607         __pyx_empty_tuple, /*PyObject *consts,*/
41608         __pyx_empty_tuple, /*PyObject *names,*/
41609         __pyx_empty_tuple, /*PyObject *varnames,*/
41610         __pyx_empty_tuple, /*PyObject *freevars,*/
41611         __pyx_empty_tuple, /*PyObject *cellvars,*/
41612         py_srcfile,   /*PyObject *filename,*/
41613         py_funcname,  /*PyObject *name,*/
41614         py_line,
41615         __pyx_empty_bytes  /*PyObject *lnotab*/
41616     );
41617     Py_DECREF(py_srcfile);
41618     Py_DECREF(py_funcname);
41619     return py_code;
41620 bad:
41621     Py_XDECREF(py_srcfile);
41622     Py_XDECREF(py_funcname);
41623     return NULL;
41624 }
41625 static void __Pyx_AddTraceback(const char *funcname, int c_line,
41626                                int py_line, const char *filename) {
41627     PyCodeObject *py_code = 0;
41628     PyFrameObject *py_frame = 0;
41629     PyThreadState *tstate = __Pyx_PyThreadState_Current;
41630     if (c_line) {
41631         c_line = __Pyx_CLineForTraceback(tstate, c_line);
41632     }
41633     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
41634     if (!py_code) {
41635         py_code = __Pyx_CreateCodeObjectForTraceback(
41636             funcname, c_line, py_line, filename);
41637         if (!py_code) goto bad;
41638         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
41639     }
41640     py_frame = PyFrame_New(
41641         tstate,            /*PyThreadState *tstate,*/
41642         py_code,           /*PyCodeObject *code,*/
41643         __pyx_d,    /*PyObject *globals,*/
41644         0                  /*PyObject *locals*/
41645     );
41646     if (!py_frame) goto bad;
41647     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
41648     PyTraceBack_Here(py_frame);
41649 bad:
41650     Py_XDECREF(py_code);
41651     Py_XDECREF(py_frame);
41652 }
41653
41654 /* CIntFromPyVerify */
41655 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
41656     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
41657 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
41658     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
41659 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
41660     {\
41661         func_type value = func_value;\
41662         if (sizeof(target_type) < sizeof(func_type)) {\
41663             if (unlikely(value != (func_type) (target_type) value)) {\
41664                 func_type zero = 0;\
41665                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
41666                     return (target_type) -1;\
41667                 if (is_unsigned && unlikely(value < zero))\
41668                     goto raise_neg_overflow;\
41669                 else\
41670                     goto raise_overflow;\
41671             }\
41672         }\
41673         return (target_type) value;\
41674     }
41675
41676 /* CIntToPy */
41677 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
41678     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
41679     const int is_unsigned = neg_one > const_zero;
41680     if (is_unsigned) {
41681         if (sizeof(long) < sizeof(long)) {
41682             return PyInt_FromLong((long) value);
41683         } else if (sizeof(long) <= sizeof(unsigned long)) {
41684             return PyLong_FromUnsignedLong((unsigned long) value);
41685 #ifdef HAVE_LONG_LONG
41686         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
41687             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41688 #endif
41689         }
41690     } else {
41691         if (sizeof(long) <= sizeof(long)) {
41692             return PyInt_FromLong((long) value);
41693 #ifdef HAVE_LONG_LONG
41694         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
41695             return PyLong_FromLongLong((PY_LONG_LONG) value);
41696 #endif
41697         }
41698     }
41699     {
41700         int one = 1; int little = (int)*(unsigned char *)&one;
41701         unsigned char *bytes = (unsigned char *)&value;
41702         return _PyLong_FromByteArray(bytes, sizeof(long),
41703                                      little, !is_unsigned);
41704     }
41705 }
41706
41707 /* CIntToPy */
41708 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
41709     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
41710     const int is_unsigned = neg_one > const_zero;
41711     if (is_unsigned) {
41712         if (sizeof(int) < sizeof(long)) {
41713             return PyInt_FromLong((long) value);
41714         } else if (sizeof(int) <= sizeof(unsigned long)) {
41715             return PyLong_FromUnsignedLong((unsigned long) value);
41716 #ifdef HAVE_LONG_LONG
41717         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
41718             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
41719 #endif
41720         }
41721     } else {
41722         if (sizeof(int) <= sizeof(long)) {
41723             return PyInt_FromLong((long) value);
41724 #ifdef HAVE_LONG_LONG
41725         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
41726             return PyLong_FromLongLong((PY_LONG_LONG) value);
41727 #endif
41728         }
41729     }
41730     {
41731         int one = 1; int little = (int)*(unsigned char *)&one;
41732         unsigned char *bytes = (unsigned char *)&value;
41733         return _PyLong_FromByteArray(bytes, sizeof(int),
41734                                      little, !is_unsigned);
41735     }
41736 }
41737
41738 /* CIntFromPy */
41739 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
41740     const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
41741     const int is_unsigned = neg_one > const_zero;
41742 #if PY_MAJOR_VERSION < 3
41743     if (likely(PyInt_Check(x))) {
41744         if (sizeof(int) < sizeof(long)) {
41745             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
41746         } else {
41747             long val = PyInt_AS_LONG(x);
41748             if (is_unsigned && unlikely(val < 0)) {
41749                 goto raise_neg_overflow;
41750             }
41751             return (int) val;
41752         }
41753     } else
41754 #endif
41755     if (likely(PyLong_Check(x))) {
41756         if (is_unsigned) {
41757 #if CYTHON_USE_PYLONG_INTERNALS
41758             const digit* digits = ((PyLongObject*)x)->ob_digit;
41759             switch (Py_SIZE(x)) {
41760                 case  0: return (int) 0;
41761                 case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
41762                 case 2:
41763                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
41764                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41765                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41766                         } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
41767                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41768                         }
41769                     }
41770                     break;
41771                 case 3:
41772                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
41773                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41774                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41775                         } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
41776                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41777                         }
41778                     }
41779                     break;
41780                 case 4:
41781                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
41782                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41783                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41784                         } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
41785                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
41786                         }
41787                     }
41788                     break;
41789             }
41790 #endif
41791 #if CYTHON_COMPILING_IN_CPYTHON
41792             if (unlikely(Py_SIZE(x) < 0)) {
41793                 goto raise_neg_overflow;
41794             }
41795 #else
41796             {
41797                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41798                 if (unlikely(result < 0))
41799                     return (int) -1;
41800                 if (unlikely(result == 1))
41801                     goto raise_neg_overflow;
41802             }
41803 #endif
41804             if (sizeof(int) <= sizeof(unsigned long)) {
41805                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
41806 #ifdef HAVE_LONG_LONG
41807             } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
41808                 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41809 #endif
41810             }
41811         } else {
41812 #if CYTHON_USE_PYLONG_INTERNALS
41813             const digit* digits = ((PyLongObject*)x)->ob_digit;
41814             switch (Py_SIZE(x)) {
41815                 case  0: return (int) 0;
41816                 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
41817                 case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
41818                 case -2:
41819                     if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
41820                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41821                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41822                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41823                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41824                         }
41825                     }
41826                     break;
41827                 case 2:
41828                     if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
41829                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41830                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41831                         } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41832                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41833                         }
41834                     }
41835                     break;
41836                 case -3:
41837                     if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
41838                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41839                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41840                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41841                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41842                         }
41843                     }
41844                     break;
41845                 case 3:
41846                     if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
41847                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41848                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41849                         } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41850                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41851                         }
41852                     }
41853                     break;
41854                 case -4:
41855                     if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
41856                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41857                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41858                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
41859                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41860                         }
41861                     }
41862                     break;
41863                 case 4:
41864                     if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
41865                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41866                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41867                         } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
41868                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
41869                         }
41870                     }
41871                     break;
41872             }
41873 #endif
41874             if (sizeof(int) <= sizeof(long)) {
41875                 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
41876 #ifdef HAVE_LONG_LONG
41877             } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
41878                 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
41879 #endif
41880             }
41881         }
41882         {
41883 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
41884             PyErr_SetString(PyExc_RuntimeError,
41885                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
41886 #else
41887             int val;
41888             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
41889  #if PY_MAJOR_VERSION < 3
41890             if (likely(v) && !PyLong_Check(v)) {
41891                 PyObject *tmp = v;
41892                 v = PyNumber_Long(tmp);
41893                 Py_DECREF(tmp);
41894             }
41895  #endif
41896             if (likely(v)) {
41897                 int one = 1; int is_little = (int)*(unsigned char *)&one;
41898                 unsigned char *bytes = (unsigned char *)&val;
41899                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
41900                                               bytes, sizeof(val),
41901                                               is_little, !is_unsigned);
41902                 Py_DECREF(v);
41903                 if (likely(!ret))
41904                     return val;
41905             }
41906 #endif
41907             return (int) -1;
41908         }
41909     } else {
41910         int val;
41911         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
41912         if (!tmp) return (int) -1;
41913         val = __Pyx_PyInt_As_int(tmp);
41914         Py_DECREF(tmp);
41915         return val;
41916     }
41917 raise_overflow:
41918     PyErr_SetString(PyExc_OverflowError,
41919         "value too large to convert to int");
41920     return (int) -1;
41921 raise_neg_overflow:
41922     PyErr_SetString(PyExc_OverflowError,
41923         "can't convert negative value to int");
41924     return (int) -1;
41925 }
41926
41927 /* CIntFromPy */
41928 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
41929     const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
41930     const int is_unsigned = neg_one > const_zero;
41931 #if PY_MAJOR_VERSION < 3
41932     if (likely(PyInt_Check(x))) {
41933         if (sizeof(long) < sizeof(long)) {
41934             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
41935         } else {
41936             long val = PyInt_AS_LONG(x);
41937             if (is_unsigned && unlikely(val < 0)) {
41938                 goto raise_neg_overflow;
41939             }
41940             return (long) val;
41941         }
41942     } else
41943 #endif
41944     if (likely(PyLong_Check(x))) {
41945         if (is_unsigned) {
41946 #if CYTHON_USE_PYLONG_INTERNALS
41947             const digit* digits = ((PyLongObject*)x)->ob_digit;
41948             switch (Py_SIZE(x)) {
41949                 case  0: return (long) 0;
41950                 case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
41951                 case 2:
41952                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
41953                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
41954                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41955                         } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
41956                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41957                         }
41958                     }
41959                     break;
41960                 case 3:
41961                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
41962                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
41963                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41964                         } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
41965                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41966                         }
41967                     }
41968                     break;
41969                 case 4:
41970                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
41971                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
41972                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
41973                         } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
41974                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
41975                         }
41976                     }
41977                     break;
41978             }
41979 #endif
41980 #if CYTHON_COMPILING_IN_CPYTHON
41981             if (unlikely(Py_SIZE(x) < 0)) {
41982                 goto raise_neg_overflow;
41983             }
41984 #else
41985             {
41986                 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
41987                 if (unlikely(result < 0))
41988                     return (long) -1;
41989                 if (unlikely(result == 1))
41990                     goto raise_neg_overflow;
41991             }
41992 #endif
41993             if (sizeof(long) <= sizeof(unsigned long)) {
41994                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
41995 #ifdef HAVE_LONG_LONG
41996             } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
41997                 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
41998 #endif
41999             }
42000         } else {
42001 #if CYTHON_USE_PYLONG_INTERNALS
42002             const digit* digits = ((PyLongObject*)x)->ob_digit;
42003             switch (Py_SIZE(x)) {
42004                 case  0: return (long) 0;
42005                 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
42006                 case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
42007                 case -2:
42008                     if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
42009                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
42010                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42011                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42012                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42013                         }
42014                     }
42015                     break;
42016                 case 2:
42017                     if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
42018                         if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
42019                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42020                         } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42021                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42022                         }
42023                     }
42024                     break;
42025                 case -3:
42026                     if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
42027                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
42028                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42029                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42030                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42031                         }
42032                     }
42033                     break;
42034                 case 3:
42035                     if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
42036                         if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
42037                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42038                         } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42039                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42040                         }
42041                     }
42042                     break;
42043                 case -4:
42044                     if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
42045                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
42046                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42047                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
42048                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42049                         }
42050                     }
42051                     break;
42052                 case 4:
42053                     if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
42054                         if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
42055                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
42056                         } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
42057                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
42058                         }
42059                     }
42060                     break;
42061             }
42062 #endif
42063             if (sizeof(long) <= sizeof(long)) {
42064                 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
42065 #ifdef HAVE_LONG_LONG
42066             } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
42067                 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
42068 #endif
42069             }
42070         }
42071         {
42072 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
42073             PyErr_SetString(PyExc_RuntimeError,
42074                             "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
42075 #else
42076             long val;
42077             PyObject *v = __Pyx_PyNumber_IntOrLong(x);
42078  #if PY_MAJOR_VERSION < 3
42079             if (likely(v) && !PyLong_Check(v)) {
42080                 PyObject *tmp = v;
42081                 v = PyNumber_Long(tmp);
42082                 Py_DECREF(tmp);
42083             }
42084  #endif
42085             if (likely(v)) {
42086                 int one = 1; int is_little = (int)*(unsigned char *)&one;
42087                 unsigned char *bytes = (unsigned char *)&val;
42088                 int ret = _PyLong_AsByteArray((PyLongObject *)v,
42089                                               bytes, sizeof(val),
42090                                               is_little, !is_unsigned);
42091                 Py_DECREF(v);
42092                 if (likely(!ret))
42093                     return val;
42094             }
42095 #endif
42096             return (long) -1;
42097         }
42098     } else {
42099         long val;
42100         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
42101         if (!tmp) return (long) -1;
42102         val = __Pyx_PyInt_As_long(tmp);
42103         Py_DECREF(tmp);
42104         return val;
42105     }
42106 raise_overflow:
42107     PyErr_SetString(PyExc_OverflowError,
42108         "value too large to convert to long");
42109     return (long) -1;
42110 raise_neg_overflow:
42111     PyErr_SetString(PyExc_OverflowError,
42112         "can't convert negative value to long");
42113     return (long) -1;
42114 }
42115
42116 /* FastTypeChecks */
42117 #if CYTHON_COMPILING_IN_CPYTHON
42118 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
42119     while (a) {
42120         a = a->tp_base;
42121         if (a == b)
42122             return 1;
42123     }
42124     return b == &PyBaseObject_Type;
42125 }
42126 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
42127     PyObject *mro;
42128     if (a == b) return 1;
42129     mro = a->tp_mro;
42130     if (likely(mro)) {
42131         Py_ssize_t i, n;
42132         n = PyTuple_GET_SIZE(mro);
42133         for (i = 0; i < n; i++) {
42134             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
42135                 return 1;
42136         }
42137         return 0;
42138     }
42139     return __Pyx_InBases(a, b);
42140 }
42141 #if PY_MAJOR_VERSION == 2
42142 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
42143     PyObject *exception, *value, *tb;
42144     int res;
42145     __Pyx_PyThreadState_declare
42146     __Pyx_PyThreadState_assign
42147     __Pyx_ErrFetch(&exception, &value, &tb);
42148     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
42149     if (unlikely(res == -1)) {
42150         PyErr_WriteUnraisable(err);
42151         res = 0;
42152     }
42153     if (!res) {
42154         res = PyObject_IsSubclass(err, exc_type2);
42155         if (unlikely(res == -1)) {
42156             PyErr_WriteUnraisable(err);
42157             res = 0;
42158         }
42159     }
42160     __Pyx_ErrRestore(exception, value, tb);
42161     return res;
42162 }
42163 #else
42164 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
42165     int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
42166     if (!res) {
42167         res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
42168     }
42169     return res;
42170 }
42171 #endif
42172 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
42173     Py_ssize_t i, n;
42174     assert(PyExceptionClass_Check(exc_type));
42175     n = PyTuple_GET_SIZE(tuple);
42176 #if PY_MAJOR_VERSION >= 3
42177     for (i=0; i<n; i++) {
42178         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
42179     }
42180 #endif
42181     for (i=0; i<n; i++) {
42182         PyObject *t = PyTuple_GET_ITEM(tuple, i);
42183         #if PY_MAJOR_VERSION < 3
42184         if (likely(exc_type == t)) return 1;
42185         #endif
42186         if (likely(PyExceptionClass_Check(t))) {
42187             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
42188         } else {
42189         }
42190     }
42191     return 0;
42192 }
42193 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
42194     if (likely(err == exc_type)) return 1;
42195     if (likely(PyExceptionClass_Check(err))) {
42196         if (likely(PyExceptionClass_Check(exc_type))) {
42197             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
42198         } else if (likely(PyTuple_Check(exc_type))) {
42199             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
42200         } else {
42201         }
42202     }
42203     return PyErr_GivenExceptionMatches(err, exc_type);
42204 }
42205 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
42206     assert(PyExceptionClass_Check(exc_type1));
42207     assert(PyExceptionClass_Check(exc_type2));
42208     if (likely(err == exc_type1 || err == exc_type2)) return 1;
42209     if (likely(PyExceptionClass_Check(err))) {
42210         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
42211     }
42212     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
42213 }
42214 #endif
42215
42216 /* CheckBinaryVersion */
42217 static int __Pyx_check_binary_version(void) {
42218     char ctversion[4], rtversion[4];
42219     PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
42220     PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
42221     if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
42222         char message[200];
42223         PyOS_snprintf(message, sizeof(message),
42224                       "compiletime version %s of module '%.100s' "
42225                       "does not match runtime version %s",
42226                       ctversion, __Pyx_MODULE_NAME, rtversion);
42227         return PyErr_WarnEx(NULL, message, 1);
42228     }
42229     return 0;
42230 }
42231
42232 /* InitStrings */
42233 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
42234     while (t->p) {
42235         #if PY_MAJOR_VERSION < 3
42236         if (t->is_unicode) {
42237             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
42238         } else if (t->intern) {
42239             *t->p = PyString_InternFromString(t->s);
42240         } else {
42241             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
42242         }
42243         #else
42244         if (t->is_unicode | t->is_str) {
42245             if (t->intern) {
42246                 *t->p = PyUnicode_InternFromString(t->s);
42247             } else if (t->encoding) {
42248                 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
42249             } else {
42250                 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
42251             }
42252         } else {
42253             *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
42254         }
42255         #endif
42256         if (!*t->p)
42257             return -1;
42258         if (PyObject_Hash(*t->p) == -1)
42259             return -1;
42260         ++t;
42261     }
42262     return 0;
42263 }
42264
42265 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
42266     return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
42267 }
42268 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
42269     Py_ssize_t ignore;
42270     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
42271 }
42272 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42273 #if !CYTHON_PEP393_ENABLED
42274 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42275     char* defenc_c;
42276     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
42277     if (!defenc) return NULL;
42278     defenc_c = PyBytes_AS_STRING(defenc);
42279 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42280     {
42281         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
42282         char* c;
42283         for (c = defenc_c; c < end; c++) {
42284             if ((unsigned char) (*c) >= 128) {
42285                 PyUnicode_AsASCIIString(o);
42286                 return NULL;
42287             }
42288         }
42289     }
42290 #endif
42291     *length = PyBytes_GET_SIZE(defenc);
42292     return defenc_c;
42293 }
42294 #else
42295 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42296     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
42297 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42298     if (likely(PyUnicode_IS_ASCII(o))) {
42299         *length = PyUnicode_GET_LENGTH(o);
42300         return PyUnicode_AsUTF8(o);
42301     } else {
42302         PyUnicode_AsASCIIString(o);
42303         return NULL;
42304     }
42305 #else
42306     return PyUnicode_AsUTF8AndSize(o, length);
42307 #endif
42308 }
42309 #endif
42310 #endif
42311 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
42312 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
42313     if (
42314 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
42315             __Pyx_sys_getdefaultencoding_not_ascii &&
42316 #endif
42317             PyUnicode_Check(o)) {
42318         return __Pyx_PyUnicode_AsStringAndSize(o, length);
42319     } else
42320 #endif
42321 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
42322     if (PyByteArray_Check(o)) {
42323         *length = PyByteArray_GET_SIZE(o);
42324         return PyByteArray_AS_STRING(o);
42325     } else
42326 #endif
42327     {
42328         char* result;
42329         int r = PyBytes_AsStringAndSize(o, &result, length);
42330         if (unlikely(r < 0)) {
42331             return NULL;
42332         } else {
42333             return result;
42334         }
42335     }
42336 }
42337 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
42338    int is_true = x == Py_True;
42339    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
42340    else return PyObject_IsTrue(x);
42341 }
42342 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
42343     int retval;
42344     if (unlikely(!x)) return -1;
42345     retval = __Pyx_PyObject_IsTrue(x);
42346     Py_DECREF(x);
42347     return retval;
42348 }
42349 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
42350 #if PY_MAJOR_VERSION >= 3
42351     if (PyLong_Check(result)) {
42352         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
42353                 "__int__ returned non-int (type %.200s).  "
42354                 "The ability to return an instance of a strict subclass of int "
42355                 "is deprecated, and may be removed in a future version of Python.",
42356                 Py_TYPE(result)->tp_name)) {
42357             Py_DECREF(result);
42358             return NULL;
42359         }
42360         return result;
42361     }
42362 #endif
42363     PyErr_Format(PyExc_TypeError,
42364                  "__%.4s__ returned non-%.4s (type %.200s)",
42365                  type_name, type_name, Py_TYPE(result)->tp_name);
42366     Py_DECREF(result);
42367     return NULL;
42368 }
42369 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
42370 #if CYTHON_USE_TYPE_SLOTS
42371   PyNumberMethods *m;
42372 #endif
42373   const char *name = NULL;
42374   PyObject *res = NULL;
42375 #if PY_MAJOR_VERSION < 3
42376   if (likely(PyInt_Check(x) || PyLong_Check(x)))
42377 #else
42378   if (likely(PyLong_Check(x)))
42379 #endif
42380     return __Pyx_NewRef(x);
42381 #if CYTHON_USE_TYPE_SLOTS
42382   m = Py_TYPE(x)->tp_as_number;
42383   #if PY_MAJOR_VERSION < 3
42384   if (m && m->nb_int) {
42385     name = "int";
42386     res = m->nb_int(x);
42387   }
42388   else if (m && m->nb_long) {
42389     name = "long";
42390     res = m->nb_long(x);
42391   }
42392   #else
42393   if (likely(m && m->nb_int)) {
42394     name = "int";
42395     res = m->nb_int(x);
42396   }
42397   #endif
42398 #else
42399   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
42400     res = PyNumber_Int(x);
42401   }
42402 #endif
42403   if (likely(res)) {
42404 #if PY_MAJOR_VERSION < 3
42405     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
42406 #else
42407     if (unlikely(!PyLong_CheckExact(res))) {
42408 #endif
42409         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
42410     }
42411   }
42412   else if (!PyErr_Occurred()) {
42413     PyErr_SetString(PyExc_TypeError,
42414                     "an integer is required");
42415   }
42416   return res;
42417 }
42418 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
42419   Py_ssize_t ival;
42420   PyObject *x;
42421 #if PY_MAJOR_VERSION < 3
42422   if (likely(PyInt_CheckExact(b))) {
42423     if (sizeof(Py_ssize_t) >= sizeof(long))
42424         return PyInt_AS_LONG(b);
42425     else
42426         return PyInt_AsSsize_t(b);
42427   }
42428 #endif
42429   if (likely(PyLong_CheckExact(b))) {
42430     #if CYTHON_USE_PYLONG_INTERNALS
42431     const digit* digits = ((PyLongObject*)b)->ob_digit;
42432     const Py_ssize_t size = Py_SIZE(b);
42433     if (likely(__Pyx_sst_abs(size) <= 1)) {
42434         ival = likely(size) ? digits[0] : 0;
42435         if (size == -1) ival = -ival;
42436         return ival;
42437     } else {
42438       switch (size) {
42439          case 2:
42440            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42441              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42442            }
42443            break;
42444          case -2:
42445            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
42446              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42447            }
42448            break;
42449          case 3:
42450            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42451              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42452            }
42453            break;
42454          case -3:
42455            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
42456              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42457            }
42458            break;
42459          case 4:
42460            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42461              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42462            }
42463            break;
42464          case -4:
42465            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
42466              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
42467            }
42468            break;
42469       }
42470     }
42471     #endif
42472     return PyLong_AsSsize_t(b);
42473   }
42474   x = PyNumber_Index(b);
42475   if (!x) return -1;
42476   ival = PyInt_AsSsize_t(x);
42477   Py_DECREF(x);
42478   return ival;
42479 }
42480 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
42481   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
42482 }
42483 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
42484     return PyInt_FromSize_t(ival);
42485 }
42486
42487
42488 #endif /* Py_PYTHON_H */